From d7e5a7e0c71af0444f18b55c2ace5be9b4dc54cc Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 20 Mar 2026 12:22:52 +0800 Subject: [PATCH 01/19] regen openshift --- .../fluent/AgentPoolsClient.java | 937 --- .../ContainerServiceManagementClient.java | 84 - .../fluent/MachinesClient.java | 128 - .../MaintenanceConfigurationsClient.java | 260 - .../fluent/ManagedClustersClient.java | 2230 ------- .../fluent/ManagedNamespacesClient.java | 478 -- .../fluent/OperationsClient.java | 49 - .../PrivateEndpointConnectionsClient.java | 323 - .../fluent/PrivateLinkResourcesClient.java | 80 - .../ResolvePrivateLinkServiceIdsClient.java | 78 - .../fluent/SnapshotsClient.java | 317 - .../TrustedAccessRoleBindingsClient.java | 345 -- .../fluent/TrustedAccessRolesClient.java | 54 - .../fluent/models/AccessProfile.java | 94 - .../AgentPoolAvailableVersionsInner.java | 169 - .../AgentPoolAvailableVersionsProperties.java | 105 - .../fluent/models/AgentPoolInner.java | 1476 ----- .../models/AgentPoolUpgradeProfileInner.java | 237 - .../AgentPoolUpgradeProfileProperties.java | 201 - .../models/CommandResultProperties.java | 165 - .../fluent/models/CredentialResultsInner.java | 88 - .../KubernetesVersionListResultInner.java | 100 - .../fluent/models/MachineInner.java | 149 - .../models/MaintenanceConfigurationInner.java | 226 - .../MaintenanceConfigurationProperties.java | 170 - .../ManagedClusterAccessProfileInner.java | 206 - ...agedClusterAgentPoolProfileProperties.java | 1884 ------ .../fluent/models/ManagedClusterInner.java | 1336 ---- .../models/ManagedClusterProperties.java | 1465 ----- .../ManagedClusterUpgradeProfileInner.java | 193 - ...anagedClusterUpgradeProfileProperties.java | 149 - .../fluent/models/ManagedNamespaceInner.java | 237 - .../models/MeshRevisionProfileInner.java | 166 - .../models/MeshUpgradeProfileInner.java | 166 - .../fluent/models/OperationValueDisplay.java | 129 - .../fluent/models/OperationValueInner.java | 153 - .../OutboundEnvironmentEndpointInner.java | 131 - .../PrivateEndpointConnectionInner.java | 200 - ...vateEndpointConnectionListResultInner.java | 101 - .../PrivateEndpointConnectionProperties.java | 161 - .../models/PrivateLinkResourceInner.java | 225 - .../PrivateLinkResourcesListResultInner.java | 101 - .../fluent/models/RunCommandResultInner.java | 156 - .../fluent/models/SnapshotInner.java | 288 - .../fluent/models/SnapshotProperties.java | 229 - .../models/TrustedAccessRoleBindingInner.java | 222 - .../TrustedAccessRoleBindingProperties.java | 159 - .../fluent/models/TrustedAccessRoleInner.java | 122 - .../implementation/AgentPoolsClientImpl.java | 2187 ------- .../ContainerServiceManagementClientImpl.java | 192 - .../implementation/MachinesClientImpl.java | 449 -- .../MaintenanceConfigurationsClientImpl.java | 757 --- .../ManagedClustersClientImpl.java | 5494 ----------------- .../ManagedNamespacesClientImpl.java | 1274 ---- .../implementation/OperationsClientImpl.java | 167 - .../PrivateEndpointConnectionsClientImpl.java | 768 --- .../PrivateLinkResourcesClientImpl.java | 198 - ...esolvePrivateLinkServiceIdsClientImpl.java | 210 - .../implementation/SnapshotsClientImpl.java | 1007 --- .../TrustedAccessRoleBindingsClientImpl.java | 960 --- .../TrustedAccessRolesClientImpl.java | 259 - .../models/AbsoluteMonthlySchedule.java | 122 - .../models/AdoptionPolicy.java | 56 - .../models/AdvancedNetworkPolicies.java | 59 - .../models/AdvancedNetworking.java | 164 - .../AdvancedNetworkingObservability.java | 96 - .../models/AdvancedNetworkingSecurity.java | 135 - ...rsionsPropertiesAgentPoolVersionsItem.java | 156 - .../AgentPoolDeleteMachinesParameter.java | 105 - .../models/AgentPoolGatewayProfile.java | 105 - .../models/AgentPoolListResult.java | 115 - .../models/AgentPoolMode.java | 58 - .../models/AgentPoolNetworkProfile.java | 166 - .../models/AgentPoolSecurityProfile.java | 159 - .../models/AgentPoolSshAccess.java | 51 - .../models/AgentPoolStatus.java | 84 - .../models/AgentPoolType.java | 56 - ...lUpgradeProfilePropertiesUpgradesItem.java | 124 - .../models/AgentPoolUpgradeSettings.java | 251 - .../models/AgentPoolWindowsProfile.java | 98 - .../models/ArtifactSource.java | 51 - .../models/AzureKeyVaultKms.java | 197 - .../models/BackendPoolType.java | 51 - .../models/ClusterUpgradeSettings.java | 96 - .../containerservice/models/Code.java | 51 - .../models/CompatibleVersions.java | 123 - .../models/ConnectionStatus.java | 61 - .../models/ContainerServiceLinuxProfile.java | 137 - .../ContainerServiceNetworkProfile.java | 615 -- .../ContainerServiceSshConfiguration.java | 110 - .../models/ContainerServiceSshPublicKey.java | 105 - .../containerservice/models/CreationData.java | 95 - .../models/CredentialResult.java | 98 - .../models/DailySchedule.java | 94 - .../containerservice/models/DateSpan.java | 136 - .../models/DelegatedResource.java | 180 - .../containerservice/models/DeletePolicy.java | 51 - .../models/EndpointDependency.java | 128 - .../models/EndpointDetail.java | 177 - .../containerservice/models/Expander.java | 63 - .../models/ExtendedLocation.java | 121 - .../models/ExtendedLocationTypes.java | 46 - .../containerservice/models/Format.java | 51 - .../containerservice/models/GpuDriver.java | 51 - .../models/GpuInstanceProfile.java | 66 - .../containerservice/models/GpuProfile.java | 93 - .../containerservice/models/IpFamily.java | 51 - .../containerservice/models/IpTag.java | 121 - .../models/IstioCertificateAuthority.java | 97 - .../models/IstioComponents.java | 134 - .../models/IstioEgressGateway.java | 194 - .../models/IstioIngressGateway.java | 130 - .../models/IstioIngressGatewayMode.java | 51 - .../IstioPluginCertificateAuthority.java | 206 - .../models/IstioServiceMesh.java | 166 - .../models/KeyVaultNetworkAccessTypes.java | 53 - .../models/KubeletConfig.java | 409 -- .../models/KubeletDiskType.java | 51 - .../models/KubernetesPatchVersion.java | 95 - .../models/KubernetesSupportPlan.java | 51 - .../models/KubernetesVersion.java | 218 - .../models/KubernetesVersionCapabilities.java | 98 - .../containerservice/models/LicenseType.java | 52 - .../models/LinuxOSConfig.java | 196 - .../models/LoadBalancerSku.java | 53 - .../models/LocalDnsForwardDestination.java | 51 - .../models/LocalDnsForwardPolicy.java | 57 - .../containerservice/models/LocalDnsMode.java | 56 - .../models/LocalDnsOverride.java | 305 - .../models/LocalDnsProfile.java | 192 - .../models/LocalDnsProtocol.java | 51 - .../models/LocalDnsQueryLogging.java | 51 - .../models/LocalDnsServeStale.java | 56 - .../models/LocalDnsState.java | 51 - .../models/MachineIpAddress.java | 97 - .../models/MachineListResult.java | 115 - .../models/MachineNetworkProperties.java | 87 - .../models/MachineProperties.java | 100 - .../MaintenanceConfigurationListResult.java | 117 - .../models/MaintenanceWindow.java | 273 - ...agedClusterAIToolchainOperatorProfile.java | 100 - .../models/ManagedClusterAadProfile.java | 274 - .../models/ManagedClusterAddonProfile.java | 144 - .../ManagedClusterAddonProfileIdentity.java | 102 - .../ManagedClusterAgentPoolProfile.java | 861 --- .../ManagedClusterApiServerAccessProfile.java | 299 - .../ManagedClusterAutoUpgradeProfile.java | 133 - .../ManagedClusterAzureMonitorProfile.java | 104 - ...erAzureMonitorProfileKubeStateMetrics.java | 140 - ...agedClusterAzureMonitorProfileMetrics.java | 140 - .../ManagedClusterBootstrapProfile.java | 127 - .../models/ManagedClusterCostAnalysis.java | 101 - .../models/ManagedClusterHttpProxyConfig.java | 180 - .../models/ManagedClusterIdentity.java | 221 - .../models/ManagedClusterIngressProfile.java | 102 - .../ManagedClusterIngressProfileNginx.java | 99 - ...gedClusterIngressProfileWebAppRouting.java | 196 - .../models/ManagedClusterListResult.java | 116 - .../ManagedClusterLoadBalancerProfile.java | 312 - ...LoadBalancerProfileManagedOutboundIPs.java | 134 - ...ClusterLoadBalancerProfileOutboundIPs.java | 101 - ...LoadBalancerProfileOutboundIpPrefixes.java | 104 - ...anagedClusterManagedOutboundIpProfile.java | 98 - .../models/ManagedClusterMetricsProfile.java | 96 - .../ManagedClusterNatGatewayProfile.java | 155 - ...ManagedClusterNodeProvisioningProfile.java | 141 - ...anagedClusterNodeResourceGroupProfile.java | 100 - .../ManagedClusterOidcIssuerProfile.java | 110 - .../models/ManagedClusterPodIdentity.java | 234 - .../ManagedClusterPodIdentityException.java | 174 - .../ManagedClusterPodIdentityProfile.java | 209 - ...edClusterPodIdentityProvisioningError.java | 99 - ...usterPodIdentityProvisioningErrorBody.java | 190 - ...gedClusterPodIdentityProvisioningInfo.java | 99 - ...edClusterPodIdentityProvisioningState.java | 72 - .../ManagedClusterPoolUpgradeProfile.java | 198 - ...ClusterPoolUpgradeProfileUpgradesItem.java | 124 - ...gedClusterPropertiesAutoScalerProfile.java | 735 --- .../models/ManagedClusterSecurityProfile.java | 239 - ...ManagedClusterSecurityProfileDefender.java | 138 - ...rityProfileDefenderSecurityMonitoring.java | 97 - ...gedClusterSecurityProfileImageCleaner.java | 126 - ...lusterSecurityProfileWorkloadIdentity.java | 96 - ...ManagedClusterServicePrincipalProfile.java | 132 - .../models/ManagedClusterSku.java | 124 - .../models/ManagedClusterSkuName.java | 51 - .../models/ManagedClusterSkuTier.java | 57 - ...agedClusterStaticEgressGatewayProfile.java | 98 - .../models/ManagedClusterStatus.java | 84 - .../models/ManagedClusterStorageProfile.java | 194 - ...gedClusterStorageProfileBlobCsiDriver.java | 96 - ...gedClusterStorageProfileDiskCsiDriver.java | 96 - ...gedClusterStorageProfileFileCsiDriver.java | 96 - ...usterStorageProfileSnapshotController.java | 96 - .../models/ManagedClusterWindowsProfile.java | 252 - ...nagedClusterWorkloadAutoScalerProfile.java | 134 - ...dClusterWorkloadAutoScalerProfileKeda.java | 96 - ...utoScalerProfileVerticalPodAutoscaler.java | 99 - ...anagedClustersGetCommandResultHeaders.java | 58 - ...nagedClustersGetCommandResultResponse.java | 40 - .../models/ManagedNamespaceListResult.java | 128 - ...ceIdentityUserAssignedIdentitiesValue.java | 99 - .../models/ManualScaleProfile.java | 124 - .../containerservice/models/MeshRevision.java | 159 - .../models/MeshRevisionProfileList.java | 116 - .../models/MeshRevisionProfileProperties.java | 99 - .../models/MeshUpgradeProfileList.java | 116 - .../models/MeshUpgradeProfileProperties.java | 108 - .../models/NamespaceProperties.java | 299 - .../models/NamespaceProvisioningState.java | 71 - .../models/NetworkDataplane.java | 51 - .../containerservice/models/NetworkMode.java | 52 - .../models/NetworkPlugin.java | 56 - .../models/NetworkPluginMode.java | 46 - .../models/NetworkPolicies.java | 121 - .../models/NetworkPolicy.java | 61 - .../models/NginxIngressControllerType.java | 61 - .../models/NodeOSUpgradeChannel.java | 61 - .../NodeProvisioningDefaultNodePools.java | 55 - .../models/NodeProvisioningMode.java | 51 - .../containerservice/models/OSDiskType.java | 54 - .../containerservice/models/OSSku.java | 82 - .../models/OperationListResult.java | 88 - ...OutboundEnvironmentEndpointCollection.java | 126 - .../containerservice/models/OutboundType.java | 67 - .../models/PodIpAllocationMode.java | 52 - .../containerservice/models/PolicyRule.java | 56 - .../containerservice/models/PortRange.java | 155 - .../containerservice/models/PowerState.java | 93 - .../models/PrivateEndpoint.java | 93 - ...teEndpointConnectionProvisioningState.java | 67 - .../PrivateLinkServiceConnectionState.java | 123 - .../containerservice/models/Protocol.java | 51 - .../models/PublicNetworkAccess.java | 51 - .../models/RelativeMonthlySchedule.java | 163 - .../models/ResourceIdentityType.java | 62 - .../models/ResourceQuota.java | 205 - .../models/ResourceReference.java | 93 - .../models/RestrictionLevel.java | 51 - .../models/RunCommandRequest.java | 157 - .../models/ScaleDownMode.java | 52 - .../containerservice/models/ScaleProfile.java | 98 - .../models/ScaleSetEvictionPolicy.java | 53 - .../models/ScaleSetPriority.java | 51 - .../containerservice/models/Schedule.java | 194 - .../models/ServiceMeshMode.java | 51 - .../models/ServiceMeshProfile.java | 132 - .../models/SnapshotListResult.java | 115 - .../containerservice/models/SnapshotType.java | 46 - .../containerservice/models/SysctlConfig.java | 849 --- .../containerservice/models/TimeInWeek.java | 129 - .../containerservice/models/TimeSpan.java | 128 - .../TrustedAccessRoleBindingListResult.java | 117 - ...tedAccessRoleBindingProvisioningState.java | 67 - .../models/TrustedAccessRoleListResult.java | 104 - .../models/TrustedAccessRoleRule.java | 151 - .../containerservice/models/Type.java | 66 - .../models/UndrainableNodeBehavior.java | 53 - .../models/UpgradeChannel.java | 67 - .../models/UpgradeOverrideSettings.java | 137 - .../models/UserAssignedIdentity.java | 149 - .../models/VirtualMachineNodes.java | 121 - .../models/VirtualMachinesProfile.java | 96 - .../containerservice/models/WeekDay.java | 76 - .../models/WeeklySchedule.java | 129 - .../models/WindowsGmsaProfile.java | 157 - .../models/WorkloadRuntime.java | 56 - .../proxy-config.json | 2 +- ...ainerServicesListOrchestratorsSamples.java | 27 + ...tManagedClustersCreateOrUpdateSamples.java | 84 + ...OpenShiftManagedClustersDeleteSamples.java | 27 + ...agedClustersGetByResourceGroupSamples.java | 27 + ...gedClustersListByResourceGroupSamples.java | 27 + .../OpenShiftManagedClustersListSamples.java | 24 + ...ShiftManagedClustersUpdateTagsSamples.java | 44 + 275 files changed, 261 insertions(+), 56627 deletions(-) delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceConfigurationsClient.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedNamespacesClient.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationsClient.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateEndpointConnectionsClient.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateLinkResourcesClient.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ResolvePrivateLinkServiceIdsClient.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/SnapshotsClient.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRoleBindingsClient.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRolesClient.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AccessProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CommandResultProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CredentialResultsInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/KubernetesVersionListResultInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAccessProfileInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedNamespaceInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshRevisionProfileInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshUpgradeProfileInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueDisplay.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OutboundEnvironmentEndpointInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionListResultInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourceInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourcesListResultInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/RunCommandResultInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AbsoluteMonthlySchedule.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdoptionPolicy.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkPolicies.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingObservability.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolDeleteMachinesParameter.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolGatewayProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolListResult.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolStatus.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolType.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolWindowsProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ArtifactSource.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AzureKeyVaultKms.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BackendPoolType.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterUpgradeSettings.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Code.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CompatibleVersions.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ConnectionStatus.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceLinuxProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshConfiguration.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshPublicKey.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CreationData.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CredentialResult.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DailySchedule.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DateSpan.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DelegatedResource.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DeletePolicy.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDependency.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDetail.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Expander.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocation.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocationTypes.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Format.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuDriver.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuInstanceProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpTag.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioCertificateAuthority.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioEgressGateway.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGateway.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGatewayMode.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioPluginCertificateAuthority.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioServiceMesh.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KeyVaultNetworkAccessTypes.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletDiskType.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesPatchVersion.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesSupportPlan.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersion.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersionCapabilities.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LicenseType.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LinuxOSConfig.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerSku.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardDestination.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardPolicy.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsMode.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsOverride.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProtocol.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsQueryLogging.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsServeStale.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsState.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineIpAddress.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineListResult.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceConfigurationListResult.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceWindow.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAIToolchainOperatorProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAadProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfileIdentity.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterBootstrapProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterCostAnalysis.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIdentity.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileNginx.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterListResult.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIPs.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterManagedOutboundIpProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterMetricsProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNatGatewayProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeProvisioningProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterOidcIssuerProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentity.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityException.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningError.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningErrorBody.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningInfo.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningState.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageCleaner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileWorkloadIdentity.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterServicePrincipalProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSku.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuName.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuTier.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStaticEgressGatewayProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStatus.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileBlobCsiDriver.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileFileCsiDriver.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileSnapshotController.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWindowsProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileKeda.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultHeaders.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultResponse.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedNamespaceListResult.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedServiceIdentityUserAssignedIdentitiesValue.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManualScaleProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevision.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileList.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileList.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProvisioningState.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkDataplane.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkMode.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPlugin.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPluginMode.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicies.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicy.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NginxIngressControllerType.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningDefaultNodePools.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningMode.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSDiskType.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OperationListResult.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundEnvironmentEndpointCollection.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundType.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodIpAllocationMode.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PolicyRule.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PortRange.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PowerState.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpoint.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpointConnectionProvisioningState.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateLinkServiceConnectionState.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Protocol.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceIdentityType.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceQuota.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceReference.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RunCommandRequest.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleDownMode.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetEvictionPolicy.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetPriority.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Schedule.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshMode.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotListResult.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SysctlConfig.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeInWeek.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeSpan.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingListResult.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingProvisioningState.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleListResult.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleRule.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Type.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UndrainableNodeBehavior.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeChannel.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeOverrideSettings.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UserAssignedIdentity.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachineNodes.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachinesProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeekDay.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeeklySchedule.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WindowsGmsaProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ContainerServicesListOrchestratorsSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersCreateOrUpdateSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersDeleteSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersGetByResourceGroupSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListByResourceGroupSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersUpdateTagsSamples.java diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java deleted file mode 100644 index f1ec76e42adb..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java +++ /dev/null @@ -1,937 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolAvailableVersionsInner; -import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner; -import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolUpgradeProfileInner; -import com.azure.resourcemanager.containerservice.models.AgentPoolDeleteMachinesParameter; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in AgentPoolsClient. - */ -public interface AgentPoolsClient { - /** - * Aborts last operation running on agent pool. - * - * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and - * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> abortLatestOperationWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName); - - /** - * Aborts last operation running on agent pool. - * - * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and - * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginAbortLatestOperationAsync(String resourceGroupName, String resourceName, - String agentPoolName); - - /** - * Aborts last operation running on agent pool. - * - * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and - * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, - String agentPoolName); - - /** - * Aborts last operation running on agent pool. - * - * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and - * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, - String agentPoolName, Context context); - - /** - * Aborts last operation running on agent pool. - * - * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and - * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono abortLatestOperationAsync(String resourceGroupName, String resourceName, String agentPoolName); - - /** - * Aborts last operation running on agent pool. - * - * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and - * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void abortLatestOperation(String resourceGroupName, String resourceName, String agentPoolName); - - /** - * Aborts last operation running on agent pool. - * - * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and - * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void abortLatestOperation(String resourceGroupName, String resourceName, String agentPoolName, Context context); - - /** - * Gets a list of agent pools in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String resourceName); - - /** - * Gets a list of agent pools in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String resourceName); - - /** - * Gets a list of agent pools in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String resourceName, Context context); - - /** - * Gets the specified managed cluster agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 specified managed cluster agent pool along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String resourceName, - String agentPoolName); - - /** - * Gets the specified managed cluster agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 specified managed cluster agent pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String resourceName, String agentPoolName); - - /** - * Gets the specified managed cluster agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 specified managed cluster agent pool along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String resourceName, String agentPoolName, - Context context); - - /** - * Gets the specified managed cluster agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 specified managed cluster agent pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AgentPoolInner get(String resourceGroupName, String resourceName, String agentPoolName); - - /** - * Creates or updates an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param parameters The agent pool to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @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 agent Pool along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, - String agentPoolName, AgentPoolInner parameters, String ifMatch, String ifNoneMatch); - - /** - * Creates or updates an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param parameters The agent pool to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of agent Pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, AgentPoolInner> beginCreateOrUpdateAsync(String resourceGroupName, - String resourceName, String agentPoolName, AgentPoolInner parameters, String ifMatch, String ifNoneMatch); - - /** - * Creates or updates an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param parameters The agent pool to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of agent Pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, AgentPoolInner> beginCreateOrUpdateAsync(String resourceGroupName, - String resourceName, String agentPoolName, AgentPoolInner parameters); - - /** - * Creates or updates an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param parameters The agent pool to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of agent Pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AgentPoolInner> beginCreateOrUpdate(String resourceGroupName, - String resourceName, String agentPoolName, AgentPoolInner parameters); - - /** - * Creates or updates an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param parameters The agent pool to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of agent Pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AgentPoolInner> beginCreateOrUpdate(String resourceGroupName, - String resourceName, String agentPoolName, AgentPoolInner parameters, String ifMatch, String ifNoneMatch, - Context context); - - /** - * Creates or updates an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param parameters The agent pool to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @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 agent Pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, - AgentPoolInner parameters, String ifMatch, String ifNoneMatch); - - /** - * Creates or updates an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param parameters The agent pool to create or update. - * @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 agent Pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, - AgentPoolInner parameters); - - /** - * Creates or updates an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param parameters The agent pool to create or update. - * @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 agent Pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AgentPoolInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, - AgentPoolInner parameters); - - /** - * Creates or updates an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param parameters The agent pool to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @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 agent Pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AgentPoolInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, - AgentPoolInner parameters, String ifMatch, String ifNoneMatch, Context context); - - /** - * Deletes an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. - * @param ifMatch The request should only proceed if an entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String agentPoolName, Boolean ignorePodDisruptionBudget, String ifMatch); - - /** - * Deletes an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. - * @param ifMatch The request should only proceed if an entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String agentPoolName, Boolean ignorePodDisruptionBudget, String ifMatch); - - /** - * Deletes an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String agentPoolName); - - /** - * Deletes an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, String agentPoolName); - - /** - * Deletes an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, String agentPoolName, - Boolean ignorePodDisruptionBudget, String ifMatch, Context context); - - /** - * Deletes an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. - * @param ifMatch The request should only proceed if an entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String resourceName, String agentPoolName, - Boolean ignorePodDisruptionBudget, String ifMatch); - - /** - * Deletes an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String resourceName, String agentPoolName); - - /** - * Deletes an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String agentPoolName); - - /** - * Deletes an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. - * @param ifMatch The request should only proceed if an entity matches this string. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String agentPoolName, Boolean ignorePodDisruptionBudget, - String ifMatch, Context context); - - /** - * Gets the upgrade profile for an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 upgrade profile for an agent pool along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getUpgradeProfileWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName); - - /** - * Gets the upgrade profile for an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 upgrade profile for an agent pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getUpgradeProfileAsync(String resourceGroupName, String resourceName, - String agentPoolName); - - /** - * Gets the upgrade profile for an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 upgrade profile for an agent pool along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getUpgradeProfileWithResponse(String resourceGroupName, String resourceName, - String agentPoolName, Context context); - - /** - * Gets the upgrade profile for an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 upgrade profile for an agent pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AgentPoolUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName, String agentPoolName); - - /** - * Deletes specific machines in an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machines A list of machines from the agent pool to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteMachinesWithResponseAsync(String resourceGroupName, String resourceName, - String agentPoolName, AgentPoolDeleteMachinesParameter machines); - - /** - * Deletes specific machines in an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machines A list of machines from the agent pool to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteMachinesAsync(String resourceGroupName, String resourceName, - String agentPoolName, AgentPoolDeleteMachinesParameter machines); - - /** - * Deletes specific machines in an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machines A list of machines from the agent pool to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteMachines(String resourceGroupName, String resourceName, - String agentPoolName, AgentPoolDeleteMachinesParameter machines); - - /** - * Deletes specific machines in an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machines A list of machines from the agent pool to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteMachines(String resourceGroupName, String resourceName, - String agentPoolName, AgentPoolDeleteMachinesParameter machines, Context context); - - /** - * Deletes specific machines in an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machines A list of machines from the agent pool to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteMachinesAsync(String resourceGroupName, String resourceName, String agentPoolName, - AgentPoolDeleteMachinesParameter machines); - - /** - * Deletes specific machines in an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machines A list of machines from the agent pool to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deleteMachines(String resourceGroupName, String resourceName, String agentPoolName, - AgentPoolDeleteMachinesParameter machines); - - /** - * Deletes specific machines in an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machines A list of machines from the agent pool to be deleted. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deleteMachines(String resourceGroupName, String resourceName, String agentPoolName, - AgentPoolDeleteMachinesParameter machines, Context context); - - /** - * Gets a list of supported Kubernetes versions for the specified agent pool. - * - * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more - * details about the version lifecycle. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of available versions for an agent pool along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> - getAvailableAgentPoolVersionsWithResponseAsync(String resourceGroupName, String resourceName); - - /** - * Gets a list of supported Kubernetes versions for the specified agent pool. - * - * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more - * details about the version lifecycle. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of available versions for an agent pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAvailableAgentPoolVersionsAsync(String resourceGroupName, - String resourceName); - - /** - * Gets a list of supported Kubernetes versions for the specified agent pool. - * - * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more - * details about the version lifecycle. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of available versions for an agent pool along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getAvailableAgentPoolVersionsWithResponse(String resourceGroupName, - String resourceName, Context context); - - /** - * Gets a list of supported Kubernetes versions for the specified agent pool. - * - * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more - * details about the version lifecycle. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of available versions for an agent pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AgentPoolAvailableVersionsInner getAvailableAgentPoolVersions(String resourceGroupName, String resourceName); - - /** - * Upgrades the node image version of an agent pool to the latest. - * - * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS - * provides one new image per week with the latest updates. For more details on node image versions, see: - * https://docs.microsoft.com/azure/aks/node-image-upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> upgradeNodeImageVersionWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName); - - /** - * Upgrades the node image version of an agent pool to the latest. - * - * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS - * provides one new image per week with the latest updates. For more details on node image versions, see: - * https://docs.microsoft.com/azure/aks/node-image-upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, AgentPoolInner> beginUpgradeNodeImageVersionAsync(String resourceGroupName, - String resourceName, String agentPoolName); - - /** - * Upgrades the node image version of an agent pool to the latest. - * - * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS - * provides one new image per week with the latest updates. For more details on node image versions, see: - * https://docs.microsoft.com/azure/aks/node-image-upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AgentPoolInner> beginUpgradeNodeImageVersion(String resourceGroupName, - String resourceName, String agentPoolName); - - /** - * Upgrades the node image version of an agent pool to the latest. - * - * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS - * provides one new image per week with the latest updates. For more details on node image versions, see: - * https://docs.microsoft.com/azure/aks/node-image-upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AgentPoolInner> beginUpgradeNodeImageVersion(String resourceGroupName, - String resourceName, String agentPoolName, Context context); - - /** - * Upgrades the node image version of an agent pool to the latest. - * - * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS - * provides one new image per week with the latest updates. For more details on node image versions, see: - * https://docs.microsoft.com/azure/aks/node-image-upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono upgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, - String agentPoolName); - - /** - * Upgrades the node image version of an agent pool to the latest. - * - * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS - * provides one new image per week with the latest updates. For more details on node image versions, see: - * https://docs.microsoft.com/azure/aks/node-image-upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AgentPoolInner upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName); - - /** - * Upgrades the node image version of an agent pool to the latest. - * - * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS - * provides one new image per week with the latest updates. For more details on node image versions, see: - * https://docs.microsoft.com/azure/aks/node-image-upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AgentPoolInner upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName, - Context context); -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java index 167e25fcae77..28a39ed79ab1 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java @@ -53,88 +53,4 @@ public interface ContainerServiceManagementClient { * @return the ContainerServicesClient object. */ ContainerServicesClient getContainerServices(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the ManagedClustersClient object to access its operations. - * - * @return the ManagedClustersClient object. - */ - ManagedClustersClient getManagedClusters(); - - /** - * Gets the MaintenanceConfigurationsClient object to access its operations. - * - * @return the MaintenanceConfigurationsClient object. - */ - MaintenanceConfigurationsClient getMaintenanceConfigurations(); - - /** - * Gets the ManagedNamespacesClient object to access its operations. - * - * @return the ManagedNamespacesClient object. - */ - ManagedNamespacesClient getManagedNamespaces(); - - /** - * Gets the AgentPoolsClient object to access its operations. - * - * @return the AgentPoolsClient object. - */ - AgentPoolsClient getAgentPools(); - - /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. - * - * @return the PrivateEndpointConnectionsClient object. - */ - PrivateEndpointConnectionsClient getPrivateEndpointConnections(); - - /** - * Gets the PrivateLinkResourcesClient object to access its operations. - * - * @return the PrivateLinkResourcesClient object. - */ - PrivateLinkResourcesClient getPrivateLinkResources(); - - /** - * Gets the ResolvePrivateLinkServiceIdsClient object to access its operations. - * - * @return the ResolvePrivateLinkServiceIdsClient object. - */ - ResolvePrivateLinkServiceIdsClient getResolvePrivateLinkServiceIds(); - - /** - * Gets the SnapshotsClient object to access its operations. - * - * @return the SnapshotsClient object. - */ - SnapshotsClient getSnapshots(); - - /** - * Gets the TrustedAccessRoleBindingsClient object to access its operations. - * - * @return the TrustedAccessRoleBindingsClient object. - */ - TrustedAccessRoleBindingsClient getTrustedAccessRoleBindings(); - - /** - * Gets the TrustedAccessRolesClient object to access its operations. - * - * @return the TrustedAccessRolesClient object. - */ - TrustedAccessRolesClient getTrustedAccessRoles(); - - /** - * Gets the MachinesClient object to access its operations. - * - * @return the MachinesClient object. - */ - MachinesClient getMachines(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java deleted file mode 100644 index 57a92d2b1623..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerservice.fluent.models.MachineInner; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in MachinesClient. - */ -public interface MachinesClient { - /** - * Gets a list of machines in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of machines in the specified agent pool as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String resourceName, String agentPoolName); - - /** - * Gets a list of machines in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of machines in the specified agent pool as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String resourceName, String agentPoolName); - - /** - * Gets a list of machines in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of machines in the specified agent pool as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String resourceName, String agentPoolName, - Context context); - - /** - * Get a specific machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName host name of the machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific machine in the specified agent pool along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String resourceName, - String agentPoolName, String machineName); - - /** - * Get a specific machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName host name of the machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific machine in the specified agent pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String resourceName, String agentPoolName, - String machineName); - - /** - * Get a specific machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName host name of the machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific machine in the specified agent pool along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String resourceName, String agentPoolName, - String machineName, Context context); - - /** - * Get a specific machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName host name of the machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific machine in the specified agent pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MachineInner get(String resourceGroupName, String resourceName, String agentPoolName, String machineName); -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceConfigurationsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceConfigurationsClient.java deleted file mode 100644 index a044c35f527c..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceConfigurationsClient.java +++ /dev/null @@ -1,260 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerservice.fluent.models.MaintenanceConfigurationInner; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in MaintenanceConfigurationsClient. - */ -public interface MaintenanceConfigurationsClient { - /** - * Gets a list of maintenance configurations in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of maintenance configurations in the specified managed cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName); - - /** - * Gets a list of maintenance configurations in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of maintenance configurations in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedCluster(String resourceGroupName, String resourceName); - - /** - * Gets a list of maintenance configurations in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of maintenance configurations in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, - Context context); - - /** - * Gets the specified maintenance configuration of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @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 specified maintenance configuration of a managed cluster along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String resourceName, - String configName); - - /** - * Gets the specified maintenance configuration of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @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 specified maintenance configuration of a managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String resourceName, String configName); - - /** - * Gets the specified maintenance configuration of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @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 specified maintenance configuration of a managed cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String resourceName, - String configName, Context context); - - /** - * Gets the specified maintenance configuration of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @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 specified maintenance configuration of a managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MaintenanceConfigurationInner get(String resourceGroupName, String resourceName, String configName); - - /** - * Creates or updates a maintenance configuration in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @param parameters The maintenance configuration to create or update. - * @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 planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster - * along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, String configName, MaintenanceConfigurationInner parameters); - - /** - * Creates or updates a maintenance configuration in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @param parameters The maintenance configuration to create or update. - * @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 planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - String configName, MaintenanceConfigurationInner parameters); - - /** - * Creates or updates a maintenance configuration in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @param parameters The maintenance configuration to create or update. - * @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 planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster - * along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, - String configName, MaintenanceConfigurationInner parameters, Context context); - - /** - * Creates or updates a maintenance configuration in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @param parameters The maintenance configuration to create or update. - * @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 planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MaintenanceConfigurationInner createOrUpdate(String resourceGroupName, String resourceName, String configName, - MaintenanceConfigurationInner parameters); - - /** - * Deletes a maintenance configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, String configName); - - /** - * Deletes a maintenance configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String resourceName, String configName); - - /** - * Deletes a maintenance configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String resourceName, String configName, - Context context); - - /** - * Deletes a maintenance configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String configName); -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java deleted file mode 100644 index 1e03332b8dff..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java +++ /dev/null @@ -1,2230 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.fluent.models.CredentialResultsInner; -import com.azure.resourcemanager.containerservice.fluent.models.KubernetesVersionListResultInner; -import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterAccessProfileInner; -import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterInner; -import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterUpgradeProfileInner; -import com.azure.resourcemanager.containerservice.fluent.models.MeshRevisionProfileInner; -import com.azure.resourcemanager.containerservice.fluent.models.MeshUpgradeProfileInner; -import com.azure.resourcemanager.containerservice.fluent.models.OutboundEnvironmentEndpointInner; -import com.azure.resourcemanager.containerservice.fluent.models.RunCommandResultInner; -import com.azure.resourcemanager.containerservice.models.Format; -import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClustersGetCommandResultResponse; -import com.azure.resourcemanager.containerservice.models.RunCommandRequest; -import com.azure.resourcemanager.containerservice.models.TagsObject; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ManagedClustersClient. - */ -public interface ManagedClustersClient extends InnerSupportsGet, - InnerSupportsListing, InnerSupportsDelete { - /** - * Gets a list of supported Kubernetes versions in the specified subscription. - * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. - * - * @param location The name of the Azure region. - * @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 hold values properties, which is array of KubernetesVersion along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> listKubernetesVersionsWithResponseAsync(String location); - - /** - * Gets a list of supported Kubernetes versions in the specified subscription. - * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. - * - * @param location The name of the Azure region. - * @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 hold values properties, which is array of KubernetesVersion on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono listKubernetesVersionsAsync(String location); - - /** - * Gets a list of supported Kubernetes versions in the specified subscription. - * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. - * - * @param location The name of the Azure region. - * @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 hold values properties, which is array of KubernetesVersion along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listKubernetesVersionsWithResponse(String location, Context context); - - /** - * Gets a list of supported Kubernetes versions in the specified subscription. - * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. - * - * @param location The name of the Azure region. - * @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 hold values properties, which is array of KubernetesVersion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - KubernetesVersionListResultInner listKubernetesVersions(String location); - - /** - * Gets a list of managed clusters in the specified subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed clusters in the specified subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); - - /** - * Gets a list of managed clusters in the specified subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed clusters in the specified subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Gets a list of managed clusters in the specified subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed clusters in the specified subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Lists managed clusters in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Managed Clusters operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); - - /** - * Lists managed clusters in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Managed Clusters operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists managed clusters in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 the List Managed Clusters operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Gets the upgrade profile of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade profile of a managed cluster along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getUpgradeProfileWithResponseAsync(String resourceGroupName, - String resourceName); - - /** - * Gets the upgrade profile of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade profile of a managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getUpgradeProfileAsync(String resourceGroupName, String resourceName); - - /** - * Gets the upgrade profile of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade profile of a managed cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getUpgradeProfileWithResponse(String resourceGroupName, - String resourceName, Context context); - - /** - * Gets the upgrade profile of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade profile of a managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedClusterUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName); - - /** - * Gets an access profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Instead use - * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) - * or - * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) - * . - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param roleName The name of the role for managed cluster accessProfile resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed cluster Access Profile along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getAccessProfileWithResponseAsync(String resourceGroupName, - String resourceName, String roleName); - - /** - * Gets an access profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Instead use - * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) - * or - * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) - * . - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param roleName The name of the role for managed cluster accessProfile resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed cluster Access Profile on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAccessProfileAsync(String resourceGroupName, String resourceName, - String roleName); - - /** - * Gets an access profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Instead use - * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) - * or - * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) - * . - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param roleName The name of the role for managed cluster accessProfile resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed cluster Access Profile along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getAccessProfileWithResponse(String resourceGroupName, - String resourceName, String roleName, Context context); - - /** - * Gets an access profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Instead use - * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) - * or - * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) - * . - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param roleName The name of the role for managed cluster accessProfile resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed cluster Access Profile. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedClusterAccessProfileInner getAccessProfile(String resourceGroupName, String resourceName, String roleName); - - /** - * Lists the admin credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. - * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> listClusterAdminCredentialsWithResponseAsync(String resourceGroupName, - String resourceName, String serverFqdn); - - /** - * Lists the admin credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list credential result response on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono listClusterAdminCredentialsAsync(String resourceGroupName, String resourceName); - - /** - * Lists the admin credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. - * @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 list credential result response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listClusterAdminCredentialsWithResponse(String resourceGroupName, - String resourceName, String serverFqdn, Context context); - - /** - * Lists the admin credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list credential result response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CredentialResultsInner listClusterAdminCredentials(String resourceGroupName, String resourceName); - - /** - * Lists the user credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. - * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return - * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary - * in the path. - * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> listClusterUserCredentialsWithResponseAsync(String resourceGroupName, - String resourceName, String serverFqdn, Format format); - - /** - * Lists the user credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list credential result response on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono listClusterUserCredentialsAsync(String resourceGroupName, String resourceName); - - /** - * Lists the user credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. - * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return - * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary - * in the path. - * @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 list credential result response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listClusterUserCredentialsWithResponse(String resourceGroupName, - String resourceName, String serverFqdn, Format format, Context context); - - /** - * Lists the user credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list credential result response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CredentialResultsInner listClusterUserCredentials(String resourceGroupName, String resourceName); - - /** - * Lists the cluster monitoring user credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. - * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> listClusterMonitoringUserCredentialsWithResponseAsync( - String resourceGroupName, String resourceName, String serverFqdn); - - /** - * Lists the cluster monitoring user credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list credential result response on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono listClusterMonitoringUserCredentialsAsync(String resourceGroupName, - String resourceName); - - /** - * Lists the cluster monitoring user credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. - * @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 list credential result response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listClusterMonitoringUserCredentialsWithResponse(String resourceGroupName, - String resourceName, String serverFqdn, Context context); - - /** - * Lists the cluster monitoring user credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list credential result response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CredentialResultsInner listClusterMonitoringUserCredentials(String resourceGroupName, String resourceName); - - /** - * Gets a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String resourceName); - - /** - * Gets a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, String resourceName); - - /** - * Gets a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, - Context context); - - /** - * Gets a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedClusterInner getByResourceGroup(String resourceGroupName, String resourceName); - - /** - * Creates or updates a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @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 managed cluster along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, - ManagedClusterInner parameters, String ifMatch, String ifNoneMatch); - - /** - * Creates or updates a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ManagedClusterInner> beginCreateOrUpdateAsync(String resourceGroupName, - String resourceName, ManagedClusterInner parameters, String ifMatch, String ifNoneMatch); - - /** - * Creates or updates a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ManagedClusterInner> beginCreateOrUpdateAsync(String resourceGroupName, - String resourceName, ManagedClusterInner parameters); - - /** - * Creates or updates a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedClusterInner> beginCreateOrUpdate(String resourceGroupName, - String resourceName, ManagedClusterInner parameters); - - /** - * Creates or updates a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedClusterInner> beginCreateOrUpdate(String resourceGroupName, - String resourceName, ManagedClusterInner parameters, String ifMatch, String ifNoneMatch, Context context); - - /** - * Creates or updates a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @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 managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - ManagedClusterInner parameters, String ifMatch, String ifNoneMatch); - - /** - * Creates or updates a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @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 managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - ManagedClusterInner parameters); - - /** - * Creates or updates a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @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 managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedClusterInner createOrUpdate(String resourceGroupName, String resourceName, ManagedClusterInner parameters); - - /** - * Creates or updates a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @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 managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedClusterInner createOrUpdate(String resourceGroupName, String resourceName, ManagedClusterInner parameters, - String ifMatch, String ifNoneMatch, Context context); - - /** - * Updates tags on a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @param ifMatch The request should only proceed if an entity matches this string. - * @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 managed cluster along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateTagsWithResponseAsync(String resourceGroupName, String resourceName, - TagsObject parameters, String ifMatch); - - /** - * Updates tags on a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @param ifMatch The request should only proceed if an entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ManagedClusterInner> beginUpdateTagsAsync(String resourceGroupName, - String resourceName, TagsObject parameters, String ifMatch); - - /** - * Updates tags on a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ManagedClusterInner> beginUpdateTagsAsync(String resourceGroupName, - String resourceName, TagsObject parameters); - - /** - * Updates tags on a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedClusterInner> beginUpdateTags(String resourceGroupName, - String resourceName, TagsObject parameters); - - /** - * Updates tags on a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedClusterInner> beginUpdateTags(String resourceGroupName, - String resourceName, TagsObject parameters, String ifMatch, Context context); - - /** - * Updates tags on a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @param ifMatch The request should only proceed if an entity matches this string. - * @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 managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateTagsAsync(String resourceGroupName, String resourceName, TagsObject parameters, - String ifMatch); - - /** - * Updates tags on a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags 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 managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateTagsAsync(String resourceGroupName, String resourceName, TagsObject parameters); - - /** - * Updates tags on a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags 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 managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedClusterInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters); - - /** - * Updates tags on a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @param ifMatch The request should only proceed if an entity matches this string. - * @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 managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedClusterInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters, String ifMatch, - Context context); - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param ifMatch The request should only proceed if an entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String ifMatch); - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param ifMatch The request should only proceed if an entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, String ifMatch); - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName); - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName); - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, String ifMatch, - Context context); - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param ifMatch The request should only proceed if an entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String resourceName, String ifMatch); - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String resourceName); - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName); - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param ifMatch The request should only proceed if an entity matches this string. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String ifMatch, Context context); - - /** - * Reset the Service Principal Profile of a managed cluster. - * - * This action cannot be performed on a cluster that is not using a service principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> resetServicePrincipalProfileWithResponseAsync(String resourceGroupName, - String resourceName, ManagedClusterServicePrincipalProfile parameters); - - /** - * Reset the Service Principal Profile of a managed cluster. - * - * This action cannot be performed on a cluster that is not using a service principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginResetServicePrincipalProfileAsync(String resourceGroupName, - String resourceName, ManagedClusterServicePrincipalProfile parameters); - - /** - * Reset the Service Principal Profile of a managed cluster. - * - * This action cannot be performed on a cluster that is not using a service principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginResetServicePrincipalProfile(String resourceGroupName, String resourceName, - ManagedClusterServicePrincipalProfile parameters); - - /** - * Reset the Service Principal Profile of a managed cluster. - * - * This action cannot be performed on a cluster that is not using a service principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginResetServicePrincipalProfile(String resourceGroupName, String resourceName, - ManagedClusterServicePrincipalProfile parameters, Context context); - - /** - * Reset the Service Principal Profile of a managed cluster. - * - * This action cannot be performed on a cluster that is not using a service principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono resetServicePrincipalProfileAsync(String resourceGroupName, String resourceName, - ManagedClusterServicePrincipalProfile parameters); - - /** - * Reset the Service Principal Profile of a managed cluster. - * - * This action cannot be performed on a cluster that is not using a service principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void resetServicePrincipalProfile(String resourceGroupName, String resourceName, - ManagedClusterServicePrincipalProfile parameters); - - /** - * Reset the Service Principal Profile of a managed cluster. - * - * This action cannot be performed on a cluster that is not using a service principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void resetServicePrincipalProfile(String resourceGroupName, String resourceName, - ManagedClusterServicePrincipalProfile parameters, Context context); - - /** - * Reset the AAD Profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> resetAadProfileWithResponseAsync(String resourceGroupName, String resourceName, - ManagedClusterAadProfile parameters); - - /** - * Reset the AAD Profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginResetAadProfileAsync(String resourceGroupName, String resourceName, - ManagedClusterAadProfile parameters); - - /** - * Reset the AAD Profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginResetAadProfile(String resourceGroupName, String resourceName, - ManagedClusterAadProfile parameters); - - /** - * Reset the AAD Profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginResetAadProfile(String resourceGroupName, String resourceName, - ManagedClusterAadProfile parameters, Context context); - - /** - * Reset the AAD Profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono resetAadProfileAsync(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters); - - /** - * Reset the AAD Profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void resetAadProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters); - - /** - * Reset the AAD Profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void resetAadProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, - Context context); - - /** - * Rotates the certificates of a managed cluster. - * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, - String resourceName); - - /** - * Rotates the certificates of a managed cluster. - * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, - String resourceName); - - /** - * Rotates the certificates of a managed cluster. - * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRotateClusterCertificates(String resourceGroupName, String resourceName); - - /** - * Rotates the certificates of a managed cluster. - * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRotateClusterCertificates(String resourceGroupName, String resourceName, - Context context); - - /** - * Rotates the certificates of a managed cluster. - * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono rotateClusterCertificatesAsync(String resourceGroupName, String resourceName); - - /** - * Rotates the certificates of a managed cluster. - * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void rotateClusterCertificates(String resourceGroupName, String resourceName); - - /** - * Rotates the certificates of a managed cluster. - * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void rotateClusterCertificates(String resourceGroupName, String resourceName, Context context); - - /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> abortLatestOperationWithResponseAsync(String resourceGroupName, - String resourceName); - - /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginAbortLatestOperationAsync(String resourceGroupName, String resourceName); - - /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName); - - /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, - Context context); - - /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono abortLatestOperationAsync(String resourceGroupName, String resourceName); - - /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void abortLatestOperation(String resourceGroupName, String resourceName); - - /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void abortLatestOperation(String resourceGroupName, String resourceName, Context context); - - /** - * Rotates the service account signing keys of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> rotateServiceAccountSigningKeysWithResponseAsync(String resourceGroupName, - String resourceName); - - /** - * Rotates the service account signing keys of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginRotateServiceAccountSigningKeysAsync(String resourceGroupName, - String resourceName); - - /** - * Rotates the service account signing keys of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRotateServiceAccountSigningKeys(String resourceGroupName, - String resourceName); - - /** - * Rotates the service account signing keys of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRotateServiceAccountSigningKeys(String resourceGroupName, - String resourceName, Context context); - - /** - * Rotates the service account signing keys of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono rotateServiceAccountSigningKeysAsync(String resourceGroupName, String resourceName); - - /** - * Rotates the service account signing keys of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName); - - /** - * Rotates the service account signing keys of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName, Context context); - - /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> stopWithResponseAsync(String resourceGroupName, String resourceName); - - /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginStopAsync(String resourceGroupName, String resourceName); - - /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStop(String resourceGroupName, String resourceName); - - /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStop(String resourceGroupName, String resourceName, Context context); - - /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono stopAsync(String resourceGroupName, String resourceName); - - /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void stop(String resourceGroupName, String resourceName); - - /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void stop(String resourceGroupName, String resourceName, Context context); - - /** - * Starts a previously stopped Managed Cluster - * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> startWithResponseAsync(String resourceGroupName, String resourceName); - - /** - * Starts a previously stopped Managed Cluster - * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginStartAsync(String resourceGroupName, String resourceName); - - /** - * Starts a previously stopped Managed Cluster - * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStart(String resourceGroupName, String resourceName); - - /** - * Starts a previously stopped Managed Cluster - * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStart(String resourceGroupName, String resourceName, Context context); - - /** - * Starts a previously stopped Managed Cluster - * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono startAsync(String resourceGroupName, String resourceName); - - /** - * Starts a previously stopped Managed Cluster - * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void start(String resourceGroupName, String resourceName); - - /** - * Starts a previously stopped Managed Cluster - * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void start(String resourceGroupName, String resourceName, Context context); - - /** - * Submits a command to run against the Managed Cluster. - * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return run command result along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> runCommandWithResponseAsync(String resourceGroupName, String resourceName, - RunCommandRequest requestPayload); - - /** - * Submits a command to run against the Managed Cluster. - * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of run command result. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, RunCommandResultInner> beginRunCommandAsync(String resourceGroupName, - String resourceName, RunCommandRequest requestPayload); - - /** - * Submits a command to run against the Managed Cluster. - * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of run command result. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RunCommandResultInner> beginRunCommand(String resourceGroupName, - String resourceName, RunCommandRequest requestPayload); - - /** - * Submits a command to run against the Managed Cluster. - * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of run command result. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RunCommandResultInner> beginRunCommand(String resourceGroupName, - String resourceName, RunCommandRequest requestPayload, Context context); - - /** - * Submits a command to run against the Managed Cluster. - * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return run command result on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono runCommandAsync(String resourceGroupName, String resourceName, - RunCommandRequest requestPayload); - - /** - * Submits a command to run against the Managed Cluster. - * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return run command result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RunCommandResultInner runCommand(String resourceGroupName, String resourceName, RunCommandRequest requestPayload); - - /** - * Submits a command to run against the Managed Cluster. - * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return run command result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RunCommandResultInner runCommand(String resourceGroupName, String resourceName, RunCommandRequest requestPayload, - Context context); - - /** - * Gets the results of a command which has been run on the Managed Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param commandId Id of the command. - * @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 results of a command which has been run on the Managed Cluster on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getCommandResultWithResponseAsync(String resourceGroupName, - String resourceName, String commandId); - - /** - * Gets the results of a command which has been run on the Managed Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param commandId Id of the command. - * @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 results of a command which has been run on the Managed Cluster on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getCommandResultAsync(String resourceGroupName, String resourceName, String commandId); - - /** - * Gets the results of a command which has been run on the Managed Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param commandId Id of the command. - * @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 results of a command which has been run on the Managed Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedClustersGetCommandResultResponse getCommandResultWithResponse(String resourceGroupName, String resourceName, - String commandId, Context context); - - /** - * Gets the results of a command which has been run on the Managed Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param commandId Id of the command. - * @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 results of a command which has been run on the Managed Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RunCommandResultInner getCommandResult(String resourceGroupName, String resourceName, String commandId); - - /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. - * - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. The operation returns properties of each egress endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, - String resourceName); - - /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. - * - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. The operation returns properties of each egress endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, - String resourceName); - - /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. - * - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. The operation returns properties of each egress endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, - String resourceName, Context context); - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listMeshRevisionProfilesAsync(String location); - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listMeshRevisionProfiles(String location); - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listMeshRevisionProfiles(String location, Context context); - - /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. - * @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 mesh revision profile for a mesh along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getMeshRevisionProfileWithResponseAsync(String location, String mode); - - /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. - * @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 mesh revision profile for a mesh on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getMeshRevisionProfileAsync(String location, String mode); - - /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. - * @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 mesh revision profile for a mesh along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getMeshRevisionProfileWithResponse(String location, String mode, - Context context); - - /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. - * @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 mesh revision profile for a mesh. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MeshRevisionProfileInner getMeshRevisionProfile(String location, String mode); - - /** - * Lists available upgrades for all service meshes in a specific cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listMeshUpgradeProfilesAsync(String resourceGroupName, String resourceName); - - /** - * Lists available upgrades for all service meshes in a specific cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listMeshUpgradeProfiles(String resourceGroupName, String resourceName); - - /** - * Lists available upgrades for all service meshes in a specific cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listMeshUpgradeProfiles(String resourceGroupName, String resourceName, - Context context); - - /** - * Gets available upgrades for a service mesh in a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. - * @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 available upgrades for a service mesh in a cluster along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getMeshUpgradeProfileWithResponseAsync(String resourceGroupName, - String resourceName, String mode); - - /** - * Gets available upgrades for a service mesh in a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. - * @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 available upgrades for a service mesh in a cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getMeshUpgradeProfileAsync(String resourceGroupName, String resourceName, - String mode); - - /** - * Gets available upgrades for a service mesh in a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. - * @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 available upgrades for a service mesh in a cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getMeshUpgradeProfileWithResponse(String resourceGroupName, String resourceName, - String mode, Context context); - - /** - * Gets available upgrades for a service mesh in a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. - * @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 available upgrades for a service mesh in a cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MeshUpgradeProfileInner getMeshUpgradeProfile(String resourceGroupName, String resourceName, String mode); -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedNamespacesClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedNamespacesClient.java deleted file mode 100644 index 45832206d7d1..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedNamespacesClient.java +++ /dev/null @@ -1,478 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.fluent.models.CredentialResultsInner; -import com.azure.resourcemanager.containerservice.fluent.models.ManagedNamespaceInner; -import com.azure.resourcemanager.containerservice.models.TagsObject; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ManagedNamespacesClient. - */ -public interface ManagedNamespacesClient { - /** - * Gets a list of managed namespaces in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed namespaces in the specified managed cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName); - - /** - * Gets a list of managed namespaces in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed namespaces in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedCluster(String resourceGroupName, String resourceName); - - /** - * Gets a list of managed namespaces in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed namespaces in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, - Context context); - - /** - * Gets the specified namespace of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @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 specified namespace of a managed cluster along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String resourceName, - String managedNamespaceName); - - /** - * Gets the specified namespace of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @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 specified namespace of a managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String resourceName, String managedNamespaceName); - - /** - * Gets the specified namespace of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @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 specified namespace of a managed cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String resourceName, - String managedNamespaceName, Context context); - - /** - * Gets the specified namespace of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @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 specified namespace of a managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedNamespaceInner get(String resourceGroupName, String resourceName, String managedNamespaceName); - - /** - * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like - * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters The namespace to create or update. - * @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 namespace managed by ARM along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, - String managedNamespaceName, ManagedNamespaceInner parameters); - - /** - * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like - * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters The namespace to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of namespace managed by ARM. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ManagedNamespaceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String resourceName, String managedNamespaceName, ManagedNamespaceInner parameters); - - /** - * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like - * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters The namespace to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of namespace managed by ARM. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedNamespaceInner> beginCreateOrUpdate(String resourceGroupName, - String resourceName, String managedNamespaceName, ManagedNamespaceInner parameters); - - /** - * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like - * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters The namespace to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of namespace managed by ARM. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedNamespaceInner> beginCreateOrUpdate(String resourceGroupName, - String resourceName, String managedNamespaceName, ManagedNamespaceInner parameters, Context context); - - /** - * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like - * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters The namespace to create or update. - * @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 namespace managed by ARM on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - String managedNamespaceName, ManagedNamespaceInner parameters); - - /** - * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like - * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters The namespace to create or update. - * @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 namespace managed by ARM. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedNamespaceInner createOrUpdate(String resourceGroupName, String resourceName, String managedNamespaceName, - ManagedNamespaceInner parameters); - - /** - * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like - * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters The namespace to create or update. - * @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 namespace managed by ARM. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedNamespaceInner createOrUpdate(String resourceGroupName, String resourceName, String managedNamespaceName, - ManagedNamespaceInner parameters, Context context); - - /** - * Deletes a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String managedNamespaceName); - - /** - * Deletes a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String managedNamespaceName); - - /** - * Deletes a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, - String managedNamespaceName); - - /** - * Deletes a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, - String managedNamespaceName, Context context); - - /** - * Deletes a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String resourceName, String managedNamespaceName); - - /** - * Deletes a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String managedNamespaceName); - - /** - * Deletes a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String managedNamespaceName, Context context); - - /** - * Updates tags on a managed namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters Parameters supplied to the patch namespace operation, we only support patch tags for now. - * @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 namespace managed by ARM along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync(String resourceGroupName, String resourceName, - String managedNamespaceName, TagsObject parameters); - - /** - * Updates tags on a managed namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters Parameters supplied to the patch namespace operation, we only support patch tags for now. - * @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 namespace managed by ARM on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String resourceName, String managedNamespaceName, - TagsObject parameters); - - /** - * Updates tags on a managed namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters Parameters supplied to the patch namespace operation, we only support patch tags for now. - * @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 namespace managed by ARM along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String resourceName, - String managedNamespaceName, TagsObject parameters, Context context); - - /** - * Updates tags on a managed namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters Parameters supplied to the patch namespace operation, we only support patch tags for now. - * @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 namespace managed by ARM. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedNamespaceInner update(String resourceGroupName, String resourceName, String managedNamespaceName, - TagsObject parameters); - - /** - * Lists the credentials of a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> listCredentialWithResponseAsync(String resourceGroupName, - String resourceName, String managedNamespaceName); - - /** - * Lists the credentials of a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @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 list credential result response on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono listCredentialAsync(String resourceGroupName, String resourceName, - String managedNamespaceName); - - /** - * Lists the credentials of a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @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 list credential result response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listCredentialWithResponse(String resourceGroupName, String resourceName, - String managedNamespaceName, Context context); - - /** - * Lists the credentials of a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @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 list credential result response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CredentialResultsInner listCredential(String resourceGroupName, String resourceName, String managedNamespaceName); -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationsClient.java deleted file mode 100644 index c21d92a200b7..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationsClient.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerservice.fluent.models.OperationValueInner; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public interface OperationsClient { - /** - * Gets a list of operations. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of operations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); - - /** - * Gets a list of operations. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of operations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Gets a list of operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of operations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateEndpointConnectionsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateEndpointConnectionsClient.java deleted file mode 100644 index 3d1685d6874a..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateEndpointConnectionsClient.java +++ /dev/null @@ -1,323 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.containerservice.fluent.models.PrivateEndpointConnectionListResultInner; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. - */ -public interface PrivateEndpointConnectionsClient { - /** - * Gets a list of private endpoint connections in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> listWithResponseAsync(String resourceGroupName, - String resourceName); - - /** - * Gets a list of private endpoint connections in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono listAsync(String resourceGroupName, String resourceName); - - /** - * Gets a list of private endpoint connections in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String resourceGroupName, String resourceName, - Context context); - - /** - * Gets a list of private endpoint connections in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionListResultInner list(String resourceGroupName, String resourceName); - - /** - * Gets the specified private endpoint connection. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String resourceName, - String privateEndpointConnectionName); - - /** - * Gets the specified private endpoint connection. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String resourceName, - String privateEndpointConnectionName); - - /** - * Gets the specified private endpoint connection. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String resourceName, - String privateEndpointConnectionName, Context context); - - /** - * Gets the specified private endpoint connection. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner get(String resourceGroupName, String resourceName, - String privateEndpointConnectionName); - - /** - * Updates a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The updated private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync(String resourceGroupName, - String resourceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); - - /** - * Updates a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The updated private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String resourceName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); - - /** - * Updates a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The updated private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String resourceName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context); - - /** - * Updates a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The updated private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner update(String resourceGroupName, String resourceName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, - String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, - String privateEndpointConnectionName, Context context); - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context); -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateLinkResourcesClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateLinkResourcesClient.java deleted file mode 100644 index cd2367dd8beb..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateLinkResourcesClient.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerservice.fluent.models.PrivateLinkResourcesListResultInner; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. - */ -public interface PrivateLinkResourcesClient { - /** - * Gets a list of private link resources in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> listWithResponseAsync(String resourceGroupName, - String resourceName); - - /** - * Gets a list of private link resources in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono listAsync(String resourceGroupName, String resourceName); - - /** - * Gets a list of private link resources in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String resourceGroupName, String resourceName, - Context context); - - /** - * Gets a list of private link resources in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourcesListResultInner list(String resourceGroupName, String resourceName); -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ResolvePrivateLinkServiceIdsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ResolvePrivateLinkServiceIdsClient.java deleted file mode 100644 index f1255c9f7aa5..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ResolvePrivateLinkServiceIdsClient.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerservice.fluent.models.PrivateLinkResourceInner; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ResolvePrivateLinkServiceIdsClient. - */ -public interface ResolvePrivateLinkServiceIdsClient { - /** - * Gets the private link service ID for the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters required in order to resolve a private link service ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link service ID for the specified managed cluster along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> postWithResponseAsync(String resourceGroupName, String resourceName, - PrivateLinkResourceInner parameters); - - /** - * Gets the private link service ID for the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters required in order to resolve a private link service ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link service ID for the specified managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono postAsync(String resourceGroupName, String resourceName, - PrivateLinkResourceInner parameters); - - /** - * Gets the private link service ID for the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters required in order to resolve a private link service ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link service ID for the specified managed cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response postWithResponse(String resourceGroupName, String resourceName, - PrivateLinkResourceInner parameters, Context context); - - /** - * Gets the private link service ID for the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters required in order to resolve a private link service ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link service ID for the specified managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourceInner post(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters); -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/SnapshotsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/SnapshotsClient.java deleted file mode 100644 index 854e49547d5c..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/SnapshotsClient.java +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerservice.fluent.models.SnapshotInner; -import com.azure.resourcemanager.containerservice.models.TagsObject; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in SnapshotsClient. - */ -public interface SnapshotsClient - extends InnerSupportsGet, InnerSupportsListing, InnerSupportsDelete { - /** - * Gets a list of snapshots in the specified subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of snapshots in the specified subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); - - /** - * Gets a list of snapshots in the specified subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of snapshots in the specified subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Gets a list of snapshots in the specified subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of snapshots in the specified subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Lists snapshots in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Snapshots operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); - - /** - * Lists snapshots in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Snapshots operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists snapshots in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 the List Snapshots operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Gets a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a snapshot along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String resourceName); - - /** - * Gets a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a snapshot on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, String resourceName); - - /** - * Gets a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a snapshot along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, - Context context); - - /** - * Gets a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a snapshot. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SnapshotInner getByResourceGroup(String resourceGroupName, String resourceName); - - /** - * Creates or updates a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The snapshot to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, - SnapshotInner parameters); - - /** - * Creates or updates a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The snapshot to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String resourceName, SnapshotInner parameters); - - /** - * Creates or updates a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The snapshot to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, - SnapshotInner parameters, Context context); - - /** - * Creates or updates a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The snapshot to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SnapshotInner createOrUpdate(String resourceGroupName, String resourceName, SnapshotInner parameters); - - /** - * Updates tags on a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update snapshot Tags operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateTagsWithResponseAsync(String resourceGroupName, String resourceName, - TagsObject parameters); - - /** - * Updates tags on a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update snapshot Tags operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateTagsAsync(String resourceGroupName, String resourceName, TagsObject parameters); - - /** - * Updates tags on a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update snapshot Tags operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateTagsWithResponse(String resourceGroupName, String resourceName, TagsObject parameters, - Context context); - - /** - * Updates tags on a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update snapshot Tags operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SnapshotInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters); - - /** - * Deletes a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName); - - /** - * Deletes a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String resourceName); - - /** - * Deletes a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); - - /** - * Deletes a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName); -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRoleBindingsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRoleBindingsClient.java deleted file mode 100644 index 24851deca87b..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRoleBindingsClient.java +++ /dev/null @@ -1,345 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.fluent.models.TrustedAccessRoleBindingInner; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in TrustedAccessRoleBindingsClient. - */ -public interface TrustedAccessRoleBindingsClient { - /** - * List trusted access role bindings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of trusted access role bindings as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String resourceName); - - /** - * List trusted access role bindings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of trusted access role bindings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String resourceName); - - /** - * List trusted access role bindings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of trusted access role bindings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String resourceName, Context context); - - /** - * Get a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a trusted access role binding along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName); - - /** - * Get a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a trusted access role binding on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName); - - /** - * Get a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a trusted access role binding along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName, Context context); - - /** - * Get a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a trusted access role binding. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - TrustedAccessRoleBindingInner get(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName); - - /** - * Create or update a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param trustedAccessRoleBinding A trusted access role binding. - * @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 defines binding between a resource and role along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName, TrustedAccessRoleBindingInner trustedAccessRoleBinding); - - /** - * Create or update a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param trustedAccessRoleBinding A trusted access role binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines binding between a resource and role. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, TrustedAccessRoleBindingInner> beginCreateOrUpdateAsync( - String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, - TrustedAccessRoleBindingInner trustedAccessRoleBinding); - - /** - * Create or update a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param trustedAccessRoleBinding A trusted access role binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines binding between a resource and role. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, TrustedAccessRoleBindingInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, - TrustedAccessRoleBindingInner trustedAccessRoleBinding); - - /** - * Create or update a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param trustedAccessRoleBinding A trusted access role binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines binding between a resource and role. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, TrustedAccessRoleBindingInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, - TrustedAccessRoleBindingInner trustedAccessRoleBinding, Context context); - - /** - * Create or update a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param trustedAccessRoleBinding A trusted access role binding. - * @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 defines binding between a resource and role on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName, TrustedAccessRoleBindingInner trustedAccessRoleBinding); - - /** - * Create or update a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param trustedAccessRoleBinding A trusted access role binding. - * @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 defines binding between a resource and role. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - TrustedAccessRoleBindingInner createOrUpdate(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName, TrustedAccessRoleBindingInner trustedAccessRoleBinding); - - /** - * Create or update a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param trustedAccessRoleBinding A trusted access role binding. - * @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 defines binding between a resource and role. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - TrustedAccessRoleBindingInner createOrUpdate(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName, TrustedAccessRoleBindingInner trustedAccessRoleBinding, Context context); - - /** - * Delete a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName); - - /** - * Delete a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName); - - /** - * Delete a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName); - - /** - * Delete a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName, Context context); - - /** - * Delete a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName); - - /** - * Delete a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName); - - /** - * Delete a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, Context context); -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRolesClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRolesClient.java deleted file mode 100644 index f9cac9a8f19e..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRolesClient.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerservice.fluent.models.TrustedAccessRoleInner; - -/** - * An instance of this class provides access to all the operations defined in TrustedAccessRolesClient. - */ -public interface TrustedAccessRolesClient { - /** - * List supported trusted access roles. - * - * @param location The name of the Azure region. - * @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 list of trusted access roles as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String location); - - /** - * List supported trusted access roles. - * - * @param location The name of the Azure region. - * @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 list of trusted access roles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location); - - /** - * List supported trusted access roles. - * - * @param location The name of the Azure region. - * @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 list of trusted access roles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location, Context context); -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AccessProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AccessProfile.java deleted file mode 100644 index fc9e1725879c..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AccessProfile.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Profile for enabling a user to access a managed cluster. - */ -@Fluent -public final class AccessProfile implements JsonSerializable { - /* - * Base64-encoded Kubernetes configuration file. - */ - private byte[] kubeConfig; - - /** - * Creates an instance of AccessProfile class. - */ - public AccessProfile() { - } - - /** - * Get the kubeConfig property: Base64-encoded Kubernetes configuration file. - * - * @return the kubeConfig value. - */ - public byte[] kubeConfig() { - return CoreUtils.clone(this.kubeConfig); - } - - /** - * Set the kubeConfig property: Base64-encoded Kubernetes configuration file. - * - * @param kubeConfig the kubeConfig value to set. - * @return the AccessProfile object itself. - */ - public AccessProfile withKubeConfig(byte[] kubeConfig) { - this.kubeConfig = CoreUtils.clone(kubeConfig); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBinaryField("kubeConfig", this.kubeConfig); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AccessProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AccessProfile 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 AccessProfile. - */ - public static AccessProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AccessProfile deserializedAccessProfile = new AccessProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("kubeConfig".equals(fieldName)) { - deserializedAccessProfile.kubeConfig = reader.getBinary(); - } else { - reader.skipChildren(); - } - } - - return deserializedAccessProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsInner.java deleted file mode 100644 index e84d83ef38ee..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsInner.java +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem; -import java.io.IOException; -import java.util.List; - -/** - * The list of available versions for an agent pool. - */ -@Fluent -public final class AgentPoolAvailableVersionsInner implements JsonSerializable { - /* - * The ID of the agent pool version list. - */ - private String id; - - /* - * The name of the agent pool version list. - */ - private String name; - - /* - * Type of the agent pool version list. - */ - private String type; - - /* - * Properties of agent pool available versions. - */ - private AgentPoolAvailableVersionsProperties innerProperties = new AgentPoolAvailableVersionsProperties(); - - /** - * Creates an instance of AgentPoolAvailableVersionsInner class. - */ - public AgentPoolAvailableVersionsInner() { - } - - /** - * Get the id property: The ID of the agent pool version list. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the agent pool version list. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the type property: Type of the agent pool version list. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the innerProperties property: Properties of agent pool available versions. - * - * @return the innerProperties value. - */ - private AgentPoolAvailableVersionsProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the agentPoolVersions property: List of versions available for agent pool. - * - * @return the agentPoolVersions value. - */ - public List agentPoolVersions() { - return this.innerProperties() == null ? null : this.innerProperties().agentPoolVersions(); - } - - /** - * Set the agentPoolVersions property: List of versions available for agent pool. - * - * @param agentPoolVersions the agentPoolVersions value to set. - * @return the AgentPoolAvailableVersionsInner object itself. - */ - public AgentPoolAvailableVersionsInner - withAgentPoolVersions(List agentPoolVersions) { - if (this.innerProperties() == null) { - this.innerProperties = new AgentPoolAvailableVersionsProperties(); - } - this.innerProperties().withAgentPoolVersions(agentPoolVersions); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model AgentPoolAvailableVersionsInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AgentPoolAvailableVersionsInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AgentPoolAvailableVersionsInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AgentPoolAvailableVersionsInner 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 AgentPoolAvailableVersionsInner. - */ - public static AgentPoolAvailableVersionsInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AgentPoolAvailableVersionsInner deserializedAgentPoolAvailableVersionsInner - = new AgentPoolAvailableVersionsInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedAgentPoolAvailableVersionsInner.innerProperties - = AgentPoolAvailableVersionsProperties.fromJson(reader); - } else if ("id".equals(fieldName)) { - deserializedAgentPoolAvailableVersionsInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedAgentPoolAvailableVersionsInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedAgentPoolAvailableVersionsInner.type = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAgentPoolAvailableVersionsInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsProperties.java deleted file mode 100644 index fd96a07e23cd..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsProperties.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.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 com.azure.resourcemanager.containerservice.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem; -import java.io.IOException; -import java.util.List; - -/** - * The list of available agent pool versions. - */ -@Fluent -public final class AgentPoolAvailableVersionsProperties - implements JsonSerializable { - /* - * List of versions available for agent pool. - */ - private List agentPoolVersions; - - /** - * Creates an instance of AgentPoolAvailableVersionsProperties class. - */ - public AgentPoolAvailableVersionsProperties() { - } - - /** - * Get the agentPoolVersions property: List of versions available for agent pool. - * - * @return the agentPoolVersions value. - */ - public List agentPoolVersions() { - return this.agentPoolVersions; - } - - /** - * Set the agentPoolVersions property: List of versions available for agent pool. - * - * @param agentPoolVersions the agentPoolVersions value to set. - * @return the AgentPoolAvailableVersionsProperties object itself. - */ - public AgentPoolAvailableVersionsProperties - withAgentPoolVersions(List agentPoolVersions) { - this.agentPoolVersions = agentPoolVersions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (agentPoolVersions() != null) { - agentPoolVersions().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("agentPoolVersions", this.agentPoolVersions, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AgentPoolAvailableVersionsProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AgentPoolAvailableVersionsProperties 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 AgentPoolAvailableVersionsProperties. - */ - public static AgentPoolAvailableVersionsProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AgentPoolAvailableVersionsProperties deserializedAgentPoolAvailableVersionsProperties - = new AgentPoolAvailableVersionsProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("agentPoolVersions".equals(fieldName)) { - List agentPoolVersions - = reader.readArray( - reader1 -> AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.fromJson(reader1)); - deserializedAgentPoolAvailableVersionsProperties.agentPoolVersions = agentPoolVersions; - } else { - reader.skipChildren(); - } - } - - return deserializedAgentPoolAvailableVersionsProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java deleted file mode 100644 index 5f3f79c9daf8..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java +++ /dev/null @@ -1,1476 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.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 com.azure.resourcemanager.containerservice.models.AgentPoolGatewayProfile; -import com.azure.resourcemanager.containerservice.models.AgentPoolMode; -import com.azure.resourcemanager.containerservice.models.AgentPoolNetworkProfile; -import com.azure.resourcemanager.containerservice.models.AgentPoolSecurityProfile; -import com.azure.resourcemanager.containerservice.models.AgentPoolStatus; -import com.azure.resourcemanager.containerservice.models.AgentPoolType; -import com.azure.resourcemanager.containerservice.models.AgentPoolUpgradeSettings; -import com.azure.resourcemanager.containerservice.models.AgentPoolWindowsProfile; -import com.azure.resourcemanager.containerservice.models.CreationData; -import com.azure.resourcemanager.containerservice.models.GpuInstanceProfile; -import com.azure.resourcemanager.containerservice.models.GpuProfile; -import com.azure.resourcemanager.containerservice.models.KubeletConfig; -import com.azure.resourcemanager.containerservice.models.KubeletDiskType; -import com.azure.resourcemanager.containerservice.models.LinuxOSConfig; -import com.azure.resourcemanager.containerservice.models.LocalDnsProfile; -import com.azure.resourcemanager.containerservice.models.OSDiskType; -import com.azure.resourcemanager.containerservice.models.OSSku; -import com.azure.resourcemanager.containerservice.models.OSType; -import com.azure.resourcemanager.containerservice.models.PodIpAllocationMode; -import com.azure.resourcemanager.containerservice.models.PowerState; -import com.azure.resourcemanager.containerservice.models.ScaleDownMode; -import com.azure.resourcemanager.containerservice.models.ScaleSetEvictionPolicy; -import com.azure.resourcemanager.containerservice.models.ScaleSetPriority; -import com.azure.resourcemanager.containerservice.models.VirtualMachineNodes; -import com.azure.resourcemanager.containerservice.models.VirtualMachinesProfile; -import com.azure.resourcemanager.containerservice.models.WorkloadRuntime; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Agent Pool. - */ -@Fluent -public final class AgentPoolInner extends SubResource { - /* - * Properties of an agent pool. - */ - private ManagedClusterAgentPoolProfileProperties innerProperties; - - /* - * The name of the resource that is unique within a resource group. This name can be used to access the resource. - */ - private String name; - - /* - * Resource type - */ - private String type; - - /** - * Creates an instance of AgentPoolInner class. - */ - public AgentPoolInner() { - } - - /** - * Get the innerProperties property: Properties of an agent pool. - * - * @return the innerProperties value. - */ - private ManagedClusterAgentPoolProfileProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the name property: The name of the resource that is unique within a resource group. This name can be used to - * access the resource. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the type property: Resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * {@inheritDoc} - */ - @Override - public AgentPoolInner withId(String id) { - super.withId(id); - return this; - } - - /** - * Get the etag property: Unique read-only string used to implement optimistic concurrency. The eTag value will - * change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a - * subsequent request to enable optimistic concurrency per the normal eTag convention. - * - * @return the etag value. - */ - public String etag() { - return this.innerProperties() == null ? null : this.innerProperties().etag(); - } - - /** - * Get the count property: Number of agents (VMs) to host docker containers. Allowed values must be in the range of - * 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default - * value is 1. - * - * @return the count value. - */ - public Integer count() { - return this.innerProperties() == null ? null : this.innerProperties().count(); - } - - /** - * Set the count property: Number of agents (VMs) to host docker containers. Allowed values must be in the range of - * 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default - * value is 1. - * - * @param count the count value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withCount(Integer count) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withCount(count); - return this; - } - - /** - * Get the vmSize property: The size of the agent pool VMs. VM size availability varies by region. If a node - * contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on - * restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. - * - * @return the vmSize value. - */ - public String vmSize() { - return this.innerProperties() == null ? null : this.innerProperties().vmSize(); - } - - /** - * Set the vmSize property: The size of the agent pool VMs. VM size availability varies by region. If a node - * contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on - * restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. - * - * @param vmSize the vmSize value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withVmSize(String vmSize) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withVmSize(vmSize); - return this; - } - - /** - * Get the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the - * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. - * - * @return the osDiskSizeGB value. - */ - public Integer osDiskSizeGB() { - return this.innerProperties() == null ? null : this.innerProperties().osDiskSizeGB(); - } - - /** - * Set the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the - * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. - * - * @param osDiskSizeGB the osDiskSizeGB value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withOsDiskSizeGB(Integer osDiskSizeGB) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withOsDiskSizeGB(osDiskSizeGB); - return this; - } - - /** - * Get the osDiskType property: The OS disk type to be used for machines in the agent pool. The default is - * 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, - * defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral - * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). - * - * @return the osDiskType value. - */ - public OSDiskType osDiskType() { - return this.innerProperties() == null ? null : this.innerProperties().osDiskType(); - } - - /** - * Set the osDiskType property: The OS disk type to be used for machines in the agent pool. The default is - * 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, - * defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral - * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). - * - * @param osDiskType the osDiskType value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withOsDiskType(OSDiskType osDiskType) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withOsDiskType(osDiskType); - return this; - } - - /** - * Get the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and - * Kubelet ephemeral storage. - * - * @return the kubeletDiskType value. - */ - public KubeletDiskType kubeletDiskType() { - return this.innerProperties() == null ? null : this.innerProperties().kubeletDiskType(); - } - - /** - * Set the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and - * Kubelet ephemeral storage. - * - * @param kubeletDiskType the kubeletDiskType value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withKubeletDiskType(KubeletDiskType kubeletDiskType) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withKubeletDiskType(kubeletDiskType); - return this; - } - - /** - * Get the workloadRuntime property: Determines the type of workload a node can run. - * - * @return the workloadRuntime value. - */ - public WorkloadRuntime workloadRuntime() { - return this.innerProperties() == null ? null : this.innerProperties().workloadRuntime(); - } - - /** - * Set the workloadRuntime property: Determines the type of workload a node can run. - * - * @param workloadRuntime the workloadRuntime value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withWorkloadRuntime(WorkloadRuntime workloadRuntime) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withWorkloadRuntime(workloadRuntime); - return this; - } - - /** - * Get the messageOfTheDay property: Message of the day for Linux nodes, base64-encoded. A base64-encoded string - * which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux - * nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not - * be executed as a script). - * - * @return the messageOfTheDay value. - */ - public String messageOfTheDay() { - return this.innerProperties() == null ? null : this.innerProperties().messageOfTheDay(); - } - - /** - * Set the messageOfTheDay property: Message of the day for Linux nodes, base64-encoded. A base64-encoded string - * which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux - * nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not - * be executed as a script). - * - * @param messageOfTheDay the messageOfTheDay value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withMessageOfTheDay(String messageOfTheDay) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withMessageOfTheDay(messageOfTheDay); - return this; - } - - /** - * Get the vnetSubnetId property: The ID of the subnet which agent pool nodes and optionally pods will join on - * startup. If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, - * this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. - * - * @return the vnetSubnetId value. - */ - public String vnetSubnetId() { - return this.innerProperties() == null ? null : this.innerProperties().vnetSubnetId(); - } - - /** - * Set the vnetSubnetId property: The ID of the subnet which agent pool nodes and optionally pods will join on - * startup. If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, - * this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. - * - * @param vnetSubnetId the vnetSubnetId value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withVnetSubnetId(String vnetSubnetId) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withVnetSubnetId(vnetSubnetId); - return this; - } - - /** - * Get the podSubnetId property: The ID of the subnet which pods will join when launched. If omitted, pod IPs are - * statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. - * - * @return the podSubnetId value. - */ - public String podSubnetId() { - return this.innerProperties() == null ? null : this.innerProperties().podSubnetId(); - } - - /** - * Set the podSubnetId property: The ID of the subnet which pods will join when launched. If omitted, pod IPs are - * statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. - * - * @param podSubnetId the podSubnetId value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withPodSubnetId(String podSubnetId) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withPodSubnetId(podSubnetId); - return this; - } - - /** - * Get the podIpAllocationMode property: Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. - * Must be used with podSubnetId. The default is 'DynamicIndividual'. - * - * @return the podIpAllocationMode value. - */ - public PodIpAllocationMode podIpAllocationMode() { - return this.innerProperties() == null ? null : this.innerProperties().podIpAllocationMode(); - } - - /** - * Set the podIpAllocationMode property: Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. - * Must be used with podSubnetId. The default is 'DynamicIndividual'. - * - * @param podIpAllocationMode the podIpAllocationMode value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withPodIpAllocationMode(PodIpAllocationMode podIpAllocationMode) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withPodIpAllocationMode(podIpAllocationMode); - return this; - } - - /** - * Get the maxPods property: The maximum number of pods that can run on a node. - * - * @return the maxPods value. - */ - public Integer maxPods() { - return this.innerProperties() == null ? null : this.innerProperties().maxPods(); - } - - /** - * Set the maxPods property: The maximum number of pods that can run on a node. - * - * @param maxPods the maxPods value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withMaxPods(Integer maxPods) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withMaxPods(maxPods); - return this; - } - - /** - * Get the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - * - * @return the osType value. - */ - public OSType osType() { - return this.innerProperties() == null ? null : this.innerProperties().osType(); - } - - /** - * Set the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - * - * @param osType the osType value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withOsType(OSType osType) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withOsType(osType); - return this; - } - - /** - * Get the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. - * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is - * Windows. - * - * @return the osSku value. - */ - public OSSku osSku() { - return this.innerProperties() == null ? null : this.innerProperties().osSku(); - } - - /** - * Set the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. - * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is - * Windows. - * - * @param osSku the osSku value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withOsSku(OSSku osSku) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withOsSku(osSku); - return this; - } - - /** - * Get the maxCount property: The maximum number of nodes for auto-scaling. - * - * @return the maxCount value. - */ - public Integer maxCount() { - return this.innerProperties() == null ? null : this.innerProperties().maxCount(); - } - - /** - * Set the maxCount property: The maximum number of nodes for auto-scaling. - * - * @param maxCount the maxCount value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withMaxCount(Integer maxCount) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withMaxCount(maxCount); - return this; - } - - /** - * Get the minCount property: The minimum number of nodes for auto-scaling. - * - * @return the minCount value. - */ - public Integer minCount() { - return this.innerProperties() == null ? null : this.innerProperties().minCount(); - } - - /** - * Set the minCount property: The minimum number of nodes for auto-scaling. - * - * @param minCount the minCount value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withMinCount(Integer minCount) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withMinCount(minCount); - return this; - } - - /** - * Get the enableAutoScaling property: Whether to enable auto-scaler. - * - * @return the enableAutoScaling value. - */ - public Boolean enableAutoScaling() { - return this.innerProperties() == null ? null : this.innerProperties().enableAutoScaling(); - } - - /** - * Set the enableAutoScaling property: Whether to enable auto-scaler. - * - * @param enableAutoScaling the enableAutoScaling value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withEnableAutoScaling(Boolean enableAutoScaling) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withEnableAutoScaling(enableAutoScaling); - return this; - } - - /** - * Get the scaleDownMode property: The scale down mode to use when scaling the Agent Pool. This also effects the - * cluster autoscaler behavior. If not specified, it defaults to Delete. - * - * @return the scaleDownMode value. - */ - public ScaleDownMode scaleDownMode() { - return this.innerProperties() == null ? null : this.innerProperties().scaleDownMode(); - } - - /** - * Set the scaleDownMode property: The scale down mode to use when scaling the Agent Pool. This also effects the - * cluster autoscaler behavior. If not specified, it defaults to Delete. - * - * @param scaleDownMode the scaleDownMode value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withScaleDownMode(ScaleDownMode scaleDownMode) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withScaleDownMode(scaleDownMode); - return this; - } - - /** - * Get the type property: The type of Agent Pool. - * - * @return the type value. - */ - public AgentPoolType typePropertiesType() { - return this.innerProperties() == null ? null : this.innerProperties().type(); - } - - /** - * Set the type property: The type of Agent Pool. - * - * @param type the type value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withTypePropertiesType(AgentPoolType type) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withType(type); - return this; - } - - /** - * Get the mode property: The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all - * times. For additional information on agent pool restrictions and best practices, see: - * https://docs.microsoft.com/azure/aks/use-system-pools. - * - * @return the mode value. - */ - public AgentPoolMode mode() { - return this.innerProperties() == null ? null : this.innerProperties().mode(); - } - - /** - * Set the mode property: The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all - * times. For additional information on agent pool restrictions and best practices, see: - * https://docs.microsoft.com/azure/aks/use-system-pools. - * - * @param mode the mode value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withMode(AgentPoolMode mode) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withMode(mode); - return this; - } - - /** - * Get the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version - * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When - * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the - * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an - * upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an - * AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control - * plane. The node pool minor version must be within two minor versions of the control plane version. The node pool - * version cannot be greater than the control plane version. For more information see [upgrading a node - * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). - * - * @return the orchestratorVersion value. - */ - public String orchestratorVersion() { - return this.innerProperties() == null ? null : this.innerProperties().orchestratorVersion(); - } - - /** - * Set the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version - * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When - * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the - * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an - * upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an - * AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control - * plane. The node pool minor version must be within two minor versions of the control plane version. The node pool - * version cannot be greater than the control plane version. For more information see [upgrading a node - * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). - * - * @param orchestratorVersion the orchestratorVersion value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withOrchestratorVersion(String orchestratorVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withOrchestratorVersion(orchestratorVersion); - return this; - } - - /** - * Get the currentOrchestratorVersion property: The version of Kubernetes the Agent Pool is running. If - * orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to - * it. If orchestratorVersion is <major.minor>, this field will contain the full <major.minor.patch> - * version being used. - * - * @return the currentOrchestratorVersion value. - */ - public String currentOrchestratorVersion() { - return this.innerProperties() == null ? null : this.innerProperties().currentOrchestratorVersion(); - } - - /** - * Get the nodeImageVersion property: The version of node image. - * - * @return the nodeImageVersion value. - */ - public String nodeImageVersion() { - return this.innerProperties() == null ? null : this.innerProperties().nodeImageVersion(); - } - - /** - * Get the upgradeSettings property: Settings for upgrading the agentpool. - * - * @return the upgradeSettings value. - */ - public AgentPoolUpgradeSettings upgradeSettings() { - return this.innerProperties() == null ? null : this.innerProperties().upgradeSettings(); - } - - /** - * Set the upgradeSettings property: Settings for upgrading the agentpool. - * - * @param upgradeSettings the upgradeSettings value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withUpgradeSettings(upgradeSettings); - return this; - } - - /** - * Get the provisioningState property: The current deployment or provisioning state. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the powerState property: Whether the Agent Pool is running or stopped. When an Agent Pool is first created it - * is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops - * all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and - * provisioning state is Succeeded. - * - * @return the powerState value. - */ - public PowerState powerState() { - return this.innerProperties() == null ? null : this.innerProperties().powerState(); - } - - /** - * Set the powerState property: Whether the Agent Pool is running or stopped. When an Agent Pool is first created it - * is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops - * all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and - * provisioning state is Succeeded. - * - * @param powerState the powerState value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withPowerState(PowerState powerState) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withPowerState(powerState); - return this; - } - - /** - * Get the availabilityZones property: The list of Availability zones to use for nodes. This can only be specified - * if the AgentPoolType property is 'VirtualMachineScaleSets'. - * - * @return the availabilityZones value. - */ - public List availabilityZones() { - return this.innerProperties() == null ? null : this.innerProperties().availabilityZones(); - } - - /** - * Set the availabilityZones property: The list of Availability zones to use for nodes. This can only be specified - * if the AgentPoolType property is 'VirtualMachineScaleSets'. - * - * @param availabilityZones the availabilityZones value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withAvailabilityZones(List availabilityZones) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withAvailabilityZones(availabilityZones); - return this; - } - - /** - * Get the enableNodePublicIp property: Whether each node is allocated its own public IP. Some scenarios may require - * nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming - * workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For - * more information see [assigning a public IP per - * node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). - * The default is false. - * - * @return the enableNodePublicIp value. - */ - public Boolean enableNodePublicIp() { - return this.innerProperties() == null ? null : this.innerProperties().enableNodePublicIp(); - } - - /** - * Set the enableNodePublicIp property: Whether each node is allocated its own public IP. Some scenarios may require - * nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming - * workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For - * more information see [assigning a public IP per - * node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). - * The default is false. - * - * @param enableNodePublicIp the enableNodePublicIp value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withEnableNodePublicIp(Boolean enableNodePublicIp) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withEnableNodePublicIp(enableNodePublicIp); - return this; - } - - /** - * Get the nodePublicIpPrefixId property: The public IP prefix ID which VM nodes should use IPs from. This is of the - * form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. - * - * @return the nodePublicIpPrefixId value. - */ - public String nodePublicIpPrefixId() { - return this.innerProperties() == null ? null : this.innerProperties().nodePublicIpPrefixId(); - } - - /** - * Set the nodePublicIpPrefixId property: The public IP prefix ID which VM nodes should use IPs from. This is of the - * form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. - * - * @param nodePublicIpPrefixId the nodePublicIpPrefixId value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withNodePublicIpPrefixId(String nodePublicIpPrefixId) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withNodePublicIpPrefixId(nodePublicIpPrefixId); - return this; - } - - /** - * Get the scaleSetPriority property: The Virtual Machine Scale Set priority. If not specified, the default is - * 'Regular'. - * - * @return the scaleSetPriority value. - */ - public ScaleSetPriority scaleSetPriority() { - return this.innerProperties() == null ? null : this.innerProperties().scaleSetPriority(); - } - - /** - * Set the scaleSetPriority property: The Virtual Machine Scale Set priority. If not specified, the default is - * 'Regular'. - * - * @param scaleSetPriority the scaleSetPriority value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withScaleSetPriority(ScaleSetPriority scaleSetPriority) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withScaleSetPriority(scaleSetPriority); - return this; - } - - /** - * Get the scaleSetEvictionPolicy property: The Virtual Machine Scale Set eviction policy to use. This cannot be - * specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. - * - * @return the scaleSetEvictionPolicy value. - */ - public ScaleSetEvictionPolicy scaleSetEvictionPolicy() { - return this.innerProperties() == null ? null : this.innerProperties().scaleSetEvictionPolicy(); - } - - /** - * Set the scaleSetEvictionPolicy property: The Virtual Machine Scale Set eviction policy to use. This cannot be - * specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. - * - * @param scaleSetEvictionPolicy the scaleSetEvictionPolicy value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withScaleSetEvictionPolicy(scaleSetEvictionPolicy); - return this; - } - - /** - * Get the spotMaxPrice property: The max price (in US Dollars) you are willing to pay for spot instances. Possible - * values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. - * Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any - * on-demand price. For more details on spot pricing, see [spot VMs - * pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). - * - * @return the spotMaxPrice value. - */ - public Float spotMaxPrice() { - return this.innerProperties() == null ? null : this.innerProperties().spotMaxPrice(); - } - - /** - * Set the spotMaxPrice property: The max price (in US Dollars) you are willing to pay for spot instances. Possible - * values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. - * Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any - * on-demand price. For more details on spot pricing, see [spot VMs - * pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). - * - * @param spotMaxPrice the spotMaxPrice value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withSpotMaxPrice(Float spotMaxPrice) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withSpotMaxPrice(spotMaxPrice); - return this; - } - - /** - * Get the tags property: The tags to be persisted on the agent pool virtual machine scale set. - * - * @return the tags value. - */ - public Map tags() { - return this.innerProperties() == null ? null : this.innerProperties().tags(); - } - - /** - * Set the tags property: The tags to be persisted on the agent pool virtual machine scale set. - * - * @param tags the tags value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withTags(Map tags) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withTags(tags); - return this; - } - - /** - * Get the nodeLabels property: The node labels to be persisted across all nodes in agent pool. - * - * @return the nodeLabels value. - */ - public Map nodeLabels() { - return this.innerProperties() == null ? null : this.innerProperties().nodeLabels(); - } - - /** - * Set the nodeLabels property: The node labels to be persisted across all nodes in agent pool. - * - * @param nodeLabels the nodeLabels value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withNodeLabels(Map nodeLabels) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withNodeLabels(nodeLabels); - return this; - } - - /** - * Get the nodeTaints property: The taints added to new nodes during node pool create and scale. For example, - * key=value:NoSchedule. - * - * @return the nodeTaints value. - */ - public List nodeTaints() { - return this.innerProperties() == null ? null : this.innerProperties().nodeTaints(); - } - - /** - * Set the nodeTaints property: The taints added to new nodes during node pool create and scale. For example, - * key=value:NoSchedule. - * - * @param nodeTaints the nodeTaints value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withNodeTaints(List nodeTaints) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withNodeTaints(nodeTaints); - return this; - } - - /** - * Get the proximityPlacementGroupId property: The ID for Proximity Placement Group. - * - * @return the proximityPlacementGroupId value. - */ - public String proximityPlacementGroupId() { - return this.innerProperties() == null ? null : this.innerProperties().proximityPlacementGroupId(); - } - - /** - * Set the proximityPlacementGroupId property: The ID for Proximity Placement Group. - * - * @param proximityPlacementGroupId the proximityPlacementGroupId value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withProximityPlacementGroupId(String proximityPlacementGroupId) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withProximityPlacementGroupId(proximityPlacementGroupId); - return this; - } - - /** - * Get the kubeletConfig property: The Kubelet configuration on the agent pool nodes. - * - * @return the kubeletConfig value. - */ - public KubeletConfig kubeletConfig() { - return this.innerProperties() == null ? null : this.innerProperties().kubeletConfig(); - } - - /** - * Set the kubeletConfig property: The Kubelet configuration on the agent pool nodes. - * - * @param kubeletConfig the kubeletConfig value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withKubeletConfig(KubeletConfig kubeletConfig) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withKubeletConfig(kubeletConfig); - return this; - } - - /** - * Get the linuxOSConfig property: The OS configuration of Linux agent nodes. - * - * @return the linuxOSConfig value. - */ - public LinuxOSConfig linuxOSConfig() { - return this.innerProperties() == null ? null : this.innerProperties().linuxOSConfig(); - } - - /** - * Set the linuxOSConfig property: The OS configuration of Linux agent nodes. - * - * @param linuxOSConfig the linuxOSConfig value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withLinuxOSConfig(LinuxOSConfig linuxOSConfig) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withLinuxOSConfig(linuxOSConfig); - return this; - } - - /** - * Get the enableEncryptionAtHost property: Whether to enable host based OS and data drive encryption. This is only - * supported on certain VM sizes and in certain Azure regions. For more information, see: - * https://docs.microsoft.com/azure/aks/enable-host-encryption. - * - * @return the enableEncryptionAtHost value. - */ - public Boolean enableEncryptionAtHost() { - return this.innerProperties() == null ? null : this.innerProperties().enableEncryptionAtHost(); - } - - /** - * Set the enableEncryptionAtHost property: Whether to enable host based OS and data drive encryption. This is only - * supported on certain VM sizes and in certain Azure regions. For more information, see: - * https://docs.microsoft.com/azure/aks/enable-host-encryption. - * - * @param enableEncryptionAtHost the enableEncryptionAtHost value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withEnableEncryptionAtHost(Boolean enableEncryptionAtHost) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withEnableEncryptionAtHost(enableEncryptionAtHost); - return this; - } - - /** - * Get the enableUltraSsd property: Whether to enable UltraSSD. - * - * @return the enableUltraSsd value. - */ - public Boolean enableUltraSsd() { - return this.innerProperties() == null ? null : this.innerProperties().enableUltraSsd(); - } - - /** - * Set the enableUltraSsd property: Whether to enable UltraSSD. - * - * @param enableUltraSsd the enableUltraSsd value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withEnableUltraSsd(Boolean enableUltraSsd) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withEnableUltraSsd(enableUltraSsd); - return this; - } - - /** - * Get the enableFips property: Whether to use a FIPS-enabled OS. See [Add a FIPS-enabled node - * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more - * details. - * - * @return the enableFips value. - */ - public Boolean enableFips() { - return this.innerProperties() == null ? null : this.innerProperties().enableFips(); - } - - /** - * Set the enableFips property: Whether to use a FIPS-enabled OS. See [Add a FIPS-enabled node - * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more - * details. - * - * @param enableFips the enableFips value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withEnableFips(Boolean enableFips) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withEnableFips(enableFips); - return this; - } - - /** - * Get the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for - * supported GPU VM SKU. - * - * @return the gpuInstanceProfile value. - */ - public GpuInstanceProfile gpuInstanceProfile() { - return this.innerProperties() == null ? null : this.innerProperties().gpuInstanceProfile(); - } - - /** - * Set the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for - * supported GPU VM SKU. - * - * @param gpuInstanceProfile the gpuInstanceProfile value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withGpuInstanceProfile(gpuInstanceProfile); - return this; - } - - /** - * Get the creationData property: CreationData to be used to specify the source Snapshot ID if the node pool will be - * created/upgraded using a snapshot. - * - * @return the creationData value. - */ - public CreationData creationData() { - return this.innerProperties() == null ? null : this.innerProperties().creationData(); - } - - /** - * Set the creationData property: CreationData to be used to specify the source Snapshot ID if the node pool will be - * created/upgraded using a snapshot. - * - * @param creationData the creationData value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withCreationData(CreationData creationData) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withCreationData(creationData); - return this; - } - - /** - * Get the capacityReservationGroupId property: AKS will associate the specified agent pool with the Capacity - * Reservation Group. - * - * @return the capacityReservationGroupId value. - */ - public String capacityReservationGroupId() { - return this.innerProperties() == null ? null : this.innerProperties().capacityReservationGroupId(); - } - - /** - * Set the capacityReservationGroupId property: AKS will associate the specified agent pool with the Capacity - * Reservation Group. - * - * @param capacityReservationGroupId the capacityReservationGroupId value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withCapacityReservationGroupId(String capacityReservationGroupId) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withCapacityReservationGroupId(capacityReservationGroupId); - return this; - } - - /** - * Get the hostGroupId property: The fully qualified resource ID of the Dedicated Host Group to provision virtual - * machines from, used only in creation scenario and not allowed to changed once set. This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. - * For more information see [Azure dedicated - * hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). - * - * @return the hostGroupId value. - */ - public String hostGroupId() { - return this.innerProperties() == null ? null : this.innerProperties().hostGroupId(); - } - - /** - * Set the hostGroupId property: The fully qualified resource ID of the Dedicated Host Group to provision virtual - * machines from, used only in creation scenario and not allowed to changed once set. This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. - * For more information see [Azure dedicated - * hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). - * - * @param hostGroupId the hostGroupId value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withHostGroupId(String hostGroupId) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withHostGroupId(hostGroupId); - return this; - } - - /** - * Get the networkProfile property: Network-related settings of an agent pool. - * - * @return the networkProfile value. - */ - public AgentPoolNetworkProfile networkProfile() { - return this.innerProperties() == null ? null : this.innerProperties().networkProfile(); - } - - /** - * Set the networkProfile property: Network-related settings of an agent pool. - * - * @param networkProfile the networkProfile value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withNetworkProfile(AgentPoolNetworkProfile networkProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withNetworkProfile(networkProfile); - return this; - } - - /** - * Get the windowsProfile property: The Windows agent pool's specific profile. - * - * @return the windowsProfile value. - */ - public AgentPoolWindowsProfile windowsProfile() { - return this.innerProperties() == null ? null : this.innerProperties().windowsProfile(); - } - - /** - * Set the windowsProfile property: The Windows agent pool's specific profile. - * - * @param windowsProfile the windowsProfile value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withWindowsProfile(windowsProfile); - return this; - } - - /** - * Get the securityProfile property: The security settings of an agent pool. - * - * @return the securityProfile value. - */ - public AgentPoolSecurityProfile securityProfile() { - return this.innerProperties() == null ? null : this.innerProperties().securityProfile(); - } - - /** - * Set the securityProfile property: The security settings of an agent pool. - * - * @param securityProfile the securityProfile value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withSecurityProfile(AgentPoolSecurityProfile securityProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withSecurityProfile(securityProfile); - return this; - } - - /** - * Get the gpuProfile property: GPU settings for the Agent Pool. - * - * @return the gpuProfile value. - */ - public GpuProfile gpuProfile() { - return this.innerProperties() == null ? null : this.innerProperties().gpuProfile(); - } - - /** - * Set the gpuProfile property: GPU settings for the Agent Pool. - * - * @param gpuProfile the gpuProfile value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withGpuProfile(GpuProfile gpuProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withGpuProfile(gpuProfile); - return this; - } - - /** - * Get the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be - * set if agent pool mode is not Gateway. - * - * @return the gatewayProfile value. - */ - public AgentPoolGatewayProfile gatewayProfile() { - return this.innerProperties() == null ? null : this.innerProperties().gatewayProfile(); - } - - /** - * Set the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be - * set if agent pool mode is not Gateway. - * - * @param gatewayProfile the gatewayProfile value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withGatewayProfile(AgentPoolGatewayProfile gatewayProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withGatewayProfile(gatewayProfile); - return this; - } - - /** - * Get the virtualMachinesProfile property: Specifications on VirtualMachines agent pool. - * - * @return the virtualMachinesProfile value. - */ - public VirtualMachinesProfile virtualMachinesProfile() { - return this.innerProperties() == null ? null : this.innerProperties().virtualMachinesProfile(); - } - - /** - * Set the virtualMachinesProfile property: Specifications on VirtualMachines agent pool. - * - * @param virtualMachinesProfile the virtualMachinesProfile value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withVirtualMachinesProfile(VirtualMachinesProfile virtualMachinesProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withVirtualMachinesProfile(virtualMachinesProfile); - return this; - } - - /** - * Get the virtualMachineNodesStatus property: The status of nodes in a VirtualMachines agent pool. - * - * @return the virtualMachineNodesStatus value. - */ - public List virtualMachineNodesStatus() { - return this.innerProperties() == null ? null : this.innerProperties().virtualMachineNodesStatus(); - } - - /** - * Set the virtualMachineNodesStatus property: The status of nodes in a VirtualMachines agent pool. - * - * @param virtualMachineNodesStatus the virtualMachineNodesStatus value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withVirtualMachineNodesStatus(List virtualMachineNodesStatus) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withVirtualMachineNodesStatus(virtualMachineNodesStatus); - return this; - } - - /** - * Get the status property: Contains read-only information about the Agent Pool. - * - * @return the status value. - */ - public AgentPoolStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Set the status property: Contains read-only information about the Agent Pool. - * - * @param status the status value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withStatus(AgentPoolStatus status) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withStatus(status); - return this; - } - - /** - * Get the localDnsProfile property: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS - * helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see - * aka.ms/aks/localdns. - * - * @return the localDnsProfile value. - */ - public LocalDnsProfile localDnsProfile() { - return this.innerProperties() == null ? null : this.innerProperties().localDnsProfile(); - } - - /** - * Set the localDnsProfile property: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS - * helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see - * aka.ms/aks/localdns. - * - * @param localDnsProfile the localDnsProfile value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withLocalDnsProfile(LocalDnsProfile localDnsProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withLocalDnsProfile(localDnsProfile); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", id()); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AgentPoolInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AgentPoolInner 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 AgentPoolInner. - */ - public static AgentPoolInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AgentPoolInner deserializedAgentPoolInner = new AgentPoolInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedAgentPoolInner.withId(reader.getString()); - } else if ("properties".equals(fieldName)) { - deserializedAgentPoolInner.innerProperties - = ManagedClusterAgentPoolProfileProperties.fromJson(reader); - } else if ("name".equals(fieldName)) { - deserializedAgentPoolInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedAgentPoolInner.type = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAgentPoolInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java deleted file mode 100644 index 79cc3cd76425..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java +++ /dev/null @@ -1,237 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.AgentPoolUpgradeProfilePropertiesUpgradesItem; -import com.azure.resourcemanager.containerservice.models.OSType; -import java.io.IOException; -import java.util.List; - -/** - * The list of available upgrades for an agent pool. - */ -@Fluent -public final class AgentPoolUpgradeProfileInner implements JsonSerializable { - /* - * The ID of the agent pool upgrade profile. - */ - private String id; - - /* - * The name of the agent pool upgrade profile. - */ - private String name; - - /* - * The type of the agent pool upgrade profile. - */ - private String type; - - /* - * The properties of the agent pool upgrade profile. - */ - private AgentPoolUpgradeProfileProperties innerProperties = new AgentPoolUpgradeProfileProperties(); - - /** - * Creates an instance of AgentPoolUpgradeProfileInner class. - */ - public AgentPoolUpgradeProfileInner() { - } - - /** - * Get the id property: The ID of the agent pool upgrade profile. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the agent pool upgrade profile. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the agent pool upgrade profile. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the innerProperties property: The properties of the agent pool upgrade profile. - * - * @return the innerProperties value. - */ - private AgentPoolUpgradeProfileProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the kubernetesVersion property: The Kubernetes version (major.minor.patch). - * - * @return the kubernetesVersion value. - */ - public String kubernetesVersion() { - return this.innerProperties() == null ? null : this.innerProperties().kubernetesVersion(); - } - - /** - * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). - * - * @param kubernetesVersion the kubernetesVersion value to set. - * @return the AgentPoolUpgradeProfileInner object itself. - */ - public AgentPoolUpgradeProfileInner withKubernetesVersion(String kubernetesVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new AgentPoolUpgradeProfileProperties(); - } - this.innerProperties().withKubernetesVersion(kubernetesVersion); - return this; - } - - /** - * Get the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - * - * @return the osType value. - */ - public OSType osType() { - return this.innerProperties() == null ? null : this.innerProperties().osType(); - } - - /** - * Set the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - * - * @param osType the osType value to set. - * @return the AgentPoolUpgradeProfileInner object itself. - */ - public AgentPoolUpgradeProfileInner withOsType(OSType osType) { - if (this.innerProperties() == null) { - this.innerProperties = new AgentPoolUpgradeProfileProperties(); - } - this.innerProperties().withOsType(osType); - return this; - } - - /** - * Get the upgrades property: List of orchestrator types and versions available for upgrade. - * - * @return the upgrades value. - */ - public List upgrades() { - return this.innerProperties() == null ? null : this.innerProperties().upgrades(); - } - - /** - * Set the upgrades property: List of orchestrator types and versions available for upgrade. - * - * @param upgrades the upgrades value to set. - * @return the AgentPoolUpgradeProfileInner object itself. - */ - public AgentPoolUpgradeProfileInner withUpgrades(List upgrades) { - if (this.innerProperties() == null) { - this.innerProperties = new AgentPoolUpgradeProfileProperties(); - } - this.innerProperties().withUpgrades(upgrades); - return this; - } - - /** - * Get the latestNodeImageVersion property: The latest AKS supported node image version. - * - * @return the latestNodeImageVersion value. - */ - public String latestNodeImageVersion() { - return this.innerProperties() == null ? null : this.innerProperties().latestNodeImageVersion(); - } - - /** - * Set the latestNodeImageVersion property: The latest AKS supported node image version. - * - * @param latestNodeImageVersion the latestNodeImageVersion value to set. - * @return the AgentPoolUpgradeProfileInner object itself. - */ - public AgentPoolUpgradeProfileInner withLatestNodeImageVersion(String latestNodeImageVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new AgentPoolUpgradeProfileProperties(); - } - this.innerProperties().withLatestNodeImageVersion(latestNodeImageVersion); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model AgentPoolUpgradeProfileInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AgentPoolUpgradeProfileInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AgentPoolUpgradeProfileInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AgentPoolUpgradeProfileInner 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 AgentPoolUpgradeProfileInner. - */ - public static AgentPoolUpgradeProfileInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AgentPoolUpgradeProfileInner deserializedAgentPoolUpgradeProfileInner = new AgentPoolUpgradeProfileInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedAgentPoolUpgradeProfileInner.innerProperties - = AgentPoolUpgradeProfileProperties.fromJson(reader); - } else if ("id".equals(fieldName)) { - deserializedAgentPoolUpgradeProfileInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedAgentPoolUpgradeProfileInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedAgentPoolUpgradeProfileInner.type = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAgentPoolUpgradeProfileInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java deleted file mode 100644 index 98880ef60067..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.AgentPoolUpgradeProfilePropertiesUpgradesItem; -import com.azure.resourcemanager.containerservice.models.OSType; -import java.io.IOException; -import java.util.List; - -/** - * The list of available upgrade versions. - */ -@Fluent -public final class AgentPoolUpgradeProfileProperties implements JsonSerializable { - /* - * The Kubernetes version (major.minor.patch). - */ - private String kubernetesVersion; - - /* - * OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - */ - private OSType osType; - - /* - * List of orchestrator types and versions available for upgrade. - */ - private List upgrades; - - /* - * The latest AKS supported node image version. - */ - private String latestNodeImageVersion; - - /** - * Creates an instance of AgentPoolUpgradeProfileProperties class. - */ - public AgentPoolUpgradeProfileProperties() { - } - - /** - * Get the kubernetesVersion property: The Kubernetes version (major.minor.patch). - * - * @return the kubernetesVersion value. - */ - public String kubernetesVersion() { - return this.kubernetesVersion; - } - - /** - * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). - * - * @param kubernetesVersion the kubernetesVersion value to set. - * @return the AgentPoolUpgradeProfileProperties object itself. - */ - public AgentPoolUpgradeProfileProperties withKubernetesVersion(String kubernetesVersion) { - this.kubernetesVersion = kubernetesVersion; - return this; - } - - /** - * Get the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - * - * @return the osType value. - */ - public OSType osType() { - return this.osType; - } - - /** - * Set the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - * - * @param osType the osType value to set. - * @return the AgentPoolUpgradeProfileProperties object itself. - */ - public AgentPoolUpgradeProfileProperties withOsType(OSType osType) { - this.osType = osType; - return this; - } - - /** - * Get the upgrades property: List of orchestrator types and versions available for upgrade. - * - * @return the upgrades value. - */ - public List upgrades() { - return this.upgrades; - } - - /** - * Set the upgrades property: List of orchestrator types and versions available for upgrade. - * - * @param upgrades the upgrades value to set. - * @return the AgentPoolUpgradeProfileProperties object itself. - */ - public AgentPoolUpgradeProfileProperties - withUpgrades(List upgrades) { - this.upgrades = upgrades; - return this; - } - - /** - * Get the latestNodeImageVersion property: The latest AKS supported node image version. - * - * @return the latestNodeImageVersion value. - */ - public String latestNodeImageVersion() { - return this.latestNodeImageVersion; - } - - /** - * Set the latestNodeImageVersion property: The latest AKS supported node image version. - * - * @param latestNodeImageVersion the latestNodeImageVersion value to set. - * @return the AgentPoolUpgradeProfileProperties object itself. - */ - public AgentPoolUpgradeProfileProperties withLatestNodeImageVersion(String latestNodeImageVersion) { - this.latestNodeImageVersion = latestNodeImageVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (kubernetesVersion() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property kubernetesVersion in model AgentPoolUpgradeProfileProperties")); - } - if (osType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property osType in model AgentPoolUpgradeProfileProperties")); - } - if (upgrades() != null) { - upgrades().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AgentPoolUpgradeProfileProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); - jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); - jsonWriter.writeArrayField("upgrades", this.upgrades, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("latestNodeImageVersion", this.latestNodeImageVersion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AgentPoolUpgradeProfileProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AgentPoolUpgradeProfileProperties 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 AgentPoolUpgradeProfileProperties. - */ - public static AgentPoolUpgradeProfileProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AgentPoolUpgradeProfileProperties deserializedAgentPoolUpgradeProfileProperties - = new AgentPoolUpgradeProfileProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("kubernetesVersion".equals(fieldName)) { - deserializedAgentPoolUpgradeProfileProperties.kubernetesVersion = reader.getString(); - } else if ("osType".equals(fieldName)) { - deserializedAgentPoolUpgradeProfileProperties.osType = OSType.fromString(reader.getString()); - } else if ("upgrades".equals(fieldName)) { - List upgrades - = reader.readArray(reader1 -> AgentPoolUpgradeProfilePropertiesUpgradesItem.fromJson(reader1)); - deserializedAgentPoolUpgradeProfileProperties.upgrades = upgrades; - } else if ("latestNodeImageVersion".equals(fieldName)) { - deserializedAgentPoolUpgradeProfileProperties.latestNodeImageVersion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAgentPoolUpgradeProfileProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CommandResultProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CommandResultProperties.java deleted file mode 100644 index 477c0c268457..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CommandResultProperties.java +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * The results of a run command. - */ -@Immutable -public final class CommandResultProperties implements JsonSerializable { - /* - * provisioning State - */ - private String provisioningState; - - /* - * The exit code of the command - */ - private Integer exitCode; - - /* - * The time when the command started. - */ - private OffsetDateTime startedAt; - - /* - * The time when the command finished. - */ - private OffsetDateTime finishedAt; - - /* - * The command output. - */ - private String logs; - - /* - * An explanation of why provisioningState is set to failed (if so). - */ - private String reason; - - /** - * Creates an instance of CommandResultProperties class. - */ - public CommandResultProperties() { - } - - /** - * Get the provisioningState property: provisioning State. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the exitCode property: The exit code of the command. - * - * @return the exitCode value. - */ - public Integer exitCode() { - return this.exitCode; - } - - /** - * Get the startedAt property: The time when the command started. - * - * @return the startedAt value. - */ - public OffsetDateTime startedAt() { - return this.startedAt; - } - - /** - * Get the finishedAt property: The time when the command finished. - * - * @return the finishedAt value. - */ - public OffsetDateTime finishedAt() { - return this.finishedAt; - } - - /** - * Get the logs property: The command output. - * - * @return the logs value. - */ - public String logs() { - return this.logs; - } - - /** - * Get the reason property: An explanation of why provisioningState is set to failed (if so). - * - * @return the reason value. - */ - public String reason() { - return this.reason; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CommandResultProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CommandResultProperties 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 CommandResultProperties. - */ - public static CommandResultProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CommandResultProperties deserializedCommandResultProperties = new CommandResultProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedCommandResultProperties.provisioningState = reader.getString(); - } else if ("exitCode".equals(fieldName)) { - deserializedCommandResultProperties.exitCode = reader.getNullable(JsonReader::getInt); - } else if ("startedAt".equals(fieldName)) { - deserializedCommandResultProperties.startedAt = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("finishedAt".equals(fieldName)) { - deserializedCommandResultProperties.finishedAt = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("logs".equals(fieldName)) { - deserializedCommandResultProperties.logs = reader.getString(); - } else if ("reason".equals(fieldName)) { - deserializedCommandResultProperties.reason = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCommandResultProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CredentialResultsInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CredentialResultsInner.java deleted file mode 100644 index 972b1e5c612f..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CredentialResultsInner.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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.containerservice.models.CredentialResult; -import java.io.IOException; -import java.util.List; - -/** - * The list credential result response. - */ -@Immutable -public final class CredentialResultsInner implements JsonSerializable { - /* - * Base64-encoded Kubernetes configuration file. - */ - private List kubeconfigs; - - /** - * Creates an instance of CredentialResultsInner class. - */ - public CredentialResultsInner() { - } - - /** - * Get the kubeconfigs property: Base64-encoded Kubernetes configuration file. - * - * @return the kubeconfigs value. - */ - public List kubeconfigs() { - return this.kubeconfigs; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (kubeconfigs() != null) { - kubeconfigs().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CredentialResultsInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CredentialResultsInner 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 CredentialResultsInner. - */ - public static CredentialResultsInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CredentialResultsInner deserializedCredentialResultsInner = new CredentialResultsInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("kubeconfigs".equals(fieldName)) { - List kubeconfigs - = reader.readArray(reader1 -> CredentialResult.fromJson(reader1)); - deserializedCredentialResultsInner.kubeconfigs = kubeconfigs; - } else { - reader.skipChildren(); - } - } - - return deserializedCredentialResultsInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/KubernetesVersionListResultInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/KubernetesVersionListResultInner.java deleted file mode 100644 index a9574fe999f0..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/KubernetesVersionListResultInner.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.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 com.azure.resourcemanager.containerservice.models.KubernetesVersion; -import java.io.IOException; -import java.util.List; - -/** - * Hold values properties, which is array of KubernetesVersion. - */ -@Fluent -public final class KubernetesVersionListResultInner implements JsonSerializable { - /* - * Array of AKS supported Kubernetes versions. - */ - private List values; - - /** - * Creates an instance of KubernetesVersionListResultInner class. - */ - public KubernetesVersionListResultInner() { - } - - /** - * Get the values property: Array of AKS supported Kubernetes versions. - * - * @return the values value. - */ - public List values() { - return this.values; - } - - /** - * Set the values property: Array of AKS supported Kubernetes versions. - * - * @param values the values value to set. - * @return the KubernetesVersionListResultInner object itself. - */ - public KubernetesVersionListResultInner withValues(List values) { - this.values = values; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (values() != null) { - values().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of KubernetesVersionListResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of KubernetesVersionListResultInner 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 KubernetesVersionListResultInner. - */ - public static KubernetesVersionListResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - KubernetesVersionListResultInner deserializedKubernetesVersionListResultInner - = new KubernetesVersionListResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("values".equals(fieldName)) { - List values = reader.readArray(reader1 -> KubernetesVersion.fromJson(reader1)); - deserializedKubernetesVersionListResultInner.values = values; - } else { - reader.skipChildren(); - } - } - - return deserializedKubernetesVersionListResultInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java deleted file mode 100644 index 5bedf80fe172..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.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 com.azure.resourcemanager.containerservice.models.MachineProperties; -import java.io.IOException; -import java.util.List; - -/** - * A machine. Contains details about the underlying virtual machine. A machine may be visible here but not in kubectl - * get nodes; if so it may be because the machine has not been registered with the Kubernetes API Server yet. - */ -@Fluent -public final class MachineInner extends SubResource { - /* - * The Availability zone in which machine is located. - */ - private List zones; - - /* - * The properties of the machine - */ - private MachineProperties properties; - - /* - * The name of the resource that is unique within a resource group. This name can be used to access the resource. - */ - private String name; - - /* - * Resource type - */ - private String type; - - /** - * Creates an instance of MachineInner class. - */ - public MachineInner() { - } - - /** - * Get the zones property: The Availability zone in which machine is located. - * - * @return the zones value. - */ - public List zones() { - return this.zones; - } - - /** - * Get the properties property: The properties of the machine. - * - * @return the properties value. - */ - public MachineProperties properties() { - return this.properties; - } - - /** - * Get the name property: The name of the resource that is unique within a resource group. This name can be used to - * access the resource. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the type property: Resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * {@inheritDoc} - */ - @Override - public MachineInner withId(String id) { - super.withId(id); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", id()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MachineInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MachineInner 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 MachineInner. - */ - public static MachineInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MachineInner deserializedMachineInner = new MachineInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedMachineInner.withId(reader.getString()); - } else if ("zones".equals(fieldName)) { - List zones = reader.readArray(reader1 -> reader1.getString()); - deserializedMachineInner.zones = zones; - } else if ("properties".equals(fieldName)) { - deserializedMachineInner.properties = MachineProperties.fromJson(reader); - } else if ("name".equals(fieldName)) { - deserializedMachineInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedMachineInner.type = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMachineInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationInner.java deleted file mode 100644 index 23710c51731d..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationInner.java +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.SubResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.MaintenanceWindow; -import com.azure.resourcemanager.containerservice.models.TimeInWeek; -import com.azure.resourcemanager.containerservice.models.TimeSpan; -import java.io.IOException; -import java.util.List; - -/** - * Planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster. See [planned - * maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for more information about planned - * maintenance. - */ -@Fluent -public final class MaintenanceConfigurationInner extends SubResource { - /* - * The system metadata relating to this resource. - */ - private SystemData systemData; - - /* - * Properties of a default maintenance configuration. - */ - private MaintenanceConfigurationProperties innerProperties; - - /* - * The name of the resource that is unique within a resource group. This name can be used to access the resource. - */ - private String name; - - /* - * Resource type - */ - private String type; - - /** - * Creates an instance of MaintenanceConfigurationInner class. - */ - public MaintenanceConfigurationInner() { - } - - /** - * Get the systemData property: The system metadata relating to this resource. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the innerProperties property: Properties of a default maintenance configuration. - * - * @return the innerProperties value. - */ - private MaintenanceConfigurationProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the name property: The name of the resource that is unique within a resource group. This name can be used to - * access the resource. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the type property: Resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * {@inheritDoc} - */ - @Override - public MaintenanceConfigurationInner withId(String id) { - super.withId(id); - return this; - } - - /** - * Get the timeInWeek property: Time slots during the week when planned maintenance is allowed to proceed. If two - * array entries specify the same day of the week, the applied configuration is the union of times in both entries. - * - * @return the timeInWeek value. - */ - public List timeInWeek() { - return this.innerProperties() == null ? null : this.innerProperties().timeInWeek(); - } - - /** - * Set the timeInWeek property: Time slots during the week when planned maintenance is allowed to proceed. If two - * array entries specify the same day of the week, the applied configuration is the union of times in both entries. - * - * @param timeInWeek the timeInWeek value to set. - * @return the MaintenanceConfigurationInner object itself. - */ - public MaintenanceConfigurationInner withTimeInWeek(List timeInWeek) { - if (this.innerProperties() == null) { - this.innerProperties = new MaintenanceConfigurationProperties(); - } - this.innerProperties().withTimeInWeek(timeInWeek); - return this; - } - - /** - * Get the notAllowedTime property: Time slots on which upgrade is not allowed. - * - * @return the notAllowedTime value. - */ - public List notAllowedTime() { - return this.innerProperties() == null ? null : this.innerProperties().notAllowedTime(); - } - - /** - * Set the notAllowedTime property: Time slots on which upgrade is not allowed. - * - * @param notAllowedTime the notAllowedTime value to set. - * @return the MaintenanceConfigurationInner object itself. - */ - public MaintenanceConfigurationInner withNotAllowedTime(List notAllowedTime) { - if (this.innerProperties() == null) { - this.innerProperties = new MaintenanceConfigurationProperties(); - } - this.innerProperties().withNotAllowedTime(notAllowedTime); - return this; - } - - /** - * Get the maintenanceWindow property: Maintenance window for the maintenance configuration. - * - * @return the maintenanceWindow value. - */ - public MaintenanceWindow maintenanceWindow() { - return this.innerProperties() == null ? null : this.innerProperties().maintenanceWindow(); - } - - /** - * Set the maintenanceWindow property: Maintenance window for the maintenance configuration. - * - * @param maintenanceWindow the maintenanceWindow value to set. - * @return the MaintenanceConfigurationInner object itself. - */ - public MaintenanceConfigurationInner withMaintenanceWindow(MaintenanceWindow maintenanceWindow) { - if (this.innerProperties() == null) { - this.innerProperties = new MaintenanceConfigurationProperties(); - } - this.innerProperties().withMaintenanceWindow(maintenanceWindow); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", id()); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MaintenanceConfigurationInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MaintenanceConfigurationInner 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 MaintenanceConfigurationInner. - */ - public static MaintenanceConfigurationInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MaintenanceConfigurationInner deserializedMaintenanceConfigurationInner - = new MaintenanceConfigurationInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedMaintenanceConfigurationInner.withId(reader.getString()); - } else if ("systemData".equals(fieldName)) { - deserializedMaintenanceConfigurationInner.systemData = SystemData.fromJson(reader); - } else if ("properties".equals(fieldName)) { - deserializedMaintenanceConfigurationInner.innerProperties - = MaintenanceConfigurationProperties.fromJson(reader); - } else if ("name".equals(fieldName)) { - deserializedMaintenanceConfigurationInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedMaintenanceConfigurationInner.type = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMaintenanceConfigurationInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationProperties.java deleted file mode 100644 index 278a29cd3848..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationProperties.java +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.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 com.azure.resourcemanager.containerservice.models.MaintenanceWindow; -import com.azure.resourcemanager.containerservice.models.TimeInWeek; -import com.azure.resourcemanager.containerservice.models.TimeSpan; -import java.io.IOException; -import java.util.List; - -/** - * Properties used to configure planned maintenance for a Managed Cluster. - */ -@Fluent -public final class MaintenanceConfigurationProperties implements JsonSerializable { - /* - * Time slots during the week when planned maintenance is allowed to proceed. If two array entries specify the same - * day of the week, the applied configuration is the union of times in both entries. - */ - private List timeInWeek; - - /* - * Time slots on which upgrade is not allowed. - */ - private List notAllowedTime; - - /* - * Maintenance window for the maintenance configuration. - */ - private MaintenanceWindow maintenanceWindow; - - /** - * Creates an instance of MaintenanceConfigurationProperties class. - */ - public MaintenanceConfigurationProperties() { - } - - /** - * Get the timeInWeek property: Time slots during the week when planned maintenance is allowed to proceed. If two - * array entries specify the same day of the week, the applied configuration is the union of times in both entries. - * - * @return the timeInWeek value. - */ - public List timeInWeek() { - return this.timeInWeek; - } - - /** - * Set the timeInWeek property: Time slots during the week when planned maintenance is allowed to proceed. If two - * array entries specify the same day of the week, the applied configuration is the union of times in both entries. - * - * @param timeInWeek the timeInWeek value to set. - * @return the MaintenanceConfigurationProperties object itself. - */ - public MaintenanceConfigurationProperties withTimeInWeek(List timeInWeek) { - this.timeInWeek = timeInWeek; - return this; - } - - /** - * Get the notAllowedTime property: Time slots on which upgrade is not allowed. - * - * @return the notAllowedTime value. - */ - public List notAllowedTime() { - return this.notAllowedTime; - } - - /** - * Set the notAllowedTime property: Time slots on which upgrade is not allowed. - * - * @param notAllowedTime the notAllowedTime value to set. - * @return the MaintenanceConfigurationProperties object itself. - */ - public MaintenanceConfigurationProperties withNotAllowedTime(List notAllowedTime) { - this.notAllowedTime = notAllowedTime; - return this; - } - - /** - * Get the maintenanceWindow property: Maintenance window for the maintenance configuration. - * - * @return the maintenanceWindow value. - */ - public MaintenanceWindow maintenanceWindow() { - return this.maintenanceWindow; - } - - /** - * Set the maintenanceWindow property: Maintenance window for the maintenance configuration. - * - * @param maintenanceWindow the maintenanceWindow value to set. - * @return the MaintenanceConfigurationProperties object itself. - */ - public MaintenanceConfigurationProperties withMaintenanceWindow(MaintenanceWindow maintenanceWindow) { - this.maintenanceWindow = maintenanceWindow; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (timeInWeek() != null) { - timeInWeek().forEach(e -> e.validate()); - } - if (notAllowedTime() != null) { - notAllowedTime().forEach(e -> e.validate()); - } - if (maintenanceWindow() != null) { - maintenanceWindow().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("timeInWeek", this.timeInWeek, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("notAllowedTime", this.notAllowedTime, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("maintenanceWindow", this.maintenanceWindow); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MaintenanceConfigurationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MaintenanceConfigurationProperties 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 MaintenanceConfigurationProperties. - */ - public static MaintenanceConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MaintenanceConfigurationProperties deserializedMaintenanceConfigurationProperties - = new MaintenanceConfigurationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("timeInWeek".equals(fieldName)) { - List timeInWeek = reader.readArray(reader1 -> TimeInWeek.fromJson(reader1)); - deserializedMaintenanceConfigurationProperties.timeInWeek = timeInWeek; - } else if ("notAllowedTime".equals(fieldName)) { - List notAllowedTime = reader.readArray(reader1 -> TimeSpan.fromJson(reader1)); - deserializedMaintenanceConfigurationProperties.notAllowedTime = notAllowedTime; - } else if ("maintenanceWindow".equals(fieldName)) { - deserializedMaintenanceConfigurationProperties.maintenanceWindow - = MaintenanceWindow.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedMaintenanceConfigurationProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAccessProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAccessProfileInner.java deleted file mode 100644 index e99678c9e8be..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAccessProfileInner.java +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Managed cluster Access Profile. - */ -@Fluent -public final class ManagedClusterAccessProfileInner extends Resource { - private static final byte[] EMPTY_BYTE_ARRAY = new byte[0]; - - /* - * AccessProfile of a managed cluster. - */ - private AccessProfile innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ManagedClusterAccessProfileInner class. - */ - public ManagedClusterAccessProfileInner() { - } - - /** - * Get the innerProperties property: AccessProfile of a managed cluster. - * - * @return the innerProperties value. - */ - private AccessProfile innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAccessProfileInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAccessProfileInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the kubeConfig property: Base64-encoded Kubernetes configuration file. - * - * @return the kubeConfig value. - */ - public byte[] kubeConfig() { - return this.innerProperties() == null ? EMPTY_BYTE_ARRAY : this.innerProperties().kubeConfig(); - } - - /** - * Set the kubeConfig property: Base64-encoded Kubernetes configuration file. - * - * @param kubeConfig the kubeConfig value to set. - * @return the ManagedClusterAccessProfileInner object itself. - */ - public ManagedClusterAccessProfileInner withKubeConfig(byte[] kubeConfig) { - if (this.innerProperties() == null) { - this.innerProperties = new AccessProfile(); - } - this.innerProperties().withKubeConfig(kubeConfig); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterAccessProfileInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterAccessProfileInner 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 ManagedClusterAccessProfileInner. - */ - public static ManagedClusterAccessProfileInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterAccessProfileInner deserializedManagedClusterAccessProfileInner - = new ManagedClusterAccessProfileInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedManagedClusterAccessProfileInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedManagedClusterAccessProfileInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedManagedClusterAccessProfileInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedManagedClusterAccessProfileInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedManagedClusterAccessProfileInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedManagedClusterAccessProfileInner.innerProperties = AccessProfile.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedClusterAccessProfileInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterAccessProfileInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java deleted file mode 100644 index 93d5bfd7120f..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java +++ /dev/null @@ -1,1884 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.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 com.azure.resourcemanager.containerservice.models.AgentPoolGatewayProfile; -import com.azure.resourcemanager.containerservice.models.AgentPoolMode; -import com.azure.resourcemanager.containerservice.models.AgentPoolNetworkProfile; -import com.azure.resourcemanager.containerservice.models.AgentPoolSecurityProfile; -import com.azure.resourcemanager.containerservice.models.AgentPoolStatus; -import com.azure.resourcemanager.containerservice.models.AgentPoolType; -import com.azure.resourcemanager.containerservice.models.AgentPoolUpgradeSettings; -import com.azure.resourcemanager.containerservice.models.AgentPoolWindowsProfile; -import com.azure.resourcemanager.containerservice.models.CreationData; -import com.azure.resourcemanager.containerservice.models.GpuInstanceProfile; -import com.azure.resourcemanager.containerservice.models.GpuProfile; -import com.azure.resourcemanager.containerservice.models.KubeletConfig; -import com.azure.resourcemanager.containerservice.models.KubeletDiskType; -import com.azure.resourcemanager.containerservice.models.LinuxOSConfig; -import com.azure.resourcemanager.containerservice.models.LocalDnsProfile; -import com.azure.resourcemanager.containerservice.models.OSDiskType; -import com.azure.resourcemanager.containerservice.models.OSSku; -import com.azure.resourcemanager.containerservice.models.OSType; -import com.azure.resourcemanager.containerservice.models.PodIpAllocationMode; -import com.azure.resourcemanager.containerservice.models.PowerState; -import com.azure.resourcemanager.containerservice.models.ScaleDownMode; -import com.azure.resourcemanager.containerservice.models.ScaleSetEvictionPolicy; -import com.azure.resourcemanager.containerservice.models.ScaleSetPriority; -import com.azure.resourcemanager.containerservice.models.VirtualMachineNodes; -import com.azure.resourcemanager.containerservice.models.VirtualMachinesProfile; -import com.azure.resourcemanager.containerservice.models.WorkloadRuntime; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Properties for the container service agent pool profile. - */ -@Fluent -public class ManagedClusterAgentPoolProfileProperties - implements JsonSerializable { - /* - * Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is - * updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable - * optimistic concurrency per the normal eTag convention. - */ - private String etag; - - /* - * Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) - * for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1. - */ - private Integer count; - - /* - * The size of the agent pool VMs. VM size availability varies by region. If a node contains insufficient compute - * resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: - * https://docs.microsoft.com/azure/aks/quotas-skus-regions - */ - private String vmSize; - - /* - * OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify - * 0, it will apply the default osDisk size according to the vmSize specified. - */ - private Integer osDiskSizeGB; - - /* - * The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the VM supports it and - * has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed - * after creation. For more information see [Ephemeral - * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). - */ - private OSDiskType osDiskType; - - /* - * Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. - */ - private KubeletDiskType kubeletDiskType; - - /* - * Determines the type of workload a node can run. - */ - private WorkloadRuntime workloadRuntime; - - /* - * Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd - * after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for - * Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a script). - */ - private String messageOfTheDay; - - /* - * The ID of the subnet which agent pool nodes and optionally pods will join on startup. If this is not specified, a - * VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, - * otherwise it applies to just nodes. This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{ - * virtualNetworkName}/subnets/{subnetName} - */ - private String vnetSubnetId; - - /* - * The ID of the subnet which pods will join when launched. If omitted, pod IPs are statically assigned on the node - * subnet (see vnetSubnetID for more details). This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{ - * virtualNetworkName}/subnets/{subnetName} - */ - private String podSubnetId; - - /* - * Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The - * default is 'DynamicIndividual'. - */ - private PodIpAllocationMode podIpAllocationMode; - - /* - * The maximum number of pods that can run on a node. - */ - private Integer maxPods; - - /* - * OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - */ - private OSType osType; - - /* - * Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 - * when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. - */ - private OSSku osSku; - - /* - * The maximum number of nodes for auto-scaling - */ - private Integer maxCount; - - /* - * The minimum number of nodes for auto-scaling - */ - private Integer minCount; - - /* - * Whether to enable auto-scaler - */ - private Boolean enableAutoScaling; - - /* - * The scale down mode to use when scaling the Agent Pool. This also effects the cluster autoscaler behavior. If not - * specified, it defaults to Delete. - */ - private ScaleDownMode scaleDownMode; - - /* - * The type of Agent Pool. - */ - private AgentPoolType type; - - /* - * The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional - * information on agent pool restrictions and best practices, see: - * https://docs.microsoft.com/azure/aks/use-system-pools - */ - private AgentPoolMode mode; - - /* - * The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and - * (e.g. 1.20) are supported. When is specified, the latest supported GA patch version - * is chosen automatically. Updating the cluster with the same once it has been created (e.g. 1.14.x - * -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should - * upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same - * major version as the control plane. The node pool minor version must be within two minor versions of the control - * plane version. The node pool version cannot be greater than the control plane version. For more information see - * [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). - */ - private String orchestratorVersion; - - /* - * The version of Kubernetes the Agent Pool is running. If orchestratorVersion is a fully specified version - * , this field will be exactly equal to it. If orchestratorVersion is , this field - * will contain the full version being used. - */ - private String currentOrchestratorVersion; - - /* - * The version of node image - */ - private String nodeImageVersion; - - /* - * Settings for upgrading the agentpool - */ - private AgentPoolUpgradeSettings upgradeSettings; - - /* - * The current deployment or provisioning state. - */ - private String provisioningState; - - /* - * Whether the Agent Pool is running or stopped. When an Agent Pool is first created it is initially Running. The - * Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does - * not accrue billing charges. An Agent Pool can only be stopped if it is Running and provisioning state is - * Succeeded - */ - private PowerState powerState; - - /* - * The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is - * 'VirtualMachineScaleSets'. - */ - private List availabilityZones; - - /* - * Whether each node is allocated its own public IP. Some scenarios may require nodes in a node pool to receive - * their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make - * a direct connection to a cloud virtual machine to minimize hops. For more information see [assigning a public IP - * per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node- - * pools). The default is false. - */ - private Boolean enableNodePublicIp; - - /* - * The public IP prefix ID which VM nodes should use IPs from. This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{ - * publicIPPrefixName} - */ - private String nodePublicIpPrefixId; - - /* - * The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. - */ - private ScaleSetPriority scaleSetPriority; - - /* - * The Virtual Machine Scale Set eviction policy to use. This cannot be specified unless the scaleSetPriority is - * 'Spot'. If not specified, the default is 'Delete'. - */ - private ScaleSetEvictionPolicy scaleSetEvictionPolicy; - - /* - * The max price (in US Dollars) you are willing to pay for spot instances. Possible values are any decimal value - * greater than zero or -1 which indicates default price to be up-to on-demand. Possible values are any decimal - * value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on - * spot pricing, see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) - */ - private Float spotMaxPrice; - - /* - * The tags to be persisted on the agent pool virtual machine scale set. - */ - private Map tags; - - /* - * The node labels to be persisted across all nodes in agent pool. - */ - private Map nodeLabels; - - /* - * The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. - */ - private List nodeTaints; - - /* - * The ID for Proximity Placement Group. - */ - private String proximityPlacementGroupId; - - /* - * The Kubelet configuration on the agent pool nodes. - */ - private KubeletConfig kubeletConfig; - - /* - * The OS configuration of Linux agent nodes. - */ - private LinuxOSConfig linuxOSConfig; - - /* - * Whether to enable host based OS and data drive encryption. This is only supported on certain VM sizes and in - * certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption - */ - private Boolean enableEncryptionAtHost; - - /* - * Whether to enable UltraSSD - */ - private Boolean enableUltraSsd; - - /* - * Whether to use a FIPS-enabled OS. See [Add a FIPS-enabled node - * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more - * details. - */ - private Boolean enableFips; - - /* - * GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. - */ - private GpuInstanceProfile gpuInstanceProfile; - - /* - * CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a - * snapshot. - */ - private CreationData creationData; - - /* - * AKS will associate the specified agent pool with the Capacity Reservation Group. - */ - private String capacityReservationGroupId; - - /* - * The fully qualified resource ID of the Dedicated Host Group to provision virtual machines from, used only in - * creation scenario and not allowed to changed once set. This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{ - * hostGroupName}. For more information see [Azure dedicated - * hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). - */ - private String hostGroupId; - - /* - * Network-related settings of an agent pool. - */ - private AgentPoolNetworkProfile networkProfile; - - /* - * The Windows agent pool's specific profile. - */ - private AgentPoolWindowsProfile windowsProfile; - - /* - * The security settings of an agent pool. - */ - private AgentPoolSecurityProfile securityProfile; - - /* - * GPU settings for the Agent Pool. - */ - private GpuProfile gpuProfile; - - /* - * Profile specific to a managed agent pool in Gateway mode. This field cannot be set if agent pool mode is not - * Gateway. - */ - private AgentPoolGatewayProfile gatewayProfile; - - /* - * Specifications on VirtualMachines agent pool. - */ - private VirtualMachinesProfile virtualMachinesProfile; - - /* - * The status of nodes in a VirtualMachines agent pool. - */ - private List virtualMachineNodesStatus; - - /* - * Contains read-only information about the Agent Pool. - */ - private AgentPoolStatus status; - - /* - * Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve performance and - * reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns. - */ - private LocalDnsProfile localDnsProfile; - - /** - * Creates an instance of ManagedClusterAgentPoolProfileProperties class. - */ - public ManagedClusterAgentPoolProfileProperties() { - } - - /** - * Get the etag property: Unique read-only string used to implement optimistic concurrency. The eTag value will - * change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a - * subsequent request to enable optimistic concurrency per the normal eTag convention. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Set the etag property: Unique read-only string used to implement optimistic concurrency. The eTag value will - * change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a - * subsequent request to enable optimistic concurrency per the normal eTag convention. - * - * @param etag the etag value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - ManagedClusterAgentPoolProfileProperties withEtag(String etag) { - this.etag = etag; - return this; - } - - /** - * Get the count property: Number of agents (VMs) to host docker containers. Allowed values must be in the range of - * 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default - * value is 1. - * - * @return the count value. - */ - public Integer count() { - return this.count; - } - - /** - * Set the count property: Number of agents (VMs) to host docker containers. Allowed values must be in the range of - * 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default - * value is 1. - * - * @param count the count value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withCount(Integer count) { - this.count = count; - return this; - } - - /** - * Get the vmSize property: The size of the agent pool VMs. VM size availability varies by region. If a node - * contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on - * restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. - * - * @return the vmSize value. - */ - public String vmSize() { - return this.vmSize; - } - - /** - * Set the vmSize property: The size of the agent pool VMs. VM size availability varies by region. If a node - * contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on - * restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. - * - * @param vmSize the vmSize value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withVmSize(String vmSize) { - this.vmSize = vmSize; - return this; - } - - /** - * Get the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the - * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. - * - * @return the osDiskSizeGB value. - */ - public Integer osDiskSizeGB() { - return this.osDiskSizeGB; - } - - /** - * Set the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the - * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. - * - * @param osDiskSizeGB the osDiskSizeGB value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withOsDiskSizeGB(Integer osDiskSizeGB) { - this.osDiskSizeGB = osDiskSizeGB; - return this; - } - - /** - * Get the osDiskType property: The OS disk type to be used for machines in the agent pool. The default is - * 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, - * defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral - * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). - * - * @return the osDiskType value. - */ - public OSDiskType osDiskType() { - return this.osDiskType; - } - - /** - * Set the osDiskType property: The OS disk type to be used for machines in the agent pool. The default is - * 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, - * defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral - * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). - * - * @param osDiskType the osDiskType value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withOsDiskType(OSDiskType osDiskType) { - this.osDiskType = osDiskType; - return this; - } - - /** - * Get the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and - * Kubelet ephemeral storage. - * - * @return the kubeletDiskType value. - */ - public KubeletDiskType kubeletDiskType() { - return this.kubeletDiskType; - } - - /** - * Set the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and - * Kubelet ephemeral storage. - * - * @param kubeletDiskType the kubeletDiskType value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withKubeletDiskType(KubeletDiskType kubeletDiskType) { - this.kubeletDiskType = kubeletDiskType; - return this; - } - - /** - * Get the workloadRuntime property: Determines the type of workload a node can run. - * - * @return the workloadRuntime value. - */ - public WorkloadRuntime workloadRuntime() { - return this.workloadRuntime; - } - - /** - * Set the workloadRuntime property: Determines the type of workload a node can run. - * - * @param workloadRuntime the workloadRuntime value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withWorkloadRuntime(WorkloadRuntime workloadRuntime) { - this.workloadRuntime = workloadRuntime; - return this; - } - - /** - * Get the messageOfTheDay property: Message of the day for Linux nodes, base64-encoded. A base64-encoded string - * which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux - * nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not - * be executed as a script). - * - * @return the messageOfTheDay value. - */ - public String messageOfTheDay() { - return this.messageOfTheDay; - } - - /** - * Set the messageOfTheDay property: Message of the day for Linux nodes, base64-encoded. A base64-encoded string - * which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux - * nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not - * be executed as a script). - * - * @param messageOfTheDay the messageOfTheDay value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withMessageOfTheDay(String messageOfTheDay) { - this.messageOfTheDay = messageOfTheDay; - return this; - } - - /** - * Get the vnetSubnetId property: The ID of the subnet which agent pool nodes and optionally pods will join on - * startup. If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, - * this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. - * - * @return the vnetSubnetId value. - */ - public String vnetSubnetId() { - return this.vnetSubnetId; - } - - /** - * Set the vnetSubnetId property: The ID of the subnet which agent pool nodes and optionally pods will join on - * startup. If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, - * this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. - * - * @param vnetSubnetId the vnetSubnetId value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withVnetSubnetId(String vnetSubnetId) { - this.vnetSubnetId = vnetSubnetId; - return this; - } - - /** - * Get the podSubnetId property: The ID of the subnet which pods will join when launched. If omitted, pod IPs are - * statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. - * - * @return the podSubnetId value. - */ - public String podSubnetId() { - return this.podSubnetId; - } - - /** - * Set the podSubnetId property: The ID of the subnet which pods will join when launched. If omitted, pod IPs are - * statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. - * - * @param podSubnetId the podSubnetId value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withPodSubnetId(String podSubnetId) { - this.podSubnetId = podSubnetId; - return this; - } - - /** - * Get the podIpAllocationMode property: Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. - * Must be used with podSubnetId. The default is 'DynamicIndividual'. - * - * @return the podIpAllocationMode value. - */ - public PodIpAllocationMode podIpAllocationMode() { - return this.podIpAllocationMode; - } - - /** - * Set the podIpAllocationMode property: Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. - * Must be used with podSubnetId. The default is 'DynamicIndividual'. - * - * @param podIpAllocationMode the podIpAllocationMode value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withPodIpAllocationMode(PodIpAllocationMode podIpAllocationMode) { - this.podIpAllocationMode = podIpAllocationMode; - return this; - } - - /** - * Get the maxPods property: The maximum number of pods that can run on a node. - * - * @return the maxPods value. - */ - public Integer maxPods() { - return this.maxPods; - } - - /** - * Set the maxPods property: The maximum number of pods that can run on a node. - * - * @param maxPods the maxPods value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withMaxPods(Integer maxPods) { - this.maxPods = maxPods; - return this; - } - - /** - * Get the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - * - * @return the osType value. - */ - public OSType osType() { - return this.osType; - } - - /** - * Set the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - * - * @param osType the osType value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withOsType(OSType osType) { - this.osType = osType; - return this; - } - - /** - * Get the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. - * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is - * Windows. - * - * @return the osSku value. - */ - public OSSku osSku() { - return this.osSku; - } - - /** - * Set the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. - * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is - * Windows. - * - * @param osSku the osSku value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withOsSku(OSSku osSku) { - this.osSku = osSku; - return this; - } - - /** - * Get the maxCount property: The maximum number of nodes for auto-scaling. - * - * @return the maxCount value. - */ - public Integer maxCount() { - return this.maxCount; - } - - /** - * Set the maxCount property: The maximum number of nodes for auto-scaling. - * - * @param maxCount the maxCount value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withMaxCount(Integer maxCount) { - this.maxCount = maxCount; - return this; - } - - /** - * Get the minCount property: The minimum number of nodes for auto-scaling. - * - * @return the minCount value. - */ - public Integer minCount() { - return this.minCount; - } - - /** - * Set the minCount property: The minimum number of nodes for auto-scaling. - * - * @param minCount the minCount value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withMinCount(Integer minCount) { - this.minCount = minCount; - return this; - } - - /** - * Get the enableAutoScaling property: Whether to enable auto-scaler. - * - * @return the enableAutoScaling value. - */ - public Boolean enableAutoScaling() { - return this.enableAutoScaling; - } - - /** - * Set the enableAutoScaling property: Whether to enable auto-scaler. - * - * @param enableAutoScaling the enableAutoScaling value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withEnableAutoScaling(Boolean enableAutoScaling) { - this.enableAutoScaling = enableAutoScaling; - return this; - } - - /** - * Get the scaleDownMode property: The scale down mode to use when scaling the Agent Pool. This also effects the - * cluster autoscaler behavior. If not specified, it defaults to Delete. - * - * @return the scaleDownMode value. - */ - public ScaleDownMode scaleDownMode() { - return this.scaleDownMode; - } - - /** - * Set the scaleDownMode property: The scale down mode to use when scaling the Agent Pool. This also effects the - * cluster autoscaler behavior. If not specified, it defaults to Delete. - * - * @param scaleDownMode the scaleDownMode value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withScaleDownMode(ScaleDownMode scaleDownMode) { - this.scaleDownMode = scaleDownMode; - return this; - } - - /** - * Get the type property: The type of Agent Pool. - * - * @return the type value. - */ - public AgentPoolType type() { - return this.type; - } - - /** - * Set the type property: The type of Agent Pool. - * - * @param type the type value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withType(AgentPoolType type) { - this.type = type; - return this; - } - - /** - * Get the mode property: The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all - * times. For additional information on agent pool restrictions and best practices, see: - * https://docs.microsoft.com/azure/aks/use-system-pools. - * - * @return the mode value. - */ - public AgentPoolMode mode() { - return this.mode; - } - - /** - * Set the mode property: The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all - * times. For additional information on agent pool restrictions and best practices, see: - * https://docs.microsoft.com/azure/aks/use-system-pools. - * - * @param mode the mode value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withMode(AgentPoolMode mode) { - this.mode = mode; - return this; - } - - /** - * Get the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version - * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When - * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the - * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an - * upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an - * AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control - * plane. The node pool minor version must be within two minor versions of the control plane version. The node pool - * version cannot be greater than the control plane version. For more information see [upgrading a node - * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). - * - * @return the orchestratorVersion value. - */ - public String orchestratorVersion() { - return this.orchestratorVersion; - } - - /** - * Set the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version - * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When - * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the - * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an - * upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an - * AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control - * plane. The node pool minor version must be within two minor versions of the control plane version. The node pool - * version cannot be greater than the control plane version. For more information see [upgrading a node - * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). - * - * @param orchestratorVersion the orchestratorVersion value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withOrchestratorVersion(String orchestratorVersion) { - this.orchestratorVersion = orchestratorVersion; - return this; - } - - /** - * Get the currentOrchestratorVersion property: The version of Kubernetes the Agent Pool is running. If - * orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to - * it. If orchestratorVersion is <major.minor>, this field will contain the full <major.minor.patch> - * version being used. - * - * @return the currentOrchestratorVersion value. - */ - public String currentOrchestratorVersion() { - return this.currentOrchestratorVersion; - } - - /** - * Set the currentOrchestratorVersion property: The version of Kubernetes the Agent Pool is running. If - * orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to - * it. If orchestratorVersion is <major.minor>, this field will contain the full <major.minor.patch> - * version being used. - * - * @param currentOrchestratorVersion the currentOrchestratorVersion value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - ManagedClusterAgentPoolProfileProperties withCurrentOrchestratorVersion(String currentOrchestratorVersion) { - this.currentOrchestratorVersion = currentOrchestratorVersion; - return this; - } - - /** - * Get the nodeImageVersion property: The version of node image. - * - * @return the nodeImageVersion value. - */ - public String nodeImageVersion() { - return this.nodeImageVersion; - } - - /** - * Set the nodeImageVersion property: The version of node image. - * - * @param nodeImageVersion the nodeImageVersion value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - ManagedClusterAgentPoolProfileProperties withNodeImageVersion(String nodeImageVersion) { - this.nodeImageVersion = nodeImageVersion; - return this; - } - - /** - * Get the upgradeSettings property: Settings for upgrading the agentpool. - * - * @return the upgradeSettings value. - */ - public AgentPoolUpgradeSettings upgradeSettings() { - return this.upgradeSettings; - } - - /** - * Set the upgradeSettings property: Settings for upgrading the agentpool. - * - * @param upgradeSettings the upgradeSettings value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings) { - this.upgradeSettings = upgradeSettings; - return this; - } - - /** - * Get the provisioningState property: The current deployment or provisioning state. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: The current deployment or provisioning state. - * - * @param provisioningState the provisioningState value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - ManagedClusterAgentPoolProfileProperties withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the powerState property: Whether the Agent Pool is running or stopped. When an Agent Pool is first created it - * is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops - * all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and - * provisioning state is Succeeded. - * - * @return the powerState value. - */ - public PowerState powerState() { - return this.powerState; - } - - /** - * Set the powerState property: Whether the Agent Pool is running or stopped. When an Agent Pool is first created it - * is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops - * all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and - * provisioning state is Succeeded. - * - * @param powerState the powerState value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withPowerState(PowerState powerState) { - this.powerState = powerState; - return this; - } - - /** - * Get the availabilityZones property: The list of Availability zones to use for nodes. This can only be specified - * if the AgentPoolType property is 'VirtualMachineScaleSets'. - * - * @return the availabilityZones value. - */ - public List availabilityZones() { - return this.availabilityZones; - } - - /** - * Set the availabilityZones property: The list of Availability zones to use for nodes. This can only be specified - * if the AgentPoolType property is 'VirtualMachineScaleSets'. - * - * @param availabilityZones the availabilityZones value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withAvailabilityZones(List availabilityZones) { - this.availabilityZones = availabilityZones; - return this; - } - - /** - * Get the enableNodePublicIp property: Whether each node is allocated its own public IP. Some scenarios may require - * nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming - * workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For - * more information see [assigning a public IP per - * node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). - * The default is false. - * - * @return the enableNodePublicIp value. - */ - public Boolean enableNodePublicIp() { - return this.enableNodePublicIp; - } - - /** - * Set the enableNodePublicIp property: Whether each node is allocated its own public IP. Some scenarios may require - * nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming - * workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For - * more information see [assigning a public IP per - * node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). - * The default is false. - * - * @param enableNodePublicIp the enableNodePublicIp value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withEnableNodePublicIp(Boolean enableNodePublicIp) { - this.enableNodePublicIp = enableNodePublicIp; - return this; - } - - /** - * Get the nodePublicIpPrefixId property: The public IP prefix ID which VM nodes should use IPs from. This is of the - * form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. - * - * @return the nodePublicIpPrefixId value. - */ - public String nodePublicIpPrefixId() { - return this.nodePublicIpPrefixId; - } - - /** - * Set the nodePublicIpPrefixId property: The public IP prefix ID which VM nodes should use IPs from. This is of the - * form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. - * - * @param nodePublicIpPrefixId the nodePublicIpPrefixId value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withNodePublicIpPrefixId(String nodePublicIpPrefixId) { - this.nodePublicIpPrefixId = nodePublicIpPrefixId; - return this; - } - - /** - * Get the scaleSetPriority property: The Virtual Machine Scale Set priority. If not specified, the default is - * 'Regular'. - * - * @return the scaleSetPriority value. - */ - public ScaleSetPriority scaleSetPriority() { - return this.scaleSetPriority; - } - - /** - * Set the scaleSetPriority property: The Virtual Machine Scale Set priority. If not specified, the default is - * 'Regular'. - * - * @param scaleSetPriority the scaleSetPriority value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withScaleSetPriority(ScaleSetPriority scaleSetPriority) { - this.scaleSetPriority = scaleSetPriority; - return this; - } - - /** - * Get the scaleSetEvictionPolicy property: The Virtual Machine Scale Set eviction policy to use. This cannot be - * specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. - * - * @return the scaleSetEvictionPolicy value. - */ - public ScaleSetEvictionPolicy scaleSetEvictionPolicy() { - return this.scaleSetEvictionPolicy; - } - - /** - * Set the scaleSetEvictionPolicy property: The Virtual Machine Scale Set eviction policy to use. This cannot be - * specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. - * - * @param scaleSetEvictionPolicy the scaleSetEvictionPolicy value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties - withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy) { - this.scaleSetEvictionPolicy = scaleSetEvictionPolicy; - return this; - } - - /** - * Get the spotMaxPrice property: The max price (in US Dollars) you are willing to pay for spot instances. Possible - * values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. - * Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any - * on-demand price. For more details on spot pricing, see [spot VMs - * pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). - * - * @return the spotMaxPrice value. - */ - public Float spotMaxPrice() { - return this.spotMaxPrice; - } - - /** - * Set the spotMaxPrice property: The max price (in US Dollars) you are willing to pay for spot instances. Possible - * values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. - * Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any - * on-demand price. For more details on spot pricing, see [spot VMs - * pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). - * - * @param spotMaxPrice the spotMaxPrice value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withSpotMaxPrice(Float spotMaxPrice) { - this.spotMaxPrice = spotMaxPrice; - return this; - } - - /** - * Get the tags property: The tags to be persisted on the agent pool virtual machine scale set. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: The tags to be persisted on the agent pool virtual machine scale set. - * - * @param tags the tags value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the nodeLabels property: The node labels to be persisted across all nodes in agent pool. - * - * @return the nodeLabels value. - */ - public Map nodeLabels() { - return this.nodeLabels; - } - - /** - * Set the nodeLabels property: The node labels to be persisted across all nodes in agent pool. - * - * @param nodeLabels the nodeLabels value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withNodeLabels(Map nodeLabels) { - this.nodeLabels = nodeLabels; - return this; - } - - /** - * Get the nodeTaints property: The taints added to new nodes during node pool create and scale. For example, - * key=value:NoSchedule. - * - * @return the nodeTaints value. - */ - public List nodeTaints() { - return this.nodeTaints; - } - - /** - * Set the nodeTaints property: The taints added to new nodes during node pool create and scale. For example, - * key=value:NoSchedule. - * - * @param nodeTaints the nodeTaints value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withNodeTaints(List nodeTaints) { - this.nodeTaints = nodeTaints; - return this; - } - - /** - * Get the proximityPlacementGroupId property: The ID for Proximity Placement Group. - * - * @return the proximityPlacementGroupId value. - */ - public String proximityPlacementGroupId() { - return this.proximityPlacementGroupId; - } - - /** - * Set the proximityPlacementGroupId property: The ID for Proximity Placement Group. - * - * @param proximityPlacementGroupId the proximityPlacementGroupId value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withProximityPlacementGroupId(String proximityPlacementGroupId) { - this.proximityPlacementGroupId = proximityPlacementGroupId; - return this; - } - - /** - * Get the kubeletConfig property: The Kubelet configuration on the agent pool nodes. - * - * @return the kubeletConfig value. - */ - public KubeletConfig kubeletConfig() { - return this.kubeletConfig; - } - - /** - * Set the kubeletConfig property: The Kubelet configuration on the agent pool nodes. - * - * @param kubeletConfig the kubeletConfig value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withKubeletConfig(KubeletConfig kubeletConfig) { - this.kubeletConfig = kubeletConfig; - return this; - } - - /** - * Get the linuxOSConfig property: The OS configuration of Linux agent nodes. - * - * @return the linuxOSConfig value. - */ - public LinuxOSConfig linuxOSConfig() { - return this.linuxOSConfig; - } - - /** - * Set the linuxOSConfig property: The OS configuration of Linux agent nodes. - * - * @param linuxOSConfig the linuxOSConfig value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withLinuxOSConfig(LinuxOSConfig linuxOSConfig) { - this.linuxOSConfig = linuxOSConfig; - return this; - } - - /** - * Get the enableEncryptionAtHost property: Whether to enable host based OS and data drive encryption. This is only - * supported on certain VM sizes and in certain Azure regions. For more information, see: - * https://docs.microsoft.com/azure/aks/enable-host-encryption. - * - * @return the enableEncryptionAtHost value. - */ - public Boolean enableEncryptionAtHost() { - return this.enableEncryptionAtHost; - } - - /** - * Set the enableEncryptionAtHost property: Whether to enable host based OS and data drive encryption. This is only - * supported on certain VM sizes and in certain Azure regions. For more information, see: - * https://docs.microsoft.com/azure/aks/enable-host-encryption. - * - * @param enableEncryptionAtHost the enableEncryptionAtHost value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withEnableEncryptionAtHost(Boolean enableEncryptionAtHost) { - this.enableEncryptionAtHost = enableEncryptionAtHost; - return this; - } - - /** - * Get the enableUltraSsd property: Whether to enable UltraSSD. - * - * @return the enableUltraSsd value. - */ - public Boolean enableUltraSsd() { - return this.enableUltraSsd; - } - - /** - * Set the enableUltraSsd property: Whether to enable UltraSSD. - * - * @param enableUltraSsd the enableUltraSsd value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withEnableUltraSsd(Boolean enableUltraSsd) { - this.enableUltraSsd = enableUltraSsd; - return this; - } - - /** - * Get the enableFips property: Whether to use a FIPS-enabled OS. See [Add a FIPS-enabled node - * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more - * details. - * - * @return the enableFips value. - */ - public Boolean enableFips() { - return this.enableFips; - } - - /** - * Set the enableFips property: Whether to use a FIPS-enabled OS. See [Add a FIPS-enabled node - * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more - * details. - * - * @param enableFips the enableFips value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withEnableFips(Boolean enableFips) { - this.enableFips = enableFips; - return this; - } - - /** - * Get the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for - * supported GPU VM SKU. - * - * @return the gpuInstanceProfile value. - */ - public GpuInstanceProfile gpuInstanceProfile() { - return this.gpuInstanceProfile; - } - - /** - * Set the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for - * supported GPU VM SKU. - * - * @param gpuInstanceProfile the gpuInstanceProfile value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile) { - this.gpuInstanceProfile = gpuInstanceProfile; - return this; - } - - /** - * Get the creationData property: CreationData to be used to specify the source Snapshot ID if the node pool will be - * created/upgraded using a snapshot. - * - * @return the creationData value. - */ - public CreationData creationData() { - return this.creationData; - } - - /** - * Set the creationData property: CreationData to be used to specify the source Snapshot ID if the node pool will be - * created/upgraded using a snapshot. - * - * @param creationData the creationData value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withCreationData(CreationData creationData) { - this.creationData = creationData; - return this; - } - - /** - * Get the capacityReservationGroupId property: AKS will associate the specified agent pool with the Capacity - * Reservation Group. - * - * @return the capacityReservationGroupId value. - */ - public String capacityReservationGroupId() { - return this.capacityReservationGroupId; - } - - /** - * Set the capacityReservationGroupId property: AKS will associate the specified agent pool with the Capacity - * Reservation Group. - * - * @param capacityReservationGroupId the capacityReservationGroupId value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withCapacityReservationGroupId(String capacityReservationGroupId) { - this.capacityReservationGroupId = capacityReservationGroupId; - return this; - } - - /** - * Get the hostGroupId property: The fully qualified resource ID of the Dedicated Host Group to provision virtual - * machines from, used only in creation scenario and not allowed to changed once set. This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. - * For more information see [Azure dedicated - * hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). - * - * @return the hostGroupId value. - */ - public String hostGroupId() { - return this.hostGroupId; - } - - /** - * Set the hostGroupId property: The fully qualified resource ID of the Dedicated Host Group to provision virtual - * machines from, used only in creation scenario and not allowed to changed once set. This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. - * For more information see [Azure dedicated - * hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). - * - * @param hostGroupId the hostGroupId value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withHostGroupId(String hostGroupId) { - this.hostGroupId = hostGroupId; - return this; - } - - /** - * Get the networkProfile property: Network-related settings of an agent pool. - * - * @return the networkProfile value. - */ - public AgentPoolNetworkProfile networkProfile() { - return this.networkProfile; - } - - /** - * Set the networkProfile property: Network-related settings of an agent pool. - * - * @param networkProfile the networkProfile value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withNetworkProfile(AgentPoolNetworkProfile networkProfile) { - this.networkProfile = networkProfile; - return this; - } - - /** - * Get the windowsProfile property: The Windows agent pool's specific profile. - * - * @return the windowsProfile value. - */ - public AgentPoolWindowsProfile windowsProfile() { - return this.windowsProfile; - } - - /** - * Set the windowsProfile property: The Windows agent pool's specific profile. - * - * @param windowsProfile the windowsProfile value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { - this.windowsProfile = windowsProfile; - return this; - } - - /** - * Get the securityProfile property: The security settings of an agent pool. - * - * @return the securityProfile value. - */ - public AgentPoolSecurityProfile securityProfile() { - return this.securityProfile; - } - - /** - * Set the securityProfile property: The security settings of an agent pool. - * - * @param securityProfile the securityProfile value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withSecurityProfile(AgentPoolSecurityProfile securityProfile) { - this.securityProfile = securityProfile; - return this; - } - - /** - * Get the gpuProfile property: GPU settings for the Agent Pool. - * - * @return the gpuProfile value. - */ - public GpuProfile gpuProfile() { - return this.gpuProfile; - } - - /** - * Set the gpuProfile property: GPU settings for the Agent Pool. - * - * @param gpuProfile the gpuProfile value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withGpuProfile(GpuProfile gpuProfile) { - this.gpuProfile = gpuProfile; - return this; - } - - /** - * Get the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be - * set if agent pool mode is not Gateway. - * - * @return the gatewayProfile value. - */ - public AgentPoolGatewayProfile gatewayProfile() { - return this.gatewayProfile; - } - - /** - * Set the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be - * set if agent pool mode is not Gateway. - * - * @param gatewayProfile the gatewayProfile value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withGatewayProfile(AgentPoolGatewayProfile gatewayProfile) { - this.gatewayProfile = gatewayProfile; - return this; - } - - /** - * Get the virtualMachinesProfile property: Specifications on VirtualMachines agent pool. - * - * @return the virtualMachinesProfile value. - */ - public VirtualMachinesProfile virtualMachinesProfile() { - return this.virtualMachinesProfile; - } - - /** - * Set the virtualMachinesProfile property: Specifications on VirtualMachines agent pool. - * - * @param virtualMachinesProfile the virtualMachinesProfile value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties - withVirtualMachinesProfile(VirtualMachinesProfile virtualMachinesProfile) { - this.virtualMachinesProfile = virtualMachinesProfile; - return this; - } - - /** - * Get the virtualMachineNodesStatus property: The status of nodes in a VirtualMachines agent pool. - * - * @return the virtualMachineNodesStatus value. - */ - public List virtualMachineNodesStatus() { - return this.virtualMachineNodesStatus; - } - - /** - * Set the virtualMachineNodesStatus property: The status of nodes in a VirtualMachines agent pool. - * - * @param virtualMachineNodesStatus the virtualMachineNodesStatus value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties - withVirtualMachineNodesStatus(List virtualMachineNodesStatus) { - this.virtualMachineNodesStatus = virtualMachineNodesStatus; - return this; - } - - /** - * Get the status property: Contains read-only information about the Agent Pool. - * - * @return the status value. - */ - public AgentPoolStatus status() { - return this.status; - } - - /** - * Set the status property: Contains read-only information about the Agent Pool. - * - * @param status the status value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withStatus(AgentPoolStatus status) { - this.status = status; - return this; - } - - /** - * Get the localDnsProfile property: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS - * helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see - * aka.ms/aks/localdns. - * - * @return the localDnsProfile value. - */ - public LocalDnsProfile localDnsProfile() { - return this.localDnsProfile; - } - - /** - * Set the localDnsProfile property: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS - * helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see - * aka.ms/aks/localdns. - * - * @param localDnsProfile the localDnsProfile value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withLocalDnsProfile(LocalDnsProfile localDnsProfile) { - this.localDnsProfile = localDnsProfile; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (upgradeSettings() != null) { - upgradeSettings().validate(); - } - if (powerState() != null) { - powerState().validate(); - } - if (kubeletConfig() != null) { - kubeletConfig().validate(); - } - if (linuxOSConfig() != null) { - linuxOSConfig().validate(); - } - if (creationData() != null) { - creationData().validate(); - } - if (networkProfile() != null) { - networkProfile().validate(); - } - if (windowsProfile() != null) { - windowsProfile().validate(); - } - if (securityProfile() != null) { - securityProfile().validate(); - } - if (gpuProfile() != null) { - gpuProfile().validate(); - } - if (gatewayProfile() != null) { - gatewayProfile().validate(); - } - if (virtualMachinesProfile() != null) { - virtualMachinesProfile().validate(); - } - if (virtualMachineNodesStatus() != null) { - virtualMachineNodesStatus().forEach(e -> e.validate()); - } - if (status() != null) { - status().validate(); - } - if (localDnsProfile() != null) { - localDnsProfile().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("count", this.count); - jsonWriter.writeStringField("vmSize", this.vmSize); - jsonWriter.writeNumberField("osDiskSizeGB", this.osDiskSizeGB); - jsonWriter.writeStringField("osDiskType", this.osDiskType == null ? null : this.osDiskType.toString()); - jsonWriter.writeStringField("kubeletDiskType", - this.kubeletDiskType == null ? null : this.kubeletDiskType.toString()); - jsonWriter.writeStringField("workloadRuntime", - this.workloadRuntime == null ? null : this.workloadRuntime.toString()); - jsonWriter.writeStringField("messageOfTheDay", this.messageOfTheDay); - jsonWriter.writeStringField("vnetSubnetID", this.vnetSubnetId); - jsonWriter.writeStringField("podSubnetID", this.podSubnetId); - jsonWriter.writeStringField("podIPAllocationMode", - this.podIpAllocationMode == null ? null : this.podIpAllocationMode.toString()); - jsonWriter.writeNumberField("maxPods", this.maxPods); - jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); - jsonWriter.writeStringField("osSKU", this.osSku == null ? null : this.osSku.toString()); - jsonWriter.writeNumberField("maxCount", this.maxCount); - jsonWriter.writeNumberField("minCount", this.minCount); - jsonWriter.writeBooleanField("enableAutoScaling", this.enableAutoScaling); - jsonWriter.writeStringField("scaleDownMode", this.scaleDownMode == null ? null : this.scaleDownMode.toString()); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - jsonWriter.writeStringField("orchestratorVersion", this.orchestratorVersion); - jsonWriter.writeJsonField("upgradeSettings", this.upgradeSettings); - jsonWriter.writeJsonField("powerState", this.powerState); - jsonWriter.writeArrayField("availabilityZones", this.availabilityZones, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("enableNodePublicIP", this.enableNodePublicIp); - jsonWriter.writeStringField("nodePublicIPPrefixID", this.nodePublicIpPrefixId); - jsonWriter.writeStringField("scaleSetPriority", - this.scaleSetPriority == null ? null : this.scaleSetPriority.toString()); - jsonWriter.writeStringField("scaleSetEvictionPolicy", - this.scaleSetEvictionPolicy == null ? null : this.scaleSetEvictionPolicy.toString()); - jsonWriter.writeNumberField("spotMaxPrice", this.spotMaxPrice); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("nodeLabels", this.nodeLabels, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("nodeTaints", this.nodeTaints, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("proximityPlacementGroupID", this.proximityPlacementGroupId); - jsonWriter.writeJsonField("kubeletConfig", this.kubeletConfig); - jsonWriter.writeJsonField("linuxOSConfig", this.linuxOSConfig); - jsonWriter.writeBooleanField("enableEncryptionAtHost", this.enableEncryptionAtHost); - jsonWriter.writeBooleanField("enableUltraSSD", this.enableUltraSsd); - jsonWriter.writeBooleanField("enableFIPS", this.enableFips); - jsonWriter.writeStringField("gpuInstanceProfile", - this.gpuInstanceProfile == null ? null : this.gpuInstanceProfile.toString()); - jsonWriter.writeJsonField("creationData", this.creationData); - jsonWriter.writeStringField("capacityReservationGroupID", this.capacityReservationGroupId); - jsonWriter.writeStringField("hostGroupID", this.hostGroupId); - jsonWriter.writeJsonField("networkProfile", this.networkProfile); - jsonWriter.writeJsonField("windowsProfile", this.windowsProfile); - jsonWriter.writeJsonField("securityProfile", this.securityProfile); - jsonWriter.writeJsonField("gpuProfile", this.gpuProfile); - jsonWriter.writeJsonField("gatewayProfile", this.gatewayProfile); - jsonWriter.writeJsonField("virtualMachinesProfile", this.virtualMachinesProfile); - jsonWriter.writeArrayField("virtualMachineNodesStatus", this.virtualMachineNodesStatus, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("status", this.status); - jsonWriter.writeJsonField("localDNSProfile", this.localDnsProfile); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterAgentPoolProfileProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterAgentPoolProfileProperties 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 ManagedClusterAgentPoolProfileProperties. - */ - public static ManagedClusterAgentPoolProfileProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterAgentPoolProfileProperties deserializedManagedClusterAgentPoolProfileProperties - = new ManagedClusterAgentPoolProfileProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("eTag".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.etag = reader.getString(); - } else if ("count".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.count = reader.getNullable(JsonReader::getInt); - } else if ("vmSize".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.vmSize = reader.getString(); - } else if ("osDiskSizeGB".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.osDiskSizeGB - = reader.getNullable(JsonReader::getInt); - } else if ("osDiskType".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.osDiskType - = OSDiskType.fromString(reader.getString()); - } else if ("kubeletDiskType".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.kubeletDiskType - = KubeletDiskType.fromString(reader.getString()); - } else if ("workloadRuntime".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.workloadRuntime - = WorkloadRuntime.fromString(reader.getString()); - } else if ("messageOfTheDay".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.messageOfTheDay = reader.getString(); - } else if ("vnetSubnetID".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.vnetSubnetId = reader.getString(); - } else if ("podSubnetID".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.podSubnetId = reader.getString(); - } else if ("podIPAllocationMode".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.podIpAllocationMode - = PodIpAllocationMode.fromString(reader.getString()); - } else if ("maxPods".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.maxPods - = reader.getNullable(JsonReader::getInt); - } else if ("osType".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.osType = OSType.fromString(reader.getString()); - } else if ("osSKU".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.osSku = OSSku.fromString(reader.getString()); - } else if ("maxCount".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.maxCount - = reader.getNullable(JsonReader::getInt); - } else if ("minCount".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.minCount - = reader.getNullable(JsonReader::getInt); - } else if ("enableAutoScaling".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.enableAutoScaling - = reader.getNullable(JsonReader::getBoolean); - } else if ("scaleDownMode".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.scaleDownMode - = ScaleDownMode.fromString(reader.getString()); - } else if ("type".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.type - = AgentPoolType.fromString(reader.getString()); - } else if ("mode".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.mode - = AgentPoolMode.fromString(reader.getString()); - } else if ("orchestratorVersion".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.orchestratorVersion = reader.getString(); - } else if ("currentOrchestratorVersion".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.currentOrchestratorVersion - = reader.getString(); - } else if ("nodeImageVersion".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.nodeImageVersion = reader.getString(); - } else if ("upgradeSettings".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.upgradeSettings - = AgentPoolUpgradeSettings.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.provisioningState = reader.getString(); - } else if ("powerState".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.powerState = PowerState.fromJson(reader); - } else if ("availabilityZones".equals(fieldName)) { - List availabilityZones = reader.readArray(reader1 -> reader1.getString()); - deserializedManagedClusterAgentPoolProfileProperties.availabilityZones = availabilityZones; - } else if ("enableNodePublicIP".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.enableNodePublicIp - = reader.getNullable(JsonReader::getBoolean); - } else if ("nodePublicIPPrefixID".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.nodePublicIpPrefixId = reader.getString(); - } else if ("scaleSetPriority".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.scaleSetPriority - = ScaleSetPriority.fromString(reader.getString()); - } else if ("scaleSetEvictionPolicy".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.scaleSetEvictionPolicy - = ScaleSetEvictionPolicy.fromString(reader.getString()); - } else if ("spotMaxPrice".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.spotMaxPrice - = reader.getNullable(JsonReader::getFloat); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedManagedClusterAgentPoolProfileProperties.tags = tags; - } else if ("nodeLabels".equals(fieldName)) { - Map nodeLabels = reader.readMap(reader1 -> reader1.getString()); - deserializedManagedClusterAgentPoolProfileProperties.nodeLabels = nodeLabels; - } else if ("nodeTaints".equals(fieldName)) { - List nodeTaints = reader.readArray(reader1 -> reader1.getString()); - deserializedManagedClusterAgentPoolProfileProperties.nodeTaints = nodeTaints; - } else if ("proximityPlacementGroupID".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.proximityPlacementGroupId = reader.getString(); - } else if ("kubeletConfig".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.kubeletConfig = KubeletConfig.fromJson(reader); - } else if ("linuxOSConfig".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.linuxOSConfig = LinuxOSConfig.fromJson(reader); - } else if ("enableEncryptionAtHost".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.enableEncryptionAtHost - = reader.getNullable(JsonReader::getBoolean); - } else if ("enableUltraSSD".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.enableUltraSsd - = reader.getNullable(JsonReader::getBoolean); - } else if ("enableFIPS".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.enableFips - = reader.getNullable(JsonReader::getBoolean); - } else if ("gpuInstanceProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.gpuInstanceProfile - = GpuInstanceProfile.fromString(reader.getString()); - } else if ("creationData".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.creationData = CreationData.fromJson(reader); - } else if ("capacityReservationGroupID".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.capacityReservationGroupId - = reader.getString(); - } else if ("hostGroupID".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.hostGroupId = reader.getString(); - } else if ("networkProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.networkProfile - = AgentPoolNetworkProfile.fromJson(reader); - } else if ("windowsProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.windowsProfile - = AgentPoolWindowsProfile.fromJson(reader); - } else if ("securityProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.securityProfile - = AgentPoolSecurityProfile.fromJson(reader); - } else if ("gpuProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.gpuProfile = GpuProfile.fromJson(reader); - } else if ("gatewayProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.gatewayProfile - = AgentPoolGatewayProfile.fromJson(reader); - } else if ("virtualMachinesProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.virtualMachinesProfile - = VirtualMachinesProfile.fromJson(reader); - } else if ("virtualMachineNodesStatus".equals(fieldName)) { - List virtualMachineNodesStatus - = reader.readArray(reader1 -> VirtualMachineNodes.fromJson(reader1)); - deserializedManagedClusterAgentPoolProfileProperties.virtualMachineNodesStatus - = virtualMachineNodesStatus; - } else if ("status".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.status = AgentPoolStatus.fromJson(reader); - } else if ("localDNSProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.localDnsProfile - = LocalDnsProfile.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterAgentPoolProfileProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java deleted file mode 100644 index 8a1a490a1922..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java +++ /dev/null @@ -1,1336 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.ClusterUpgradeSettings; -import com.azure.resourcemanager.containerservice.models.ContainerServiceLinuxProfile; -import com.azure.resourcemanager.containerservice.models.ContainerServiceNetworkProfile; -import com.azure.resourcemanager.containerservice.models.ExtendedLocation; -import com.azure.resourcemanager.containerservice.models.KubernetesSupportPlan; -import com.azure.resourcemanager.containerservice.models.ManagedClusterAIToolchainOperatorProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterAddonProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterAgentPoolProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterApiServerAccessProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterAutoUpgradeProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterAzureMonitorProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterBootstrapProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterHttpProxyConfig; -import com.azure.resourcemanager.containerservice.models.ManagedClusterIdentity; -import com.azure.resourcemanager.containerservice.models.ManagedClusterIngressProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterMetricsProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterNodeProvisioningProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterNodeResourceGroupProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterOidcIssuerProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterPodIdentityProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterPropertiesAutoScalerProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterSecurityProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterSku; -import com.azure.resourcemanager.containerservice.models.ManagedClusterStatus; -import com.azure.resourcemanager.containerservice.models.ManagedClusterStorageProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterWindowsProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterWorkloadAutoScalerProfile; -import com.azure.resourcemanager.containerservice.models.PowerState; -import com.azure.resourcemanager.containerservice.models.PublicNetworkAccess; -import com.azure.resourcemanager.containerservice.models.ServiceMeshProfile; -import com.azure.resourcemanager.containerservice.models.UserAssignedIdentity; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Managed cluster. - */ -@Fluent -public final class ManagedClusterInner extends Resource { - /* - * Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is - * updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable - * optimistic concurrency per the normal eTag convention. - */ - private String etag; - - /* - * The managed cluster SKU. - */ - private ManagedClusterSku sku; - - /* - * The extended location of the Virtual Machine. - */ - private ExtendedLocation extendedLocation; - - /* - * The identity of the managed cluster, if configured. - */ - private ManagedClusterIdentity identity; - - /* - * Properties of a managed cluster. - */ - private ManagedClusterProperties innerProperties; - - /* - * This is primarily used to expose different UI experiences in the portal for different kinds - */ - private String kind; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ManagedClusterInner class. - */ - public ManagedClusterInner() { - } - - /** - * Get the etag property: Unique read-only string used to implement optimistic concurrency. The eTag value will - * change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a - * subsequent request to enable optimistic concurrency per the normal eTag convention. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Get the sku property: The managed cluster SKU. - * - * @return the sku value. - */ - public ManagedClusterSku sku() { - return this.sku; - } - - /** - * Set the sku property: The managed cluster SKU. - * - * @param sku the sku value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withSku(ManagedClusterSku sku) { - this.sku = sku; - 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 ManagedClusterInner object itself. - */ - public ManagedClusterInner withExtendedLocation(ExtendedLocation extendedLocation) { - this.extendedLocation = extendedLocation; - return this; - } - - /** - * Get the identity property: The identity of the managed cluster, if configured. - * - * @return the identity value. - */ - public ManagedClusterIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the managed cluster, if configured. - * - * @param identity the identity value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withIdentity(ManagedClusterIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the innerProperties property: Properties of a managed cluster. - * - * @return the innerProperties value. - */ - private ManagedClusterProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the kind property: This is primarily used to expose different UI experiences in the portal for different - * kinds. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: This is primarily used to expose different UI experiences in the portal for different - * kinds. - * - * @param kind the kind value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the provisioningState property: The current provisioning state. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the powerState property: The Power State of the cluster. - * - * @return the powerState value. - */ - public PowerState powerState() { - return this.innerProperties() == null ? null : this.innerProperties().powerState(); - } - - /** - * Get the maxAgentPools property: The max number of agent pools for the managed cluster. - * - * @return the maxAgentPools value. - */ - public Integer maxAgentPools() { - return this.innerProperties() == null ? null : this.innerProperties().maxAgentPools(); - } - - /** - * Get the kubernetesVersion property: The version of Kubernetes specified by the user. Both patch version - * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When - * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the - * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an - * upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor - * versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, - * upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not - * allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. - * - * @return the kubernetesVersion value. - */ - public String kubernetesVersion() { - return this.innerProperties() == null ? null : this.innerProperties().kubernetesVersion(); - } - - /** - * Set the kubernetesVersion property: The version of Kubernetes specified by the user. Both patch version - * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When - * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the - * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an - * upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor - * versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, - * upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not - * allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. - * - * @param kubernetesVersion the kubernetesVersion value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withKubernetesVersion(String kubernetesVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withKubernetesVersion(kubernetesVersion); - return this; - } - - /** - * Get the currentKubernetesVersion property: The version of Kubernetes the Managed Cluster is running. If - * kubernetesVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to - * it. If kubernetesVersion was <major.minor>, this field will contain the full <major.minor.patch> - * version being used. - * - * @return the currentKubernetesVersion value. - */ - public String currentKubernetesVersion() { - return this.innerProperties() == null ? null : this.innerProperties().currentKubernetesVersion(); - } - - /** - * Get the dnsPrefix property: The DNS prefix of the Managed Cluster. This cannot be updated once the Managed - * Cluster has been created. - * - * @return the dnsPrefix value. - */ - public String dnsPrefix() { - return this.innerProperties() == null ? null : this.innerProperties().dnsPrefix(); - } - - /** - * Set the dnsPrefix property: The DNS prefix of the Managed Cluster. This cannot be updated once the Managed - * Cluster has been created. - * - * @param dnsPrefix the dnsPrefix value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withDnsPrefix(String dnsPrefix) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withDnsPrefix(dnsPrefix); - return this; - } - - /** - * Get the fqdnSubdomain property: The FQDN subdomain of the private cluster with custom private dns zone. This - * cannot be updated once the Managed Cluster has been created. - * - * @return the fqdnSubdomain value. - */ - public String fqdnSubdomain() { - return this.innerProperties() == null ? null : this.innerProperties().fqdnSubdomain(); - } - - /** - * Set the fqdnSubdomain property: The FQDN subdomain of the private cluster with custom private dns zone. This - * cannot be updated once the Managed Cluster has been created. - * - * @param fqdnSubdomain the fqdnSubdomain value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withFqdnSubdomain(String fqdnSubdomain) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withFqdnSubdomain(fqdnSubdomain); - return this; - } - - /** - * Get the fqdn property: The FQDN of the master pool. - * - * @return the fqdn value. - */ - public String fqdn() { - return this.innerProperties() == null ? null : this.innerProperties().fqdn(); - } - - /** - * Get the privateFqdn property: The FQDN of private cluster. - * - * @return the privateFqdn value. - */ - public String privateFqdn() { - return this.innerProperties() == null ? null : this.innerProperties().privateFqdn(); - } - - /** - * Get the azurePortalFqdn property: The special FQDN used by the Azure Portal to access the Managed Cluster. This - * FQDN is for use only by the Azure Portal and should not be used by other clients. The Azure Portal requires - * certain Cross-Origin Resource Sharing (CORS) headers to be sent in some responses, which Kubernetes APIServer - * doesn't handle by default. This special FQDN supports CORS, allowing the Azure Portal to function properly. - * - * @return the azurePortalFqdn value. - */ - public String azurePortalFqdn() { - return this.innerProperties() == null ? null : this.innerProperties().azurePortalFqdn(); - } - - /** - * Get the agentPoolProfiles property: The agent pool properties. - * - * @return the agentPoolProfiles value. - */ - public List agentPoolProfiles() { - return this.innerProperties() == null ? null : this.innerProperties().agentPoolProfiles(); - } - - /** - * Set the agentPoolProfiles property: The agent pool properties. - * - * @param agentPoolProfiles the agentPoolProfiles value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withAgentPoolProfiles(List agentPoolProfiles) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withAgentPoolProfiles(agentPoolProfiles); - return this; - } - - /** - * Get the linuxProfile property: The profile for Linux VMs in the Managed Cluster. - * - * @return the linuxProfile value. - */ - public ContainerServiceLinuxProfile linuxProfile() { - return this.innerProperties() == null ? null : this.innerProperties().linuxProfile(); - } - - /** - * Set the linuxProfile property: The profile for Linux VMs in the Managed Cluster. - * - * @param linuxProfile the linuxProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withLinuxProfile(ContainerServiceLinuxProfile linuxProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withLinuxProfile(linuxProfile); - return this; - } - - /** - * Get the windowsProfile property: The profile for Windows VMs in the Managed Cluster. - * - * @return the windowsProfile value. - */ - public ManagedClusterWindowsProfile windowsProfile() { - return this.innerProperties() == null ? null : this.innerProperties().windowsProfile(); - } - - /** - * Set the windowsProfile property: The profile for Windows VMs in the Managed Cluster. - * - * @param windowsProfile the windowsProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withWindowsProfile(ManagedClusterWindowsProfile windowsProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withWindowsProfile(windowsProfile); - return this; - } - - /** - * Get the servicePrincipalProfile property: Information about a service principal identity for the cluster to use - * for manipulating Azure APIs. - * - * @return the servicePrincipalProfile value. - */ - public ManagedClusterServicePrincipalProfile servicePrincipalProfile() { - return this.innerProperties() == null ? null : this.innerProperties().servicePrincipalProfile(); - } - - /** - * Set the servicePrincipalProfile property: Information about a service principal identity for the cluster to use - * for manipulating Azure APIs. - * - * @param servicePrincipalProfile the servicePrincipalProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner - withServicePrincipalProfile(ManagedClusterServicePrincipalProfile servicePrincipalProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withServicePrincipalProfile(servicePrincipalProfile); - return this; - } - - /** - * Get the addonProfiles property: The profile of managed cluster add-on. - * - * @return the addonProfiles value. - */ - public Map addonProfiles() { - return this.innerProperties() == null ? null : this.innerProperties().addonProfiles(); - } - - /** - * Set the addonProfiles property: The profile of managed cluster add-on. - * - * @param addonProfiles the addonProfiles value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withAddonProfiles(Map addonProfiles) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withAddonProfiles(addonProfiles); - return this; - } - - /** - * Get the podIdentityProfile property: The pod identity profile of the Managed Cluster. See [use AAD pod - * identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on AAD pod identity - * integration. - * - * @return the podIdentityProfile value. - */ - public ManagedClusterPodIdentityProfile podIdentityProfile() { - return this.innerProperties() == null ? null : this.innerProperties().podIdentityProfile(); - } - - /** - * Set the podIdentityProfile property: The pod identity profile of the Managed Cluster. See [use AAD pod - * identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on AAD pod identity - * integration. - * - * @param podIdentityProfile the podIdentityProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withPodIdentityProfile(ManagedClusterPodIdentityProfile podIdentityProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withPodIdentityProfile(podIdentityProfile); - return this; - } - - /** - * Get the oidcIssuerProfile property: The OIDC issuer profile of the Managed Cluster. - * - * @return the oidcIssuerProfile value. - */ - public ManagedClusterOidcIssuerProfile oidcIssuerProfile() { - return this.innerProperties() == null ? null : this.innerProperties().oidcIssuerProfile(); - } - - /** - * Set the oidcIssuerProfile property: The OIDC issuer profile of the Managed Cluster. - * - * @param oidcIssuerProfile the oidcIssuerProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withOidcIssuerProfile(ManagedClusterOidcIssuerProfile oidcIssuerProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withOidcIssuerProfile(oidcIssuerProfile); - return this; - } - - /** - * Get the nodeResourceGroup property: The name of the resource group containing agent pool nodes. - * - * @return the nodeResourceGroup value. - */ - public String nodeResourceGroup() { - return this.innerProperties() == null ? null : this.innerProperties().nodeResourceGroup(); - } - - /** - * Set the nodeResourceGroup property: The name of the resource group containing agent pool nodes. - * - * @param nodeResourceGroup the nodeResourceGroup value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withNodeResourceGroup(String nodeResourceGroup) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withNodeResourceGroup(nodeResourceGroup); - return this; - } - - /** - * Get the nodeResourceGroupProfile property: Profile of the node resource group configuration. - * - * @return the nodeResourceGroupProfile value. - */ - public ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile() { - return this.innerProperties() == null ? null : this.innerProperties().nodeResourceGroupProfile(); - } - - /** - * Set the nodeResourceGroupProfile property: Profile of the node resource group configuration. - * - * @param nodeResourceGroupProfile the nodeResourceGroupProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner - withNodeResourceGroupProfile(ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withNodeResourceGroupProfile(nodeResourceGroupProfile); - return this; - } - - /** - * Get the enableRbac property: Whether to enable Kubernetes Role-Based Access Control. - * - * @return the enableRbac value. - */ - public Boolean enableRbac() { - return this.innerProperties() == null ? null : this.innerProperties().enableRbac(); - } - - /** - * Set the enableRbac property: Whether to enable Kubernetes Role-Based Access Control. - * - * @param enableRbac the enableRbac value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withEnableRbac(Boolean enableRbac) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withEnableRbac(enableRbac); - return this; - } - - /** - * Get the supportPlan property: The support plan for the Managed Cluster. If unspecified, the default is - * 'KubernetesOfficial'. - * - * @return the supportPlan value. - */ - public KubernetesSupportPlan supportPlan() { - return this.innerProperties() == null ? null : this.innerProperties().supportPlan(); - } - - /** - * Set the supportPlan property: The support plan for the Managed Cluster. If unspecified, the default is - * 'KubernetesOfficial'. - * - * @param supportPlan the supportPlan value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withSupportPlan(KubernetesSupportPlan supportPlan) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withSupportPlan(supportPlan); - return this; - } - - /** - * Get the networkProfile property: The network configuration profile. - * - * @return the networkProfile value. - */ - public ContainerServiceNetworkProfile networkProfile() { - return this.innerProperties() == null ? null : this.innerProperties().networkProfile(); - } - - /** - * Set the networkProfile property: The network configuration profile. - * - * @param networkProfile the networkProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withNetworkProfile(ContainerServiceNetworkProfile networkProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withNetworkProfile(networkProfile); - return this; - } - - /** - * Get the aadProfile property: The Azure Active Directory configuration. - * - * @return the aadProfile value. - */ - public ManagedClusterAadProfile aadProfile() { - return this.innerProperties() == null ? null : this.innerProperties().aadProfile(); - } - - /** - * Set the aadProfile property: The Azure Active Directory configuration. - * - * @param aadProfile the aadProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withAadProfile(ManagedClusterAadProfile aadProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withAadProfile(aadProfile); - return this; - } - - /** - * Get the autoUpgradeProfile property: The auto upgrade configuration. - * - * @return the autoUpgradeProfile value. - */ - public ManagedClusterAutoUpgradeProfile autoUpgradeProfile() { - return this.innerProperties() == null ? null : this.innerProperties().autoUpgradeProfile(); - } - - /** - * Set the autoUpgradeProfile property: The auto upgrade configuration. - * - * @param autoUpgradeProfile the autoUpgradeProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withAutoUpgradeProfile(ManagedClusterAutoUpgradeProfile autoUpgradeProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withAutoUpgradeProfile(autoUpgradeProfile); - return this; - } - - /** - * Get the upgradeSettings property: Settings for upgrading a cluster. - * - * @return the upgradeSettings value. - */ - public ClusterUpgradeSettings upgradeSettings() { - return this.innerProperties() == null ? null : this.innerProperties().upgradeSettings(); - } - - /** - * Set the upgradeSettings property: Settings for upgrading a cluster. - * - * @param upgradeSettings the upgradeSettings value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withUpgradeSettings(ClusterUpgradeSettings upgradeSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withUpgradeSettings(upgradeSettings); - return this; - } - - /** - * Get the autoScalerProfile property: Parameters to be applied to the cluster-autoscaler when enabled. - * - * @return the autoScalerProfile value. - */ - public ManagedClusterPropertiesAutoScalerProfile autoScalerProfile() { - return this.innerProperties() == null ? null : this.innerProperties().autoScalerProfile(); - } - - /** - * Set the autoScalerProfile property: Parameters to be applied to the cluster-autoscaler when enabled. - * - * @param autoScalerProfile the autoScalerProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withAutoScalerProfile(ManagedClusterPropertiesAutoScalerProfile autoScalerProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withAutoScalerProfile(autoScalerProfile); - return this; - } - - /** - * Get the apiServerAccessProfile property: The access profile for managed cluster API server. - * - * @return the apiServerAccessProfile value. - */ - public ManagedClusterApiServerAccessProfile apiServerAccessProfile() { - return this.innerProperties() == null ? null : this.innerProperties().apiServerAccessProfile(); - } - - /** - * Set the apiServerAccessProfile property: The access profile for managed cluster API server. - * - * @param apiServerAccessProfile the apiServerAccessProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withApiServerAccessProfile(ManagedClusterApiServerAccessProfile apiServerAccessProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withApiServerAccessProfile(apiServerAccessProfile); - return this; - } - - /** - * Get the diskEncryptionSetId property: The Resource ID of the disk encryption set to use for enabling encryption - * at rest. This is of the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. - * - * @return the diskEncryptionSetId value. - */ - public String diskEncryptionSetId() { - return this.innerProperties() == null ? null : this.innerProperties().diskEncryptionSetId(); - } - - /** - * Set the diskEncryptionSetId property: The Resource ID of the disk encryption set to use for enabling encryption - * at rest. This is of the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. - * - * @param diskEncryptionSetId the diskEncryptionSetId value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withDiskEncryptionSetId(String diskEncryptionSetId) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withDiskEncryptionSetId(diskEncryptionSetId); - return this; - } - - /** - * Get the identityProfile property: The user identity associated with the managed cluster. This identity will be - * used by the kubelet. Only one user assigned identity is allowed. The only accepted key is "kubeletidentity", with - * value of "resourceId": - * "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". - * - * @return the identityProfile value. - */ - public Map identityProfile() { - return this.innerProperties() == null ? null : this.innerProperties().identityProfile(); - } - - /** - * Set the identityProfile property: The user identity associated with the managed cluster. This identity will be - * used by the kubelet. Only one user assigned identity is allowed. The only accepted key is "kubeletidentity", with - * value of "resourceId": - * "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". - * - * @param identityProfile the identityProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withIdentityProfile(Map identityProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withIdentityProfile(identityProfile); - return this; - } - - /** - * Get the privateLinkResources property: Private link resources associated with the cluster. - * - * @return the privateLinkResources value. - */ - public List privateLinkResources() { - return this.innerProperties() == null ? null : this.innerProperties().privateLinkResources(); - } - - /** - * Set the privateLinkResources property: Private link resources associated with the cluster. - * - * @param privateLinkResources the privateLinkResources value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withPrivateLinkResources(List privateLinkResources) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withPrivateLinkResources(privateLinkResources); - return this; - } - - /** - * Get the disableLocalAccounts property: If local accounts should be disabled on the Managed Cluster. If set to - * true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters - * that are AAD enabled. For more details see [disable local - * accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). - * - * @return the disableLocalAccounts value. - */ - public Boolean disableLocalAccounts() { - return this.innerProperties() == null ? null : this.innerProperties().disableLocalAccounts(); - } - - /** - * Set the disableLocalAccounts property: If local accounts should be disabled on the Managed Cluster. If set to - * true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters - * that are AAD enabled. For more details see [disable local - * accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). - * - * @param disableLocalAccounts the disableLocalAccounts value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withDisableLocalAccounts(Boolean disableLocalAccounts) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withDisableLocalAccounts(disableLocalAccounts); - return this; - } - - /** - * Get the httpProxyConfig property: Configurations for provisioning the cluster with HTTP proxy servers. - * - * @return the httpProxyConfig value. - */ - public ManagedClusterHttpProxyConfig httpProxyConfig() { - return this.innerProperties() == null ? null : this.innerProperties().httpProxyConfig(); - } - - /** - * Set the httpProxyConfig property: Configurations for provisioning the cluster with HTTP proxy servers. - * - * @param httpProxyConfig the httpProxyConfig value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withHttpProxyConfig(ManagedClusterHttpProxyConfig httpProxyConfig) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withHttpProxyConfig(httpProxyConfig); - return this; - } - - /** - * Get the securityProfile property: Security profile for the managed cluster. - * - * @return the securityProfile value. - */ - public ManagedClusterSecurityProfile securityProfile() { - return this.innerProperties() == null ? null : this.innerProperties().securityProfile(); - } - - /** - * Set the securityProfile property: Security profile for the managed cluster. - * - * @param securityProfile the securityProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withSecurityProfile(ManagedClusterSecurityProfile securityProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withSecurityProfile(securityProfile); - return this; - } - - /** - * Get the storageProfile property: Storage profile for the managed cluster. - * - * @return the storageProfile value. - */ - public ManagedClusterStorageProfile storageProfile() { - return this.innerProperties() == null ? null : this.innerProperties().storageProfile(); - } - - /** - * Set the storageProfile property: Storage profile for the managed cluster. - * - * @param storageProfile the storageProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withStorageProfile(ManagedClusterStorageProfile storageProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withStorageProfile(storageProfile); - return this; - } - - /** - * Get the ingressProfile property: Ingress profile for the managed cluster. - * - * @return the ingressProfile value. - */ - public ManagedClusterIngressProfile ingressProfile() { - return this.innerProperties() == null ? null : this.innerProperties().ingressProfile(); - } - - /** - * Set the ingressProfile property: Ingress profile for the managed cluster. - * - * @param ingressProfile the ingressProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withIngressProfile(ManagedClusterIngressProfile ingressProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withIngressProfile(ingressProfile); - return this; - } - - /** - * Get the publicNetworkAccess property: PublicNetworkAccess of the managedCluster. Allow or deny public network - * access for AKS. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccess publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); - } - - /** - * Set the publicNetworkAccess property: PublicNetworkAccess of the managedCluster. Allow or deny public network - * access for AKS. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); - return this; - } - - /** - * Get the workloadAutoScalerProfile property: Workload Auto-scaler profile for the managed cluster. - * - * @return the workloadAutoScalerProfile value. - */ - public ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile() { - return this.innerProperties() == null ? null : this.innerProperties().workloadAutoScalerProfile(); - } - - /** - * Set the workloadAutoScalerProfile property: Workload Auto-scaler profile for the managed cluster. - * - * @param workloadAutoScalerProfile the workloadAutoScalerProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner - withWorkloadAutoScalerProfile(ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withWorkloadAutoScalerProfile(workloadAutoScalerProfile); - return this; - } - - /** - * Get the azureMonitorProfile property: Azure Monitor addon profiles for monitoring the managed cluster. - * - * @return the azureMonitorProfile value. - */ - public ManagedClusterAzureMonitorProfile azureMonitorProfile() { - return this.innerProperties() == null ? null : this.innerProperties().azureMonitorProfile(); - } - - /** - * Set the azureMonitorProfile property: Azure Monitor addon profiles for monitoring the managed cluster. - * - * @param azureMonitorProfile the azureMonitorProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withAzureMonitorProfile(ManagedClusterAzureMonitorProfile azureMonitorProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withAzureMonitorProfile(azureMonitorProfile); - return this; - } - - /** - * Get the serviceMeshProfile property: Service mesh profile for a managed cluster. - * - * @return the serviceMeshProfile value. - */ - public ServiceMeshProfile serviceMeshProfile() { - return this.innerProperties() == null ? null : this.innerProperties().serviceMeshProfile(); - } - - /** - * Set the serviceMeshProfile property: Service mesh profile for a managed cluster. - * - * @param serviceMeshProfile the serviceMeshProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withServiceMeshProfile(ServiceMeshProfile serviceMeshProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withServiceMeshProfile(serviceMeshProfile); - return this; - } - - /** - * Get the resourceUid property: The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds - * (i.e: create, delete, create sequence). - * - * @return the resourceUid value. - */ - public String resourceUid() { - return this.innerProperties() == null ? null : this.innerProperties().resourceUid(); - } - - /** - * Get the metricsProfile property: Optional cluster metrics configuration. - * - * @return the metricsProfile value. - */ - public ManagedClusterMetricsProfile metricsProfile() { - return this.innerProperties() == null ? null : this.innerProperties().metricsProfile(); - } - - /** - * Set the metricsProfile property: Optional cluster metrics configuration. - * - * @param metricsProfile the metricsProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withMetricsProfile(ManagedClusterMetricsProfile metricsProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withMetricsProfile(metricsProfile); - return this; - } - - /** - * Get the nodeProvisioningProfile property: Node provisioning settings that apply to the whole cluster. - * - * @return the nodeProvisioningProfile value. - */ - public ManagedClusterNodeProvisioningProfile nodeProvisioningProfile() { - return this.innerProperties() == null ? null : this.innerProperties().nodeProvisioningProfile(); - } - - /** - * Set the nodeProvisioningProfile property: Node provisioning settings that apply to the whole cluster. - * - * @param nodeProvisioningProfile the nodeProvisioningProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner - withNodeProvisioningProfile(ManagedClusterNodeProvisioningProfile nodeProvisioningProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withNodeProvisioningProfile(nodeProvisioningProfile); - return this; - } - - /** - * Get the bootstrapProfile property: Profile of the cluster bootstrap configuration. - * - * @return the bootstrapProfile value. - */ - public ManagedClusterBootstrapProfile bootstrapProfile() { - return this.innerProperties() == null ? null : this.innerProperties().bootstrapProfile(); - } - - /** - * Set the bootstrapProfile property: Profile of the cluster bootstrap configuration. - * - * @param bootstrapProfile the bootstrapProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withBootstrapProfile(ManagedClusterBootstrapProfile bootstrapProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withBootstrapProfile(bootstrapProfile); - return this; - } - - /** - * Get the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. - * - * @return the aiToolchainOperatorProfile value. - */ - public ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile() { - return this.innerProperties() == null ? null : this.innerProperties().aiToolchainOperatorProfile(); - } - - /** - * Set the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. - * - * @param aiToolchainOperatorProfile the aiToolchainOperatorProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner - withAiToolchainOperatorProfile(ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withAiToolchainOperatorProfile(aiToolchainOperatorProfile); - return this; - } - - /** - * Get the status property: Contains read-only information about the Managed Cluster. - * - * @return the status value. - */ - public ManagedClusterStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Set the status property: Contains read-only information about the Managed Cluster. - * - * @param status the status value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withStatus(ManagedClusterStatus status) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withStatus(status); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sku() != null) { - sku().validate(); - } - if (extendedLocation() != null) { - extendedLocation().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("sku", this.sku); - jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeStringField("kind", this.kind); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterInner 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 ManagedClusterInner. - */ - public static ManagedClusterInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterInner deserializedManagedClusterInner = new ManagedClusterInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedManagedClusterInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedManagedClusterInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedManagedClusterInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedManagedClusterInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedManagedClusterInner.withTags(tags); - } else if ("eTag".equals(fieldName)) { - deserializedManagedClusterInner.etag = reader.getString(); - } else if ("sku".equals(fieldName)) { - deserializedManagedClusterInner.sku = ManagedClusterSku.fromJson(reader); - } else if ("extendedLocation".equals(fieldName)) { - deserializedManagedClusterInner.extendedLocation = ExtendedLocation.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedManagedClusterInner.identity = ManagedClusterIdentity.fromJson(reader); - } else if ("properties".equals(fieldName)) { - deserializedManagedClusterInner.innerProperties = ManagedClusterProperties.fromJson(reader); - } else if ("kind".equals(fieldName)) { - deserializedManagedClusterInner.kind = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedManagedClusterInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java deleted file mode 100644 index 2d3a5904c461..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java +++ /dev/null @@ -1,1465 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.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 com.azure.resourcemanager.containerservice.models.ClusterUpgradeSettings; -import com.azure.resourcemanager.containerservice.models.ContainerServiceLinuxProfile; -import com.azure.resourcemanager.containerservice.models.ContainerServiceNetworkProfile; -import com.azure.resourcemanager.containerservice.models.KubernetesSupportPlan; -import com.azure.resourcemanager.containerservice.models.ManagedClusterAIToolchainOperatorProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterAddonProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterAgentPoolProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterApiServerAccessProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterAutoUpgradeProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterAzureMonitorProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterBootstrapProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterHttpProxyConfig; -import com.azure.resourcemanager.containerservice.models.ManagedClusterIngressProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterMetricsProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterNodeProvisioningProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterNodeResourceGroupProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterOidcIssuerProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterPodIdentityProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterPropertiesAutoScalerProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterSecurityProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterStatus; -import com.azure.resourcemanager.containerservice.models.ManagedClusterStorageProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterWindowsProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterWorkloadAutoScalerProfile; -import com.azure.resourcemanager.containerservice.models.PowerState; -import com.azure.resourcemanager.containerservice.models.PublicNetworkAccess; -import com.azure.resourcemanager.containerservice.models.ServiceMeshProfile; -import com.azure.resourcemanager.containerservice.models.UserAssignedIdentity; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Properties of the managed cluster. - */ -@Fluent -public final class ManagedClusterProperties implements JsonSerializable { - /* - * The current provisioning state. - */ - private String provisioningState; - - /* - * The Power State of the cluster. - */ - private PowerState powerState; - - /* - * The max number of agent pools for the managed cluster. - */ - private Integer maxAgentPools; - - /* - * The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and - * (e.g. 1.20) are supported. When is specified, the latest supported GA patch version - * is chosen automatically. Updating the cluster with the same once it has been created (e.g. 1.14.x - * -> 1.14) will not trigger an upgrade, even if a newer patch version is available. When you upgrade a supported - * AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed sequentially by major - * version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> - * 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for - * more details. - */ - private String kubernetesVersion; - - /* - * The version of Kubernetes the Managed Cluster is running. If kubernetesVersion was a fully specified version - * , this field will be exactly equal to it. If kubernetesVersion was , this field - * will contain the full version being used. - */ - private String currentKubernetesVersion; - - /* - * The DNS prefix of the Managed Cluster. This cannot be updated once the Managed Cluster has been created. - */ - private String dnsPrefix; - - /* - * The FQDN subdomain of the private cluster with custom private dns zone. This cannot be updated once the Managed - * Cluster has been created. - */ - private String fqdnSubdomain; - - /* - * The FQDN of the master pool. - */ - private String fqdn; - - /* - * The FQDN of private cluster. - */ - private String privateFqdn; - - /* - * The special FQDN used by the Azure Portal to access the Managed Cluster. This FQDN is for use only by the Azure - * Portal and should not be used by other clients. The Azure Portal requires certain Cross-Origin Resource Sharing - * (CORS) headers to be sent in some responses, which Kubernetes APIServer doesn't handle by default. This special - * FQDN supports CORS, allowing the Azure Portal to function properly. - */ - private String azurePortalFqdn; - - /* - * The agent pool properties. - */ - private List agentPoolProfiles; - - /* - * The profile for Linux VMs in the Managed Cluster. - */ - private ContainerServiceLinuxProfile linuxProfile; - - /* - * The profile for Windows VMs in the Managed Cluster. - */ - private ManagedClusterWindowsProfile windowsProfile; - - /* - * Information about a service principal identity for the cluster to use for manipulating Azure APIs. - */ - private ManagedClusterServicePrincipalProfile servicePrincipalProfile; - - /* - * The profile of managed cluster add-on. - */ - private Map addonProfiles; - - /* - * The pod identity profile of the Managed Cluster. See [use AAD pod - * identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on AAD pod identity - * integration. - */ - private ManagedClusterPodIdentityProfile podIdentityProfile; - - /* - * The OIDC issuer profile of the Managed Cluster. - */ - private ManagedClusterOidcIssuerProfile oidcIssuerProfile; - - /* - * The name of the resource group containing agent pool nodes. - */ - private String nodeResourceGroup; - - /* - * Profile of the node resource group configuration. - */ - private ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile; - - /* - * Whether to enable Kubernetes Role-Based Access Control. - */ - private Boolean enableRbac; - - /* - * The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'. - */ - private KubernetesSupportPlan supportPlan; - - /* - * The network configuration profile. - */ - private ContainerServiceNetworkProfile networkProfile; - - /* - * The Azure Active Directory configuration. - */ - private ManagedClusterAadProfile aadProfile; - - /* - * The auto upgrade configuration. - */ - private ManagedClusterAutoUpgradeProfile autoUpgradeProfile; - - /* - * Settings for upgrading a cluster. - */ - private ClusterUpgradeSettings upgradeSettings; - - /* - * Parameters to be applied to the cluster-autoscaler when enabled - */ - private ManagedClusterPropertiesAutoScalerProfile autoScalerProfile; - - /* - * The access profile for managed cluster API server. - */ - private ManagedClusterApiServerAccessProfile apiServerAccessProfile; - - /* - * The Resource ID of the disk encryption set to use for enabling encryption at rest. This is of the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/ - * diskEncryptionSets/{encryptionSetName}' - */ - private String diskEncryptionSetId; - - /* - * The user identity associated with the managed cluster. This identity will be used by the kubelet. Only one user - * assigned identity is allowed. The only accepted key is "kubeletidentity", with value of "resourceId": - * "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". - */ - private Map identityProfile; - - /* - * Private link resources associated with the cluster. - */ - private List privateLinkResources; - - /* - * If local accounts should be disabled on the Managed Cluster. If set to true, getting static credentials will be - * disabled for this cluster. This must only be used on Managed Clusters that are AAD enabled. For more details see - * [disable local accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). - */ - private Boolean disableLocalAccounts; - - /* - * Configurations for provisioning the cluster with HTTP proxy servers. - */ - private ManagedClusterHttpProxyConfig httpProxyConfig; - - /* - * Security profile for the managed cluster. - */ - private ManagedClusterSecurityProfile securityProfile; - - /* - * Storage profile for the managed cluster. - */ - private ManagedClusterStorageProfile storageProfile; - - /* - * Ingress profile for the managed cluster. - */ - private ManagedClusterIngressProfile ingressProfile; - - /* - * PublicNetworkAccess of the managedCluster. Allow or deny public network access for AKS - */ - private PublicNetworkAccess publicNetworkAccess; - - /* - * Workload Auto-scaler profile for the managed cluster. - */ - private ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile; - - /* - * Azure Monitor addon profiles for monitoring the managed cluster. - */ - private ManagedClusterAzureMonitorProfile azureMonitorProfile; - - /* - * Service mesh profile for a managed cluster. - */ - private ServiceMeshProfile serviceMeshProfile; - - /* - * The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds (i.e: create, delete, create - * sequence) - */ - private String resourceUid; - - /* - * Optional cluster metrics configuration. - */ - private ManagedClusterMetricsProfile metricsProfile; - - /* - * Node provisioning settings that apply to the whole cluster. - */ - private ManagedClusterNodeProvisioningProfile nodeProvisioningProfile; - - /* - * Profile of the cluster bootstrap configuration. - */ - private ManagedClusterBootstrapProfile bootstrapProfile; - - /* - * AI toolchain operator settings that apply to the whole cluster. - */ - private ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile; - - /* - * Contains read-only information about the Managed Cluster. - */ - private ManagedClusterStatus status; - - /** - * Creates an instance of ManagedClusterProperties class. - */ - public ManagedClusterProperties() { - } - - /** - * Get the provisioningState property: The current provisioning state. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the powerState property: The Power State of the cluster. - * - * @return the powerState value. - */ - public PowerState powerState() { - return this.powerState; - } - - /** - * Get the maxAgentPools property: The max number of agent pools for the managed cluster. - * - * @return the maxAgentPools value. - */ - public Integer maxAgentPools() { - return this.maxAgentPools; - } - - /** - * Get the kubernetesVersion property: The version of Kubernetes specified by the user. Both patch version - * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When - * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the - * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an - * upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor - * versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, - * upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not - * allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. - * - * @return the kubernetesVersion value. - */ - public String kubernetesVersion() { - return this.kubernetesVersion; - } - - /** - * Set the kubernetesVersion property: The version of Kubernetes specified by the user. Both patch version - * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When - * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the - * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an - * upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor - * versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, - * upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not - * allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. - * - * @param kubernetesVersion the kubernetesVersion value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withKubernetesVersion(String kubernetesVersion) { - this.kubernetesVersion = kubernetesVersion; - return this; - } - - /** - * Get the currentKubernetesVersion property: The version of Kubernetes the Managed Cluster is running. If - * kubernetesVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to - * it. If kubernetesVersion was <major.minor>, this field will contain the full <major.minor.patch> - * version being used. - * - * @return the currentKubernetesVersion value. - */ - public String currentKubernetesVersion() { - return this.currentKubernetesVersion; - } - - /** - * Get the dnsPrefix property: The DNS prefix of the Managed Cluster. This cannot be updated once the Managed - * Cluster has been created. - * - * @return the dnsPrefix value. - */ - public String dnsPrefix() { - return this.dnsPrefix; - } - - /** - * Set the dnsPrefix property: The DNS prefix of the Managed Cluster. This cannot be updated once the Managed - * Cluster has been created. - * - * @param dnsPrefix the dnsPrefix value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withDnsPrefix(String dnsPrefix) { - this.dnsPrefix = dnsPrefix; - return this; - } - - /** - * Get the fqdnSubdomain property: The FQDN subdomain of the private cluster with custom private dns zone. This - * cannot be updated once the Managed Cluster has been created. - * - * @return the fqdnSubdomain value. - */ - public String fqdnSubdomain() { - return this.fqdnSubdomain; - } - - /** - * Set the fqdnSubdomain property: The FQDN subdomain of the private cluster with custom private dns zone. This - * cannot be updated once the Managed Cluster has been created. - * - * @param fqdnSubdomain the fqdnSubdomain value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withFqdnSubdomain(String fqdnSubdomain) { - this.fqdnSubdomain = fqdnSubdomain; - return this; - } - - /** - * Get the fqdn property: The FQDN of the master pool. - * - * @return the fqdn value. - */ - public String fqdn() { - return this.fqdn; - } - - /** - * Get the privateFqdn property: The FQDN of private cluster. - * - * @return the privateFqdn value. - */ - public String privateFqdn() { - return this.privateFqdn; - } - - /** - * Get the azurePortalFqdn property: The special FQDN used by the Azure Portal to access the Managed Cluster. This - * FQDN is for use only by the Azure Portal and should not be used by other clients. The Azure Portal requires - * certain Cross-Origin Resource Sharing (CORS) headers to be sent in some responses, which Kubernetes APIServer - * doesn't handle by default. This special FQDN supports CORS, allowing the Azure Portal to function properly. - * - * @return the azurePortalFqdn value. - */ - public String azurePortalFqdn() { - return this.azurePortalFqdn; - } - - /** - * Get the agentPoolProfiles property: The agent pool properties. - * - * @return the agentPoolProfiles value. - */ - public List agentPoolProfiles() { - return this.agentPoolProfiles; - } - - /** - * Set the agentPoolProfiles property: The agent pool properties. - * - * @param agentPoolProfiles the agentPoolProfiles value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withAgentPoolProfiles(List agentPoolProfiles) { - this.agentPoolProfiles = agentPoolProfiles; - return this; - } - - /** - * Get the linuxProfile property: The profile for Linux VMs in the Managed Cluster. - * - * @return the linuxProfile value. - */ - public ContainerServiceLinuxProfile linuxProfile() { - return this.linuxProfile; - } - - /** - * Set the linuxProfile property: The profile for Linux VMs in the Managed Cluster. - * - * @param linuxProfile the linuxProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withLinuxProfile(ContainerServiceLinuxProfile linuxProfile) { - this.linuxProfile = linuxProfile; - return this; - } - - /** - * Get the windowsProfile property: The profile for Windows VMs in the Managed Cluster. - * - * @return the windowsProfile value. - */ - public ManagedClusterWindowsProfile windowsProfile() { - return this.windowsProfile; - } - - /** - * Set the windowsProfile property: The profile for Windows VMs in the Managed Cluster. - * - * @param windowsProfile the windowsProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withWindowsProfile(ManagedClusterWindowsProfile windowsProfile) { - this.windowsProfile = windowsProfile; - return this; - } - - /** - * Get the servicePrincipalProfile property: Information about a service principal identity for the cluster to use - * for manipulating Azure APIs. - * - * @return the servicePrincipalProfile value. - */ - public ManagedClusterServicePrincipalProfile servicePrincipalProfile() { - return this.servicePrincipalProfile; - } - - /** - * Set the servicePrincipalProfile property: Information about a service principal identity for the cluster to use - * for manipulating Azure APIs. - * - * @param servicePrincipalProfile the servicePrincipalProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties - withServicePrincipalProfile(ManagedClusterServicePrincipalProfile servicePrincipalProfile) { - this.servicePrincipalProfile = servicePrincipalProfile; - return this; - } - - /** - * Get the addonProfiles property: The profile of managed cluster add-on. - * - * @return the addonProfiles value. - */ - public Map addonProfiles() { - return this.addonProfiles; - } - - /** - * Set the addonProfiles property: The profile of managed cluster add-on. - * - * @param addonProfiles the addonProfiles value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withAddonProfiles(Map addonProfiles) { - this.addonProfiles = addonProfiles; - return this; - } - - /** - * Get the podIdentityProfile property: The pod identity profile of the Managed Cluster. See [use AAD pod - * identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on AAD pod identity - * integration. - * - * @return the podIdentityProfile value. - */ - public ManagedClusterPodIdentityProfile podIdentityProfile() { - return this.podIdentityProfile; - } - - /** - * Set the podIdentityProfile property: The pod identity profile of the Managed Cluster. See [use AAD pod - * identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on AAD pod identity - * integration. - * - * @param podIdentityProfile the podIdentityProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withPodIdentityProfile(ManagedClusterPodIdentityProfile podIdentityProfile) { - this.podIdentityProfile = podIdentityProfile; - return this; - } - - /** - * Get the oidcIssuerProfile property: The OIDC issuer profile of the Managed Cluster. - * - * @return the oidcIssuerProfile value. - */ - public ManagedClusterOidcIssuerProfile oidcIssuerProfile() { - return this.oidcIssuerProfile; - } - - /** - * Set the oidcIssuerProfile property: The OIDC issuer profile of the Managed Cluster. - * - * @param oidcIssuerProfile the oidcIssuerProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withOidcIssuerProfile(ManagedClusterOidcIssuerProfile oidcIssuerProfile) { - this.oidcIssuerProfile = oidcIssuerProfile; - return this; - } - - /** - * Get the nodeResourceGroup property: The name of the resource group containing agent pool nodes. - * - * @return the nodeResourceGroup value. - */ - public String nodeResourceGroup() { - return this.nodeResourceGroup; - } - - /** - * Set the nodeResourceGroup property: The name of the resource group containing agent pool nodes. - * - * @param nodeResourceGroup the nodeResourceGroup value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withNodeResourceGroup(String nodeResourceGroup) { - this.nodeResourceGroup = nodeResourceGroup; - return this; - } - - /** - * Get the nodeResourceGroupProfile property: Profile of the node resource group configuration. - * - * @return the nodeResourceGroupProfile value. - */ - public ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile() { - return this.nodeResourceGroupProfile; - } - - /** - * Set the nodeResourceGroupProfile property: Profile of the node resource group configuration. - * - * @param nodeResourceGroupProfile the nodeResourceGroupProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties - withNodeResourceGroupProfile(ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile) { - this.nodeResourceGroupProfile = nodeResourceGroupProfile; - return this; - } - - /** - * Get the enableRbac property: Whether to enable Kubernetes Role-Based Access Control. - * - * @return the enableRbac value. - */ - public Boolean enableRbac() { - return this.enableRbac; - } - - /** - * Set the enableRbac property: Whether to enable Kubernetes Role-Based Access Control. - * - * @param enableRbac the enableRbac value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withEnableRbac(Boolean enableRbac) { - this.enableRbac = enableRbac; - return this; - } - - /** - * Get the supportPlan property: The support plan for the Managed Cluster. If unspecified, the default is - * 'KubernetesOfficial'. - * - * @return the supportPlan value. - */ - public KubernetesSupportPlan supportPlan() { - return this.supportPlan; - } - - /** - * Set the supportPlan property: The support plan for the Managed Cluster. If unspecified, the default is - * 'KubernetesOfficial'. - * - * @param supportPlan the supportPlan value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withSupportPlan(KubernetesSupportPlan supportPlan) { - this.supportPlan = supportPlan; - return this; - } - - /** - * Get the networkProfile property: The network configuration profile. - * - * @return the networkProfile value. - */ - public ContainerServiceNetworkProfile networkProfile() { - return this.networkProfile; - } - - /** - * Set the networkProfile property: The network configuration profile. - * - * @param networkProfile the networkProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withNetworkProfile(ContainerServiceNetworkProfile networkProfile) { - this.networkProfile = networkProfile; - return this; - } - - /** - * Get the aadProfile property: The Azure Active Directory configuration. - * - * @return the aadProfile value. - */ - public ManagedClusterAadProfile aadProfile() { - return this.aadProfile; - } - - /** - * Set the aadProfile property: The Azure Active Directory configuration. - * - * @param aadProfile the aadProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withAadProfile(ManagedClusterAadProfile aadProfile) { - this.aadProfile = aadProfile; - return this; - } - - /** - * Get the autoUpgradeProfile property: The auto upgrade configuration. - * - * @return the autoUpgradeProfile value. - */ - public ManagedClusterAutoUpgradeProfile autoUpgradeProfile() { - return this.autoUpgradeProfile; - } - - /** - * Set the autoUpgradeProfile property: The auto upgrade configuration. - * - * @param autoUpgradeProfile the autoUpgradeProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withAutoUpgradeProfile(ManagedClusterAutoUpgradeProfile autoUpgradeProfile) { - this.autoUpgradeProfile = autoUpgradeProfile; - return this; - } - - /** - * Get the upgradeSettings property: Settings for upgrading a cluster. - * - * @return the upgradeSettings value. - */ - public ClusterUpgradeSettings upgradeSettings() { - return this.upgradeSettings; - } - - /** - * Set the upgradeSettings property: Settings for upgrading a cluster. - * - * @param upgradeSettings the upgradeSettings value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withUpgradeSettings(ClusterUpgradeSettings upgradeSettings) { - this.upgradeSettings = upgradeSettings; - return this; - } - - /** - * Get the autoScalerProfile property: Parameters to be applied to the cluster-autoscaler when enabled. - * - * @return the autoScalerProfile value. - */ - public ManagedClusterPropertiesAutoScalerProfile autoScalerProfile() { - return this.autoScalerProfile; - } - - /** - * Set the autoScalerProfile property: Parameters to be applied to the cluster-autoscaler when enabled. - * - * @param autoScalerProfile the autoScalerProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withAutoScalerProfile(ManagedClusterPropertiesAutoScalerProfile autoScalerProfile) { - this.autoScalerProfile = autoScalerProfile; - return this; - } - - /** - * Get the apiServerAccessProfile property: The access profile for managed cluster API server. - * - * @return the apiServerAccessProfile value. - */ - public ManagedClusterApiServerAccessProfile apiServerAccessProfile() { - return this.apiServerAccessProfile; - } - - /** - * Set the apiServerAccessProfile property: The access profile for managed cluster API server. - * - * @param apiServerAccessProfile the apiServerAccessProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties - withApiServerAccessProfile(ManagedClusterApiServerAccessProfile apiServerAccessProfile) { - this.apiServerAccessProfile = apiServerAccessProfile; - return this; - } - - /** - * Get the diskEncryptionSetId property: The Resource ID of the disk encryption set to use for enabling encryption - * at rest. This is of the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. - * - * @return the diskEncryptionSetId value. - */ - public String diskEncryptionSetId() { - return this.diskEncryptionSetId; - } - - /** - * Set the diskEncryptionSetId property: The Resource ID of the disk encryption set to use for enabling encryption - * at rest. This is of the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. - * - * @param diskEncryptionSetId the diskEncryptionSetId value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withDiskEncryptionSetId(String diskEncryptionSetId) { - this.diskEncryptionSetId = diskEncryptionSetId; - return this; - } - - /** - * Get the identityProfile property: The user identity associated with the managed cluster. This identity will be - * used by the kubelet. Only one user assigned identity is allowed. The only accepted key is "kubeletidentity", with - * value of "resourceId": - * "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". - * - * @return the identityProfile value. - */ - public Map identityProfile() { - return this.identityProfile; - } - - /** - * Set the identityProfile property: The user identity associated with the managed cluster. This identity will be - * used by the kubelet. Only one user assigned identity is allowed. The only accepted key is "kubeletidentity", with - * value of "resourceId": - * "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". - * - * @param identityProfile the identityProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withIdentityProfile(Map identityProfile) { - this.identityProfile = identityProfile; - return this; - } - - /** - * Get the privateLinkResources property: Private link resources associated with the cluster. - * - * @return the privateLinkResources value. - */ - public List privateLinkResources() { - return this.privateLinkResources; - } - - /** - * Set the privateLinkResources property: Private link resources associated with the cluster. - * - * @param privateLinkResources the privateLinkResources value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withPrivateLinkResources(List privateLinkResources) { - this.privateLinkResources = privateLinkResources; - return this; - } - - /** - * Get the disableLocalAccounts property: If local accounts should be disabled on the Managed Cluster. If set to - * true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters - * that are AAD enabled. For more details see [disable local - * accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). - * - * @return the disableLocalAccounts value. - */ - public Boolean disableLocalAccounts() { - return this.disableLocalAccounts; - } - - /** - * Set the disableLocalAccounts property: If local accounts should be disabled on the Managed Cluster. If set to - * true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters - * that are AAD enabled. For more details see [disable local - * accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). - * - * @param disableLocalAccounts the disableLocalAccounts value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withDisableLocalAccounts(Boolean disableLocalAccounts) { - this.disableLocalAccounts = disableLocalAccounts; - return this; - } - - /** - * Get the httpProxyConfig property: Configurations for provisioning the cluster with HTTP proxy servers. - * - * @return the httpProxyConfig value. - */ - public ManagedClusterHttpProxyConfig httpProxyConfig() { - return this.httpProxyConfig; - } - - /** - * Set the httpProxyConfig property: Configurations for provisioning the cluster with HTTP proxy servers. - * - * @param httpProxyConfig the httpProxyConfig value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withHttpProxyConfig(ManagedClusterHttpProxyConfig httpProxyConfig) { - this.httpProxyConfig = httpProxyConfig; - return this; - } - - /** - * Get the securityProfile property: Security profile for the managed cluster. - * - * @return the securityProfile value. - */ - public ManagedClusterSecurityProfile securityProfile() { - return this.securityProfile; - } - - /** - * Set the securityProfile property: Security profile for the managed cluster. - * - * @param securityProfile the securityProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withSecurityProfile(ManagedClusterSecurityProfile securityProfile) { - this.securityProfile = securityProfile; - return this; - } - - /** - * Get the storageProfile property: Storage profile for the managed cluster. - * - * @return the storageProfile value. - */ - public ManagedClusterStorageProfile storageProfile() { - return this.storageProfile; - } - - /** - * Set the storageProfile property: Storage profile for the managed cluster. - * - * @param storageProfile the storageProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withStorageProfile(ManagedClusterStorageProfile storageProfile) { - this.storageProfile = storageProfile; - return this; - } - - /** - * Get the ingressProfile property: Ingress profile for the managed cluster. - * - * @return the ingressProfile value. - */ - public ManagedClusterIngressProfile ingressProfile() { - return this.ingressProfile; - } - - /** - * Set the ingressProfile property: Ingress profile for the managed cluster. - * - * @param ingressProfile the ingressProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withIngressProfile(ManagedClusterIngressProfile ingressProfile) { - this.ingressProfile = ingressProfile; - return this; - } - - /** - * Get the publicNetworkAccess property: PublicNetworkAccess of the managedCluster. Allow or deny public network - * access for AKS. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: PublicNetworkAccess of the managedCluster. Allow or deny public network - * access for AKS. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * Get the workloadAutoScalerProfile property: Workload Auto-scaler profile for the managed cluster. - * - * @return the workloadAutoScalerProfile value. - */ - public ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile() { - return this.workloadAutoScalerProfile; - } - - /** - * Set the workloadAutoScalerProfile property: Workload Auto-scaler profile for the managed cluster. - * - * @param workloadAutoScalerProfile the workloadAutoScalerProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties - withWorkloadAutoScalerProfile(ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile) { - this.workloadAutoScalerProfile = workloadAutoScalerProfile; - return this; - } - - /** - * Get the azureMonitorProfile property: Azure Monitor addon profiles for monitoring the managed cluster. - * - * @return the azureMonitorProfile value. - */ - public ManagedClusterAzureMonitorProfile azureMonitorProfile() { - return this.azureMonitorProfile; - } - - /** - * Set the azureMonitorProfile property: Azure Monitor addon profiles for monitoring the managed cluster. - * - * @param azureMonitorProfile the azureMonitorProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withAzureMonitorProfile(ManagedClusterAzureMonitorProfile azureMonitorProfile) { - this.azureMonitorProfile = azureMonitorProfile; - return this; - } - - /** - * Get the serviceMeshProfile property: Service mesh profile for a managed cluster. - * - * @return the serviceMeshProfile value. - */ - public ServiceMeshProfile serviceMeshProfile() { - return this.serviceMeshProfile; - } - - /** - * Set the serviceMeshProfile property: Service mesh profile for a managed cluster. - * - * @param serviceMeshProfile the serviceMeshProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withServiceMeshProfile(ServiceMeshProfile serviceMeshProfile) { - this.serviceMeshProfile = serviceMeshProfile; - return this; - } - - /** - * Get the resourceUid property: The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds - * (i.e: create, delete, create sequence). - * - * @return the resourceUid value. - */ - public String resourceUid() { - return this.resourceUid; - } - - /** - * Get the metricsProfile property: Optional cluster metrics configuration. - * - * @return the metricsProfile value. - */ - public ManagedClusterMetricsProfile metricsProfile() { - return this.metricsProfile; - } - - /** - * Set the metricsProfile property: Optional cluster metrics configuration. - * - * @param metricsProfile the metricsProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withMetricsProfile(ManagedClusterMetricsProfile metricsProfile) { - this.metricsProfile = metricsProfile; - return this; - } - - /** - * Get the nodeProvisioningProfile property: Node provisioning settings that apply to the whole cluster. - * - * @return the nodeProvisioningProfile value. - */ - public ManagedClusterNodeProvisioningProfile nodeProvisioningProfile() { - return this.nodeProvisioningProfile; - } - - /** - * Set the nodeProvisioningProfile property: Node provisioning settings that apply to the whole cluster. - * - * @param nodeProvisioningProfile the nodeProvisioningProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties - withNodeProvisioningProfile(ManagedClusterNodeProvisioningProfile nodeProvisioningProfile) { - this.nodeProvisioningProfile = nodeProvisioningProfile; - return this; - } - - /** - * Get the bootstrapProfile property: Profile of the cluster bootstrap configuration. - * - * @return the bootstrapProfile value. - */ - public ManagedClusterBootstrapProfile bootstrapProfile() { - return this.bootstrapProfile; - } - - /** - * Set the bootstrapProfile property: Profile of the cluster bootstrap configuration. - * - * @param bootstrapProfile the bootstrapProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withBootstrapProfile(ManagedClusterBootstrapProfile bootstrapProfile) { - this.bootstrapProfile = bootstrapProfile; - return this; - } - - /** - * Get the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. - * - * @return the aiToolchainOperatorProfile value. - */ - public ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile() { - return this.aiToolchainOperatorProfile; - } - - /** - * Set the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. - * - * @param aiToolchainOperatorProfile the aiToolchainOperatorProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties - withAiToolchainOperatorProfile(ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile) { - this.aiToolchainOperatorProfile = aiToolchainOperatorProfile; - return this; - } - - /** - * Get the status property: Contains read-only information about the Managed Cluster. - * - * @return the status value. - */ - public ManagedClusterStatus status() { - return this.status; - } - - /** - * Set the status property: Contains read-only information about the Managed Cluster. - * - * @param status the status value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withStatus(ManagedClusterStatus status) { - this.status = status; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (powerState() != null) { - powerState().validate(); - } - if (agentPoolProfiles() != null) { - agentPoolProfiles().forEach(e -> e.validate()); - } - if (linuxProfile() != null) { - linuxProfile().validate(); - } - if (windowsProfile() != null) { - windowsProfile().validate(); - } - if (servicePrincipalProfile() != null) { - servicePrincipalProfile().validate(); - } - if (addonProfiles() != null) { - addonProfiles().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (podIdentityProfile() != null) { - podIdentityProfile().validate(); - } - if (oidcIssuerProfile() != null) { - oidcIssuerProfile().validate(); - } - if (nodeResourceGroupProfile() != null) { - nodeResourceGroupProfile().validate(); - } - if (networkProfile() != null) { - networkProfile().validate(); - } - if (aadProfile() != null) { - aadProfile().validate(); - } - if (autoUpgradeProfile() != null) { - autoUpgradeProfile().validate(); - } - if (upgradeSettings() != null) { - upgradeSettings().validate(); - } - if (autoScalerProfile() != null) { - autoScalerProfile().validate(); - } - if (apiServerAccessProfile() != null) { - apiServerAccessProfile().validate(); - } - if (identityProfile() != null) { - identityProfile().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (privateLinkResources() != null) { - privateLinkResources().forEach(e -> e.validate()); - } - if (httpProxyConfig() != null) { - httpProxyConfig().validate(); - } - if (securityProfile() != null) { - securityProfile().validate(); - } - if (storageProfile() != null) { - storageProfile().validate(); - } - if (ingressProfile() != null) { - ingressProfile().validate(); - } - if (workloadAutoScalerProfile() != null) { - workloadAutoScalerProfile().validate(); - } - if (azureMonitorProfile() != null) { - azureMonitorProfile().validate(); - } - if (serviceMeshProfile() != null) { - serviceMeshProfile().validate(); - } - if (metricsProfile() != null) { - metricsProfile().validate(); - } - if (nodeProvisioningProfile() != null) { - nodeProvisioningProfile().validate(); - } - if (bootstrapProfile() != null) { - bootstrapProfile().validate(); - } - if (aiToolchainOperatorProfile() != null) { - aiToolchainOperatorProfile().validate(); - } - if (status() != null) { - status().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); - jsonWriter.writeStringField("dnsPrefix", this.dnsPrefix); - jsonWriter.writeStringField("fqdnSubdomain", this.fqdnSubdomain); - jsonWriter.writeArrayField("agentPoolProfiles", this.agentPoolProfiles, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("linuxProfile", this.linuxProfile); - jsonWriter.writeJsonField("windowsProfile", this.windowsProfile); - jsonWriter.writeJsonField("servicePrincipalProfile", this.servicePrincipalProfile); - jsonWriter.writeMapField("addonProfiles", this.addonProfiles, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("podIdentityProfile", this.podIdentityProfile); - jsonWriter.writeJsonField("oidcIssuerProfile", this.oidcIssuerProfile); - jsonWriter.writeStringField("nodeResourceGroup", this.nodeResourceGroup); - jsonWriter.writeJsonField("nodeResourceGroupProfile", this.nodeResourceGroupProfile); - jsonWriter.writeBooleanField("enableRBAC", this.enableRbac); - jsonWriter.writeStringField("supportPlan", this.supportPlan == null ? null : this.supportPlan.toString()); - jsonWriter.writeJsonField("networkProfile", this.networkProfile); - jsonWriter.writeJsonField("aadProfile", this.aadProfile); - jsonWriter.writeJsonField("autoUpgradeProfile", this.autoUpgradeProfile); - jsonWriter.writeJsonField("upgradeSettings", this.upgradeSettings); - jsonWriter.writeJsonField("autoScalerProfile", this.autoScalerProfile); - jsonWriter.writeJsonField("apiServerAccessProfile", this.apiServerAccessProfile); - jsonWriter.writeStringField("diskEncryptionSetID", this.diskEncryptionSetId); - jsonWriter.writeMapField("identityProfile", this.identityProfile, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("privateLinkResources", this.privateLinkResources, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeBooleanField("disableLocalAccounts", this.disableLocalAccounts); - jsonWriter.writeJsonField("httpProxyConfig", this.httpProxyConfig); - jsonWriter.writeJsonField("securityProfile", this.securityProfile); - jsonWriter.writeJsonField("storageProfile", this.storageProfile); - jsonWriter.writeJsonField("ingressProfile", this.ingressProfile); - jsonWriter.writeStringField("publicNetworkAccess", - this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); - jsonWriter.writeJsonField("workloadAutoScalerProfile", this.workloadAutoScalerProfile); - jsonWriter.writeJsonField("azureMonitorProfile", this.azureMonitorProfile); - jsonWriter.writeJsonField("serviceMeshProfile", this.serviceMeshProfile); - jsonWriter.writeJsonField("metricsProfile", this.metricsProfile); - jsonWriter.writeJsonField("nodeProvisioningProfile", this.nodeProvisioningProfile); - jsonWriter.writeJsonField("bootstrapProfile", this.bootstrapProfile); - jsonWriter.writeJsonField("aiToolchainOperatorProfile", this.aiToolchainOperatorProfile); - jsonWriter.writeJsonField("status", this.status); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterProperties 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 ManagedClusterProperties. - */ - public static ManagedClusterProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterProperties deserializedManagedClusterProperties = new ManagedClusterProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedManagedClusterProperties.provisioningState = reader.getString(); - } else if ("powerState".equals(fieldName)) { - deserializedManagedClusterProperties.powerState = PowerState.fromJson(reader); - } else if ("maxAgentPools".equals(fieldName)) { - deserializedManagedClusterProperties.maxAgentPools = reader.getNullable(JsonReader::getInt); - } else if ("kubernetesVersion".equals(fieldName)) { - deserializedManagedClusterProperties.kubernetesVersion = reader.getString(); - } else if ("currentKubernetesVersion".equals(fieldName)) { - deserializedManagedClusterProperties.currentKubernetesVersion = reader.getString(); - } else if ("dnsPrefix".equals(fieldName)) { - deserializedManagedClusterProperties.dnsPrefix = reader.getString(); - } else if ("fqdnSubdomain".equals(fieldName)) { - deserializedManagedClusterProperties.fqdnSubdomain = reader.getString(); - } else if ("fqdn".equals(fieldName)) { - deserializedManagedClusterProperties.fqdn = reader.getString(); - } else if ("privateFQDN".equals(fieldName)) { - deserializedManagedClusterProperties.privateFqdn = reader.getString(); - } else if ("azurePortalFQDN".equals(fieldName)) { - deserializedManagedClusterProperties.azurePortalFqdn = reader.getString(); - } else if ("agentPoolProfiles".equals(fieldName)) { - List agentPoolProfiles - = reader.readArray(reader1 -> ManagedClusterAgentPoolProfile.fromJson(reader1)); - deserializedManagedClusterProperties.agentPoolProfiles = agentPoolProfiles; - } else if ("linuxProfile".equals(fieldName)) { - deserializedManagedClusterProperties.linuxProfile = ContainerServiceLinuxProfile.fromJson(reader); - } else if ("windowsProfile".equals(fieldName)) { - deserializedManagedClusterProperties.windowsProfile = ManagedClusterWindowsProfile.fromJson(reader); - } else if ("servicePrincipalProfile".equals(fieldName)) { - deserializedManagedClusterProperties.servicePrincipalProfile - = ManagedClusterServicePrincipalProfile.fromJson(reader); - } else if ("addonProfiles".equals(fieldName)) { - Map addonProfiles - = reader.readMap(reader1 -> ManagedClusterAddonProfile.fromJson(reader1)); - deserializedManagedClusterProperties.addonProfiles = addonProfiles; - } else if ("podIdentityProfile".equals(fieldName)) { - deserializedManagedClusterProperties.podIdentityProfile - = ManagedClusterPodIdentityProfile.fromJson(reader); - } else if ("oidcIssuerProfile".equals(fieldName)) { - deserializedManagedClusterProperties.oidcIssuerProfile - = ManagedClusterOidcIssuerProfile.fromJson(reader); - } else if ("nodeResourceGroup".equals(fieldName)) { - deserializedManagedClusterProperties.nodeResourceGroup = reader.getString(); - } else if ("nodeResourceGroupProfile".equals(fieldName)) { - deserializedManagedClusterProperties.nodeResourceGroupProfile - = ManagedClusterNodeResourceGroupProfile.fromJson(reader); - } else if ("enableRBAC".equals(fieldName)) { - deserializedManagedClusterProperties.enableRbac = reader.getNullable(JsonReader::getBoolean); - } else if ("supportPlan".equals(fieldName)) { - deserializedManagedClusterProperties.supportPlan - = KubernetesSupportPlan.fromString(reader.getString()); - } else if ("networkProfile".equals(fieldName)) { - deserializedManagedClusterProperties.networkProfile - = ContainerServiceNetworkProfile.fromJson(reader); - } else if ("aadProfile".equals(fieldName)) { - deserializedManagedClusterProperties.aadProfile = ManagedClusterAadProfile.fromJson(reader); - } else if ("autoUpgradeProfile".equals(fieldName)) { - deserializedManagedClusterProperties.autoUpgradeProfile - = ManagedClusterAutoUpgradeProfile.fromJson(reader); - } else if ("upgradeSettings".equals(fieldName)) { - deserializedManagedClusterProperties.upgradeSettings = ClusterUpgradeSettings.fromJson(reader); - } else if ("autoScalerProfile".equals(fieldName)) { - deserializedManagedClusterProperties.autoScalerProfile - = ManagedClusterPropertiesAutoScalerProfile.fromJson(reader); - } else if ("apiServerAccessProfile".equals(fieldName)) { - deserializedManagedClusterProperties.apiServerAccessProfile - = ManagedClusterApiServerAccessProfile.fromJson(reader); - } else if ("diskEncryptionSetID".equals(fieldName)) { - deserializedManagedClusterProperties.diskEncryptionSetId = reader.getString(); - } else if ("identityProfile".equals(fieldName)) { - Map identityProfile - = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); - deserializedManagedClusterProperties.identityProfile = identityProfile; - } else if ("privateLinkResources".equals(fieldName)) { - List privateLinkResources - = reader.readArray(reader1 -> PrivateLinkResourceInner.fromJson(reader1)); - deserializedManagedClusterProperties.privateLinkResources = privateLinkResources; - } else if ("disableLocalAccounts".equals(fieldName)) { - deserializedManagedClusterProperties.disableLocalAccounts - = reader.getNullable(JsonReader::getBoolean); - } else if ("httpProxyConfig".equals(fieldName)) { - deserializedManagedClusterProperties.httpProxyConfig - = ManagedClusterHttpProxyConfig.fromJson(reader); - } else if ("securityProfile".equals(fieldName)) { - deserializedManagedClusterProperties.securityProfile - = ManagedClusterSecurityProfile.fromJson(reader); - } else if ("storageProfile".equals(fieldName)) { - deserializedManagedClusterProperties.storageProfile = ManagedClusterStorageProfile.fromJson(reader); - } else if ("ingressProfile".equals(fieldName)) { - deserializedManagedClusterProperties.ingressProfile = ManagedClusterIngressProfile.fromJson(reader); - } else if ("publicNetworkAccess".equals(fieldName)) { - deserializedManagedClusterProperties.publicNetworkAccess - = PublicNetworkAccess.fromString(reader.getString()); - } else if ("workloadAutoScalerProfile".equals(fieldName)) { - deserializedManagedClusterProperties.workloadAutoScalerProfile - = ManagedClusterWorkloadAutoScalerProfile.fromJson(reader); - } else if ("azureMonitorProfile".equals(fieldName)) { - deserializedManagedClusterProperties.azureMonitorProfile - = ManagedClusterAzureMonitorProfile.fromJson(reader); - } else if ("serviceMeshProfile".equals(fieldName)) { - deserializedManagedClusterProperties.serviceMeshProfile = ServiceMeshProfile.fromJson(reader); - } else if ("resourceUID".equals(fieldName)) { - deserializedManagedClusterProperties.resourceUid = reader.getString(); - } else if ("metricsProfile".equals(fieldName)) { - deserializedManagedClusterProperties.metricsProfile = ManagedClusterMetricsProfile.fromJson(reader); - } else if ("nodeProvisioningProfile".equals(fieldName)) { - deserializedManagedClusterProperties.nodeProvisioningProfile - = ManagedClusterNodeProvisioningProfile.fromJson(reader); - } else if ("bootstrapProfile".equals(fieldName)) { - deserializedManagedClusterProperties.bootstrapProfile - = ManagedClusterBootstrapProfile.fromJson(reader); - } else if ("aiToolchainOperatorProfile".equals(fieldName)) { - deserializedManagedClusterProperties.aiToolchainOperatorProfile - = ManagedClusterAIToolchainOperatorProfile.fromJson(reader); - } else if ("status".equals(fieldName)) { - deserializedManagedClusterProperties.status = ManagedClusterStatus.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileInner.java deleted file mode 100644 index be10533e3f37..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileInner.java +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.ManagedClusterPoolUpgradeProfile; -import java.io.IOException; -import java.util.List; - -/** - * The list of available upgrades for compute pools. - */ -@Fluent -public final class ManagedClusterUpgradeProfileInner implements JsonSerializable { - /* - * The ID of the upgrade profile. - */ - private String id; - - /* - * The name of the upgrade profile. - */ - private String name; - - /* - * The type of the upgrade profile. - */ - private String type; - - /* - * The properties of the upgrade profile. - */ - private ManagedClusterUpgradeProfileProperties innerProperties = new ManagedClusterUpgradeProfileProperties(); - - /** - * Creates an instance of ManagedClusterUpgradeProfileInner class. - */ - public ManagedClusterUpgradeProfileInner() { - } - - /** - * Get the id property: The ID of the upgrade profile. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the upgrade profile. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the upgrade profile. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the innerProperties property: The properties of the upgrade profile. - * - * @return the innerProperties value. - */ - private ManagedClusterUpgradeProfileProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the controlPlaneProfile property: The list of available upgrade versions for the control plane. - * - * @return the controlPlaneProfile value. - */ - public ManagedClusterPoolUpgradeProfile controlPlaneProfile() { - return this.innerProperties() == null ? null : this.innerProperties().controlPlaneProfile(); - } - - /** - * Set the controlPlaneProfile property: The list of available upgrade versions for the control plane. - * - * @param controlPlaneProfile the controlPlaneProfile value to set. - * @return the ManagedClusterUpgradeProfileInner object itself. - */ - public ManagedClusterUpgradeProfileInner - withControlPlaneProfile(ManagedClusterPoolUpgradeProfile controlPlaneProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterUpgradeProfileProperties(); - } - this.innerProperties().withControlPlaneProfile(controlPlaneProfile); - return this; - } - - /** - * Get the agentPoolProfiles property: The list of available upgrade versions for agent pools. - * - * @return the agentPoolProfiles value. - */ - public List agentPoolProfiles() { - return this.innerProperties() == null ? null : this.innerProperties().agentPoolProfiles(); - } - - /** - * Set the agentPoolProfiles property: The list of available upgrade versions for agent pools. - * - * @param agentPoolProfiles the agentPoolProfiles value to set. - * @return the ManagedClusterUpgradeProfileInner object itself. - */ - public ManagedClusterUpgradeProfileInner - withAgentPoolProfiles(List agentPoolProfiles) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterUpgradeProfileProperties(); - } - this.innerProperties().withAgentPoolProfiles(agentPoolProfiles); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model ManagedClusterUpgradeProfileInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterUpgradeProfileInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterUpgradeProfileInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterUpgradeProfileInner 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 ManagedClusterUpgradeProfileInner. - */ - public static ManagedClusterUpgradeProfileInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterUpgradeProfileInner deserializedManagedClusterUpgradeProfileInner - = new ManagedClusterUpgradeProfileInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedManagedClusterUpgradeProfileInner.innerProperties - = ManagedClusterUpgradeProfileProperties.fromJson(reader); - } else if ("id".equals(fieldName)) { - deserializedManagedClusterUpgradeProfileInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedManagedClusterUpgradeProfileInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedManagedClusterUpgradeProfileInner.type = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterUpgradeProfileInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileProperties.java deleted file mode 100644 index 624fe6953d50..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileProperties.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.ManagedClusterPoolUpgradeProfile; -import java.io.IOException; -import java.util.List; - -/** - * Control plane and agent pool upgrade profiles. - */ -@Fluent -public final class ManagedClusterUpgradeProfileProperties - implements JsonSerializable { - /* - * The list of available upgrade versions for the control plane. - */ - private ManagedClusterPoolUpgradeProfile controlPlaneProfile; - - /* - * The list of available upgrade versions for agent pools. - */ - private List agentPoolProfiles; - - /** - * Creates an instance of ManagedClusterUpgradeProfileProperties class. - */ - public ManagedClusterUpgradeProfileProperties() { - } - - /** - * Get the controlPlaneProfile property: The list of available upgrade versions for the control plane. - * - * @return the controlPlaneProfile value. - */ - public ManagedClusterPoolUpgradeProfile controlPlaneProfile() { - return this.controlPlaneProfile; - } - - /** - * Set the controlPlaneProfile property: The list of available upgrade versions for the control plane. - * - * @param controlPlaneProfile the controlPlaneProfile value to set. - * @return the ManagedClusterUpgradeProfileProperties object itself. - */ - public ManagedClusterUpgradeProfileProperties - withControlPlaneProfile(ManagedClusterPoolUpgradeProfile controlPlaneProfile) { - this.controlPlaneProfile = controlPlaneProfile; - return this; - } - - /** - * Get the agentPoolProfiles property: The list of available upgrade versions for agent pools. - * - * @return the agentPoolProfiles value. - */ - public List agentPoolProfiles() { - return this.agentPoolProfiles; - } - - /** - * Set the agentPoolProfiles property: The list of available upgrade versions for agent pools. - * - * @param agentPoolProfiles the agentPoolProfiles value to set. - * @return the ManagedClusterUpgradeProfileProperties object itself. - */ - public ManagedClusterUpgradeProfileProperties - withAgentPoolProfiles(List agentPoolProfiles) { - this.agentPoolProfiles = agentPoolProfiles; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (controlPlaneProfile() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property controlPlaneProfile in model ManagedClusterUpgradeProfileProperties")); - } else { - controlPlaneProfile().validate(); - } - if (agentPoolProfiles() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property agentPoolProfiles in model ManagedClusterUpgradeProfileProperties")); - } else { - agentPoolProfiles().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterUpgradeProfileProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("controlPlaneProfile", this.controlPlaneProfile); - jsonWriter.writeArrayField("agentPoolProfiles", this.agentPoolProfiles, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterUpgradeProfileProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterUpgradeProfileProperties 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 ManagedClusterUpgradeProfileProperties. - */ - public static ManagedClusterUpgradeProfileProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterUpgradeProfileProperties deserializedManagedClusterUpgradeProfileProperties - = new ManagedClusterUpgradeProfileProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("controlPlaneProfile".equals(fieldName)) { - deserializedManagedClusterUpgradeProfileProperties.controlPlaneProfile - = ManagedClusterPoolUpgradeProfile.fromJson(reader); - } else if ("agentPoolProfiles".equals(fieldName)) { - List agentPoolProfiles - = reader.readArray(reader1 -> ManagedClusterPoolUpgradeProfile.fromJson(reader1)); - deserializedManagedClusterUpgradeProfileProperties.agentPoolProfiles = agentPoolProfiles; - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterUpgradeProfileProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedNamespaceInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedNamespaceInner.java deleted file mode 100644 index 86f4f3c9e671..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedNamespaceInner.java +++ /dev/null @@ -1,237 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.SubResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.NamespaceProperties; -import java.io.IOException; -import java.util.Map; - -/** - * Namespace managed by ARM. - */ -@Fluent -public final class ManagedNamespaceInner extends SubResource { - /* - * The system metadata relating to this resource. - */ - private SystemData systemData; - - /* - * The tags to be persisted on the managed cluster namespace. - */ - private Map tags; - - /* - * Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is - * updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable - * optimistic concurrency per the normal eTag convention. - */ - private String etag; - - /* - * The location of the namespace. - */ - private String location; - - /* - * Properties of a namespace. - */ - private NamespaceProperties properties; - - /* - * The name of the resource that is unique within a resource group. This name can be used to access the resource. - */ - private String name; - - /* - * Resource type - */ - private String type; - - /** - * Creates an instance of ManagedNamespaceInner class. - */ - public ManagedNamespaceInner() { - } - - /** - * Get the systemData property: The system metadata relating to this resource. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the tags property: The tags to be persisted on the managed cluster namespace. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: The tags to be persisted on the managed cluster namespace. - * - * @param tags the tags value to set. - * @return the ManagedNamespaceInner object itself. - */ - public ManagedNamespaceInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the etag property: Unique read-only string used to implement optimistic concurrency. The eTag value will - * change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a - * subsequent request to enable optimistic concurrency per the normal eTag convention. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Get the location property: The location of the namespace. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The location of the namespace. - * - * @param location the location value to set. - * @return the ManagedNamespaceInner object itself. - */ - public ManagedNamespaceInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the properties property: Properties of a namespace. - * - * @return the properties value. - */ - public NamespaceProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of a namespace. - * - * @param properties the properties value to set. - * @return the ManagedNamespaceInner object itself. - */ - public ManagedNamespaceInner withProperties(NamespaceProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the name property: The name of the resource that is unique within a resource group. This name can be used to - * access the resource. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the type property: Resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedNamespaceInner withId(String id) { - super.withId(id); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", id()); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("location", this.location); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedNamespaceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedNamespaceInner 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 ManagedNamespaceInner. - */ - public static ManagedNamespaceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedNamespaceInner deserializedManagedNamespaceInner = new ManagedNamespaceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedManagedNamespaceInner.withId(reader.getString()); - } else if ("systemData".equals(fieldName)) { - deserializedManagedNamespaceInner.systemData = SystemData.fromJson(reader); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedManagedNamespaceInner.tags = tags; - } else if ("eTag".equals(fieldName)) { - deserializedManagedNamespaceInner.etag = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedManagedNamespaceInner.location = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedManagedNamespaceInner.properties = NamespaceProperties.fromJson(reader); - } else if ("name".equals(fieldName)) { - deserializedManagedNamespaceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedManagedNamespaceInner.type = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedNamespaceInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshRevisionProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshRevisionProfileInner.java deleted file mode 100644 index f5d81ffcf56c..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshRevisionProfileInner.java +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.MeshRevisionProfileProperties; -import java.io.IOException; - -/** - * Mesh revision profile for a mesh. - */ -@Fluent -public final class MeshRevisionProfileInner extends ProxyResource { - /* - * Mesh revision profile properties for a mesh - */ - private MeshRevisionProfileProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of MeshRevisionProfileInner class. - */ - public MeshRevisionProfileInner() { - } - - /** - * Get the properties property: Mesh revision profile properties for a mesh. - * - * @return the properties value. - */ - public MeshRevisionProfileProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Mesh revision profile properties for a mesh. - * - * @param properties the properties value to set. - * @return the MeshRevisionProfileInner object itself. - */ - public MeshRevisionProfileInner withProperties(MeshRevisionProfileProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MeshRevisionProfileInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MeshRevisionProfileInner 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 MeshRevisionProfileInner. - */ - public static MeshRevisionProfileInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MeshRevisionProfileInner deserializedMeshRevisionProfileInner = new MeshRevisionProfileInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedMeshRevisionProfileInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedMeshRevisionProfileInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedMeshRevisionProfileInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedMeshRevisionProfileInner.properties = MeshRevisionProfileProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedMeshRevisionProfileInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedMeshRevisionProfileInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshUpgradeProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshUpgradeProfileInner.java deleted file mode 100644 index 0796a76591cb..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshUpgradeProfileInner.java +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.MeshUpgradeProfileProperties; -import java.io.IOException; - -/** - * Upgrade profile for given mesh. - */ -@Fluent -public final class MeshUpgradeProfileInner extends ProxyResource { - /* - * Mesh upgrade profile properties for a major.minor release. - */ - private MeshUpgradeProfileProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of MeshUpgradeProfileInner class. - */ - public MeshUpgradeProfileInner() { - } - - /** - * Get the properties property: Mesh upgrade profile properties for a major.minor release. - * - * @return the properties value. - */ - public MeshUpgradeProfileProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Mesh upgrade profile properties for a major.minor release. - * - * @param properties the properties value to set. - * @return the MeshUpgradeProfileInner object itself. - */ - public MeshUpgradeProfileInner withProperties(MeshUpgradeProfileProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MeshUpgradeProfileInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MeshUpgradeProfileInner 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 MeshUpgradeProfileInner. - */ - public static MeshUpgradeProfileInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MeshUpgradeProfileInner deserializedMeshUpgradeProfileInner = new MeshUpgradeProfileInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedMeshUpgradeProfileInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedMeshUpgradeProfileInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedMeshUpgradeProfileInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedMeshUpgradeProfileInner.properties = MeshUpgradeProfileProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedMeshUpgradeProfileInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedMeshUpgradeProfileInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueDisplay.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueDisplay.java deleted file mode 100644 index 099e1ac25d68..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueDisplay.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 java.io.IOException; - -/** - * Describes the properties of a Operation Value Display. - */ -@Immutable -public final class OperationValueDisplay implements JsonSerializable { - /* - * The display name of the operation. - */ - private String operation; - - /* - * The display name of the resource the operation applies to. - */ - private String resource; - - /* - * The description of the operation. - */ - private String description; - - /* - * The resource provider for the operation. - */ - private String provider; - - /** - * Creates an instance of OperationValueDisplay class. - */ - public OperationValueDisplay() { - } - - /** - * Get the operation property: The display name of the operation. - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Get the resource property: The display name of the resource the operation applies to. - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Get the description property: The description of the operation. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the provider property: The resource provider for the operation. - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationValueDisplay from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationValueDisplay 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 OperationValueDisplay. - */ - public static OperationValueDisplay fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationValueDisplay deserializedOperationValueDisplay = new OperationValueDisplay(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("operation".equals(fieldName)) { - deserializedOperationValueDisplay.operation = reader.getString(); - } else if ("resource".equals(fieldName)) { - deserializedOperationValueDisplay.resource = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedOperationValueDisplay.description = reader.getString(); - } else if ("provider".equals(fieldName)) { - deserializedOperationValueDisplay.provider = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationValueDisplay; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueInner.java deleted file mode 100644 index 8d4a6a194969..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueInner.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 java.io.IOException; - -/** - * Describes the properties of a Operation value. - */ -@Immutable -public final class OperationValueInner implements JsonSerializable { - /* - * The origin of the operation. - */ - private String origin; - - /* - * The name of the operation. - */ - private String name; - - /* - * Describes the properties of a Operation Value Display. - */ - private OperationValueDisplay innerDisplay; - - /** - * Creates an instance of OperationValueInner class. - */ - public OperationValueInner() { - } - - /** - * Get the origin property: The origin of the operation. - * - * @return the origin value. - */ - public String origin() { - return this.origin; - } - - /** - * Get the name property: The name of the operation. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the innerDisplay property: Describes the properties of a Operation Value Display. - * - * @return the innerDisplay value. - */ - private OperationValueDisplay innerDisplay() { - return this.innerDisplay; - } - - /** - * Get the operation property: The display name of the operation. - * - * @return the operation value. - */ - public String operation() { - return this.innerDisplay() == null ? null : this.innerDisplay().operation(); - } - - /** - * Get the resource property: The display name of the resource the operation applies to. - * - * @return the resource value. - */ - public String resource() { - return this.innerDisplay() == null ? null : this.innerDisplay().resource(); - } - - /** - * Get the description property: The description of the operation. - * - * @return the description value. - */ - public String description() { - return this.innerDisplay() == null ? null : this.innerDisplay().description(); - } - - /** - * Get the provider property: The resource provider for the operation. - * - * @return the provider value. - */ - public String provider() { - return this.innerDisplay() == null ? null : this.innerDisplay().provider(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerDisplay() != null) { - innerDisplay().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("display", this.innerDisplay); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationValueInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationValueInner 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 OperationValueInner. - */ - public static OperationValueInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationValueInner deserializedOperationValueInner = new OperationValueInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("origin".equals(fieldName)) { - deserializedOperationValueInner.origin = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedOperationValueInner.name = reader.getString(); - } else if ("display".equals(fieldName)) { - deserializedOperationValueInner.innerDisplay = OperationValueDisplay.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationValueInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OutboundEnvironmentEndpointInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OutboundEnvironmentEndpointInner.java deleted file mode 100644 index f60ba9c31a8c..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OutboundEnvironmentEndpointInner.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.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 com.azure.resourcemanager.containerservice.models.EndpointDependency; -import java.io.IOException; -import java.util.List; - -/** - * Egress endpoints which AKS agent nodes connect to for common purpose. - */ -@Fluent -public final class OutboundEnvironmentEndpointInner implements JsonSerializable { - /* - * The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. - */ - private String category; - - /* - * The endpoints that AKS agent nodes connect to - */ - private List endpoints; - - /** - * Creates an instance of OutboundEnvironmentEndpointInner class. - */ - public OutboundEnvironmentEndpointInner() { - } - - /** - * Get the category property: The category of endpoints accessed by the AKS agent node, e.g. - * azure-resource-management, apiserver, etc. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Set the category property: The category of endpoints accessed by the AKS agent node, e.g. - * azure-resource-management, apiserver, etc. - * - * @param category the category value to set. - * @return the OutboundEnvironmentEndpointInner object itself. - */ - public OutboundEnvironmentEndpointInner withCategory(String category) { - this.category = category; - return this; - } - - /** - * Get the endpoints property: The endpoints that AKS agent nodes connect to. - * - * @return the endpoints value. - */ - public List endpoints() { - return this.endpoints; - } - - /** - * Set the endpoints property: The endpoints that AKS agent nodes connect to. - * - * @param endpoints the endpoints value to set. - * @return the OutboundEnvironmentEndpointInner object itself. - */ - public OutboundEnvironmentEndpointInner withEndpoints(List endpoints) { - this.endpoints = endpoints; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (endpoints() != null) { - endpoints().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("category", this.category); - jsonWriter.writeArrayField("endpoints", this.endpoints, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OutboundEnvironmentEndpointInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OutboundEnvironmentEndpointInner 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 OutboundEnvironmentEndpointInner. - */ - public static OutboundEnvironmentEndpointInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OutboundEnvironmentEndpointInner deserializedOutboundEnvironmentEndpointInner - = new OutboundEnvironmentEndpointInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("category".equals(fieldName)) { - deserializedOutboundEnvironmentEndpointInner.category = reader.getString(); - } else if ("endpoints".equals(fieldName)) { - List endpoints - = reader.readArray(reader1 -> EndpointDependency.fromJson(reader1)); - deserializedOutboundEnvironmentEndpointInner.endpoints = endpoints; - } else { - reader.skipChildren(); - } - } - - return deserializedOutboundEnvironmentEndpointInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionInner.java deleted file mode 100644 index c6612e4c2e49..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionInner.java +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.PrivateEndpoint; -import com.azure.resourcemanager.containerservice.models.PrivateEndpointConnectionProvisioningState; -import com.azure.resourcemanager.containerservice.models.PrivateLinkServiceConnectionState; -import java.io.IOException; - -/** - * A private endpoint connection. - */ -@Fluent -public final class PrivateEndpointConnectionInner extends ProxyResource { - /* - * The properties of a private endpoint connection. - */ - private PrivateEndpointConnectionProperties innerProperties; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of PrivateEndpointConnectionInner class. - */ - public PrivateEndpointConnectionInner() { - } - - /** - * Get the innerProperties property: The properties of a private endpoint connection. - * - * @return the innerProperties value. - */ - private PrivateEndpointConnectionProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the provisioningState property: The current provisioning state. - * - * @return the provisioningState value. - */ - public PrivateEndpointConnectionProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the privateEndpoint property: The resource of private endpoint. - * - * @return the privateEndpoint value. - */ - public PrivateEndpoint privateEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); - } - - /** - * Set the privateEndpoint property: The resource of private endpoint. - * - * @param privateEndpoint the privateEndpoint value to set. - * @return the PrivateEndpointConnectionInner object itself. - */ - public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateEndpointConnectionProperties(); - } - this.innerProperties().withPrivateEndpoint(privateEndpoint); - return this; - } - - /** - * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @return the privateLinkServiceConnectionState value. - */ - public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); - } - - /** - * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. - * @return the PrivateEndpointConnectionInner object itself. - */ - public PrivateEndpointConnectionInner - withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateEndpointConnectionProperties(); - } - this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpointConnectionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointConnectionInner 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 PrivateEndpointConnectionInner. - */ - public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpointConnectionInner deserializedPrivateEndpointConnectionInner - = new PrivateEndpointConnectionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.innerProperties - = PrivateEndpointConnectionProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpointConnectionInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionListResultInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionListResultInner.java deleted file mode 100644 index 3d5b7a349f39..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionListResultInner.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.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; - -/** - * A list of private endpoint connections. - */ -@Fluent -public final class PrivateEndpointConnectionListResultInner - implements JsonSerializable { - /* - * The collection value. - */ - private List value; - - /** - * Creates an instance of PrivateEndpointConnectionListResultInner class. - */ - public PrivateEndpointConnectionListResultInner() { - } - - /** - * Get the value property: The collection value. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The collection value. - * - * @param value the value value to set. - * @return the PrivateEndpointConnectionListResultInner object itself. - */ - public PrivateEndpointConnectionListResultInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpointConnectionListResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointConnectionListResultInner 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 PrivateEndpointConnectionListResultInner. - */ - public static PrivateEndpointConnectionListResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpointConnectionListResultInner deserializedPrivateEndpointConnectionListResultInner - = new PrivateEndpointConnectionListResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); - deserializedPrivateEndpointConnectionListResultInner.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpointConnectionListResultInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionProperties.java deleted file mode 100644 index 1ba3b3f5c011..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionProperties.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.PrivateEndpoint; -import com.azure.resourcemanager.containerservice.models.PrivateEndpointConnectionProvisioningState; -import com.azure.resourcemanager.containerservice.models.PrivateLinkServiceConnectionState; -import java.io.IOException; - -/** - * Properties of a private endpoint connection. - */ -@Fluent -public final class PrivateEndpointConnectionProperties - implements JsonSerializable { - /* - * The current provisioning state. - */ - private PrivateEndpointConnectionProvisioningState provisioningState; - - /* - * The resource of private endpoint. - */ - private PrivateEndpoint privateEndpoint; - - /* - * A collection of information about the state of the connection between service consumer and provider. - */ - private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; - - /** - * Creates an instance of PrivateEndpointConnectionProperties class. - */ - public PrivateEndpointConnectionProperties() { - } - - /** - * Get the provisioningState property: The current provisioning state. - * - * @return the provisioningState value. - */ - public PrivateEndpointConnectionProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the privateEndpoint property: The resource of private endpoint. - * - * @return the privateEndpoint value. - */ - public PrivateEndpoint privateEndpoint() { - return this.privateEndpoint; - } - - /** - * Set the privateEndpoint property: The resource of private endpoint. - * - * @param privateEndpoint the privateEndpoint value to set. - * @return the PrivateEndpointConnectionProperties object itself. - */ - public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - this.privateEndpoint = privateEndpoint; - return this; - } - - /** - * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @return the privateLinkServiceConnectionState value. - */ - public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.privateLinkServiceConnectionState; - } - - /** - * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. - * @return the PrivateEndpointConnectionProperties object itself. - */ - public PrivateEndpointConnectionProperties - withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (privateEndpoint() != null) { - privateEndpoint().validate(); - } - if (privateLinkServiceConnectionState() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property privateLinkServiceConnectionState in model PrivateEndpointConnectionProperties")); - } else { - privateLinkServiceConnectionState().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState); - jsonWriter.writeJsonField("privateEndpoint", this.privateEndpoint); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpointConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointConnectionProperties 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 PrivateEndpointConnectionProperties. - */ - public static PrivateEndpointConnectionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpointConnectionProperties deserializedPrivateEndpointConnectionProperties - = new PrivateEndpointConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("privateLinkServiceConnectionState".equals(fieldName)) { - deserializedPrivateEndpointConnectionProperties.privateLinkServiceConnectionState - = PrivateLinkServiceConnectionState.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedPrivateEndpointConnectionProperties.provisioningState - = PrivateEndpointConnectionProvisioningState.fromString(reader.getString()); - } else if ("privateEndpoint".equals(fieldName)) { - deserializedPrivateEndpointConnectionProperties.privateEndpoint = PrivateEndpoint.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpointConnectionProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourceInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourceInner.java deleted file mode 100644 index ee65eeb97ecf..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourceInner.java +++ /dev/null @@ -1,225 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.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; - -/** - * A private link resource. - */ -@Fluent -public final class PrivateLinkResourceInner implements JsonSerializable { - /* - * The ID of the private link resource. - */ - private String id; - - /* - * The name of the private link resource. - */ - private String name; - - /* - * The resource type. - */ - private String type; - - /* - * The group ID of the resource. - */ - private String groupId; - - /* - * The RequiredMembers of the resource - */ - private List requiredMembers; - - /* - * The private link service ID of the resource, this field is exposed only to NRP internally. - */ - private String privateLinkServiceId; - - /** - * Creates an instance of PrivateLinkResourceInner class. - */ - public PrivateLinkResourceInner() { - } - - /** - * Get the id property: The ID of the private link resource. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The ID of the private link resource. - * - * @param id the id value to set. - * @return the PrivateLinkResourceInner object itself. - */ - public PrivateLinkResourceInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: The name of the private link resource. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the private link resource. - * - * @param name the name value to set. - * @return the PrivateLinkResourceInner object itself. - */ - public PrivateLinkResourceInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: The resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: The resource type. - * - * @param type the type value to set. - * @return the PrivateLinkResourceInner object itself. - */ - public PrivateLinkResourceInner withType(String type) { - this.type = type; - return this; - } - - /** - * Get the groupId property: The group ID of the resource. - * - * @return the groupId value. - */ - public String groupId() { - return this.groupId; - } - - /** - * Set the groupId property: The group ID of the resource. - * - * @param groupId the groupId value to set. - * @return the PrivateLinkResourceInner object itself. - */ - public PrivateLinkResourceInner withGroupId(String groupId) { - this.groupId = groupId; - return this; - } - - /** - * Get the requiredMembers property: The RequiredMembers of the resource. - * - * @return the requiredMembers value. - */ - public List requiredMembers() { - return this.requiredMembers; - } - - /** - * Set the requiredMembers property: The RequiredMembers of the resource. - * - * @param requiredMembers the requiredMembers value to set. - * @return the PrivateLinkResourceInner object itself. - */ - public PrivateLinkResourceInner withRequiredMembers(List requiredMembers) { - this.requiredMembers = requiredMembers; - return this; - } - - /** - * Get the privateLinkServiceId property: The private link service ID of the resource, this field is exposed only to - * NRP internally. - * - * @return the privateLinkServiceId value. - */ - public String privateLinkServiceId() { - return this.privateLinkServiceId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("type", this.type); - jsonWriter.writeStringField("groupId", this.groupId); - jsonWriter.writeArrayField("requiredMembers", this.requiredMembers, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkResourceInner 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 PrivateLinkResourceInner. - */ - public static PrivateLinkResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkResourceInner deserializedPrivateLinkResourceInner = new PrivateLinkResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPrivateLinkResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedPrivateLinkResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedPrivateLinkResourceInner.type = reader.getString(); - } else if ("groupId".equals(fieldName)) { - deserializedPrivateLinkResourceInner.groupId = reader.getString(); - } else if ("requiredMembers".equals(fieldName)) { - List requiredMembers = reader.readArray(reader1 -> reader1.getString()); - deserializedPrivateLinkResourceInner.requiredMembers = requiredMembers; - } else if ("privateLinkServiceID".equals(fieldName)) { - deserializedPrivateLinkResourceInner.privateLinkServiceId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkResourceInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourcesListResultInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourcesListResultInner.java deleted file mode 100644 index 5d38ebfc0410..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourcesListResultInner.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.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; - -/** - * A list of private link resources. - */ -@Fluent -public final class PrivateLinkResourcesListResultInner - implements JsonSerializable { - /* - * The collection value. - */ - private List value; - - /** - * Creates an instance of PrivateLinkResourcesListResultInner class. - */ - public PrivateLinkResourcesListResultInner() { - } - - /** - * Get the value property: The collection value. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The collection value. - * - * @param value the value value to set. - * @return the PrivateLinkResourcesListResultInner object itself. - */ - public PrivateLinkResourcesListResultInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkResourcesListResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkResourcesListResultInner 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 PrivateLinkResourcesListResultInner. - */ - public static PrivateLinkResourcesListResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkResourcesListResultInner deserializedPrivateLinkResourcesListResultInner - = new PrivateLinkResourcesListResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> PrivateLinkResourceInner.fromJson(reader1)); - deserializedPrivateLinkResourcesListResultInner.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkResourcesListResultInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/RunCommandResultInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/RunCommandResultInner.java deleted file mode 100644 index 17d578d3da75..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/RunCommandResultInner.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 java.io.IOException; -import java.time.OffsetDateTime; - -/** - * run command result. - */ -@Immutable -public final class RunCommandResultInner implements JsonSerializable { - /* - * The command id. - */ - private String id; - - /* - * Properties of command result. - */ - private CommandResultProperties innerProperties; - - /** - * Creates an instance of RunCommandResultInner class. - */ - public RunCommandResultInner() { - } - - /** - * Get the id property: The command id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the innerProperties property: Properties of command result. - * - * @return the innerProperties value. - */ - private CommandResultProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the provisioningState property: provisioning State. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the exitCode property: The exit code of the command. - * - * @return the exitCode value. - */ - public Integer exitCode() { - return this.innerProperties() == null ? null : this.innerProperties().exitCode(); - } - - /** - * Get the startedAt property: The time when the command started. - * - * @return the startedAt value. - */ - public OffsetDateTime startedAt() { - return this.innerProperties() == null ? null : this.innerProperties().startedAt(); - } - - /** - * Get the finishedAt property: The time when the command finished. - * - * @return the finishedAt value. - */ - public OffsetDateTime finishedAt() { - return this.innerProperties() == null ? null : this.innerProperties().finishedAt(); - } - - /** - * Get the logs property: The command output. - * - * @return the logs value. - */ - public String logs() { - return this.innerProperties() == null ? null : this.innerProperties().logs(); - } - - /** - * Get the reason property: An explanation of why provisioningState is set to failed (if so). - * - * @return the reason value. - */ - public String reason() { - return this.innerProperties() == null ? null : this.innerProperties().reason(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RunCommandResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RunCommandResultInner 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 RunCommandResultInner. - */ - public static RunCommandResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RunCommandResultInner deserializedRunCommandResultInner = new RunCommandResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedRunCommandResultInner.id = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedRunCommandResultInner.innerProperties = CommandResultProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRunCommandResultInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotInner.java deleted file mode 100644 index 70b300a40509..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotInner.java +++ /dev/null @@ -1,288 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.CreationData; -import com.azure.resourcemanager.containerservice.models.OSSku; -import com.azure.resourcemanager.containerservice.models.OSType; -import com.azure.resourcemanager.containerservice.models.SnapshotType; -import java.io.IOException; -import java.util.Map; - -/** - * A node pool snapshot resource. - */ -@Fluent -public final class SnapshotInner extends Resource { - /* - * Properties of a snapshot. - */ - private SnapshotProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of SnapshotInner class. - */ - public SnapshotInner() { - } - - /** - * Get the innerProperties property: Properties of a snapshot. - * - * @return the innerProperties value. - */ - private SnapshotProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public SnapshotInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SnapshotInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the creationData property: CreationData to be used to specify the source agent pool resource ID to create - * this snapshot. - * - * @return the creationData value. - */ - public CreationData creationData() { - return this.innerProperties() == null ? null : this.innerProperties().creationData(); - } - - /** - * Set the creationData property: CreationData to be used to specify the source agent pool resource ID to create - * this snapshot. - * - * @param creationData the creationData value to set. - * @return the SnapshotInner object itself. - */ - public SnapshotInner withCreationData(CreationData creationData) { - if (this.innerProperties() == null) { - this.innerProperties = new SnapshotProperties(); - } - this.innerProperties().withCreationData(creationData); - return this; - } - - /** - * Get the snapshotType property: The type of a snapshot. The default is NodePool. - * - * @return the snapshotType value. - */ - public SnapshotType snapshotType() { - return this.innerProperties() == null ? null : this.innerProperties().snapshotType(); - } - - /** - * Set the snapshotType property: The type of a snapshot. The default is NodePool. - * - * @param snapshotType the snapshotType value to set. - * @return the SnapshotInner object itself. - */ - public SnapshotInner withSnapshotType(SnapshotType snapshotType) { - if (this.innerProperties() == null) { - this.innerProperties = new SnapshotProperties(); - } - this.innerProperties().withSnapshotType(snapshotType); - return this; - } - - /** - * Get the kubernetesVersion property: The version of Kubernetes. - * - * @return the kubernetesVersion value. - */ - public String kubernetesVersion() { - return this.innerProperties() == null ? null : this.innerProperties().kubernetesVersion(); - } - - /** - * Get the nodeImageVersion property: The version of node image. - * - * @return the nodeImageVersion value. - */ - public String nodeImageVersion() { - return this.innerProperties() == null ? null : this.innerProperties().nodeImageVersion(); - } - - /** - * Get the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - * - * @return the osType value. - */ - public OSType osType() { - return this.innerProperties() == null ? null : this.innerProperties().osType(); - } - - /** - * Get the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. - * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is - * Windows. - * - * @return the osSku value. - */ - public OSSku osSku() { - return this.innerProperties() == null ? null : this.innerProperties().osSku(); - } - - /** - * Get the vmSize property: The size of the VM. - * - * @return the vmSize value. - */ - public String vmSize() { - return this.innerProperties() == null ? null : this.innerProperties().vmSize(); - } - - /** - * Get the enableFips property: Whether to use a FIPS-enabled OS. - * - * @return the enableFips value. - */ - public Boolean enableFips() { - return this.innerProperties() == null ? null : this.innerProperties().enableFips(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SnapshotInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SnapshotInner 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 SnapshotInner. - */ - public static SnapshotInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SnapshotInner deserializedSnapshotInner = new SnapshotInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedSnapshotInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedSnapshotInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedSnapshotInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedSnapshotInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedSnapshotInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedSnapshotInner.innerProperties = SnapshotProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedSnapshotInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSnapshotInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotProperties.java deleted file mode 100644 index dc9593d1697f..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotProperties.java +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.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 com.azure.resourcemanager.containerservice.models.CreationData; -import com.azure.resourcemanager.containerservice.models.OSSku; -import com.azure.resourcemanager.containerservice.models.OSType; -import com.azure.resourcemanager.containerservice.models.SnapshotType; -import java.io.IOException; - -/** - * Properties used to configure a node pool snapshot. - */ -@Fluent -public final class SnapshotProperties implements JsonSerializable { - /* - * CreationData to be used to specify the source agent pool resource ID to create this snapshot. - */ - private CreationData creationData; - - /* - * The type of a snapshot. The default is NodePool. - */ - private SnapshotType snapshotType; - - /* - * The version of Kubernetes. - */ - private String kubernetesVersion; - - /* - * The version of node image. - */ - private String nodeImageVersion; - - /* - * OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - */ - private OSType osType; - - /* - * Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 - * when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. - */ - private OSSku osSku; - - /* - * The size of the VM. - */ - private String vmSize; - - /* - * Whether to use a FIPS-enabled OS. - */ - private Boolean enableFips; - - /** - * Creates an instance of SnapshotProperties class. - */ - public SnapshotProperties() { - } - - /** - * Get the creationData property: CreationData to be used to specify the source agent pool resource ID to create - * this snapshot. - * - * @return the creationData value. - */ - public CreationData creationData() { - return this.creationData; - } - - /** - * Set the creationData property: CreationData to be used to specify the source agent pool resource ID to create - * this snapshot. - * - * @param creationData the creationData value to set. - * @return the SnapshotProperties object itself. - */ - public SnapshotProperties withCreationData(CreationData creationData) { - this.creationData = creationData; - return this; - } - - /** - * Get the snapshotType property: The type of a snapshot. The default is NodePool. - * - * @return the snapshotType value. - */ - public SnapshotType snapshotType() { - return this.snapshotType; - } - - /** - * Set the snapshotType property: The type of a snapshot. The default is NodePool. - * - * @param snapshotType the snapshotType value to set. - * @return the SnapshotProperties object itself. - */ - public SnapshotProperties withSnapshotType(SnapshotType snapshotType) { - this.snapshotType = snapshotType; - return this; - } - - /** - * Get the kubernetesVersion property: The version of Kubernetes. - * - * @return the kubernetesVersion value. - */ - public String kubernetesVersion() { - return this.kubernetesVersion; - } - - /** - * Get the nodeImageVersion property: The version of node image. - * - * @return the nodeImageVersion value. - */ - public String nodeImageVersion() { - return this.nodeImageVersion; - } - - /** - * Get the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - * - * @return the osType value. - */ - public OSType osType() { - return this.osType; - } - - /** - * Get the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. - * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is - * Windows. - * - * @return the osSku value. - */ - public OSSku osSku() { - return this.osSku; - } - - /** - * Get the vmSize property: The size of the VM. - * - * @return the vmSize value. - */ - public String vmSize() { - return this.vmSize; - } - - /** - * Get the enableFips property: Whether to use a FIPS-enabled OS. - * - * @return the enableFips value. - */ - public Boolean enableFips() { - return this.enableFips; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (creationData() != null) { - creationData().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("creationData", this.creationData); - jsonWriter.writeStringField("snapshotType", this.snapshotType == null ? null : this.snapshotType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SnapshotProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SnapshotProperties 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 SnapshotProperties. - */ - public static SnapshotProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SnapshotProperties deserializedSnapshotProperties = new SnapshotProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("creationData".equals(fieldName)) { - deserializedSnapshotProperties.creationData = CreationData.fromJson(reader); - } else if ("snapshotType".equals(fieldName)) { - deserializedSnapshotProperties.snapshotType = SnapshotType.fromString(reader.getString()); - } else if ("kubernetesVersion".equals(fieldName)) { - deserializedSnapshotProperties.kubernetesVersion = reader.getString(); - } else if ("nodeImageVersion".equals(fieldName)) { - deserializedSnapshotProperties.nodeImageVersion = reader.getString(); - } else if ("osType".equals(fieldName)) { - deserializedSnapshotProperties.osType = OSType.fromString(reader.getString()); - } else if ("osSku".equals(fieldName)) { - deserializedSnapshotProperties.osSku = OSSku.fromString(reader.getString()); - } else if ("vmSize".equals(fieldName)) { - deserializedSnapshotProperties.vmSize = reader.getString(); - } else if ("enableFIPS".equals(fieldName)) { - deserializedSnapshotProperties.enableFips = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedSnapshotProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingInner.java deleted file mode 100644 index b52b9665d120..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingInner.java +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.TrustedAccessRoleBindingProvisioningState; -import java.io.IOException; -import java.util.List; - -/** - * Defines binding between a resource and role. - */ -@Fluent -public final class TrustedAccessRoleBindingInner extends ProxyResource { - /* - * Properties for trusted access role binding - */ - private TrustedAccessRoleBindingProperties innerProperties = new TrustedAccessRoleBindingProperties(); - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of TrustedAccessRoleBindingInner class. - */ - public TrustedAccessRoleBindingInner() { - } - - /** - * Get the innerProperties property: Properties for trusted access role binding. - * - * @return the innerProperties value. - */ - private TrustedAccessRoleBindingProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the provisioningState property: The current provisioning state of trusted access role binding. - * - * @return the provisioningState value. - */ - public TrustedAccessRoleBindingProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the sourceResourceId property: The ARM resource ID of source resource that trusted access is configured for. - * - * @return the sourceResourceId value. - */ - public String sourceResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().sourceResourceId(); - } - - /** - * Set the sourceResourceId property: The ARM resource ID of source resource that trusted access is configured for. - * - * @param sourceResourceId the sourceResourceId value to set. - * @return the TrustedAccessRoleBindingInner object itself. - */ - public TrustedAccessRoleBindingInner withSourceResourceId(String sourceResourceId) { - if (this.innerProperties() == null) { - this.innerProperties = new TrustedAccessRoleBindingProperties(); - } - this.innerProperties().withSourceResourceId(sourceResourceId); - return this; - } - - /** - * Get the roles property: A list of roles to bind, each item is a resource type qualified role name. For example: - * 'Microsoft.MachineLearningServices/workspaces/reader'. - * - * @return the roles value. - */ - public List roles() { - return this.innerProperties() == null ? null : this.innerProperties().roles(); - } - - /** - * Set the roles property: A list of roles to bind, each item is a resource type qualified role name. For example: - * 'Microsoft.MachineLearningServices/workspaces/reader'. - * - * @param roles the roles value to set. - * @return the TrustedAccessRoleBindingInner object itself. - */ - public TrustedAccessRoleBindingInner withRoles(List roles) { - if (this.innerProperties() == null) { - this.innerProperties = new TrustedAccessRoleBindingProperties(); - } - this.innerProperties().withRoles(roles); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model TrustedAccessRoleBindingInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TrustedAccessRoleBindingInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TrustedAccessRoleBindingInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TrustedAccessRoleBindingInner 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 TrustedAccessRoleBindingInner. - */ - public static TrustedAccessRoleBindingInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TrustedAccessRoleBindingInner deserializedTrustedAccessRoleBindingInner - = new TrustedAccessRoleBindingInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedTrustedAccessRoleBindingInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedTrustedAccessRoleBindingInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedTrustedAccessRoleBindingInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedTrustedAccessRoleBindingInner.innerProperties - = TrustedAccessRoleBindingProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedTrustedAccessRoleBindingInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedTrustedAccessRoleBindingInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingProperties.java deleted file mode 100644 index 1b46798c4b31..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingProperties.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.TrustedAccessRoleBindingProvisioningState; -import java.io.IOException; -import java.util.List; - -/** - * Properties for trusted access role binding. - */ -@Fluent -public final class TrustedAccessRoleBindingProperties implements JsonSerializable { - /* - * The current provisioning state of trusted access role binding. - */ - private TrustedAccessRoleBindingProvisioningState provisioningState; - - /* - * The ARM resource ID of source resource that trusted access is configured for. - */ - private String sourceResourceId; - - /* - * A list of roles to bind, each item is a resource type qualified role name. For example: - * 'Microsoft.MachineLearningServices/workspaces/reader'. - */ - private List roles; - - /** - * Creates an instance of TrustedAccessRoleBindingProperties class. - */ - public TrustedAccessRoleBindingProperties() { - } - - /** - * Get the provisioningState property: The current provisioning state of trusted access role binding. - * - * @return the provisioningState value. - */ - public TrustedAccessRoleBindingProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the sourceResourceId property: The ARM resource ID of source resource that trusted access is configured for. - * - * @return the sourceResourceId value. - */ - public String sourceResourceId() { - return this.sourceResourceId; - } - - /** - * Set the sourceResourceId property: The ARM resource ID of source resource that trusted access is configured for. - * - * @param sourceResourceId the sourceResourceId value to set. - * @return the TrustedAccessRoleBindingProperties object itself. - */ - public TrustedAccessRoleBindingProperties withSourceResourceId(String sourceResourceId) { - this.sourceResourceId = sourceResourceId; - return this; - } - - /** - * Get the roles property: A list of roles to bind, each item is a resource type qualified role name. For example: - * 'Microsoft.MachineLearningServices/workspaces/reader'. - * - * @return the roles value. - */ - public List roles() { - return this.roles; - } - - /** - * Set the roles property: A list of roles to bind, each item is a resource type qualified role name. For example: - * 'Microsoft.MachineLearningServices/workspaces/reader'. - * - * @param roles the roles value to set. - * @return the TrustedAccessRoleBindingProperties object itself. - */ - public TrustedAccessRoleBindingProperties withRoles(List roles) { - this.roles = roles; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceResourceId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property sourceResourceId in model TrustedAccessRoleBindingProperties")); - } - if (roles() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property roles in model TrustedAccessRoleBindingProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TrustedAccessRoleBindingProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sourceResourceId", this.sourceResourceId); - jsonWriter.writeArrayField("roles", this.roles, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TrustedAccessRoleBindingProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TrustedAccessRoleBindingProperties 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 TrustedAccessRoleBindingProperties. - */ - public static TrustedAccessRoleBindingProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TrustedAccessRoleBindingProperties deserializedTrustedAccessRoleBindingProperties - = new TrustedAccessRoleBindingProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sourceResourceId".equals(fieldName)) { - deserializedTrustedAccessRoleBindingProperties.sourceResourceId = reader.getString(); - } else if ("roles".equals(fieldName)) { - List roles = reader.readArray(reader1 -> reader1.getString()); - deserializedTrustedAccessRoleBindingProperties.roles = roles; - } else if ("provisioningState".equals(fieldName)) { - deserializedTrustedAccessRoleBindingProperties.provisioningState - = TrustedAccessRoleBindingProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedTrustedAccessRoleBindingProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleInner.java deleted file mode 100644 index f637cfcd4c09..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleInner.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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.containerservice.models.TrustedAccessRoleRule; -import java.io.IOException; -import java.util.List; - -/** - * Trusted access role definition. - */ -@Immutable -public final class TrustedAccessRoleInner implements JsonSerializable { - /* - * Resource type of Azure resource - */ - private String sourceResourceType; - - /* - * Name of role, name is unique under a source resource type - */ - private String name; - - /* - * List of rules for the role. This maps to 'rules' property of [Kubernetes Cluster - * Role](https://kubernetes.io/docs/reference/kubernetes-api/authorization-resources/cluster-role-v1/#ClusterRole). - */ - private List rules; - - /** - * Creates an instance of TrustedAccessRoleInner class. - */ - public TrustedAccessRoleInner() { - } - - /** - * Get the sourceResourceType property: Resource type of Azure resource. - * - * @return the sourceResourceType value. - */ - public String sourceResourceType() { - return this.sourceResourceType; - } - - /** - * Get the name property: Name of role, name is unique under a source resource type. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the rules property: List of rules for the role. This maps to 'rules' property of [Kubernetes Cluster - * Role](https://kubernetes.io/docs/reference/kubernetes-api/authorization-resources/cluster-role-v1/#ClusterRole). - * - * @return the rules value. - */ - public List rules() { - return this.rules; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (rules() != null) { - rules().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TrustedAccessRoleInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TrustedAccessRoleInner 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 TrustedAccessRoleInner. - */ - public static TrustedAccessRoleInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TrustedAccessRoleInner deserializedTrustedAccessRoleInner = new TrustedAccessRoleInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sourceResourceType".equals(fieldName)) { - deserializedTrustedAccessRoleInner.sourceResourceType = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedTrustedAccessRoleInner.name = reader.getString(); - } else if ("rules".equals(fieldName)) { - List rules - = reader.readArray(reader1 -> TrustedAccessRoleRule.fromJson(reader1)); - deserializedTrustedAccessRoleInner.rules = rules; - } else { - reader.skipChildren(); - } - } - - return deserializedTrustedAccessRoleInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java deleted file mode 100644 index 04eb32db2c35..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java +++ /dev/null @@ -1,2187 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.fluent.AgentPoolsClient; -import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolAvailableVersionsInner; -import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner; -import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolUpgradeProfileInner; -import com.azure.resourcemanager.containerservice.models.AgentPoolDeleteMachinesParameter; -import com.azure.resourcemanager.containerservice.models.AgentPoolListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in AgentPoolsClient. - */ -public final class AgentPoolsClientImpl implements AgentPoolsClient { - /** - * The proxy service used to perform REST calls. - */ - private final AgentPoolsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerServiceManagementClientImpl client; - - /** - * Initializes an instance of AgentPoolsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - AgentPoolsClientImpl(ContainerServiceManagementClientImpl client) { - this.service - = RestProxy.create(AgentPoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerServiceManagementClientAgentPools to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerServiceManagementClientAgentPools") - public interface AgentPoolsService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> abortLatestOperation(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("agentPoolName") String agentPoolName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @BodyParam("application/json") AgentPoolInner parameters, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("agentPoolName") String agentPoolName, - @QueryParam("ignore-pod-disruption-budget") Boolean ignorePodDisruptionBudget, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getUpgradeProfile(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteMachines(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("agentPoolName") String agentPoolName, - @BodyParam("application/json") AgentPoolDeleteMachinesParameter machines, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getAvailableAgentPoolVersions( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> upgradeNodeImageVersion(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Aborts last operation running on agent pool. - * - * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and - * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> abortLatestOperationWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.abortLatestOperation(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Aborts last operation running on agent pool. - * - * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and - * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> abortLatestOperationWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.abortLatestOperation(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, agentPoolName, accept, context); - } - - /** - * Aborts last operation running on agent pool. - * - * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and - * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginAbortLatestOperationAsync(String resourceGroupName, - String resourceName, String agentPoolName) { - Mono>> mono - = abortLatestOperationWithResponseAsync(resourceGroupName, resourceName, agentPoolName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Aborts last operation running on agent pool. - * - * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and - * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginAbortLatestOperationAsync(String resourceGroupName, - String resourceName, String agentPoolName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = abortLatestOperationWithResponseAsync(resourceGroupName, resourceName, agentPoolName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Aborts last operation running on agent pool. - * - * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and - * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, - String agentPoolName) { - return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName).getSyncPoller(); - } - - /** - * Aborts last operation running on agent pool. - * - * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and - * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, - String agentPoolName, Context context) { - return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName, context) - .getSyncPoller(); - } - - /** - * Aborts last operation running on agent pool. - * - * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and - * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono abortLatestOperationAsync(String resourceGroupName, String resourceName, String agentPoolName) { - return beginAbortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Aborts last operation running on agent pool. - * - * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and - * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono abortLatestOperationAsync(String resourceGroupName, String resourceName, String agentPoolName, - Context context) { - return beginAbortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Aborts last operation running on agent pool. - * - * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and - * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void abortLatestOperation(String resourceGroupName, String resourceName, String agentPoolName) { - abortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName).block(); - } - - /** - * Aborts last operation running on agent pool. - * - * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and - * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void abortLatestOperation(String resourceGroupName, String resourceName, String agentPoolName, - Context context) { - abortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName, context).block(); - } - - /** - * Gets a list of agent pools in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of agent pools in the specified managed cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of agent pools in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of agent pools in the specified managed cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String resourceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of agent pools in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of agent pools in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String resourceName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of agent pools in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String resourceName) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceName)); - } - - /** - * Gets a list of agent pools in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String resourceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); - } - - /** - * Gets the specified managed cluster agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 specified managed cluster agent pool along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String resourceName, - String agentPoolName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, agentPoolName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the specified managed cluster agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 specified managed cluster agent pool along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, - String agentPoolName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, agentPoolName, accept, context); - } - - /** - * Gets the specified managed cluster agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 specified managed cluster agent pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String resourceName, String agentPoolName) { - return getWithResponseAsync(resourceGroupName, resourceName, agentPoolName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the specified managed cluster agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 specified managed cluster agent pool along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String resourceName, String agentPoolName, - Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, agentPoolName, context).block(); - } - - /** - * Gets the specified managed cluster agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 specified managed cluster agent pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AgentPoolInner get(String resourceGroupName, String resourceName, String agentPoolName) { - return getWithResponse(resourceGroupName, resourceName, agentPoolName, Context.NONE).getValue(); - } - - /** - * Creates or updates an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param parameters The agent pool to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @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 agent Pool along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName, AgentPoolInner parameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, ifMatch, ifNoneMatch, - parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param parameters The agent pool to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @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 agent Pool along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName, AgentPoolInner parameters, String ifMatch, String ifNoneMatch, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, agentPoolName, ifMatch, ifNoneMatch, parameters, accept, context); - } - - /** - * Creates or updates an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param parameters The agent pool to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of agent Pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, AgentPoolInner> beginCreateOrUpdateAsync(String resourceGroupName, - String resourceName, String agentPoolName, AgentPoolInner parameters, String ifMatch, String ifNoneMatch) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, - agentPoolName, parameters, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - AgentPoolInner.class, AgentPoolInner.class, this.client.getContext()); - } - - /** - * Creates or updates an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param parameters The agent pool to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of agent Pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, AgentPoolInner> beginCreateOrUpdateAsync(String resourceGroupName, - String resourceName, String agentPoolName, AgentPoolInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, - agentPoolName, parameters, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - AgentPoolInner.class, AgentPoolInner.class, this.client.getContext()); - } - - /** - * Creates or updates an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param parameters The agent pool to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of agent Pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AgentPoolInner> beginCreateOrUpdateAsync(String resourceGroupName, - String resourceName, String agentPoolName, AgentPoolInner parameters, String ifMatch, String ifNoneMatch, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, - agentPoolName, parameters, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - AgentPoolInner.class, AgentPoolInner.class, context); - } - - /** - * Creates or updates an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param parameters The agent pool to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of agent Pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AgentPoolInner> beginCreateOrUpdate(String resourceGroupName, - String resourceName, String agentPoolName, AgentPoolInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return this - .beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch, ifNoneMatch) - .getSyncPoller(); - } - - /** - * Creates or updates an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param parameters The agent pool to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of agent Pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AgentPoolInner> beginCreateOrUpdate(String resourceGroupName, - String resourceName, String agentPoolName, AgentPoolInner parameters, String ifMatch, String ifNoneMatch, - Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch, ifNoneMatch, - context) - .getSyncPoller(); - } - - /** - * Creates or updates an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param parameters The agent pool to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @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 agent Pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, - AgentPoolInner parameters, String ifMatch, String ifNoneMatch) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch, - ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param parameters The agent pool to create or update. - * @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 agent Pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, - AgentPoolInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch, - ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param parameters The agent pool to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @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 agent Pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - String agentPoolName, AgentPoolInner parameters, String ifMatch, String ifNoneMatch, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch, - ifNoneMatch, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param parameters The agent pool to create or update. - * @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 agent Pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AgentPoolInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, - AgentPoolInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return createOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch, ifNoneMatch) - .block(); - } - - /** - * Creates or updates an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param parameters The agent pool to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @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 agent Pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AgentPoolInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, - AgentPoolInner parameters, String ifMatch, String ifNoneMatch, Context context) { - return createOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch, ifNoneMatch, - context).block(); - } - - /** - * Deletes an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. - * @param ifMatch The request should only proceed if an entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String agentPoolName, Boolean ignorePodDisruptionBudget, String ifMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, - ignorePodDisruptionBudget, ifMatch, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String agentPoolName, Boolean ignorePodDisruptionBudget, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch, accept, context); - } - - /** - * Deletes an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. - * @param ifMatch The request should only proceed if an entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String agentPoolName, Boolean ignorePodDisruptionBudget, String ifMatch) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, agentPoolName, - ignorePodDisruptionBudget, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String agentPoolName) { - final Boolean ignorePodDisruptionBudget = null; - final String ifMatch = null; - Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, agentPoolName, - ignorePodDisruptionBudget, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String agentPoolName, Boolean ignorePodDisruptionBudget, String ifMatch, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, agentPoolName, - ignorePodDisruptionBudget, ifMatch, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, - String agentPoolName) { - final Boolean ignorePodDisruptionBudget = null; - final String ifMatch = null; - return this.beginDeleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch) - .getSyncPoller(); - } - - /** - * Deletes an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, - String agentPoolName, Boolean ignorePodDisruptionBudget, String ifMatch, Context context) { - return this - .beginDeleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch, - context) - .getSyncPoller(); - } - - /** - * Deletes an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. - * @param ifMatch The request should only proceed if an entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String resourceName, String agentPoolName, - Boolean ignorePodDisruptionBudget, String ifMatch) { - return beginDeleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String resourceName, String agentPoolName) { - final Boolean ignorePodDisruptionBudget = null; - final String ifMatch = null; - return beginDeleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName, String agentPoolName, - Boolean ignorePodDisruptionBudget, String ifMatch, Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String agentPoolName) { - final Boolean ignorePodDisruptionBudget = null; - final String ifMatch = null; - deleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch).block(); - } - - /** - * Deletes an agent pool in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. - * @param ifMatch The request should only proceed if an entity matches this string. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String agentPoolName, - Boolean ignorePodDisruptionBudget, String ifMatch, Context context) { - deleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch, context) - .block(); - } - - /** - * Gets the upgrade profile for an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 upgrade profile for an agent pool along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getUpgradeProfileWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getUpgradeProfile(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the upgrade profile for an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 upgrade profile for an agent pool along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getUpgradeProfileWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getUpgradeProfile(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, agentPoolName, accept, context); - } - - /** - * Gets the upgrade profile for an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 upgrade profile for an agent pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getUpgradeProfileAsync(String resourceGroupName, String resourceName, - String agentPoolName) { - return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, agentPoolName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the upgrade profile for an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 upgrade profile for an agent pool along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getUpgradeProfileWithResponse(String resourceGroupName, - String resourceName, String agentPoolName, Context context) { - return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, agentPoolName, context).block(); - } - - /** - * Gets the upgrade profile for an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 upgrade profile for an agent pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AgentPoolUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName, - String agentPoolName) { - return getUpgradeProfileWithResponse(resourceGroupName, resourceName, agentPoolName, Context.NONE).getValue(); - } - - /** - * Deletes specific machines in an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machines A list of machines from the agent pool to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteMachinesWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName, AgentPoolDeleteMachinesParameter machines) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - if (machines == null) { - return Mono.error(new IllegalArgumentException("Parameter machines is required and cannot be null.")); - } else { - machines.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.deleteMachines(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, machines, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes specific machines in an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machines A list of machines from the agent pool to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteMachinesWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName, AgentPoolDeleteMachinesParameter machines, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - if (machines == null) { - return Mono.error(new IllegalArgumentException("Parameter machines is required and cannot be null.")); - } else { - machines.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.deleteMachines(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, agentPoolName, machines, accept, context); - } - - /** - * Deletes specific machines in an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machines A list of machines from the agent pool to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteMachinesAsync(String resourceGroupName, String resourceName, - String agentPoolName, AgentPoolDeleteMachinesParameter machines) { - Mono>> mono - = deleteMachinesWithResponseAsync(resourceGroupName, resourceName, agentPoolName, machines); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes specific machines in an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machines A list of machines from the agent pool to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteMachinesAsync(String resourceGroupName, String resourceName, - String agentPoolName, AgentPoolDeleteMachinesParameter machines, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteMachinesWithResponseAsync(resourceGroupName, resourceName, agentPoolName, machines, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes specific machines in an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machines A list of machines from the agent pool to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteMachines(String resourceGroupName, String resourceName, - String agentPoolName, AgentPoolDeleteMachinesParameter machines) { - return this.beginDeleteMachinesAsync(resourceGroupName, resourceName, agentPoolName, machines).getSyncPoller(); - } - - /** - * Deletes specific machines in an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machines A list of machines from the agent pool to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteMachines(String resourceGroupName, String resourceName, - String agentPoolName, AgentPoolDeleteMachinesParameter machines, Context context) { - return this.beginDeleteMachinesAsync(resourceGroupName, resourceName, agentPoolName, machines, context) - .getSyncPoller(); - } - - /** - * Deletes specific machines in an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machines A list of machines from the agent pool to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteMachinesAsync(String resourceGroupName, String resourceName, String agentPoolName, - AgentPoolDeleteMachinesParameter machines) { - return beginDeleteMachinesAsync(resourceGroupName, resourceName, agentPoolName, machines).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes specific machines in an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machines A list of machines from the agent pool to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteMachinesAsync(String resourceGroupName, String resourceName, String agentPoolName, - AgentPoolDeleteMachinesParameter machines, Context context) { - return beginDeleteMachinesAsync(resourceGroupName, resourceName, agentPoolName, machines, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes specific machines in an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machines A list of machines from the agent pool to be deleted. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteMachines(String resourceGroupName, String resourceName, String agentPoolName, - AgentPoolDeleteMachinesParameter machines) { - deleteMachinesAsync(resourceGroupName, resourceName, agentPoolName, machines).block(); - } - - /** - * Deletes specific machines in an agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machines A list of machines from the agent pool to be deleted. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteMachines(String resourceGroupName, String resourceName, String agentPoolName, - AgentPoolDeleteMachinesParameter machines, Context context) { - deleteMachinesAsync(resourceGroupName, resourceName, agentPoolName, machines, context).block(); - } - - /** - * Gets a list of supported Kubernetes versions for the specified agent pool. - * - * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more - * details about the version lifecycle. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of available versions for an agent pool along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - getAvailableAgentPoolVersionsWithResponseAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getAvailableAgentPoolVersions(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of supported Kubernetes versions for the specified agent pool. - * - * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more - * details about the version lifecycle. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of available versions for an agent pool along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getAvailableAgentPoolVersionsWithResponseAsync(String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getAvailableAgentPoolVersions(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); - } - - /** - * Gets a list of supported Kubernetes versions for the specified agent pool. - * - * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more - * details about the version lifecycle. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of available versions for an agent pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAvailableAgentPoolVersionsAsync(String resourceGroupName, - String resourceName) { - return getAvailableAgentPoolVersionsWithResponseAsync(resourceGroupName, resourceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a list of supported Kubernetes versions for the specified agent pool. - * - * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more - * details about the version lifecycle. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of available versions for an agent pool along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAvailableAgentPoolVersionsWithResponse(String resourceGroupName, - String resourceName, Context context) { - return getAvailableAgentPoolVersionsWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Gets a list of supported Kubernetes versions for the specified agent pool. - * - * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more - * details about the version lifecycle. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of available versions for an agent pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AgentPoolAvailableVersionsInner getAvailableAgentPoolVersions(String resourceGroupName, - String resourceName) { - return getAvailableAgentPoolVersionsWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); - } - - /** - * Upgrades the node image version of an agent pool to the latest. - * - * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS - * provides one new image per week with the latest updates. For more details on node image versions, see: - * https://docs.microsoft.com/azure/aks/node-image-upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> upgradeNodeImageVersionWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.upgradeNodeImageVersion(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Upgrades the node image version of an agent pool to the latest. - * - * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS - * provides one new image per week with the latest updates. For more details on node image versions, see: - * https://docs.microsoft.com/azure/aks/node-image-upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> upgradeNodeImageVersionWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.upgradeNodeImageVersion(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, agentPoolName, accept, context); - } - - /** - * Upgrades the node image version of an agent pool to the latest. - * - * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS - * provides one new image per week with the latest updates. For more details on node image versions, see: - * https://docs.microsoft.com/azure/aks/node-image-upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, AgentPoolInner> - beginUpgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, String agentPoolName) { - Mono>> mono - = upgradeNodeImageVersionWithResponseAsync(resourceGroupName, resourceName, agentPoolName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - AgentPoolInner.class, AgentPoolInner.class, this.client.getContext()); - } - - /** - * Upgrades the node image version of an agent pool to the latest. - * - * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS - * provides one new image per week with the latest updates. For more details on node image versions, see: - * https://docs.microsoft.com/azure/aks/node-image-upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AgentPoolInner> beginUpgradeNodeImageVersionAsync( - String resourceGroupName, String resourceName, String agentPoolName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = upgradeNodeImageVersionWithResponseAsync(resourceGroupName, resourceName, agentPoolName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - AgentPoolInner.class, AgentPoolInner.class, context); - } - - /** - * Upgrades the node image version of an agent pool to the latest. - * - * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS - * provides one new image per week with the latest updates. For more details on node image versions, see: - * https://docs.microsoft.com/azure/aks/node-image-upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AgentPoolInner> beginUpgradeNodeImageVersion(String resourceGroupName, - String resourceName, String agentPoolName) { - return this.beginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).getSyncPoller(); - } - - /** - * Upgrades the node image version of an agent pool to the latest. - * - * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS - * provides one new image per week with the latest updates. For more details on node image versions, see: - * https://docs.microsoft.com/azure/aks/node-image-upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AgentPoolInner> beginUpgradeNodeImageVersion(String resourceGroupName, - String resourceName, String agentPoolName, Context context) { - return this.beginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName, context) - .getSyncPoller(); - } - - /** - * Upgrades the node image version of an agent pool to the latest. - * - * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS - * provides one new image per week with the latest updates. For more details on node image versions, see: - * https://docs.microsoft.com/azure/aks/node-image-upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono upgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, - String agentPoolName) { - return beginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Upgrades the node image version of an agent pool to the latest. - * - * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS - * provides one new image per week with the latest updates. For more details on node image versions, see: - * https://docs.microsoft.com/azure/aks/node-image-upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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 body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono upgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, - String agentPoolName, Context context) { - return beginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Upgrades the node image version of an agent pool to the latest. - * - * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS - * provides one new image per week with the latest updates. For more details on node image versions, see: - * https://docs.microsoft.com/azure/aks/node-image-upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AgentPoolInner upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName) { - return upgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).block(); - } - - /** - * Upgrades the node image version of an agent pool to the latest. - * - * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS - * provides one new image per week with the latest updates. For more details on node image versions, see: - * https://docs.microsoft.com/azure/aks/node-image-upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AgentPoolInner upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName, - Context context) { - return upgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName, context).block(); - } - - /** - * Gets a list of agent pools in the specified managed cluster. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of agent pools in the specified managed cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of agent pools in the specified managed cluster. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of agent pools in the specified managed cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java index 11eb021db617..c88310b70473 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java @@ -8,21 +8,9 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.containerservice.fluent.AgentPoolsClient; import com.azure.resourcemanager.containerservice.fluent.ContainerServiceManagementClient; import com.azure.resourcemanager.containerservice.fluent.ContainerServicesClient; -import com.azure.resourcemanager.containerservice.fluent.MachinesClient; -import com.azure.resourcemanager.containerservice.fluent.MaintenanceConfigurationsClient; -import com.azure.resourcemanager.containerservice.fluent.ManagedClustersClient; -import com.azure.resourcemanager.containerservice.fluent.ManagedNamespacesClient; import com.azure.resourcemanager.containerservice.fluent.OpenShiftManagedClustersClient; -import com.azure.resourcemanager.containerservice.fluent.OperationsClient; -import com.azure.resourcemanager.containerservice.fluent.PrivateEndpointConnectionsClient; -import com.azure.resourcemanager.containerservice.fluent.PrivateLinkResourcesClient; -import com.azure.resourcemanager.containerservice.fluent.ResolvePrivateLinkServiceIdsClient; -import com.azure.resourcemanager.containerservice.fluent.SnapshotsClient; -import com.azure.resourcemanager.containerservice.fluent.TrustedAccessRoleBindingsClient; -import com.azure.resourcemanager.containerservice.fluent.TrustedAccessRolesClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; @@ -132,174 +120,6 @@ public ContainerServicesClient getContainerServices() { return this.containerServices; } - /** - * The OperationsClient object to access its operations. - */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** - * The ManagedClustersClient object to access its operations. - */ - private final ManagedClustersClient managedClusters; - - /** - * Gets the ManagedClustersClient object to access its operations. - * - * @return the ManagedClustersClient object. - */ - public ManagedClustersClient getManagedClusters() { - return this.managedClusters; - } - - /** - * The MaintenanceConfigurationsClient object to access its operations. - */ - private final MaintenanceConfigurationsClient maintenanceConfigurations; - - /** - * Gets the MaintenanceConfigurationsClient object to access its operations. - * - * @return the MaintenanceConfigurationsClient object. - */ - public MaintenanceConfigurationsClient getMaintenanceConfigurations() { - return this.maintenanceConfigurations; - } - - /** - * The ManagedNamespacesClient object to access its operations. - */ - private final ManagedNamespacesClient managedNamespaces; - - /** - * Gets the ManagedNamespacesClient object to access its operations. - * - * @return the ManagedNamespacesClient object. - */ - public ManagedNamespacesClient getManagedNamespaces() { - return this.managedNamespaces; - } - - /** - * The AgentPoolsClient object to access its operations. - */ - private final AgentPoolsClient agentPools; - - /** - * Gets the AgentPoolsClient object to access its operations. - * - * @return the AgentPoolsClient object. - */ - public AgentPoolsClient getAgentPools() { - return this.agentPools; - } - - /** - * The PrivateEndpointConnectionsClient object to access its operations. - */ - private final PrivateEndpointConnectionsClient privateEndpointConnections; - - /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. - * - * @return the PrivateEndpointConnectionsClient object. - */ - public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { - return this.privateEndpointConnections; - } - - /** - * The PrivateLinkResourcesClient object to access its operations. - */ - private final PrivateLinkResourcesClient privateLinkResources; - - /** - * Gets the PrivateLinkResourcesClient object to access its operations. - * - * @return the PrivateLinkResourcesClient object. - */ - public PrivateLinkResourcesClient getPrivateLinkResources() { - return this.privateLinkResources; - } - - /** - * The ResolvePrivateLinkServiceIdsClient object to access its operations. - */ - private final ResolvePrivateLinkServiceIdsClient resolvePrivateLinkServiceIds; - - /** - * Gets the ResolvePrivateLinkServiceIdsClient object to access its operations. - * - * @return the ResolvePrivateLinkServiceIdsClient object. - */ - public ResolvePrivateLinkServiceIdsClient getResolvePrivateLinkServiceIds() { - return this.resolvePrivateLinkServiceIds; - } - - /** - * The SnapshotsClient object to access its operations. - */ - private final SnapshotsClient snapshots; - - /** - * Gets the SnapshotsClient object to access its operations. - * - * @return the SnapshotsClient object. - */ - public SnapshotsClient getSnapshots() { - return this.snapshots; - } - - /** - * The TrustedAccessRoleBindingsClient object to access its operations. - */ - private final TrustedAccessRoleBindingsClient trustedAccessRoleBindings; - - /** - * Gets the TrustedAccessRoleBindingsClient object to access its operations. - * - * @return the TrustedAccessRoleBindingsClient object. - */ - public TrustedAccessRoleBindingsClient getTrustedAccessRoleBindings() { - return this.trustedAccessRoleBindings; - } - - /** - * The TrustedAccessRolesClient object to access its operations. - */ - private final TrustedAccessRolesClient trustedAccessRoles; - - /** - * Gets the TrustedAccessRolesClient object to access its operations. - * - * @return the TrustedAccessRolesClient object. - */ - public TrustedAccessRolesClient getTrustedAccessRoles() { - return this.trustedAccessRoles; - } - - /** - * The MachinesClient object to access its operations. - */ - private final MachinesClient machines; - - /** - * Gets the MachinesClient object to access its operations. - * - * @return the MachinesClient object. - */ - public MachinesClient getMachines() { - return this.machines; - } - /** * Initializes an instance of ContainerServiceManagementClient client. * @@ -321,17 +141,5 @@ public MachinesClient getMachines() { this.endpoint = endpoint; this.openShiftManagedClusters = new OpenShiftManagedClustersClientImpl(this); this.containerServices = new ContainerServicesClientImpl(this); - this.operations = new OperationsClientImpl(this); - this.managedClusters = new ManagedClustersClientImpl(this); - this.maintenanceConfigurations = new MaintenanceConfigurationsClientImpl(this); - this.managedNamespaces = new ManagedNamespacesClientImpl(this); - this.agentPools = new AgentPoolsClientImpl(this); - this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); - this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); - this.resolvePrivateLinkServiceIds = new ResolvePrivateLinkServiceIdsClientImpl(this); - this.snapshots = new SnapshotsClientImpl(this); - this.trustedAccessRoleBindings = new TrustedAccessRoleBindingsClientImpl(this); - this.trustedAccessRoles = new TrustedAccessRolesClientImpl(this); - this.machines = new MachinesClientImpl(this); } } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java deleted file mode 100644 index b88059d28c0c..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java +++ /dev/null @@ -1,449 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.containerservice.fluent.MachinesClient; -import com.azure.resourcemanager.containerservice.fluent.models.MachineInner; -import com.azure.resourcemanager.containerservice.models.MachineListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in MachinesClient. - */ -public final class MachinesClientImpl implements MachinesClient { - /** - * The proxy service used to perform REST calls. - */ - private final MachinesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerServiceManagementClientImpl client; - - /** - * Initializes an instance of MachinesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - MachinesClientImpl(ContainerServiceManagementClientImpl client) { - this.service = RestProxy.create(MachinesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerServiceManagementClientMachines to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerServiceManagementClientMachines") - public interface MachinesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("agentPoolName") String agentPoolName, @PathParam("machineName") String machineName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of machines in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of machines in the specified agent pool along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String resourceName, - String agentPoolName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, agentPoolName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of machines in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of machines in the specified agent pool along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String resourceName, - String agentPoolName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, agentPoolName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of machines in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of machines in the specified agent pool as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String resourceName, String agentPoolName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, agentPoolName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of machines in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of machines in the specified agent pool as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String resourceName, String agentPoolName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, agentPoolName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of machines in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of machines in the specified agent pool as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String resourceName, String agentPoolName) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceName, agentPoolName)); - } - - /** - * Gets a list of machines in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of machines in the specified agent pool as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String resourceName, String agentPoolName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceName, agentPoolName, context)); - } - - /** - * Get a specific machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName host name of the machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific machine in the specified agent pool along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String resourceName, - String agentPoolName, String machineName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - if (machineName == null) { - return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, agentPoolName, machineName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a specific machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName host name of the machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific machine in the specified agent pool along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, - String agentPoolName, String machineName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - if (machineName == null) { - return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, agentPoolName, machineName, accept, context); - } - - /** - * Get a specific machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName host name of the machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific machine in the specified agent pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String resourceName, String agentPoolName, - String machineName) { - return getWithResponseAsync(resourceGroupName, resourceName, agentPoolName, machineName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a specific machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName host name of the machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific machine in the specified agent pool along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String resourceName, String agentPoolName, - String machineName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, agentPoolName, machineName, context).block(); - } - - /** - * Get a specific machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName host name of the machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific machine in the specified agent pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MachineInner get(String resourceGroupName, String resourceName, String agentPoolName, String machineName) { - return getWithResponse(resourceGroupName, resourceName, agentPoolName, machineName, Context.NONE).getValue(); - } - - /** - * Gets a list of machines in the specified agent pool. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of machines in the specified agent pool along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of machines in the specified agent pool. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of machines in the specified agent pool along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java deleted file mode 100644 index c4e206da5913..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java +++ /dev/null @@ -1,757 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.containerservice.fluent.MaintenanceConfigurationsClient; -import com.azure.resourcemanager.containerservice.fluent.models.MaintenanceConfigurationInner; -import com.azure.resourcemanager.containerservice.models.MaintenanceConfigurationListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in MaintenanceConfigurationsClient. - */ -public final class MaintenanceConfigurationsClientImpl implements MaintenanceConfigurationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final MaintenanceConfigurationsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerServiceManagementClientImpl client; - - /** - * Initializes an instance of MaintenanceConfigurationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - MaintenanceConfigurationsClientImpl(ContainerServiceManagementClientImpl client) { - this.service = RestProxy.create(MaintenanceConfigurationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerServiceManagementClientMaintenanceConfigurations to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerServiceManagementClientMaintenanceConfigurations") - public interface MaintenanceConfigurationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByManagedCluster(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("configName") String configName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("configName") String configName, - @BodyParam("application/json") MaintenanceConfigurationInner parameters, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("configName") String configName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByManagedClusterNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of maintenance configurations in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of maintenance configurations in the specified managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByManagedClusterSinglePageAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of maintenance configurations in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of maintenance configurations in the specified managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByManagedClusterSinglePageAsync(String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByManagedCluster(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of maintenance configurations in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of maintenance configurations in the specified managed cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByManagedClusterAsync(String resourceGroupName, - String resourceName) { - return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), - nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of maintenance configurations in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of maintenance configurations in the specified managed cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByManagedClusterAsync(String resourceGroupName, - String resourceName, Context context) { - return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), - nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of maintenance configurations in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of maintenance configurations in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedCluster(String resourceGroupName, - String resourceName) { - return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); - } - - /** - * Gets a list of maintenance configurations in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of maintenance configurations in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedCluster(String resourceGroupName, - String resourceName, Context context) { - return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); - } - - /** - * Gets the specified maintenance configuration of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @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 specified maintenance configuration of a managed cluster along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String resourceName, String configName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (configName == null) { - return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, configName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the specified maintenance configuration of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @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 specified maintenance configuration of a managed cluster along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String resourceName, String configName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (configName == null) { - return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, configName, accept, context); - } - - /** - * Gets the specified maintenance configuration of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @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 specified maintenance configuration of a managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String resourceName, - String configName) { - return getWithResponseAsync(resourceGroupName, resourceName, configName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the specified maintenance configuration of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @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 specified maintenance configuration of a managed cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String resourceName, - String configName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, configName, context).block(); - } - - /** - * Gets the specified maintenance configuration of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @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 specified maintenance configuration of a managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MaintenanceConfigurationInner get(String resourceGroupName, String resourceName, String configName) { - return getWithResponse(resourceGroupName, resourceName, configName, Context.NONE).getValue(); - } - - /** - * Creates or updates a maintenance configuration in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @param parameters The maintenance configuration to create or update. - * @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 planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster - * along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, String configName, MaintenanceConfigurationInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (configName == null) { - return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, configName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a maintenance configuration in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @param parameters The maintenance configuration to create or update. - * @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 planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster - * along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, String configName, MaintenanceConfigurationInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (configName == null) { - return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, configName, parameters, accept, context); - } - - /** - * Creates or updates a maintenance configuration in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @param parameters The maintenance configuration to create or update. - * @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 planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - String configName, MaintenanceConfigurationInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, configName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates a maintenance configuration in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @param parameters The maintenance configuration to create or update. - * @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 planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster - * along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String resourceName, String configName, MaintenanceConfigurationInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, configName, parameters, context) - .block(); - } - - /** - * Creates or updates a maintenance configuration in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @param parameters The maintenance configuration to create or update. - * @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 planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MaintenanceConfigurationInner createOrUpdate(String resourceGroupName, String resourceName, - String configName, MaintenanceConfigurationInner parameters) { - return createOrUpdateWithResponse(resourceGroupName, resourceName, configName, parameters, Context.NONE) - .getValue(); - } - - /** - * Deletes a maintenance configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String configName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (configName == null) { - return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, configName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a maintenance configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String configName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (configName == null) { - return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, configName, accept, context); - } - - /** - * Deletes a maintenance configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String resourceName, String configName) { - return deleteWithResponseAsync(resourceGroupName, resourceName, configName).flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes a maintenance configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String resourceName, String configName, - Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, configName, context).block(); - } - - /** - * Deletes a maintenance configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. Supported values are 'default', - * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String configName) { - deleteWithResponse(resourceGroupName, resourceName, configName, Context.NONE); - } - - /** - * Gets a list of maintenance configurations in the specified managed cluster. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of maintenance configurations in the specified managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByManagedClusterNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of maintenance configurations in the specified managed cluster. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of maintenance configurations in the specified managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedClusterNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java deleted file mode 100644 index 039c84a87d5b..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java +++ /dev/null @@ -1,5494 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.fluent.ManagedClustersClient; -import com.azure.resourcemanager.containerservice.fluent.models.CredentialResultsInner; -import com.azure.resourcemanager.containerservice.fluent.models.KubernetesVersionListResultInner; -import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterAccessProfileInner; -import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterInner; -import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterUpgradeProfileInner; -import com.azure.resourcemanager.containerservice.fluent.models.MeshRevisionProfileInner; -import com.azure.resourcemanager.containerservice.fluent.models.MeshUpgradeProfileInner; -import com.azure.resourcemanager.containerservice.fluent.models.OutboundEnvironmentEndpointInner; -import com.azure.resourcemanager.containerservice.fluent.models.RunCommandResultInner; -import com.azure.resourcemanager.containerservice.models.Format; -import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterListResult; -import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClustersGetCommandResultResponse; -import com.azure.resourcemanager.containerservice.models.MeshRevisionProfileList; -import com.azure.resourcemanager.containerservice.models.MeshUpgradeProfileList; -import com.azure.resourcemanager.containerservice.models.OutboundEnvironmentEndpointCollection; -import com.azure.resourcemanager.containerservice.models.RunCommandRequest; -import com.azure.resourcemanager.containerservice.models.TagsObject; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ManagedClustersClient. - */ -public final class ManagedClustersClientImpl implements InnerSupportsGet, - InnerSupportsListing, InnerSupportsDelete, ManagedClustersClient { - /** - * The proxy service used to perform REST calls. - */ - private final ManagedClustersService service; - - /** - * The service client containing this operation class. - */ - private final ContainerServiceManagementClientImpl client; - - /** - * Initializes an instance of ManagedClustersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedClustersClientImpl(ContainerServiceManagementClientImpl client) { - this.service - = RestProxy.create(ManagedClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerServiceManagementClientManagedClusters to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerServiceManagementClientManagedClusters") - public interface ManagedClustersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/kubernetesVersions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKubernetesVersions(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getUpgradeProfile(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getAccessProfile(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("roleName") String roleName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listClusterAdminCredentials(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @QueryParam("server-fqdn") String serverFqdn, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listClusterUserCredentials(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @QueryParam("server-fqdn") String serverFqdn, @QueryParam("format") Format format, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listClusterMonitoringUserCredentials(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @QueryParam("server-fqdn") String serverFqdn, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") ManagedClusterInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateTags(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("If-Match") String ifMatch, @BodyParam("application/json") TagsObject parameters, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resetServicePrincipalProfile(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @BodyParam("application/json") ManagedClusterServicePrincipalProfile parameters, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resetAadProfile(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @BodyParam("application/json") ManagedClusterAadProfile parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> rotateClusterCertificates(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> abortLatestOperation(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> rotateServiceAccountSigningKeys(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> stop(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> runCommand(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @BodyParam("application/json") RunCommandRequest requestPayload, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono getCommandResult(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("commandId") String commandId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listOutboundNetworkDependenciesEndpoints( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listMeshRevisionProfiles(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles/{mode}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getMeshRevisionProfile(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @PathParam("mode") String mode, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listMeshUpgradeProfiles(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles/{mode}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getMeshUpgradeProfile(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("mode") String mode, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listOutboundNetworkDependenciesEndpointsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listMeshRevisionProfilesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listMeshUpgradeProfilesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of supported Kubernetes versions in the specified subscription. - * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. - * - * @param location The name of the Azure region. - * @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 hold values properties, which is array of KubernetesVersion along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listKubernetesVersionsWithResponseAsync(String location) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listKubernetesVersions(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), location, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of supported Kubernetes versions in the specified subscription. - * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. - * - * @param location The name of the Azure region. - * @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 hold values properties, which is array of KubernetesVersion along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKubernetesVersionsWithResponseAsync(String location, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listKubernetesVersions(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - location, accept, context); - } - - /** - * Gets a list of supported Kubernetes versions in the specified subscription. - * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. - * - * @param location The name of the Azure region. - * @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 hold values properties, which is array of KubernetesVersion on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listKubernetesVersionsAsync(String location) { - return listKubernetesVersionsWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a list of supported Kubernetes versions in the specified subscription. - * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. - * - * @param location The name of the Azure region. - * @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 hold values properties, which is array of KubernetesVersion along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKubernetesVersionsWithResponse(String location, - Context context) { - return listKubernetesVersionsWithResponseAsync(location, context).block(); - } - - /** - * Gets a list of supported Kubernetes versions in the specified subscription. - * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. - * - * @param location The name of the Azure region. - * @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 hold values properties, which is array of KubernetesVersion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public KubernetesVersionListResultInner listKubernetesVersions(String location) { - return listKubernetesVersionsWithResponse(location, Context.NONE).getValue(); - } - - /** - * Gets a list of managed clusters in the specified subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed clusters in the specified subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of managed clusters in the specified subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed clusters in the specified subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of managed clusters in the specified subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed clusters in the specified subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of managed clusters in the specified subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed clusters in the specified subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of managed clusters in the specified subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed clusters in the specified subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Gets a list of managed clusters in the specified subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed clusters in the specified subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Lists managed clusters in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Managed Clusters operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists managed clusters in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 the List Managed Clusters operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists managed clusters in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Managed Clusters operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists managed clusters in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 the List Managed Clusters operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists managed clusters in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Managed Clusters operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Lists managed clusters in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 the List Managed Clusters operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Gets the upgrade profile of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade profile of a managed cluster along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - getUpgradeProfileWithResponseAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getUpgradeProfile(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the upgrade profile of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade profile of a managed cluster along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getUpgradeProfileWithResponseAsync(String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getUpgradeProfile(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context); - } - - /** - * Gets the upgrade profile of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade profile of a managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getUpgradeProfileAsync(String resourceGroupName, - String resourceName) { - return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the upgrade profile of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade profile of a managed cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getUpgradeProfileWithResponse(String resourceGroupName, - String resourceName, Context context) { - return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Gets the upgrade profile of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade profile of a managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName) { - return getUpgradeProfileWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); - } - - /** - * Gets an access profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Instead use - * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) - * or - * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) - * . - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param roleName The name of the role for managed cluster accessProfile resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed cluster Access Profile along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAccessProfileWithResponseAsync(String resourceGroupName, - String resourceName, String roleName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (roleName == null) { - return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getAccessProfile(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, roleName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets an access profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Instead use - * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) - * or - * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) - * . - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param roleName The name of the role for managed cluster accessProfile resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed cluster Access Profile along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAccessProfileWithResponseAsync(String resourceGroupName, - String resourceName, String roleName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (roleName == null) { - return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getAccessProfile(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, roleName, accept, context); - } - - /** - * Gets an access profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Instead use - * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) - * or - * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) - * . - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param roleName The name of the role for managed cluster accessProfile resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed cluster Access Profile on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAccessProfileAsync(String resourceGroupName, String resourceName, - String roleName) { - return getAccessProfileWithResponseAsync(resourceGroupName, resourceName, roleName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets an access profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Instead use - * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) - * or - * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) - * . - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param roleName The name of the role for managed cluster accessProfile resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed cluster Access Profile along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAccessProfileWithResponse(String resourceGroupName, - String resourceName, String roleName, Context context) { - return getAccessProfileWithResponseAsync(resourceGroupName, resourceName, roleName, context).block(); - } - - /** - * Gets an access profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Instead use - * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) - * or - * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) - * . - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param roleName The name of the role for managed cluster accessProfile resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed cluster Access Profile. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterAccessProfileInner getAccessProfile(String resourceGroupName, String resourceName, - String roleName) { - return getAccessProfileWithResponse(resourceGroupName, resourceName, roleName, Context.NONE).getValue(); - } - - /** - * Lists the admin credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. - * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listClusterAdminCredentialsWithResponseAsync(String resourceGroupName, - String resourceName, String serverFqdn) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listClusterAdminCredentials(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, serverFqdn, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists the admin credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. - * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listClusterAdminCredentialsWithResponseAsync( - String resourceGroupName, String resourceName, String serverFqdn, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listClusterAdminCredentials(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, serverFqdn, accept, context); - } - - /** - * Lists the admin credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list credential result response on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listClusterAdminCredentialsAsync(String resourceGroupName, - String resourceName) { - final String serverFqdn = null; - return listClusterAdminCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Lists the admin credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. - * @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 list credential result response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listClusterAdminCredentialsWithResponse(String resourceGroupName, - String resourceName, String serverFqdn, Context context) { - return listClusterAdminCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn, context) - .block(); - } - - /** - * Lists the admin credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list credential result response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CredentialResultsInner listClusterAdminCredentials(String resourceGroupName, String resourceName) { - final String serverFqdn = null; - return listClusterAdminCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, Context.NONE) - .getValue(); - } - - /** - * Lists the user credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. - * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return - * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary - * in the path. - * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listClusterUserCredentialsWithResponseAsync(String resourceGroupName, - String resourceName, String serverFqdn, Format format) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listClusterUserCredentials(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, serverFqdn, format, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists the user credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. - * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return - * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary - * in the path. - * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listClusterUserCredentialsWithResponseAsync(String resourceGroupName, - String resourceName, String serverFqdn, Format format, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listClusterUserCredentials(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, serverFqdn, format, accept, context); - } - - /** - * Lists the user credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list credential result response on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listClusterUserCredentialsAsync(String resourceGroupName, String resourceName) { - final String serverFqdn = null; - final Format format = null; - return listClusterUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn, format) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Lists the user credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. - * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return - * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary - * in the path. - * @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 list credential result response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listClusterUserCredentialsWithResponse(String resourceGroupName, - String resourceName, String serverFqdn, Format format, Context context) { - return listClusterUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn, format, context) - .block(); - } - - /** - * Lists the user credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list credential result response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CredentialResultsInner listClusterUserCredentials(String resourceGroupName, String resourceName) { - final String serverFqdn = null; - final Format format = null; - return listClusterUserCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, format, Context.NONE) - .getValue(); - } - - /** - * Lists the cluster monitoring user credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. - * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listClusterMonitoringUserCredentialsWithResponseAsync( - String resourceGroupName, String resourceName, String serverFqdn) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listClusterMonitoringUserCredentials(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, serverFqdn, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists the cluster monitoring user credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. - * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listClusterMonitoringUserCredentialsWithResponseAsync( - String resourceGroupName, String resourceName, String serverFqdn, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listClusterMonitoringUserCredentials(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, serverFqdn, accept, context); - } - - /** - * Lists the cluster monitoring user credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list credential result response on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listClusterMonitoringUserCredentialsAsync(String resourceGroupName, - String resourceName) { - final String serverFqdn = null; - return listClusterMonitoringUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Lists the cluster monitoring user credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. - * @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 list credential result response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listClusterMonitoringUserCredentialsWithResponse(String resourceGroupName, - String resourceName, String serverFqdn, Context context) { - return listClusterMonitoringUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn, - context).block(); - } - - /** - * Lists the cluster monitoring user credentials of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list credential result response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CredentialResultsInner listClusterMonitoringUserCredentials(String resourceGroupName, String resourceName) { - final String serverFqdn = null; - return listClusterMonitoringUserCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, - Context.NONE).getValue(); - } - - /** - * Gets a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context); - } - - /** - * Gets a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Gets a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterInner getByResourceGroup(String resourceGroupName, String resourceName) { - return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); - } - - /** - * Creates or updates a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @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 managed cluster along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, ManagedClusterInner parameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, ifNoneMatch, parameters, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @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 managed cluster along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, ManagedClusterInner parameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, ifMatch, ifNoneMatch, parameters, accept, context); - } - - /** - * Creates or updates a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ManagedClusterInner> beginCreateOrUpdateAsync( - String resourceGroupName, String resourceName, ManagedClusterInner parameters, String ifMatch, - String ifNoneMatch) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedClusterInner.class, ManagedClusterInner.class, this.client.getContext()); - } - - /** - * Creates or updates a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ManagedClusterInner> - beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, ManagedClusterInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedClusterInner.class, ManagedClusterInner.class, this.client.getContext()); - } - - /** - * Creates or updates a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedClusterInner> beginCreateOrUpdateAsync( - String resourceGroupName, String resourceName, ManagedClusterInner parameters, String ifMatch, - String ifNoneMatch, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, - parameters, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedClusterInner.class, ManagedClusterInner.class, context); - } - - /** - * Creates or updates a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedClusterInner> - beginCreateOrUpdate(String resourceGroupName, String resourceName, ManagedClusterInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch) - .getSyncPoller(); - } - - /** - * Creates or updates a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedClusterInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, ManagedClusterInner parameters, String ifMatch, - String ifNoneMatch, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch, context) - .getSyncPoller(); - } - - /** - * Creates or updates a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @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 managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - ManagedClusterInner parameters, String ifMatch, String ifNoneMatch) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @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 managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - ManagedClusterInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @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 managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - ManagedClusterInner parameters, String ifMatch, String ifNoneMatch, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @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 managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterInner createOrUpdate(String resourceGroupName, String resourceName, - ManagedClusterInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return createOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch).block(); - } - - /** - * Creates or updates a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @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 managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterInner createOrUpdate(String resourceGroupName, String resourceName, - ManagedClusterInner parameters, String ifMatch, String ifNoneMatch, Context context) { - return createOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch, context).block(); - } - - /** - * Updates tags on a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @param ifMatch The request should only proceed if an entity matches this string. - * @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 managed cluster along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateTagsWithResponseAsync(String resourceGroupName, String resourceName, - TagsObject parameters, String ifMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.updateTags(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates tags on a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @param ifMatch The request should only proceed if an entity matches this string. - * @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 managed cluster along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateTagsWithResponseAsync(String resourceGroupName, String resourceName, - TagsObject parameters, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateTags(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, ifMatch, parameters, accept, context); - } - - /** - * Updates tags on a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @param ifMatch The request should only proceed if an entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ManagedClusterInner> - beginUpdateTagsAsync(String resourceGroupName, String resourceName, TagsObject parameters, String ifMatch) { - Mono>> mono - = updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedClusterInner.class, ManagedClusterInner.class, this.client.getContext()); - } - - /** - * Updates tags on a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ManagedClusterInner> - beginUpdateTagsAsync(String resourceGroupName, String resourceName, TagsObject parameters) { - final String ifMatch = null; - Mono>> mono - = updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedClusterInner.class, ManagedClusterInner.class, this.client.getContext()); - } - - /** - * Updates tags on a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedClusterInner> beginUpdateTagsAsync( - String resourceGroupName, String resourceName, TagsObject parameters, String ifMatch, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, ifMatch, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedClusterInner.class, ManagedClusterInner.class, context); - } - - /** - * Updates tags on a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedClusterInner> beginUpdateTags(String resourceGroupName, - String resourceName, TagsObject parameters) { - final String ifMatch = null; - return this.beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch).getSyncPoller(); - } - - /** - * Updates tags on a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedClusterInner> beginUpdateTags(String resourceGroupName, - String resourceName, TagsObject parameters, String ifMatch, Context context) { - return this.beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch, context).getSyncPoller(); - } - - /** - * Updates tags on a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @param ifMatch The request should only proceed if an entity matches this string. - * @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 managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateTagsAsync(String resourceGroupName, String resourceName, - TagsObject parameters, String ifMatch) { - return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates tags on a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags 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 managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateTagsAsync(String resourceGroupName, String resourceName, - TagsObject parameters) { - final String ifMatch = null; - return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates tags on a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @param ifMatch The request should only proceed if an entity matches this string. - * @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 managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateTagsAsync(String resourceGroupName, String resourceName, - TagsObject parameters, String ifMatch, Context context) { - return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates tags on a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags 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 managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters) { - final String ifMatch = null; - return updateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch).block(); - } - - /** - * Updates tags on a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @param ifMatch The request should only proceed if an entity matches this string. - * @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 managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters, - String ifMatch, Context context) { - return updateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch, context).block(); - } - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param ifMatch The request should only proceed if an entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String ifMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, ifMatch, accept, context); - } - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param ifMatch The request should only proceed if an entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String ifMatch) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName) { - final String ifMatch = null; - Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String ifMatch, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName) { - final String ifMatch = null; - return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch).getSyncPoller(); - } - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, String ifMatch, - Context context) { - return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch, context).getSyncPoller(); - } - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param ifMatch The request should only proceed if an entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String resourceName, String ifMatch) { - return beginDeleteAsync(resourceGroupName, resourceName, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String resourceName) { - final String ifMatch = null; - return beginDeleteAsync(resourceGroupName, resourceName, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName, String ifMatch, Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, ifMatch, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName) { - final String ifMatch = null; - deleteAsync(resourceGroupName, resourceName, ifMatch).block(); - } - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param ifMatch The request should only proceed if an entity matches this string. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String ifMatch, Context context) { - deleteAsync(resourceGroupName, resourceName, ifMatch, context).block(); - } - - /** - * Reset the Service Principal Profile of a managed cluster. - * - * This action cannot be performed on a cluster that is not using a service principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> resetServicePrincipalProfileWithResponseAsync(String resourceGroupName, - String resourceName, ManagedClusterServicePrincipalProfile parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.resetServicePrincipalProfile(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Reset the Service Principal Profile of a managed cluster. - * - * This action cannot be performed on a cluster that is not using a service principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resetServicePrincipalProfileWithResponseAsync(String resourceGroupName, - String resourceName, ManagedClusterServicePrincipalProfile parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.resetServicePrincipalProfile(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context); - } - - /** - * Reset the Service Principal Profile of a managed cluster. - * - * This action cannot be performed on a cluster that is not using a service principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginResetServicePrincipalProfileAsync(String resourceGroupName, - String resourceName, ManagedClusterServicePrincipalProfile parameters) { - Mono>> mono - = resetServicePrincipalProfileWithResponseAsync(resourceGroupName, resourceName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Reset the Service Principal Profile of a managed cluster. - * - * This action cannot be performed on a cluster that is not using a service principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginResetServicePrincipalProfileAsync(String resourceGroupName, - String resourceName, ManagedClusterServicePrincipalProfile parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = resetServicePrincipalProfileWithResponseAsync(resourceGroupName, resourceName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Reset the Service Principal Profile of a managed cluster. - * - * This action cannot be performed on a cluster that is not using a service principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResetServicePrincipalProfile(String resourceGroupName, - String resourceName, ManagedClusterServicePrincipalProfile parameters) { - return this.beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); - } - - /** - * Reset the Service Principal Profile of a managed cluster. - * - * This action cannot be performed on a cluster that is not using a service principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResetServicePrincipalProfile(String resourceGroupName, - String resourceName, ManagedClusterServicePrincipalProfile parameters, Context context) { - return this.beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters, context) - .getSyncPoller(); - } - - /** - * Reset the Service Principal Profile of a managed cluster. - * - * This action cannot be performed on a cluster that is not using a service principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono resetServicePrincipalProfileAsync(String resourceGroupName, String resourceName, - ManagedClusterServicePrincipalProfile parameters) { - return beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Reset the Service Principal Profile of a managed cluster. - * - * This action cannot be performed on a cluster that is not using a service principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resetServicePrincipalProfileAsync(String resourceGroupName, String resourceName, - ManagedClusterServicePrincipalProfile parameters, Context context) { - return beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Reset the Service Principal Profile of a managed cluster. - * - * This action cannot be performed on a cluster that is not using a service principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void resetServicePrincipalProfile(String resourceGroupName, String resourceName, - ManagedClusterServicePrincipalProfile parameters) { - resetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters).block(); - } - - /** - * Reset the Service Principal Profile of a managed cluster. - * - * This action cannot be performed on a cluster that is not using a service principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void resetServicePrincipalProfile(String resourceGroupName, String resourceName, - ManagedClusterServicePrincipalProfile parameters, Context context) { - resetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters, context).block(); - } - - /** - * Reset the AAD Profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> resetAadProfileWithResponseAsync(String resourceGroupName, - String resourceName, ManagedClusterAadProfile parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.resetAadProfile(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Reset the AAD Profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resetAadProfileWithResponseAsync(String resourceGroupName, - String resourceName, ManagedClusterAadProfile parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.resetAadProfile(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, parameters, accept, context); - } - - /** - * Reset the AAD Profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginResetAadProfileAsync(String resourceGroupName, String resourceName, - ManagedClusterAadProfile parameters) { - Mono>> mono - = resetAadProfileWithResponseAsync(resourceGroupName, resourceName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Reset the AAD Profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginResetAadProfileAsync(String resourceGroupName, String resourceName, - ManagedClusterAadProfile parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = resetAadProfileWithResponseAsync(resourceGroupName, resourceName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Reset the AAD Profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResetAadProfile(String resourceGroupName, String resourceName, - ManagedClusterAadProfile parameters) { - return this.beginResetAadProfileAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); - } - - /** - * Reset the AAD Profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResetAadProfile(String resourceGroupName, String resourceName, - ManagedClusterAadProfile parameters, Context context) { - return this.beginResetAadProfileAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); - } - - /** - * Reset the AAD Profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono resetAadProfileAsync(String resourceGroupName, String resourceName, - ManagedClusterAadProfile parameters) { - return beginResetAadProfileAsync(resourceGroupName, resourceName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Reset the AAD Profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resetAadProfileAsync(String resourceGroupName, String resourceName, - ManagedClusterAadProfile parameters, Context context) { - return beginResetAadProfileAsync(resourceGroupName, resourceName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Reset the AAD Profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void resetAadProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters) { - resetAadProfileAsync(resourceGroupName, resourceName, parameters).block(); - } - - /** - * Reset the AAD Profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void resetAadProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, - Context context) { - resetAadProfileAsync(resourceGroupName, resourceName, parameters, context).block(); - } - - /** - * Rotates the certificates of a managed cluster. - * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.rotateClusterCertificates(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Rotates the certificates of a managed cluster. - * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.rotateClusterCertificates(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context); - } - - /** - * Rotates the certificates of a managed cluster. - * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, - String resourceName) { - Mono>> mono - = rotateClusterCertificatesWithResponseAsync(resourceGroupName, resourceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Rotates the certificates of a managed cluster. - * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, - String resourceName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = rotateClusterCertificatesWithResponseAsync(resourceGroupName, resourceName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Rotates the certificates of a managed cluster. - * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRotateClusterCertificates(String resourceGroupName, - String resourceName) { - return this.beginRotateClusterCertificatesAsync(resourceGroupName, resourceName).getSyncPoller(); - } - - /** - * Rotates the certificates of a managed cluster. - * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRotateClusterCertificates(String resourceGroupName, - String resourceName, Context context) { - return this.beginRotateClusterCertificatesAsync(resourceGroupName, resourceName, context).getSyncPoller(); - } - - /** - * Rotates the certificates of a managed cluster. - * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono rotateClusterCertificatesAsync(String resourceGroupName, String resourceName) { - return beginRotateClusterCertificatesAsync(resourceGroupName, resourceName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Rotates the certificates of a managed cluster. - * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono rotateClusterCertificatesAsync(String resourceGroupName, String resourceName, Context context) { - return beginRotateClusterCertificatesAsync(resourceGroupName, resourceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Rotates the certificates of a managed cluster. - * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void rotateClusterCertificates(String resourceGroupName, String resourceName) { - rotateClusterCertificatesAsync(resourceGroupName, resourceName).block(); - } - - /** - * Rotates the certificates of a managed cluster. - * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void rotateClusterCertificates(String resourceGroupName, String resourceName, Context context) { - rotateClusterCertificatesAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> abortLatestOperationWithResponseAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.abortLatestOperation(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> abortLatestOperationWithResponseAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.abortLatestOperation(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context); - } - - /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginAbortLatestOperationAsync(String resourceGroupName, - String resourceName) { - Mono>> mono = abortLatestOperationWithResponseAsync(resourceGroupName, resourceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginAbortLatestOperationAsync(String resourceGroupName, - String resourceName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = abortLatestOperationWithResponseAsync(resourceGroupName, resourceName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName) { - return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName).getSyncPoller(); - } - - /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, - Context context) { - return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName, context).getSyncPoller(); - } - - /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono abortLatestOperationAsync(String resourceGroupName, String resourceName) { - return beginAbortLatestOperationAsync(resourceGroupName, resourceName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono abortLatestOperationAsync(String resourceGroupName, String resourceName, Context context) { - return beginAbortLatestOperationAsync(resourceGroupName, resourceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void abortLatestOperation(String resourceGroupName, String resourceName) { - abortLatestOperationAsync(resourceGroupName, resourceName).block(); - } - - /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void abortLatestOperation(String resourceGroupName, String resourceName, Context context) { - abortLatestOperationAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Rotates the service account signing keys of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> rotateServiceAccountSigningKeysWithResponseAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.rotateServiceAccountSigningKeys(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Rotates the service account signing keys of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> rotateServiceAccountSigningKeysWithResponseAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.rotateServiceAccountSigningKeys(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); - } - - /** - * Rotates the service account signing keys of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginRotateServiceAccountSigningKeysAsync(String resourceGroupName, - String resourceName) { - Mono>> mono - = rotateServiceAccountSigningKeysWithResponseAsync(resourceGroupName, resourceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Rotates the service account signing keys of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRotateServiceAccountSigningKeysAsync(String resourceGroupName, - String resourceName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = rotateServiceAccountSigningKeysWithResponseAsync(resourceGroupName, resourceName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Rotates the service account signing keys of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRotateServiceAccountSigningKeys(String resourceGroupName, - String resourceName) { - return this.beginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName).getSyncPoller(); - } - - /** - * Rotates the service account signing keys of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRotateServiceAccountSigningKeys(String resourceGroupName, - String resourceName, Context context) { - return this.beginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName, context).getSyncPoller(); - } - - /** - * Rotates the service account signing keys of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono rotateServiceAccountSigningKeysAsync(String resourceGroupName, String resourceName) { - return beginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Rotates the service account signing keys of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono rotateServiceAccountSigningKeysAsync(String resourceGroupName, String resourceName, - Context context) { - return beginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Rotates the service account signing keys of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName) { - rotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName).block(); - } - - /** - * Rotates the service account signing keys of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName, Context context) { - rotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> stopWithResponseAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.stop(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync(String resourceGroupName, String resourceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.stop(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, accept, context); - } - - /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginStopAsync(String resourceGroupName, String resourceName) { - Mono>> mono = stopWithResponseAsync(resourceGroupName, resourceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStopAsync(String resourceGroupName, String resourceName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = stopWithResponseAsync(resourceGroupName, resourceName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStop(String resourceGroupName, String resourceName) { - return this.beginStopAsync(resourceGroupName, resourceName).getSyncPoller(); - } - - /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStop(String resourceGroupName, String resourceName, - Context context) { - return this.beginStopAsync(resourceGroupName, resourceName, context).getSyncPoller(); - } - - /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono stopAsync(String resourceGroupName, String resourceName) { - return beginStopAsync(resourceGroupName, resourceName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync(String resourceGroupName, String resourceName, Context context) { - return beginStopAsync(resourceGroupName, resourceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void stop(String resourceGroupName, String resourceName) { - stopAsync(resourceGroupName, resourceName).block(); - } - - /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void stop(String resourceGroupName, String resourceName, Context context) { - stopAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Starts a previously stopped Managed Cluster - * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> startWithResponseAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.start(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Starts a previously stopped Managed Cluster - * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync(String resourceGroupName, String resourceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.start(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, accept, context); - } - - /** - * Starts a previously stopped Managed Cluster - * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginStartAsync(String resourceGroupName, String resourceName) { - Mono>> mono = startWithResponseAsync(resourceGroupName, resourceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Starts a previously stopped Managed Cluster - * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStartAsync(String resourceGroupName, String resourceName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = startWithResponseAsync(resourceGroupName, resourceName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Starts a previously stopped Managed Cluster - * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStart(String resourceGroupName, String resourceName) { - return this.beginStartAsync(resourceGroupName, resourceName).getSyncPoller(); - } - - /** - * Starts a previously stopped Managed Cluster - * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStart(String resourceGroupName, String resourceName, - Context context) { - return this.beginStartAsync(resourceGroupName, resourceName, context).getSyncPoller(); - } - - /** - * Starts a previously stopped Managed Cluster - * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono startAsync(String resourceGroupName, String resourceName) { - return beginStartAsync(resourceGroupName, resourceName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Starts a previously stopped Managed Cluster - * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceGroupName, String resourceName, Context context) { - return beginStartAsync(resourceGroupName, resourceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Starts a previously stopped Managed Cluster - * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void start(String resourceGroupName, String resourceName) { - startAsync(resourceGroupName, resourceName).block(); - } - - /** - * Starts a previously stopped Managed Cluster - * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void start(String resourceGroupName, String resourceName, Context context) { - startAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Submits a command to run against the Managed Cluster. - * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return run command result along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> runCommandWithResponseAsync(String resourceGroupName, String resourceName, - RunCommandRequest requestPayload) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (requestPayload == null) { - return Mono.error(new IllegalArgumentException("Parameter requestPayload is required and cannot be null.")); - } else { - requestPayload.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.runCommand(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, requestPayload, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Submits a command to run against the Managed Cluster. - * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return run command result along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> runCommandWithResponseAsync(String resourceGroupName, String resourceName, - RunCommandRequest requestPayload, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (requestPayload == null) { - return Mono.error(new IllegalArgumentException("Parameter requestPayload is required and cannot be null.")); - } else { - requestPayload.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.runCommand(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, requestPayload, accept, context); - } - - /** - * Submits a command to run against the Managed Cluster. - * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of run command result. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, RunCommandResultInner> - beginRunCommandAsync(String resourceGroupName, String resourceName, RunCommandRequest requestPayload) { - Mono>> mono - = runCommandWithResponseAsync(resourceGroupName, resourceName, requestPayload); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), RunCommandResultInner.class, RunCommandResultInner.class, - this.client.getContext()); - } - - /** - * Submits a command to run against the Managed Cluster. - * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of run command result. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RunCommandResultInner> beginRunCommandAsync( - String resourceGroupName, String resourceName, RunCommandRequest requestPayload, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = runCommandWithResponseAsync(resourceGroupName, resourceName, requestPayload, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), RunCommandResultInner.class, RunCommandResultInner.class, context); - } - - /** - * Submits a command to run against the Managed Cluster. - * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of run command result. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RunCommandResultInner> - beginRunCommand(String resourceGroupName, String resourceName, RunCommandRequest requestPayload) { - return this.beginRunCommandAsync(resourceGroupName, resourceName, requestPayload).getSyncPoller(); - } - - /** - * Submits a command to run against the Managed Cluster. - * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of run command result. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RunCommandResultInner> beginRunCommand( - String resourceGroupName, String resourceName, RunCommandRequest requestPayload, Context context) { - return this.beginRunCommandAsync(resourceGroupName, resourceName, requestPayload, context).getSyncPoller(); - } - - /** - * Submits a command to run against the Managed Cluster. - * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return run command result on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono runCommandAsync(String resourceGroupName, String resourceName, - RunCommandRequest requestPayload) { - return beginRunCommandAsync(resourceGroupName, resourceName, requestPayload).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Submits a command to run against the Managed Cluster. - * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return run command result on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono runCommandAsync(String resourceGroupName, String resourceName, - RunCommandRequest requestPayload, Context context) { - return beginRunCommandAsync(resourceGroupName, resourceName, requestPayload, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Submits a command to run against the Managed Cluster. - * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return run command result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RunCommandResultInner runCommand(String resourceGroupName, String resourceName, - RunCommandRequest requestPayload) { - return runCommandAsync(resourceGroupName, resourceName, requestPayload).block(); - } - - /** - * Submits a command to run against the Managed Cluster. - * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return run command result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RunCommandResultInner runCommand(String resourceGroupName, String resourceName, - RunCommandRequest requestPayload, Context context) { - return runCommandAsync(resourceGroupName, resourceName, requestPayload, context).block(); - } - - /** - * Gets the results of a command which has been run on the Managed Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param commandId Id of the command. - * @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 results of a command which has been run on the Managed Cluster on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getCommandResultWithResponseAsync(String resourceGroupName, - String resourceName, String commandId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (commandId == null) { - return Mono.error(new IllegalArgumentException("Parameter commandId is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getCommandResult(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, commandId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the results of a command which has been run on the Managed Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param commandId Id of the command. - * @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 results of a command which has been run on the Managed Cluster on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getCommandResultWithResponseAsync(String resourceGroupName, - String resourceName, String commandId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (commandId == null) { - return Mono.error(new IllegalArgumentException("Parameter commandId is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getCommandResult(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, commandId, accept, context); - } - - /** - * Gets the results of a command which has been run on the Managed Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param commandId Id of the command. - * @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 results of a command which has been run on the Managed Cluster on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getCommandResultAsync(String resourceGroupName, String resourceName, - String commandId) { - return getCommandResultWithResponseAsync(resourceGroupName, resourceName, commandId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the results of a command which has been run on the Managed Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param commandId Id of the command. - * @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 results of a command which has been run on the Managed Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClustersGetCommandResultResponse getCommandResultWithResponse(String resourceGroupName, - String resourceName, String commandId, Context context) { - return getCommandResultWithResponseAsync(resourceGroupName, resourceName, commandId, context).block(); - } - - /** - * Gets the results of a command which has been run on the Managed Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param commandId Id of the command. - * @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 results of a command which has been run on the Managed Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RunCommandResultInner getCommandResult(String resourceGroupName, String resourceName, String commandId) { - return getCommandResultWithResponse(resourceGroupName, resourceName, commandId, Context.NONE).getValue(); - } - - /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. - * - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. The operation returns properties of each egress endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listOutboundNetworkDependenciesEndpointsSinglePageAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), - apiVersion, this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. - * - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. The operation returns properties of each egress endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listOutboundNetworkDependenciesEndpointsSinglePageAsync(String resourceGroupName, String resourceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. - * - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. The operation returns properties of each egress endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux - listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>( - () -> listOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, resourceName), - nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. - * - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. The operation returns properties of each egress endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux - listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, String resourceName, Context context) { - return new PagedFlux<>( - () -> listOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, resourceName, context), - nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. - * - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. The operation returns properties of each egress endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable - listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String resourceName) { - return new PagedIterable<>(listOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, resourceName)); - } - - /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. - * - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. The operation returns properties of each egress endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable - listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String resourceName, Context context) { - return new PagedIterable<>( - listOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, resourceName, context)); - } - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @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 holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMeshRevisionProfilesSinglePageAsync(String location) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listMeshRevisionProfiles(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), location, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @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 holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMeshRevisionProfilesSinglePageAsync(String location, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listMeshRevisionProfiles(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), location, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listMeshRevisionProfilesAsync(String location) { - return new PagedFlux<>(() -> listMeshRevisionProfilesSinglePageAsync(location), - nextLink -> listMeshRevisionProfilesNextSinglePageAsync(nextLink)); - } - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listMeshRevisionProfilesAsync(String location, Context context) { - return new PagedFlux<>(() -> listMeshRevisionProfilesSinglePageAsync(location, context), - nextLink -> listMeshRevisionProfilesNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMeshRevisionProfiles(String location) { - return new PagedIterable<>(listMeshRevisionProfilesAsync(location)); - } - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMeshRevisionProfiles(String location, Context context) { - return new PagedIterable<>(listMeshRevisionProfilesAsync(location, context)); - } - - /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. - * @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 mesh revision profile for a mesh along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getMeshRevisionProfileWithResponseAsync(String location, - String mode) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (mode == null) { - return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getMeshRevisionProfile(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), location, mode, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. - * @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 mesh revision profile for a mesh along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getMeshRevisionProfileWithResponseAsync(String location, - String mode, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (mode == null) { - return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getMeshRevisionProfile(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - location, mode, accept, context); - } - - /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. - * @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 mesh revision profile for a mesh on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getMeshRevisionProfileAsync(String location, String mode) { - return getMeshRevisionProfileWithResponseAsync(location, mode).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. - * @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 mesh revision profile for a mesh along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getMeshRevisionProfileWithResponse(String location, String mode, - Context context) { - return getMeshRevisionProfileWithResponseAsync(location, mode, context).block(); - } - - /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. - * @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 mesh revision profile for a mesh. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MeshRevisionProfileInner getMeshRevisionProfile(String location, String mode) { - return getMeshRevisionProfileWithResponse(location, mode, Context.NONE).getValue(); - } - - /** - * Lists available upgrades for all service meshes in a specific cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listMeshUpgradeProfilesSinglePageAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listMeshUpgradeProfiles(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists available upgrades for all service meshes in a specific cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listMeshUpgradeProfilesSinglePageAsync(String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listMeshUpgradeProfiles(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists available upgrades for all service meshes in a specific cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listMeshUpgradeProfilesAsync(String resourceGroupName, - String resourceName) { - return new PagedFlux<>(() -> listMeshUpgradeProfilesSinglePageAsync(resourceGroupName, resourceName), - nextLink -> listMeshUpgradeProfilesNextSinglePageAsync(nextLink)); - } - - /** - * Lists available upgrades for all service meshes in a specific cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listMeshUpgradeProfilesAsync(String resourceGroupName, - String resourceName, Context context) { - return new PagedFlux<>(() -> listMeshUpgradeProfilesSinglePageAsync(resourceGroupName, resourceName, context), - nextLink -> listMeshUpgradeProfilesNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists available upgrades for all service meshes in a specific cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMeshUpgradeProfiles(String resourceGroupName, - String resourceName) { - return new PagedIterable<>(listMeshUpgradeProfilesAsync(resourceGroupName, resourceName)); - } - - /** - * Lists available upgrades for all service meshes in a specific cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMeshUpgradeProfiles(String resourceGroupName, String resourceName, - Context context) { - return new PagedIterable<>(listMeshUpgradeProfilesAsync(resourceGroupName, resourceName, context)); - } - - /** - * Gets available upgrades for a service mesh in a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. - * @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 available upgrades for a service mesh in a cluster along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getMeshUpgradeProfileWithResponseAsync(String resourceGroupName, - String resourceName, String mode) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (mode == null) { - return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getMeshUpgradeProfile(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, mode, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets available upgrades for a service mesh in a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. - * @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 available upgrades for a service mesh in a cluster along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getMeshUpgradeProfileWithResponseAsync(String resourceGroupName, - String resourceName, String mode, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (mode == null) { - return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getMeshUpgradeProfile(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, mode, accept, context); - } - - /** - * Gets available upgrades for a service mesh in a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. - * @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 available upgrades for a service mesh in a cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getMeshUpgradeProfileAsync(String resourceGroupName, String resourceName, - String mode) { - return getMeshUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, mode) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets available upgrades for a service mesh in a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. - * @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 available upgrades for a service mesh in a cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getMeshUpgradeProfileWithResponse(String resourceGroupName, - String resourceName, String mode, Context context) { - return getMeshUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, mode, context).block(); - } - - /** - * Gets available upgrades for a service mesh in a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. - * @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 available upgrades for a service mesh in a cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MeshUpgradeProfileInner getMeshUpgradeProfile(String resourceGroupName, String resourceName, String mode) { - return getMeshUpgradeProfileWithResponse(resourceGroupName, resourceName, mode, Context.NONE).getValue(); - } - - /** - * Gets a list of managed clusters in the specified subscription. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed clusters in the specified subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of managed clusters in the specified subscription. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed clusters in the specified subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists managed clusters in the specified subscription and resource group. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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 the List Managed Clusters operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists managed clusters in the specified subscription and resource group. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 the List Managed Clusters operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listOutboundNetworkDependenciesEndpointsNext(nextLink, - this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listOutboundNetworkDependenciesEndpointsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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 holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMeshRevisionProfilesNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listMeshRevisionProfilesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMeshRevisionProfilesNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listMeshRevisionProfilesNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists available upgrades for all service meshes in a specific cluster. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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 holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMeshUpgradeProfilesNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listMeshUpgradeProfilesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists available upgrades for all service meshes in a specific cluster. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMeshUpgradeProfilesNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listMeshUpgradeProfilesNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java deleted file mode 100644 index 29edf395b2ab..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java +++ /dev/null @@ -1,1274 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.fluent.ManagedNamespacesClient; -import com.azure.resourcemanager.containerservice.fluent.models.CredentialResultsInner; -import com.azure.resourcemanager.containerservice.fluent.models.ManagedNamespaceInner; -import com.azure.resourcemanager.containerservice.models.ManagedNamespaceListResult; -import com.azure.resourcemanager.containerservice.models.TagsObject; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ManagedNamespacesClient. - */ -public final class ManagedNamespacesClientImpl implements ManagedNamespacesClient { - /** - * The proxy service used to perform REST calls. - */ - private final ManagedNamespacesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerServiceManagementClientImpl client; - - /** - * Initializes an instance of ManagedNamespacesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedNamespacesClientImpl(ContainerServiceManagementClientImpl client) { - this.service - = RestProxy.create(ManagedNamespacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerServiceManagementClientManagedNamespaces to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerServiceManagementClientManagedNamespaces") - public interface ManagedNamespacesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByManagedCluster(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("managedNamespaceName") String managedNamespaceName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("managedNamespaceName") String managedNamespaceName, - @BodyParam("application/json") ManagedNamespaceInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("managedNamespaceName") String managedNamespaceName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("managedNamespaceName") String managedNamespaceName, - @BodyParam("application/json") TagsObject parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}/listCredential") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listCredential(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("managedNamespaceName") String managedNamespaceName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByManagedClusterNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of managed namespaces in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed namespaces in the specified managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of managed namespaces in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed namespaces in the specified managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByManagedCluster(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of managed namespaces in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed namespaces in the specified managed cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), - nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of managed namespaces in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed namespaces in the specified managed cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName, - Context context) { - return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), - nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of managed namespaces in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed namespaces in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName) { - return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); - } - - /** - * Gets a list of managed namespaces in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed namespaces in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, - Context context) { - return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); - } - - /** - * Gets the specified namespace of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @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 specified namespace of a managed cluster along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String resourceName, - String managedNamespaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (managedNamespaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, managedNamespaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the specified namespace of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @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 specified namespace of a managed cluster along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, - String managedNamespaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (managedNamespaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, managedNamespaceName, accept, context); - } - - /** - * Gets the specified namespace of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @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 specified namespace of a managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String resourceName, - String managedNamespaceName) { - return getWithResponseAsync(resourceGroupName, resourceName, managedNamespaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the specified namespace of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @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 specified namespace of a managed cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String resourceName, - String managedNamespaceName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, managedNamespaceName, context).block(); - } - - /** - * Gets the specified namespace of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @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 specified namespace of a managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedNamespaceInner get(String resourceGroupName, String resourceName, String managedNamespaceName) { - return getWithResponse(resourceGroupName, resourceName, managedNamespaceName, Context.NONE).getValue(); - } - - /** - * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like - * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters The namespace to create or update. - * @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 namespace managed by ARM along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, String managedNamespaceName, ManagedNamespaceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (managedNamespaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, managedNamespaceName, parameters, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like - * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters The namespace to create or update. - * @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 namespace managed by ARM along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, String managedNamespaceName, ManagedNamespaceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (managedNamespaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, managedNamespaceName, parameters, accept, context); - } - - /** - * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like - * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters The namespace to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of namespace managed by ARM. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ManagedNamespaceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String resourceName, String managedNamespaceName, ManagedNamespaceInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, managedNamespaceName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedNamespaceInner.class, ManagedNamespaceInner.class, - this.client.getContext()); - } - - /** - * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like - * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters The namespace to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of namespace managed by ARM. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedNamespaceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String resourceName, String managedNamespaceName, ManagedNamespaceInner parameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, - managedNamespaceName, parameters, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedNamespaceInner.class, ManagedNamespaceInner.class, context); - } - - /** - * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like - * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters The namespace to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of namespace managed by ARM. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedNamespaceInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, String managedNamespaceName, ManagedNamespaceInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, managedNamespaceName, parameters) - .getSyncPoller(); - } - - /** - * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like - * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters The namespace to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of namespace managed by ARM. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedNamespaceInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, String managedNamespaceName, ManagedNamespaceInner parameters, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, managedNamespaceName, parameters, context) - .getSyncPoller(); - } - - /** - * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like - * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters The namespace to create or update. - * @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 namespace managed by ARM on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - String managedNamespaceName, ManagedNamespaceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, managedNamespaceName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like - * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters The namespace to create or update. - * @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 namespace managed by ARM on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - String managedNamespaceName, ManagedNamespaceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, managedNamespaceName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like - * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters The namespace to create or update. - * @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 namespace managed by ARM. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedNamespaceInner createOrUpdate(String resourceGroupName, String resourceName, - String managedNamespaceName, ManagedNamespaceInner parameters) { - return createOrUpdateAsync(resourceGroupName, resourceName, managedNamespaceName, parameters).block(); - } - - /** - * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like - * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters The namespace to create or update. - * @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 namespace managed by ARM. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedNamespaceInner createOrUpdate(String resourceGroupName, String resourceName, - String managedNamespaceName, ManagedNamespaceInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, resourceName, managedNamespaceName, parameters, context).block(); - } - - /** - * Deletes a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String managedNamespaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (managedNamespaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, managedNamespaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String managedNamespaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (managedNamespaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, managedNamespaceName, accept, context); - } - - /** - * Deletes a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String managedNamespaceName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, resourceName, managedNamespaceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String managedNamespaceName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, resourceName, managedNamespaceName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, - String managedNamespaceName) { - return this.beginDeleteAsync(resourceGroupName, resourceName, managedNamespaceName).getSyncPoller(); - } - - /** - * Deletes a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, - String managedNamespaceName, Context context) { - return this.beginDeleteAsync(resourceGroupName, resourceName, managedNamespaceName, context).getSyncPoller(); - } - - /** - * Deletes a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String resourceName, String managedNamespaceName) { - return beginDeleteAsync(resourceGroupName, resourceName, managedNamespaceName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName, String managedNamespaceName, - Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, managedNamespaceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String managedNamespaceName) { - deleteAsync(resourceGroupName, resourceName, managedNamespaceName).block(); - } - - /** - * Deletes a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String managedNamespaceName, Context context) { - deleteAsync(resourceGroupName, resourceName, managedNamespaceName, context).block(); - } - - /** - * Updates tags on a managed namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters Parameters supplied to the patch namespace operation, we only support patch tags for now. - * @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 namespace managed by ARM along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync(String resourceGroupName, String resourceName, - String managedNamespaceName, TagsObject parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (managedNamespaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, managedNamespaceName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates tags on a managed namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters Parameters supplied to the patch namespace operation, we only support patch tags for now. - * @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 namespace managed by ARM along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String resourceName, - String managedNamespaceName, TagsObject parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (managedNamespaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, managedNamespaceName, parameters, accept, context); - } - - /** - * Updates tags on a managed namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters Parameters supplied to the patch namespace operation, we only support patch tags for now. - * @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 namespace managed by ARM on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String resourceName, - String managedNamespaceName, TagsObject parameters) { - return updateWithResponseAsync(resourceGroupName, resourceName, managedNamespaceName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Updates tags on a managed namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters Parameters supplied to the patch namespace operation, we only support patch tags for now. - * @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 namespace managed by ARM along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String resourceName, - String managedNamespaceName, TagsObject parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, managedNamespaceName, parameters, context) - .block(); - } - - /** - * Updates tags on a managed namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @param parameters Parameters supplied to the patch namespace operation, we only support patch tags for now. - * @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 namespace managed by ARM. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedNamespaceInner update(String resourceGroupName, String resourceName, String managedNamespaceName, - TagsObject parameters) { - return updateWithResponse(resourceGroupName, resourceName, managedNamespaceName, parameters, Context.NONE) - .getValue(); - } - - /** - * Lists the credentials of a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listCredentialWithResponseAsync(String resourceGroupName, - String resourceName, String managedNamespaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (managedNamespaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listCredential(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, managedNamespaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists the credentials of a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listCredentialWithResponseAsync(String resourceGroupName, - String resourceName, String managedNamespaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (managedNamespaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listCredential(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, managedNamespaceName, accept, context); - } - - /** - * Lists the credentials of a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @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 list credential result response on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listCredentialAsync(String resourceGroupName, String resourceName, - String managedNamespaceName) { - return listCredentialWithResponseAsync(resourceGroupName, resourceName, managedNamespaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Lists the credentials of a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @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 list credential result response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listCredentialWithResponse(String resourceGroupName, String resourceName, - String managedNamespaceName, Context context) { - return listCredentialWithResponseAsync(resourceGroupName, resourceName, managedNamespaceName, context).block(); - } - - /** - * Lists the credentials of a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param managedNamespaceName The name of the managed namespace. - * @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 list credential result response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CredentialResultsInner listCredential(String resourceGroupName, String resourceName, - String managedNamespaceName) { - return listCredentialWithResponse(resourceGroupName, resourceName, managedNamespaceName, Context.NONE) - .getValue(); - } - - /** - * Gets a list of managed namespaces in the specified managed cluster. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed namespaces in the specified managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedClusterNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of managed namespaces in the specified managed cluster. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed namespaces in the specified managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedClusterNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java deleted file mode 100644 index 263920fbe400..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.containerservice.fluent.OperationsClient; -import com.azure.resourcemanager.containerservice.fluent.models.OperationValueInner; -import com.azure.resourcemanager.containerservice.models.OperationListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public final class OperationsClientImpl implements OperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final OperationsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerServiceManagementClientImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(ContainerServiceManagementClientImpl client) { - this.service - = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerServiceManagementClientOperations to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerServiceManagementClientOperations") - public interface OperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.ContainerService/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of operations along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of operations along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); - } - - /** - * Gets a list of operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of operations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync()); - } - - /** - * Gets a list of operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of operations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context)); - } - - /** - * Gets a list of operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of operations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Gets a list of operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of operations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java deleted file mode 100644 index d5a5145c61c0..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java +++ /dev/null @@ -1,768 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.fluent.PrivateEndpointConnectionsClient; -import com.azure.resourcemanager.containerservice.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.containerservice.fluent.models.PrivateEndpointConnectionListResultInner; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. - */ -public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final PrivateEndpointConnectionsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerServiceManagementClientImpl client; - - /** - * Initializes an instance of PrivateEndpointConnectionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PrivateEndpointConnectionsClientImpl(ContainerServiceManagementClientImpl client) { - this.service = RestProxy.create(PrivateEndpointConnectionsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerServiceManagementClientPrivateEndpointConnections to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerServiceManagementClientPrivateEndpointConnections") - public interface PrivateEndpointConnectionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @BodyParam("application/json") PrivateEndpointConnectionInner parameters, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of private endpoint connections in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listWithResponseAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of private endpoint connections in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, accept, context); - } - - /** - * Gets a list of private endpoint connections in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listAsync(String resourceGroupName, String resourceName) { - return listWithResponseAsync(resourceGroupName, resourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a list of private endpoint connections in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(String resourceGroupName, - String resourceName, Context context) { - return listWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Gets a list of private endpoint connections in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionListResultInner list(String resourceGroupName, String resourceName) { - return listWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); - } - - /** - * Gets the specified private endpoint connection. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String resourceName, String privateEndpointConnectionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, privateEndpointConnectionName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the specified private endpoint connection. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String resourceName, String privateEndpointConnectionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, privateEndpointConnectionName, accept, context); - } - - /** - * Gets the specified private endpoint connection. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String resourceName, - String privateEndpointConnectionName) { - return getWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the specified private endpoint connection. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String resourceName, - String privateEndpointConnectionName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context).block(); - } - - /** - * Gets the specified private endpoint connection. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner get(String resourceGroupName, String resourceName, - String privateEndpointConnectionName) { - return getWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, Context.NONE).getValue(); - } - - /** - * Updates a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The updated private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync(String resourceGroupName, - String resourceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, privateEndpointConnectionName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The updated private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, - String resourceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, privateEndpointConnectionName, parameters, accept, context); - } - - /** - * Updates a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The updated private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String resourceName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - return updateWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Updates a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The updated private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String resourceName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, parameters, - context).block(); - } - - /** - * Updates a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The updated private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner update(String resourceGroupName, String resourceName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - return updateWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, parameters, - Context.NONE).getValue(); - } - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String privateEndpointConnectionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, privateEndpointConnectionName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String privateEndpointConnectionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, privateEndpointConnectionName, accept, context); - } - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String privateEndpointConnectionName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String privateEndpointConnectionName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, - String privateEndpointConnectionName) { - return this.beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName).getSyncPoller(); - } - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, - String privateEndpointConnectionName, Context context) { - return this.beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context) - .getSyncPoller(); - } - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName) { - return beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName, - Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName) { - deleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName).block(); - } - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName, - Context context) { - deleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context).block(); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java deleted file mode 100644 index eba8732b418b..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.containerservice.fluent.PrivateLinkResourcesClient; -import com.azure.resourcemanager.containerservice.fluent.models.PrivateLinkResourcesListResultInner; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. - */ -public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient { - /** - * The proxy service used to perform REST calls. - */ - private final PrivateLinkResourcesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerServiceManagementClientImpl client; - - /** - * Initializes an instance of PrivateLinkResourcesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PrivateLinkResourcesClientImpl(ContainerServiceManagementClientImpl client) { - this.service = RestProxy.create(PrivateLinkResourcesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerServiceManagementClientPrivateLinkResources to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerServiceManagementClientPrivateLinkResources") - public interface PrivateLinkResourcesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of private link resources in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listWithResponseAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of private link resources in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, accept, context); - } - - /** - * Gets a list of private link resources in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listAsync(String resourceGroupName, String resourceName) { - return listWithResponseAsync(resourceGroupName, resourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a list of private link resources in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(String resourceGroupName, String resourceName, - Context context) { - return listWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Gets a list of private link resources in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourcesListResultInner list(String resourceGroupName, String resourceName) { - return listWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java deleted file mode 100644 index d6b0cdc04983..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.containerservice.fluent.ResolvePrivateLinkServiceIdsClient; -import com.azure.resourcemanager.containerservice.fluent.models.PrivateLinkResourceInner; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ResolvePrivateLinkServiceIdsClient. - */ -public final class ResolvePrivateLinkServiceIdsClientImpl implements ResolvePrivateLinkServiceIdsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ResolvePrivateLinkServiceIdsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerServiceManagementClientImpl client; - - /** - * Initializes an instance of ResolvePrivateLinkServiceIdsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ResolvePrivateLinkServiceIdsClientImpl(ContainerServiceManagementClientImpl client) { - this.service = RestProxy.create(ResolvePrivateLinkServiceIdsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerServiceManagementClientResolvePrivateLinkServiceIds to be - * used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerServiceManagementClientResolvePrivateLinkServiceIds") - public interface ResolvePrivateLinkServiceIdsService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> post(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @BodyParam("application/json") PrivateLinkResourceInner parameters, @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets the private link service ID for the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters required in order to resolve a private link service ID. - * @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 private link service ID for the specified managed cluster along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> postWithResponseAsync(String resourceGroupName, String resourceName, - PrivateLinkResourceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.post(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the private link service ID for the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters required in order to resolve a private link service ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link service ID for the specified managed cluster along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> postWithResponseAsync(String resourceGroupName, - String resourceName, PrivateLinkResourceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.post(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, parameters, accept, context); - } - - /** - * Gets the private link service ID for the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters required in order to resolve a private link service ID. - * @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 private link service ID for the specified managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono postAsync(String resourceGroupName, String resourceName, - PrivateLinkResourceInner parameters) { - return postWithResponseAsync(resourceGroupName, resourceName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the private link service ID for the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters required in order to resolve a private link service ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link service ID for the specified managed cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response postWithResponse(String resourceGroupName, String resourceName, - PrivateLinkResourceInner parameters, Context context) { - return postWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); - } - - /** - * Gets the private link service ID for the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters required in order to resolve a private link service ID. - * @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 private link service ID for the specified managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourceInner post(String resourceGroupName, String resourceName, - PrivateLinkResourceInner parameters) { - return postWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java deleted file mode 100644 index b9a0da4dc241..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java +++ /dev/null @@ -1,1007 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.containerservice.fluent.SnapshotsClient; -import com.azure.resourcemanager.containerservice.fluent.models.SnapshotInner; -import com.azure.resourcemanager.containerservice.models.SnapshotListResult; -import com.azure.resourcemanager.containerservice.models.TagsObject; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in SnapshotsClient. - */ -public final class SnapshotsClientImpl implements InnerSupportsGet, InnerSupportsListing, - InnerSupportsDelete, SnapshotsClient { - /** - * The proxy service used to perform REST calls. - */ - private final SnapshotsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerServiceManagementClientImpl client; - - /** - * Initializes an instance of SnapshotsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SnapshotsClientImpl(ContainerServiceManagementClientImpl client) { - this.service - = RestProxy.create(SnapshotsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerServiceManagementClientSnapshots to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerServiceManagementClientSnapshots") - public interface SnapshotsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @BodyParam("application/json") SnapshotInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateTags(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @BodyParam("application/json") TagsObject parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of snapshots in the specified subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of snapshots in the specified subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of snapshots in the specified subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of snapshots in the specified subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of snapshots in the specified subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of snapshots in the specified subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of snapshots in the specified subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of snapshots in the specified subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of snapshots in the specified subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of snapshots in the specified subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Gets a list of snapshots in the specified subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of snapshots in the specified subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Lists snapshots in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Snapshots operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists snapshots in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 the List Snapshots operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists snapshots in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Snapshots operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists snapshots in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 the List Snapshots operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists snapshots in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Snapshots operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Lists snapshots in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 the List Snapshots operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Gets a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a snapshot along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a snapshot along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context); - } - - /** - * Gets a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a snapshot on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a snapshot along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Gets a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a snapshot. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SnapshotInner getByResourceGroup(String resourceGroupName, String resourceName) { - return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); - } - - /** - * Creates or updates a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The snapshot to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, - SnapshotInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The snapshot to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, - SnapshotInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, parameters, accept, context); - } - - /** - * Creates or updates a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The snapshot to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - SnapshotInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The snapshot to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, - SnapshotInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); - } - - /** - * Creates or updates a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The snapshot to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SnapshotInner createOrUpdate(String resourceGroupName, String resourceName, SnapshotInner parameters) { - return createOrUpdateWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); - } - - /** - * Updates tags on a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update snapshot Tags operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateTagsWithResponseAsync(String resourceGroupName, String resourceName, - TagsObject parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.updateTags(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates tags on a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update snapshot Tags operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateTagsWithResponseAsync(String resourceGroupName, String resourceName, - TagsObject parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateTags(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, parameters, accept, context); - } - - /** - * Updates tags on a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update snapshot Tags operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateTagsAsync(String resourceGroupName, String resourceName, TagsObject parameters) { - return updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Updates tags on a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update snapshot Tags operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateTagsWithResponse(String resourceGroupName, String resourceName, - TagsObject parameters, Context context) { - return updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); - } - - /** - * Updates tags on a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update snapshot Tags operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SnapshotInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters) { - return updateTagsWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); - } - - /** - * Deletes a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, accept, context); - } - - /** - * Deletes a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String resourceName) { - return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Deletes a snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName) { - deleteWithResponse(resourceGroupName, resourceName, Context.NONE); - } - - /** - * Gets a list of snapshots in the specified subscription. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of snapshots in the specified subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of snapshots in the specified subscription. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of snapshots in the specified subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists snapshots in the specified subscription and resource group. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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 the List Snapshots operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists snapshots in the specified subscription and resource group. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 the List Snapshots operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java deleted file mode 100644 index f572b456aa31..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java +++ /dev/null @@ -1,960 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.fluent.TrustedAccessRoleBindingsClient; -import com.azure.resourcemanager.containerservice.fluent.models.TrustedAccessRoleBindingInner; -import com.azure.resourcemanager.containerservice.models.TrustedAccessRoleBindingListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in TrustedAccessRoleBindingsClient. - */ -public final class TrustedAccessRoleBindingsClientImpl implements TrustedAccessRoleBindingsClient { - /** - * The proxy service used to perform REST calls. - */ - private final TrustedAccessRoleBindingsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerServiceManagementClientImpl client; - - /** - * Initializes an instance of TrustedAccessRoleBindingsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - TrustedAccessRoleBindingsClientImpl(ContainerServiceManagementClientImpl client) { - this.service = RestProxy.create(TrustedAccessRoleBindingsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerServiceManagementClientTrustedAccessRoleBindings to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerServiceManagementClientTrustedAccessRoleBindings") - public interface TrustedAccessRoleBindingsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("trustedAccessRoleBindingName") String trustedAccessRoleBindingName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("trustedAccessRoleBindingName") String trustedAccessRoleBindingName, - @BodyParam("application/json") TrustedAccessRoleBindingInner trustedAccessRoleBinding, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("trustedAccessRoleBindingName") String trustedAccessRoleBindingName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List trusted access role bindings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of trusted access role bindings along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List trusted access role bindings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of trusted access role bindings along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List trusted access role bindings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of trusted access role bindings as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List trusted access role bindings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of trusted access role bindings as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String resourceName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List trusted access role bindings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of trusted access role bindings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String resourceName) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceName)); - } - - /** - * List trusted access role bindings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of trusted access role bindings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String resourceName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); - } - - /** - * Get a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a trusted access role binding along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String resourceName, String trustedAccessRoleBindingName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (trustedAccessRoleBindingName == null) { - return Mono.error( - new IllegalArgumentException("Parameter trustedAccessRoleBindingName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, trustedAccessRoleBindingName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a trusted access role binding along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String resourceName, String trustedAccessRoleBindingName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (trustedAccessRoleBindingName == null) { - return Mono.error( - new IllegalArgumentException("Parameter trustedAccessRoleBindingName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, trustedAccessRoleBindingName, accept, context); - } - - /** - * Get a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a trusted access role binding on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName) { - return getWithResponseAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a trusted access role binding along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, context).block(); - } - - /** - * Get a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a trusted access role binding. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public TrustedAccessRoleBindingInner get(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName) { - return getWithResponse(resourceGroupName, resourceName, trustedAccessRoleBindingName, Context.NONE).getValue(); - } - - /** - * Create or update a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param trustedAccessRoleBinding A trusted access role binding. - * @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 defines binding between a resource and role along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, String trustedAccessRoleBindingName, - TrustedAccessRoleBindingInner trustedAccessRoleBinding) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (trustedAccessRoleBindingName == null) { - return Mono.error( - new IllegalArgumentException("Parameter trustedAccessRoleBindingName is required and cannot be null.")); - } - if (trustedAccessRoleBinding == null) { - return Mono.error( - new IllegalArgumentException("Parameter trustedAccessRoleBinding is required and cannot be null.")); - } else { - trustedAccessRoleBinding.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, trustedAccessRoleBindingName, - trustedAccessRoleBinding, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param trustedAccessRoleBinding A trusted access role binding. - * @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 defines binding between a resource and role along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, String trustedAccessRoleBindingName, - TrustedAccessRoleBindingInner trustedAccessRoleBinding, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (trustedAccessRoleBindingName == null) { - return Mono.error( - new IllegalArgumentException("Parameter trustedAccessRoleBindingName is required and cannot be null.")); - } - if (trustedAccessRoleBinding == null) { - return Mono.error( - new IllegalArgumentException("Parameter trustedAccessRoleBinding is required and cannot be null.")); - } else { - trustedAccessRoleBinding.validate(); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, trustedAccessRoleBindingName, trustedAccessRoleBinding, accept, context); - } - - /** - * Create or update a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param trustedAccessRoleBinding A trusted access role binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines binding between a resource and role. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, TrustedAccessRoleBindingInner> - beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, - TrustedAccessRoleBindingInner trustedAccessRoleBinding) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, - trustedAccessRoleBindingName, trustedAccessRoleBinding); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), TrustedAccessRoleBindingInner.class, TrustedAccessRoleBindingInner.class, - this.client.getContext()); - } - - /** - * Create or update a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param trustedAccessRoleBinding A trusted access role binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines binding between a resource and role. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, TrustedAccessRoleBindingInner> - beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, - TrustedAccessRoleBindingInner trustedAccessRoleBinding, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, - trustedAccessRoleBindingName, trustedAccessRoleBinding, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), TrustedAccessRoleBindingInner.class, TrustedAccessRoleBindingInner.class, - context); - } - - /** - * Create or update a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param trustedAccessRoleBinding A trusted access role binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines binding between a resource and role. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, TrustedAccessRoleBindingInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, - TrustedAccessRoleBindingInner trustedAccessRoleBinding) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, - trustedAccessRoleBinding) - .getSyncPoller(); - } - - /** - * Create or update a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param trustedAccessRoleBinding A trusted access role binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines binding between a resource and role. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, TrustedAccessRoleBindingInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, - TrustedAccessRoleBindingInner trustedAccessRoleBinding, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, - trustedAccessRoleBinding, context) - .getSyncPoller(); - } - - /** - * Create or update a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param trustedAccessRoleBinding A trusted access role binding. - * @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 defines binding between a resource and role on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName, TrustedAccessRoleBindingInner trustedAccessRoleBinding) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, - trustedAccessRoleBinding).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param trustedAccessRoleBinding A trusted access role binding. - * @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 defines binding between a resource and role on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName, TrustedAccessRoleBindingInner trustedAccessRoleBinding, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, - trustedAccessRoleBinding, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param trustedAccessRoleBinding A trusted access role binding. - * @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 defines binding between a resource and role. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public TrustedAccessRoleBindingInner createOrUpdate(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName, TrustedAccessRoleBindingInner trustedAccessRoleBinding) { - return createOrUpdateAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, - trustedAccessRoleBinding).block(); - } - - /** - * Create or update a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param trustedAccessRoleBinding A trusted access role binding. - * @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 defines binding between a resource and role. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public TrustedAccessRoleBindingInner createOrUpdate(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName, TrustedAccessRoleBindingInner trustedAccessRoleBinding, Context context) { - return createOrUpdateAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, - trustedAccessRoleBinding, context).block(); - } - - /** - * Delete a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (trustedAccessRoleBindingName == null) { - return Mono.error( - new IllegalArgumentException("Parameter trustedAccessRoleBindingName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, trustedAccessRoleBindingName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (trustedAccessRoleBindingName == null) { - return Mono.error( - new IllegalArgumentException("Parameter trustedAccessRoleBindingName is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, trustedAccessRoleBindingName, accept, context); - } - - /** - * Delete a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName) { - return this.beginDeleteAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName).getSyncPoller(); - } - - /** - * Delete a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, - String trustedAccessRoleBindingName, Context context) { - return this.beginDeleteAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, context) - .getSyncPoller(); - } - - /** - * Delete a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName) { - return beginDeleteAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, - Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName) { - deleteAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName).block(); - } - - /** - * Delete a trusted access role binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param trustedAccessRoleBindingName The name of trusted access role binding. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, - Context context) { - deleteAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, context).block(); - } - - /** - * List trusted access role bindings. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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 list of trusted access role bindings along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List trusted access role bindings. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of trusted access role bindings along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java deleted file mode 100644 index 63fffbc49034..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.containerservice.fluent.TrustedAccessRolesClient; -import com.azure.resourcemanager.containerservice.fluent.models.TrustedAccessRoleInner; -import com.azure.resourcemanager.containerservice.models.TrustedAccessRoleListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in TrustedAccessRolesClient. - */ -public final class TrustedAccessRolesClientImpl implements TrustedAccessRolesClient { - /** - * The proxy service used to perform REST calls. - */ - private final TrustedAccessRolesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerServiceManagementClientImpl client; - - /** - * Initializes an instance of TrustedAccessRolesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - TrustedAccessRolesClientImpl(ContainerServiceManagementClientImpl client) { - this.service = RestProxy.create(TrustedAccessRolesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerServiceManagementClientTrustedAccessRoles to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerServiceManagementClientTrustedAccessRoles") - public interface TrustedAccessRolesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List supported trusted access roles. - * - * @param location The name of the Azure region. - * @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 list of trusted access roles along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - location, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List supported trusted access roles. - * - * @param location The name of the Azure region. - * @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 list of trusted access roles along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String apiVersion = "2025-10-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), location, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List supported trusted access roles. - * - * @param location The name of the Azure region. - * @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 list of trusted access roles as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String location) { - return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List supported trusted access roles. - * - * @param location The name of the Azure region. - * @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 list of trusted access roles as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(location, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List supported trusted access roles. - * - * @param location The name of the Azure region. - * @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 list of trusted access roles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location) { - return new PagedIterable<>(listAsync(location)); - } - - /** - * List supported trusted access roles. - * - * @param location The name of the Azure region. - * @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 list of trusted access roles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location, Context context) { - return new PagedIterable<>(listAsync(location, context)); - } - - /** - * List supported trusted access roles. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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 list of trusted access roles along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List supported trusted access roles. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of trusted access roles along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AbsoluteMonthlySchedule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AbsoluteMonthlySchedule.java deleted file mode 100644 index 034e66a75649..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AbsoluteMonthlySchedule.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. - */ -@Fluent -public final class AbsoluteMonthlySchedule implements JsonSerializable { - /* - * Specifies the number of months between each set of occurrences. - */ - private int intervalMonths; - - /* - * The date of the month. - */ - private int dayOfMonth; - - /** - * Creates an instance of AbsoluteMonthlySchedule class. - */ - public AbsoluteMonthlySchedule() { - } - - /** - * Get the intervalMonths property: Specifies the number of months between each set of occurrences. - * - * @return the intervalMonths value. - */ - public int intervalMonths() { - return this.intervalMonths; - } - - /** - * Set the intervalMonths property: Specifies the number of months between each set of occurrences. - * - * @param intervalMonths the intervalMonths value to set. - * @return the AbsoluteMonthlySchedule object itself. - */ - public AbsoluteMonthlySchedule withIntervalMonths(int intervalMonths) { - this.intervalMonths = intervalMonths; - return this; - } - - /** - * Get the dayOfMonth property: The date of the month. - * - * @return the dayOfMonth value. - */ - public int dayOfMonth() { - return this.dayOfMonth; - } - - /** - * Set the dayOfMonth property: The date of the month. - * - * @param dayOfMonth the dayOfMonth value to set. - * @return the AbsoluteMonthlySchedule object itself. - */ - public AbsoluteMonthlySchedule withDayOfMonth(int dayOfMonth) { - this.dayOfMonth = dayOfMonth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeIntField("intervalMonths", this.intervalMonths); - jsonWriter.writeIntField("dayOfMonth", this.dayOfMonth); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AbsoluteMonthlySchedule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AbsoluteMonthlySchedule 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 AbsoluteMonthlySchedule. - */ - public static AbsoluteMonthlySchedule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AbsoluteMonthlySchedule deserializedAbsoluteMonthlySchedule = new AbsoluteMonthlySchedule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("intervalMonths".equals(fieldName)) { - deserializedAbsoluteMonthlySchedule.intervalMonths = reader.getInt(); - } else if ("dayOfMonth".equals(fieldName)) { - deserializedAbsoluteMonthlySchedule.dayOfMonth = reader.getInt(); - } else { - reader.skipChildren(); - } - } - - return deserializedAbsoluteMonthlySchedule; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdoptionPolicy.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdoptionPolicy.java deleted file mode 100644 index 7a2cb8d39c4e..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdoptionPolicy.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Action if Kubernetes namespace with same name already exists. - */ -public final class AdoptionPolicy extends ExpandableStringEnum { - /** - * Static value Never for AdoptionPolicy. - */ - public static final AdoptionPolicy NEVER = fromString("Never"); - - /** - * Static value IfIdentical for AdoptionPolicy. - */ - public static final AdoptionPolicy IF_IDENTICAL = fromString("IfIdentical"); - - /** - * Static value Always for AdoptionPolicy. - */ - public static final AdoptionPolicy ALWAYS = fromString("Always"); - - /** - * Creates a new instance of AdoptionPolicy value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AdoptionPolicy() { - } - - /** - * Creates or finds a AdoptionPolicy from its string representation. - * - * @param name a name to look for. - * @return the corresponding AdoptionPolicy. - */ - public static AdoptionPolicy fromString(String name) { - return fromString(name, AdoptionPolicy.class); - } - - /** - * Gets known AdoptionPolicy values. - * - * @return known AdoptionPolicy values. - */ - public static Collection values() { - return values(AdoptionPolicy.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkPolicies.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkPolicies.java deleted file mode 100644 index 3912695f8b3f..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkPolicies.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enable advanced network policies. This allows users to configure Layer 7 network policies (FQDN, HTTP, Kafka). - * Policies themselves must be configured via the Cilium Network Policy resources, see - * https://docs.cilium.io/en/latest/security/policy/index.html. This can be enabled only on cilium-based clusters. If - * not specified, the default value is FQDN if security.enabled is set to true. - */ -public final class AdvancedNetworkPolicies extends ExpandableStringEnum { - /** - * Static value L7 for AdvancedNetworkPolicies. - */ - public static final AdvancedNetworkPolicies L7 = fromString("L7"); - - /** - * Static value FQDN for AdvancedNetworkPolicies. - */ - public static final AdvancedNetworkPolicies FQDN = fromString("FQDN"); - - /** - * Static value None for AdvancedNetworkPolicies. - */ - public static final AdvancedNetworkPolicies NONE = fromString("None"); - - /** - * Creates a new instance of AdvancedNetworkPolicies value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AdvancedNetworkPolicies() { - } - - /** - * Creates or finds a AdvancedNetworkPolicies from its string representation. - * - * @param name a name to look for. - * @return the corresponding AdvancedNetworkPolicies. - */ - public static AdvancedNetworkPolicies fromString(String name) { - return fromString(name, AdvancedNetworkPolicies.class); - } - - /** - * Gets known AdvancedNetworkPolicies values. - * - * @return known AdvancedNetworkPolicies values. - */ - public static Collection values() { - return values(AdvancedNetworkPolicies.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java deleted file mode 100644 index 6132ead8e9b4..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Advanced Networking profile for enabling observability and security feature suite on a cluster. For more information - * see aka.ms/aksadvancednetworking. - */ -@Fluent -public final class AdvancedNetworking implements JsonSerializable { - /* - * Indicates the enablement of Advanced Networking functionalities of observability and security on AKS clusters. - * When this is set to true, all observability and security features will be set to enabled unless explicitly - * disabled. If not specified, the default is false. - */ - private Boolean enabled; - - /* - * Observability profile to enable advanced network metrics and flow logs with historical contexts. - */ - private AdvancedNetworkingObservability observability; - - /* - * Security profile to enable security features on cilium based cluster. - */ - private AdvancedNetworkingSecurity security; - - /** - * Creates an instance of AdvancedNetworking class. - */ - public AdvancedNetworking() { - } - - /** - * Get the enabled property: Indicates the enablement of Advanced Networking functionalities of observability and - * security on AKS clusters. When this is set to true, all observability and security features will be set to - * enabled unless explicitly disabled. If not specified, the default is false. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Indicates the enablement of Advanced Networking functionalities of observability and - * security on AKS clusters. When this is set to true, all observability and security features will be set to - * enabled unless explicitly disabled. If not specified, the default is false. - * - * @param enabled the enabled value to set. - * @return the AdvancedNetworking object itself. - */ - public AdvancedNetworking withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the observability property: Observability profile to enable advanced network metrics and flow logs with - * historical contexts. - * - * @return the observability value. - */ - public AdvancedNetworkingObservability observability() { - return this.observability; - } - - /** - * Set the observability property: Observability profile to enable advanced network metrics and flow logs with - * historical contexts. - * - * @param observability the observability value to set. - * @return the AdvancedNetworking object itself. - */ - public AdvancedNetworking withObservability(AdvancedNetworkingObservability observability) { - this.observability = observability; - return this; - } - - /** - * Get the security property: Security profile to enable security features on cilium based cluster. - * - * @return the security value. - */ - public AdvancedNetworkingSecurity security() { - return this.security; - } - - /** - * Set the security property: Security profile to enable security features on cilium based cluster. - * - * @param security the security value to set. - * @return the AdvancedNetworking object itself. - */ - public AdvancedNetworking withSecurity(AdvancedNetworkingSecurity security) { - this.security = security; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (observability() != null) { - observability().validate(); - } - if (security() != null) { - security().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeJsonField("observability", this.observability); - jsonWriter.writeJsonField("security", this.security); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AdvancedNetworking from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AdvancedNetworking 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 AdvancedNetworking. - */ - public static AdvancedNetworking fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AdvancedNetworking deserializedAdvancedNetworking = new AdvancedNetworking(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedAdvancedNetworking.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("observability".equals(fieldName)) { - deserializedAdvancedNetworking.observability = AdvancedNetworkingObservability.fromJson(reader); - } else if ("security".equals(fieldName)) { - deserializedAdvancedNetworking.security = AdvancedNetworkingSecurity.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAdvancedNetworking; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingObservability.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingObservability.java deleted file mode 100644 index d5296ad62ccd..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingObservability.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Observability profile to enable advanced network metrics and flow logs with historical contexts. - */ -@Fluent -public final class AdvancedNetworkingObservability implements JsonSerializable { - /* - * Indicates the enablement of Advanced Networking observability functionalities on clusters. - */ - private Boolean enabled; - - /** - * Creates an instance of AdvancedNetworkingObservability class. - */ - public AdvancedNetworkingObservability() { - } - - /** - * Get the enabled property: Indicates the enablement of Advanced Networking observability functionalities on - * clusters. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Indicates the enablement of Advanced Networking observability functionalities on - * clusters. - * - * @param enabled the enabled value to set. - * @return the AdvancedNetworkingObservability object itself. - */ - public AdvancedNetworkingObservability withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AdvancedNetworkingObservability from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AdvancedNetworkingObservability 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 AdvancedNetworkingObservability. - */ - public static AdvancedNetworkingObservability fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AdvancedNetworkingObservability deserializedAdvancedNetworkingObservability - = new AdvancedNetworkingObservability(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedAdvancedNetworkingObservability.enabled = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedAdvancedNetworkingObservability; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java deleted file mode 100644 index 58d38fe29209..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Security profile to enable security features on cilium based cluster. - */ -@Fluent -public final class AdvancedNetworkingSecurity implements JsonSerializable { - /* - * This feature allows user to configure network policy based on DNS (FQDN) names. It can be enabled only on cilium - * based clusters. If not specified, the default is false. - */ - private Boolean enabled; - - /* - * Enable advanced network policies. This allows users to configure Layer 7 network policies (FQDN, HTTP, Kafka). - * Policies themselves must be configured via the Cilium Network Policy resources, see - * https://docs.cilium.io/en/latest/security/policy/index.html. This can be enabled only on cilium-based clusters. - * If not specified, the default value is FQDN if security.enabled is set to true. - */ - private AdvancedNetworkPolicies advancedNetworkPolicies; - - /** - * Creates an instance of AdvancedNetworkingSecurity class. - */ - public AdvancedNetworkingSecurity() { - } - - /** - * Get the enabled property: This feature allows user to configure network policy based on DNS (FQDN) names. It can - * be enabled only on cilium based clusters. If not specified, the default is false. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: This feature allows user to configure network policy based on DNS (FQDN) names. It can - * be enabled only on cilium based clusters. If not specified, the default is false. - * - * @param enabled the enabled value to set. - * @return the AdvancedNetworkingSecurity object itself. - */ - public AdvancedNetworkingSecurity withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the advancedNetworkPolicies property: Enable advanced network policies. This allows users to configure Layer - * 7 network policies (FQDN, HTTP, Kafka). Policies themselves must be configured via the Cilium Network Policy - * resources, see https://docs.cilium.io/en/latest/security/policy/index.html. This can be enabled only on - * cilium-based clusters. If not specified, the default value is FQDN if security.enabled is set to true. - * - * @return the advancedNetworkPolicies value. - */ - public AdvancedNetworkPolicies advancedNetworkPolicies() { - return this.advancedNetworkPolicies; - } - - /** - * Set the advancedNetworkPolicies property: Enable advanced network policies. This allows users to configure Layer - * 7 network policies (FQDN, HTTP, Kafka). Policies themselves must be configured via the Cilium Network Policy - * resources, see https://docs.cilium.io/en/latest/security/policy/index.html. This can be enabled only on - * cilium-based clusters. If not specified, the default value is FQDN if security.enabled is set to true. - * - * @param advancedNetworkPolicies the advancedNetworkPolicies value to set. - * @return the AdvancedNetworkingSecurity object itself. - */ - public AdvancedNetworkingSecurity withAdvancedNetworkPolicies(AdvancedNetworkPolicies advancedNetworkPolicies) { - this.advancedNetworkPolicies = advancedNetworkPolicies; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeStringField("advancedNetworkPolicies", - this.advancedNetworkPolicies == null ? null : this.advancedNetworkPolicies.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AdvancedNetworkingSecurity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AdvancedNetworkingSecurity 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 AdvancedNetworkingSecurity. - */ - public static AdvancedNetworkingSecurity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AdvancedNetworkingSecurity deserializedAdvancedNetworkingSecurity = new AdvancedNetworkingSecurity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedAdvancedNetworkingSecurity.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("advancedNetworkPolicies".equals(fieldName)) { - deserializedAdvancedNetworkingSecurity.advancedNetworkPolicies - = AdvancedNetworkPolicies.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAdvancedNetworkingSecurity; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java deleted file mode 100644 index 2b28054aa650..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem model. - */ -@Fluent -public final class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - implements JsonSerializable { - /* - * Whether this version is the default agent pool version. - */ - private Boolean defaultProperty; - - /* - * The Kubernetes version (major.minor.patch). - */ - private String kubernetesVersion; - - /* - * Whether Kubernetes version is currently in preview. - */ - private Boolean isPreview; - - /** - * Creates an instance of AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem class. - */ - public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem() { - } - - /** - * Get the defaultProperty property: Whether this version is the default agent pool version. - * - * @return the defaultProperty value. - */ - public Boolean defaultProperty() { - return this.defaultProperty; - } - - /** - * Set the defaultProperty property: Whether this version is the default agent pool version. - * - * @param defaultProperty the defaultProperty value to set. - * @return the AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem object itself. - */ - public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem withDefaultProperty(Boolean defaultProperty) { - this.defaultProperty = defaultProperty; - return this; - } - - /** - * Get the kubernetesVersion property: The Kubernetes version (major.minor.patch). - * - * @return the kubernetesVersion value. - */ - public String kubernetesVersion() { - return this.kubernetesVersion; - } - - /** - * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). - * - * @param kubernetesVersion the kubernetesVersion value to set. - * @return the AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem object itself. - */ - public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem withKubernetesVersion(String kubernetesVersion) { - this.kubernetesVersion = kubernetesVersion; - return this; - } - - /** - * Get the isPreview property: Whether Kubernetes version is currently in preview. - * - * @return the isPreview value. - */ - public Boolean isPreview() { - return this.isPreview; - } - - /** - * Set the isPreview property: Whether Kubernetes version is currently in preview. - * - * @param isPreview the isPreview value to set. - * @return the AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem object itself. - */ - public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem withIsPreview(Boolean isPreview) { - this.isPreview = isPreview; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("default", this.defaultProperty); - jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); - jsonWriter.writeBooleanField("isPreview", this.isPreview); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem 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 - * AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - */ - public static AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem deserializedAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - = new AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("default".equals(fieldName)) { - deserializedAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.defaultProperty - = reader.getNullable(JsonReader::getBoolean); - } else if ("kubernetesVersion".equals(fieldName)) { - deserializedAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.kubernetesVersion - = reader.getString(); - } else if ("isPreview".equals(fieldName)) { - deserializedAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.isPreview - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolDeleteMachinesParameter.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolDeleteMachinesParameter.java deleted file mode 100644 index 916eb8860fc9..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolDeleteMachinesParameter.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -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 a list of machine names from the agent pool to be deleted. - */ -@Fluent -public final class AgentPoolDeleteMachinesParameter implements JsonSerializable { - /* - * The agent pool machine names. - */ - private List machineNames; - - /** - * Creates an instance of AgentPoolDeleteMachinesParameter class. - */ - public AgentPoolDeleteMachinesParameter() { - } - - /** - * Get the machineNames property: The agent pool machine names. - * - * @return the machineNames value. - */ - public List machineNames() { - return this.machineNames; - } - - /** - * Set the machineNames property: The agent pool machine names. - * - * @param machineNames the machineNames value to set. - * @return the AgentPoolDeleteMachinesParameter object itself. - */ - public AgentPoolDeleteMachinesParameter withMachineNames(List machineNames) { - this.machineNames = machineNames; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (machineNames() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property machineNames in model AgentPoolDeleteMachinesParameter")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AgentPoolDeleteMachinesParameter.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("machineNames", this.machineNames, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AgentPoolDeleteMachinesParameter from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AgentPoolDeleteMachinesParameter 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 AgentPoolDeleteMachinesParameter. - */ - public static AgentPoolDeleteMachinesParameter fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AgentPoolDeleteMachinesParameter deserializedAgentPoolDeleteMachinesParameter - = new AgentPoolDeleteMachinesParameter(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("machineNames".equals(fieldName)) { - List machineNames = reader.readArray(reader1 -> reader1.getString()); - deserializedAgentPoolDeleteMachinesParameter.machineNames = machineNames; - } else { - reader.skipChildren(); - } - } - - return deserializedAgentPoolDeleteMachinesParameter; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolGatewayProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolGatewayProfile.java deleted file mode 100644 index 1729e255411a..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolGatewayProfile.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 of the managed cluster gateway agent pool. - */ -@Fluent -public final class AgentPoolGatewayProfile implements JsonSerializable { - /* - * The Gateway agent pool associates one public IPPrefix for each static egress gateway to provide public egress. - * The size of Public IPPrefix should be selected by the user. Each node in the agent pool is assigned with one IP - * from the IPPrefix. The IPPrefix size thus serves as a cap on the size of the Gateway agent pool. Due to Azure - * public IPPrefix size limitation, the valid value range is [28, 31] (/31 = 2 nodes/IPs, /30 = 4 nodes/IPs, /29 = 8 - * nodes/IPs, /28 = 16 nodes/IPs). The default value is 31. - */ - private Integer publicIpPrefixSize; - - /** - * Creates an instance of AgentPoolGatewayProfile class. - */ - public AgentPoolGatewayProfile() { - } - - /** - * Get the publicIpPrefixSize property: The Gateway agent pool associates one public IPPrefix for each static egress - * gateway to provide public egress. The size of Public IPPrefix should be selected by the user. Each node in the - * agent pool is assigned with one IP from the IPPrefix. The IPPrefix size thus serves as a cap on the size of the - * Gateway agent pool. Due to Azure public IPPrefix size limitation, the valid value range is [28, 31] (/31 = 2 - * nodes/IPs, /30 = 4 nodes/IPs, /29 = 8 nodes/IPs, /28 = 16 nodes/IPs). The default value is 31. - * - * @return the publicIpPrefixSize value. - */ - public Integer publicIpPrefixSize() { - return this.publicIpPrefixSize; - } - - /** - * Set the publicIpPrefixSize property: The Gateway agent pool associates one public IPPrefix for each static egress - * gateway to provide public egress. The size of Public IPPrefix should be selected by the user. Each node in the - * agent pool is assigned with one IP from the IPPrefix. The IPPrefix size thus serves as a cap on the size of the - * Gateway agent pool. Due to Azure public IPPrefix size limitation, the valid value range is [28, 31] (/31 = 2 - * nodes/IPs, /30 = 4 nodes/IPs, /29 = 8 nodes/IPs, /28 = 16 nodes/IPs). The default value is 31. - * - * @param publicIpPrefixSize the publicIpPrefixSize value to set. - * @return the AgentPoolGatewayProfile object itself. - */ - public AgentPoolGatewayProfile withPublicIpPrefixSize(Integer publicIpPrefixSize) { - this.publicIpPrefixSize = publicIpPrefixSize; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("publicIPPrefixSize", this.publicIpPrefixSize); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AgentPoolGatewayProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AgentPoolGatewayProfile 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 AgentPoolGatewayProfile. - */ - public static AgentPoolGatewayProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AgentPoolGatewayProfile deserializedAgentPoolGatewayProfile = new AgentPoolGatewayProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("publicIPPrefixSize".equals(fieldName)) { - deserializedAgentPoolGatewayProfile.publicIpPrefixSize = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedAgentPoolGatewayProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolListResult.java deleted file mode 100644 index 89dd04764b23..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolListResult.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner; -import java.io.IOException; -import java.util.List; - -/** - * The response from the List Agent Pools operation. - */ -@Fluent -public final class AgentPoolListResult implements JsonSerializable { - /* - * The list of agent pools. - */ - private List value; - - /* - * The URL to get the next set of agent pool results. - */ - private String nextLink; - - /** - * Creates an instance of AgentPoolListResult class. - */ - public AgentPoolListResult() { - } - - /** - * Get the value property: The list of agent pools. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of agent pools. - * - * @param value the value value to set. - * @return the AgentPoolListResult object itself. - */ - public AgentPoolListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to get the next set of agent pool results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AgentPoolListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AgentPoolListResult 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 AgentPoolListResult. - */ - public static AgentPoolListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AgentPoolListResult deserializedAgentPoolListResult = new AgentPoolListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> AgentPoolInner.fromJson(reader1)); - deserializedAgentPoolListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedAgentPoolListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAgentPoolListResult; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java deleted file mode 100644 index a44247f5ca08..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional - * information on agent pool restrictions and best practices, see: - * https://docs.microsoft.com/azure/aks/use-system-pools. - */ -public final class AgentPoolMode extends ExpandableStringEnum { - /** - * Static value System for AgentPoolMode. - */ - public static final AgentPoolMode SYSTEM = fromString("System"); - - /** - * Static value User for AgentPoolMode. - */ - public static final AgentPoolMode USER = fromString("User"); - - /** - * Static value Gateway for AgentPoolMode. - */ - public static final AgentPoolMode GATEWAY = fromString("Gateway"); - - /** - * Creates a new instance of AgentPoolMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AgentPoolMode() { - } - - /** - * Creates or finds a AgentPoolMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding AgentPoolMode. - */ - public static AgentPoolMode fromString(String name) { - return fromString(name, AgentPoolMode.class); - } - - /** - * Gets known AgentPoolMode values. - * - * @return known AgentPoolMode values. - */ - public static Collection values() { - return values(AgentPoolMode.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkProfile.java deleted file mode 100644 index b6e537c7d3d5..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkProfile.java +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Network settings of an agent pool. - */ -@Fluent -public final class AgentPoolNetworkProfile implements JsonSerializable { - /* - * IPTags of instance-level public IPs. - */ - private List nodePublicIpTags; - - /* - * The port ranges that are allowed to access. The specified ranges are allowed to overlap. - */ - private List allowedHostPorts; - - /* - * The IDs of the application security groups which agent pool will associate when created. - */ - private List applicationSecurityGroups; - - /** - * Creates an instance of AgentPoolNetworkProfile class. - */ - public AgentPoolNetworkProfile() { - } - - /** - * Get the nodePublicIpTags property: IPTags of instance-level public IPs. - * - * @return the nodePublicIpTags value. - */ - public List nodePublicIpTags() { - return this.nodePublicIpTags; - } - - /** - * Set the nodePublicIpTags property: IPTags of instance-level public IPs. - * - * @param nodePublicIpTags the nodePublicIpTags value to set. - * @return the AgentPoolNetworkProfile object itself. - */ - public AgentPoolNetworkProfile withNodePublicIpTags(List nodePublicIpTags) { - this.nodePublicIpTags = nodePublicIpTags; - return this; - } - - /** - * Get the allowedHostPorts property: The port ranges that are allowed to access. The specified ranges are allowed - * to overlap. - * - * @return the allowedHostPorts value. - */ - public List allowedHostPorts() { - return this.allowedHostPorts; - } - - /** - * Set the allowedHostPorts property: The port ranges that are allowed to access. The specified ranges are allowed - * to overlap. - * - * @param allowedHostPorts the allowedHostPorts value to set. - * @return the AgentPoolNetworkProfile object itself. - */ - public AgentPoolNetworkProfile withAllowedHostPorts(List allowedHostPorts) { - this.allowedHostPorts = allowedHostPorts; - return this; - } - - /** - * Get the applicationSecurityGroups property: The IDs of the application security groups which agent pool will - * associate when created. - * - * @return the applicationSecurityGroups value. - */ - public List applicationSecurityGroups() { - return this.applicationSecurityGroups; - } - - /** - * Set the applicationSecurityGroups property: The IDs of the application security groups which agent pool will - * associate when created. - * - * @param applicationSecurityGroups the applicationSecurityGroups value to set. - * @return the AgentPoolNetworkProfile object itself. - */ - public AgentPoolNetworkProfile withApplicationSecurityGroups(List applicationSecurityGroups) { - this.applicationSecurityGroups = applicationSecurityGroups; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (nodePublicIpTags() != null) { - nodePublicIpTags().forEach(e -> e.validate()); - } - if (allowedHostPorts() != null) { - allowedHostPorts().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("nodePublicIPTags", this.nodePublicIpTags, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("allowedHostPorts", this.allowedHostPorts, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("applicationSecurityGroups", this.applicationSecurityGroups, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AgentPoolNetworkProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AgentPoolNetworkProfile 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 AgentPoolNetworkProfile. - */ - public static AgentPoolNetworkProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AgentPoolNetworkProfile deserializedAgentPoolNetworkProfile = new AgentPoolNetworkProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nodePublicIPTags".equals(fieldName)) { - List nodePublicIpTags = reader.readArray(reader1 -> IpTag.fromJson(reader1)); - deserializedAgentPoolNetworkProfile.nodePublicIpTags = nodePublicIpTags; - } else if ("allowedHostPorts".equals(fieldName)) { - List allowedHostPorts = reader.readArray(reader1 -> PortRange.fromJson(reader1)); - deserializedAgentPoolNetworkProfile.allowedHostPorts = allowedHostPorts; - } else if ("applicationSecurityGroups".equals(fieldName)) { - List applicationSecurityGroups = reader.readArray(reader1 -> reader1.getString()); - deserializedAgentPoolNetworkProfile.applicationSecurityGroups = applicationSecurityGroups; - } else { - reader.skipChildren(); - } - } - - return deserializedAgentPoolNetworkProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java deleted file mode 100644 index 1402defe71c1..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 security settings of an agent pool. - */ -@Fluent -public final class AgentPoolSecurityProfile implements JsonSerializable { - /* - * vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally - * on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. - */ - private Boolean enableVtpm; - - /* - * Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. - * For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. - */ - private Boolean enableSecureBoot; - - /* - * SSH access method of an agent pool. - */ - private AgentPoolSshAccess sshAccess; - - /** - * Creates an instance of AgentPoolSecurityProfile class. - */ - public AgentPoolSecurityProfile() { - } - - /** - * Get the enableVtpm property: vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys - * and measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the - * default is false. - * - * @return the enableVtpm value. - */ - public Boolean enableVtpm() { - return this.enableVtpm; - } - - /** - * Set the enableVtpm property: vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys - * and measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the - * default is false. - * - * @param enableVtpm the enableVtpm value to set. - * @return the AgentPoolSecurityProfile object itself. - */ - public AgentPoolSecurityProfile withEnableVtpm(Boolean enableVtpm) { - this.enableVtpm = enableVtpm; - return this; - } - - /** - * Get the enableSecureBoot property: Secure Boot is a feature of Trusted Launch which ensures that only signed - * operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch. If not specified, the - * default is false. - * - * @return the enableSecureBoot value. - */ - public Boolean enableSecureBoot() { - return this.enableSecureBoot; - } - - /** - * Set the enableSecureBoot property: Secure Boot is a feature of Trusted Launch which ensures that only signed - * operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch. If not specified, the - * default is false. - * - * @param enableSecureBoot the enableSecureBoot value to set. - * @return the AgentPoolSecurityProfile object itself. - */ - public AgentPoolSecurityProfile withEnableSecureBoot(Boolean enableSecureBoot) { - this.enableSecureBoot = enableSecureBoot; - return this; - } - - /** - * Get the sshAccess property: SSH access method of an agent pool. - * - * @return the sshAccess value. - */ - public AgentPoolSshAccess sshAccess() { - return this.sshAccess; - } - - /** - * Set the sshAccess property: SSH access method of an agent pool. - * - * @param sshAccess the sshAccess value to set. - * @return the AgentPoolSecurityProfile object itself. - */ - public AgentPoolSecurityProfile withSshAccess(AgentPoolSshAccess sshAccess) { - this.sshAccess = sshAccess; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enableVTPM", this.enableVtpm); - jsonWriter.writeBooleanField("enableSecureBoot", this.enableSecureBoot); - jsonWriter.writeStringField("sshAccess", this.sshAccess == null ? null : this.sshAccess.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AgentPoolSecurityProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AgentPoolSecurityProfile 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 AgentPoolSecurityProfile. - */ - public static AgentPoolSecurityProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AgentPoolSecurityProfile deserializedAgentPoolSecurityProfile = new AgentPoolSecurityProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enableVTPM".equals(fieldName)) { - deserializedAgentPoolSecurityProfile.enableVtpm = reader.getNullable(JsonReader::getBoolean); - } else if ("enableSecureBoot".equals(fieldName)) { - deserializedAgentPoolSecurityProfile.enableSecureBoot = reader.getNullable(JsonReader::getBoolean); - } else if ("sshAccess".equals(fieldName)) { - deserializedAgentPoolSecurityProfile.sshAccess = AgentPoolSshAccess.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAgentPoolSecurityProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java deleted file mode 100644 index 0a92ae4a7d03..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * SSH access method of an agent pool. - */ -public final class AgentPoolSshAccess extends ExpandableStringEnum { - /** - * Static value LocalUser for AgentPoolSshAccess. - */ - public static final AgentPoolSshAccess LOCAL_USER = fromString("LocalUser"); - - /** - * Static value Disabled for AgentPoolSshAccess. - */ - public static final AgentPoolSshAccess DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of AgentPoolSshAccess value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AgentPoolSshAccess() { - } - - /** - * Creates or finds a AgentPoolSshAccess from its string representation. - * - * @param name a name to look for. - * @return the corresponding AgentPoolSshAccess. - */ - public static AgentPoolSshAccess fromString(String name) { - return fromString(name, AgentPoolSshAccess.class); - } - - /** - * Gets known AgentPoolSshAccess values. - * - * @return known AgentPoolSshAccess values. - */ - public static Collection values() { - return values(AgentPoolSshAccess.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolStatus.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolStatus.java deleted file mode 100644 index f29f04ef7062..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolStatus.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.exception.ManagementError; -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 read-only information about the Agent Pool. - */ -@Immutable -public final class AgentPoolStatus implements JsonSerializable { - /* - * The error detail information of the agent pool. Preserves the detailed info of failure. If there was no error, - * this field is omitted. - */ - private ManagementError provisioningError; - - /** - * Creates an instance of AgentPoolStatus class. - */ - public AgentPoolStatus() { - } - - /** - * Get the provisioningError property: The error detail information of the agent pool. Preserves the detailed info - * of failure. If there was no error, this field is omitted. - * - * @return the provisioningError value. - */ - public ManagementError provisioningError() { - return this.provisioningError; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AgentPoolStatus from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AgentPoolStatus 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 AgentPoolStatus. - */ - public static AgentPoolStatus fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AgentPoolStatus deserializedAgentPoolStatus = new AgentPoolStatus(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningError".equals(fieldName)) { - deserializedAgentPoolStatus.provisioningError = ManagementError.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAgentPoolStatus; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolType.java deleted file mode 100644 index 9b5ac363665d..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The type of Agent Pool. - */ -public final class AgentPoolType extends ExpandableStringEnum { - /** - * Static value VirtualMachineScaleSets for AgentPoolType. - */ - public static final AgentPoolType VIRTUAL_MACHINE_SCALE_SETS = fromString("VirtualMachineScaleSets"); - - /** - * Static value AvailabilitySet for AgentPoolType. - */ - public static final AgentPoolType AVAILABILITY_SET = fromString("AvailabilitySet"); - - /** - * Static value VirtualMachines for AgentPoolType. - */ - public static final AgentPoolType VIRTUAL_MACHINES = fromString("VirtualMachines"); - - /** - * Creates a new instance of AgentPoolType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AgentPoolType() { - } - - /** - * Creates or finds a AgentPoolType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AgentPoolType. - */ - public static AgentPoolType fromString(String name) { - return fromString(name, AgentPoolType.class); - } - - /** - * Gets known AgentPoolType values. - * - * @return known AgentPoolType values. - */ - public static Collection values() { - return values(AgentPoolType.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java deleted file mode 100644 index c3644b0dd650..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 AgentPoolUpgradeProfilePropertiesUpgradesItem model. - */ -@Fluent -public final class AgentPoolUpgradeProfilePropertiesUpgradesItem - implements JsonSerializable { - /* - * The Kubernetes version (major.minor.patch). - */ - private String kubernetesVersion; - - /* - * Whether the Kubernetes version is currently in preview. - */ - private Boolean isPreview; - - /** - * Creates an instance of AgentPoolUpgradeProfilePropertiesUpgradesItem class. - */ - public AgentPoolUpgradeProfilePropertiesUpgradesItem() { - } - - /** - * Get the kubernetesVersion property: The Kubernetes version (major.minor.patch). - * - * @return the kubernetesVersion value. - */ - public String kubernetesVersion() { - return this.kubernetesVersion; - } - - /** - * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). - * - * @param kubernetesVersion the kubernetesVersion value to set. - * @return the AgentPoolUpgradeProfilePropertiesUpgradesItem object itself. - */ - public AgentPoolUpgradeProfilePropertiesUpgradesItem withKubernetesVersion(String kubernetesVersion) { - this.kubernetesVersion = kubernetesVersion; - return this; - } - - /** - * Get the isPreview property: Whether the Kubernetes version is currently in preview. - * - * @return the isPreview value. - */ - public Boolean isPreview() { - return this.isPreview; - } - - /** - * Set the isPreview property: Whether the Kubernetes version is currently in preview. - * - * @param isPreview the isPreview value to set. - * @return the AgentPoolUpgradeProfilePropertiesUpgradesItem object itself. - */ - public AgentPoolUpgradeProfilePropertiesUpgradesItem withIsPreview(Boolean isPreview) { - this.isPreview = isPreview; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); - jsonWriter.writeBooleanField("isPreview", this.isPreview); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AgentPoolUpgradeProfilePropertiesUpgradesItem from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AgentPoolUpgradeProfilePropertiesUpgradesItem 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 AgentPoolUpgradeProfilePropertiesUpgradesItem. - */ - public static AgentPoolUpgradeProfilePropertiesUpgradesItem fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AgentPoolUpgradeProfilePropertiesUpgradesItem deserializedAgentPoolUpgradeProfilePropertiesUpgradesItem - = new AgentPoolUpgradeProfilePropertiesUpgradesItem(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("kubernetesVersion".equals(fieldName)) { - deserializedAgentPoolUpgradeProfilePropertiesUpgradesItem.kubernetesVersion = reader.getString(); - } else if ("isPreview".equals(fieldName)) { - deserializedAgentPoolUpgradeProfilePropertiesUpgradesItem.isPreview - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedAgentPoolUpgradeProfilePropertiesUpgradesItem; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java deleted file mode 100644 index 4fe15df7ade6..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Settings for upgrading an agentpool. - */ -@Fluent -public final class AgentPoolUpgradeSettings implements JsonSerializable { - /* - * The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer - * (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent - * pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the - * default is 10%. For more information, including best practices, see: - * https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster - */ - private String maxSurge; - - /* - * The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. This can either - * be set to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage - * of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not - * specified, the default is 0. For more information, including best practices, see: - * https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster - */ - private String maxUnavailable; - - /* - * The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful - * termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, - * the upgrade fails. If not specified, the default is 30 minutes. - */ - private Integer drainTimeoutInMinutes; - - /* - * The soak duration for a node. The amount of time (in minutes) to wait after draining a node and before reimaging - * it and moving on to next node. If not specified, the default is 0 minutes. - */ - private Integer nodeSoakDurationInMinutes; - - /* - * Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod - * Disruption Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the remaining - * per-node drain timeout or pod is still being in a running state, can also cause undrainable nodes. - */ - private UndrainableNodeBehavior undrainableNodeBehavior; - - /** - * Creates an instance of AgentPoolUpgradeSettings class. - */ - public AgentPoolUpgradeSettings() { - } - - /** - * Get the maxSurge property: The maximum number or percentage of nodes that are surged during upgrade. This can - * either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the - * percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded - * up. If not specified, the default is 10%. For more information, including best practices, see: - * https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. - * - * @return the maxSurge value. - */ - public String maxSurge() { - return this.maxSurge; - } - - /** - * Set the maxSurge property: The maximum number or percentage of nodes that are surged during upgrade. This can - * either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the - * percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded - * up. If not specified, the default is 10%. For more information, including best practices, see: - * https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. - * - * @param maxSurge the maxSurge value to set. - * @return the AgentPoolUpgradeSettings object itself. - */ - public AgentPoolUpgradeSettings withMaxSurge(String maxSurge) { - this.maxSurge = maxSurge; - return this; - } - - /** - * Get the maxUnavailable property: The maximum number or percentage of nodes that can be simultaneously unavailable - * during upgrade. This can either be set to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is - * specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, - * fractional nodes are rounded up. If not specified, the default is 0. For more information, including best - * practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. - * - * @return the maxUnavailable value. - */ - public String maxUnavailable() { - return this.maxUnavailable; - } - - /** - * Set the maxUnavailable property: The maximum number or percentage of nodes that can be simultaneously unavailable - * during upgrade. This can either be set to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is - * specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, - * fractional nodes are rounded up. If not specified, the default is 0. For more information, including best - * practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. - * - * @param maxUnavailable the maxUnavailable value to set. - * @return the AgentPoolUpgradeSettings object itself. - */ - public AgentPoolUpgradeSettings withMaxUnavailable(String maxUnavailable) { - this.maxUnavailable = maxUnavailable; - return this; - } - - /** - * Get the drainTimeoutInMinutes property: The drain timeout for a node. The amount of time (in minutes) to wait on - * eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption - * budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 minutes. - * - * @return the drainTimeoutInMinutes value. - */ - public Integer drainTimeoutInMinutes() { - return this.drainTimeoutInMinutes; - } - - /** - * Set the drainTimeoutInMinutes property: The drain timeout for a node. The amount of time (in minutes) to wait on - * eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption - * budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 minutes. - * - * @param drainTimeoutInMinutes the drainTimeoutInMinutes value to set. - * @return the AgentPoolUpgradeSettings object itself. - */ - public AgentPoolUpgradeSettings withDrainTimeoutInMinutes(Integer drainTimeoutInMinutes) { - this.drainTimeoutInMinutes = drainTimeoutInMinutes; - return this; - } - - /** - * Get the nodeSoakDurationInMinutes property: The soak duration for a node. The amount of time (in minutes) to wait - * after draining a node and before reimaging it and moving on to next node. If not specified, the default is 0 - * minutes. - * - * @return the nodeSoakDurationInMinutes value. - */ - public Integer nodeSoakDurationInMinutes() { - return this.nodeSoakDurationInMinutes; - } - - /** - * Set the nodeSoakDurationInMinutes property: The soak duration for a node. The amount of time (in minutes) to wait - * after draining a node and before reimaging it and moving on to next node. If not specified, the default is 0 - * minutes. - * - * @param nodeSoakDurationInMinutes the nodeSoakDurationInMinutes value to set. - * @return the AgentPoolUpgradeSettings object itself. - */ - public AgentPoolUpgradeSettings withNodeSoakDurationInMinutes(Integer nodeSoakDurationInMinutes) { - this.nodeSoakDurationInMinutes = nodeSoakDurationInMinutes; - return this; - } - - /** - * Get the undrainableNodeBehavior property: Defines the behavior for undrainable nodes during upgrade. The most - * common cause of undrainable nodes is Pod Disruption Budgets (PDBs), but other issues, such as pod termination - * grace period is exceeding the remaining per-node drain timeout or pod is still being in a running state, can also - * cause undrainable nodes. - * - * @return the undrainableNodeBehavior value. - */ - public UndrainableNodeBehavior undrainableNodeBehavior() { - return this.undrainableNodeBehavior; - } - - /** - * Set the undrainableNodeBehavior property: Defines the behavior for undrainable nodes during upgrade. The most - * common cause of undrainable nodes is Pod Disruption Budgets (PDBs), but other issues, such as pod termination - * grace period is exceeding the remaining per-node drain timeout or pod is still being in a running state, can also - * cause undrainable nodes. - * - * @param undrainableNodeBehavior the undrainableNodeBehavior value to set. - * @return the AgentPoolUpgradeSettings object itself. - */ - public AgentPoolUpgradeSettings withUndrainableNodeBehavior(UndrainableNodeBehavior undrainableNodeBehavior) { - this.undrainableNodeBehavior = undrainableNodeBehavior; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("maxSurge", this.maxSurge); - jsonWriter.writeStringField("maxUnavailable", this.maxUnavailable); - jsonWriter.writeNumberField("drainTimeoutInMinutes", this.drainTimeoutInMinutes); - jsonWriter.writeNumberField("nodeSoakDurationInMinutes", this.nodeSoakDurationInMinutes); - jsonWriter.writeStringField("undrainableNodeBehavior", - this.undrainableNodeBehavior == null ? null : this.undrainableNodeBehavior.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AgentPoolUpgradeSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AgentPoolUpgradeSettings 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 AgentPoolUpgradeSettings. - */ - public static AgentPoolUpgradeSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AgentPoolUpgradeSettings deserializedAgentPoolUpgradeSettings = new AgentPoolUpgradeSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("maxSurge".equals(fieldName)) { - deserializedAgentPoolUpgradeSettings.maxSurge = reader.getString(); - } else if ("maxUnavailable".equals(fieldName)) { - deserializedAgentPoolUpgradeSettings.maxUnavailable = reader.getString(); - } else if ("drainTimeoutInMinutes".equals(fieldName)) { - deserializedAgentPoolUpgradeSettings.drainTimeoutInMinutes = reader.getNullable(JsonReader::getInt); - } else if ("nodeSoakDurationInMinutes".equals(fieldName)) { - deserializedAgentPoolUpgradeSettings.nodeSoakDurationInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("undrainableNodeBehavior".equals(fieldName)) { - deserializedAgentPoolUpgradeSettings.undrainableNodeBehavior - = UndrainableNodeBehavior.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAgentPoolUpgradeSettings; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolWindowsProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolWindowsProfile.java deleted file mode 100644 index cfefbed873d0..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolWindowsProfile.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 Windows agent pool's specific profile. - */ -@Fluent -public final class AgentPoolWindowsProfile implements JsonSerializable { - /* - * Whether to disable OutboundNAT in windows nodes. The default value is false. Outbound NAT can only be disabled if - * the cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP enabled. - */ - private Boolean disableOutboundNat; - - /** - * Creates an instance of AgentPoolWindowsProfile class. - */ - public AgentPoolWindowsProfile() { - } - - /** - * Get the disableOutboundNat property: Whether to disable OutboundNAT in windows nodes. The default value is false. - * Outbound NAT can only be disabled if the cluster outboundType is NAT Gateway and the Windows agent pool does not - * have node public IP enabled. - * - * @return the disableOutboundNat value. - */ - public Boolean disableOutboundNat() { - return this.disableOutboundNat; - } - - /** - * Set the disableOutboundNat property: Whether to disable OutboundNAT in windows nodes. The default value is false. - * Outbound NAT can only be disabled if the cluster outboundType is NAT Gateway and the Windows agent pool does not - * have node public IP enabled. - * - * @param disableOutboundNat the disableOutboundNat value to set. - * @return the AgentPoolWindowsProfile object itself. - */ - public AgentPoolWindowsProfile withDisableOutboundNat(Boolean disableOutboundNat) { - this.disableOutboundNat = disableOutboundNat; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("disableOutboundNat", this.disableOutboundNat); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AgentPoolWindowsProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AgentPoolWindowsProfile 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 AgentPoolWindowsProfile. - */ - public static AgentPoolWindowsProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AgentPoolWindowsProfile deserializedAgentPoolWindowsProfile = new AgentPoolWindowsProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("disableOutboundNat".equals(fieldName)) { - deserializedAgentPoolWindowsProfile.disableOutboundNat = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedAgentPoolWindowsProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ArtifactSource.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ArtifactSource.java deleted file mode 100644 index d2be9f88a64e..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ArtifactSource.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The artifact source. The source where the artifacts are downloaded from. - */ -public final class ArtifactSource extends ExpandableStringEnum { - /** - * Static value Cache for ArtifactSource. - */ - public static final ArtifactSource CACHE = fromString("Cache"); - - /** - * Static value Direct for ArtifactSource. - */ - public static final ArtifactSource DIRECT = fromString("Direct"); - - /** - * Creates a new instance of ArtifactSource value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ArtifactSource() { - } - - /** - * Creates or finds a ArtifactSource from its string representation. - * - * @param name a name to look for. - * @return the corresponding ArtifactSource. - */ - public static ArtifactSource fromString(String name) { - return fromString(name, ArtifactSource.class); - } - - /** - * Gets known ArtifactSource values. - * - * @return known ArtifactSource values. - */ - public static Collection values() { - return values(ArtifactSource.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AzureKeyVaultKms.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AzureKeyVaultKms.java deleted file mode 100644 index 2f50fe818ab9..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AzureKeyVaultKms.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Azure Key Vault key management service settings for the security profile. - */ -@Fluent -public final class AzureKeyVaultKms implements JsonSerializable { - /* - * Whether to enable Azure Key Vault key management service. The default is false. - */ - private Boolean enabled; - - /* - * Identifier of Azure Key Vault key. See [key identifier - * format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and- - * object-name) for more details. When Azure Key Vault key management service is enabled, this field is required and - * must be a valid key identifier. When Azure Key Vault key management service is disabled, leave the field empty. - */ - private String keyId; - - /* - * Network access of the key vault. Network access of key vault. The possible values are `Public` and `Private`. - * `Public` means the key vault allows public access from all networks. `Private` means the key vault disables - * public access and enables private link. The default value is `Public`. - */ - private KeyVaultNetworkAccessTypes keyVaultNetworkAccess; - - /* - * Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this field is required and must be a valid - * resource ID. When keyVaultNetworkAccess is `Public`, leave the field empty. - */ - private String keyVaultResourceId; - - /** - * Creates an instance of AzureKeyVaultKms class. - */ - public AzureKeyVaultKms() { - } - - /** - * Get the enabled property: Whether to enable Azure Key Vault key management service. The default is false. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable Azure Key Vault key management service. The default is false. - * - * @param enabled the enabled value to set. - * @return the AzureKeyVaultKms object itself. - */ - public AzureKeyVaultKms withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the keyId property: Identifier of Azure Key Vault key. See [key identifier - * format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) - * for more details. When Azure Key Vault key management service is enabled, this field is required and must be a - * valid key identifier. When Azure Key Vault key management service is disabled, leave the field empty. - * - * @return the keyId value. - */ - public String keyId() { - return this.keyId; - } - - /** - * Set the keyId property: Identifier of Azure Key Vault key. See [key identifier - * format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) - * for more details. When Azure Key Vault key management service is enabled, this field is required and must be a - * valid key identifier. When Azure Key Vault key management service is disabled, leave the field empty. - * - * @param keyId the keyId value to set. - * @return the AzureKeyVaultKms object itself. - */ - public AzureKeyVaultKms withKeyId(String keyId) { - this.keyId = keyId; - return this; - } - - /** - * Get the keyVaultNetworkAccess property: Network access of the key vault. Network access of key vault. The - * possible values are `Public` and `Private`. `Public` means the key vault allows public access from all networks. - * `Private` means the key vault disables public access and enables private link. The default value is `Public`. - * - * @return the keyVaultNetworkAccess value. - */ - public KeyVaultNetworkAccessTypes keyVaultNetworkAccess() { - return this.keyVaultNetworkAccess; - } - - /** - * Set the keyVaultNetworkAccess property: Network access of the key vault. Network access of key vault. The - * possible values are `Public` and `Private`. `Public` means the key vault allows public access from all networks. - * `Private` means the key vault disables public access and enables private link. The default value is `Public`. - * - * @param keyVaultNetworkAccess the keyVaultNetworkAccess value to set. - * @return the AzureKeyVaultKms object itself. - */ - public AzureKeyVaultKms withKeyVaultNetworkAccess(KeyVaultNetworkAccessTypes keyVaultNetworkAccess) { - this.keyVaultNetworkAccess = keyVaultNetworkAccess; - return this; - } - - /** - * Get the keyVaultResourceId property: Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this - * field is required and must be a valid resource ID. When keyVaultNetworkAccess is `Public`, leave the field empty. - * - * @return the keyVaultResourceId value. - */ - public String keyVaultResourceId() { - return this.keyVaultResourceId; - } - - /** - * Set the keyVaultResourceId property: Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this - * field is required and must be a valid resource ID. When keyVaultNetworkAccess is `Public`, leave the field empty. - * - * @param keyVaultResourceId the keyVaultResourceId value to set. - * @return the AzureKeyVaultKms object itself. - */ - public AzureKeyVaultKms withKeyVaultResourceId(String keyVaultResourceId) { - this.keyVaultResourceId = keyVaultResourceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeStringField("keyId", this.keyId); - jsonWriter.writeStringField("keyVaultNetworkAccess", - this.keyVaultNetworkAccess == null ? null : this.keyVaultNetworkAccess.toString()); - jsonWriter.writeStringField("keyVaultResourceId", this.keyVaultResourceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureKeyVaultKms from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureKeyVaultKms 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 AzureKeyVaultKms. - */ - public static AzureKeyVaultKms fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureKeyVaultKms deserializedAzureKeyVaultKms = new AzureKeyVaultKms(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedAzureKeyVaultKms.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("keyId".equals(fieldName)) { - deserializedAzureKeyVaultKms.keyId = reader.getString(); - } else if ("keyVaultNetworkAccess".equals(fieldName)) { - deserializedAzureKeyVaultKms.keyVaultNetworkAccess - = KeyVaultNetworkAccessTypes.fromString(reader.getString()); - } else if ("keyVaultResourceId".equals(fieldName)) { - deserializedAzureKeyVaultKms.keyVaultResourceId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureKeyVaultKms; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BackendPoolType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BackendPoolType.java deleted file mode 100644 index 6220922381e8..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BackendPoolType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The type of the managed inbound Load Balancer BackendPool. - */ -public final class BackendPoolType extends ExpandableStringEnum { - /** - * Static value NodeIPConfiguration for BackendPoolType. - */ - public static final BackendPoolType NODE_IPCONFIGURATION = fromString("NodeIPConfiguration"); - - /** - * Static value NodeIP for BackendPoolType. - */ - public static final BackendPoolType NODE_IP = fromString("NodeIP"); - - /** - * Creates a new instance of BackendPoolType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BackendPoolType() { - } - - /** - * Creates or finds a BackendPoolType from its string representation. - * - * @param name a name to look for. - * @return the corresponding BackendPoolType. - */ - public static BackendPoolType fromString(String name) { - return fromString(name, BackendPoolType.class); - } - - /** - * Gets known BackendPoolType values. - * - * @return known BackendPoolType values. - */ - public static Collection values() { - return values(BackendPoolType.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterUpgradeSettings.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterUpgradeSettings.java deleted file mode 100644 index fe9edbb659c0..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterUpgradeSettings.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Settings for upgrading a cluster. - */ -@Fluent -public final class ClusterUpgradeSettings implements JsonSerializable { - /* - * Settings for overrides. - */ - private UpgradeOverrideSettings overrideSettings; - - /** - * Creates an instance of ClusterUpgradeSettings class. - */ - public ClusterUpgradeSettings() { - } - - /** - * Get the overrideSettings property: Settings for overrides. - * - * @return the overrideSettings value. - */ - public UpgradeOverrideSettings overrideSettings() { - return this.overrideSettings; - } - - /** - * Set the overrideSettings property: Settings for overrides. - * - * @param overrideSettings the overrideSettings value to set. - * @return the ClusterUpgradeSettings object itself. - */ - public ClusterUpgradeSettings withOverrideSettings(UpgradeOverrideSettings overrideSettings) { - this.overrideSettings = overrideSettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (overrideSettings() != null) { - overrideSettings().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("overrideSettings", this.overrideSettings); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ClusterUpgradeSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ClusterUpgradeSettings 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 ClusterUpgradeSettings. - */ - public static ClusterUpgradeSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ClusterUpgradeSettings deserializedClusterUpgradeSettings = new ClusterUpgradeSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("overrideSettings".equals(fieldName)) { - deserializedClusterUpgradeSettings.overrideSettings = UpgradeOverrideSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedClusterUpgradeSettings; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Code.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Code.java deleted file mode 100644 index 5e916c364db4..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Code.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Tells whether the cluster is Running or Stopped. - */ -public final class Code extends ExpandableStringEnum { - /** - * Static value Running for Code. - */ - public static final Code RUNNING = fromString("Running"); - - /** - * Static value Stopped for Code. - */ - public static final Code STOPPED = fromString("Stopped"); - - /** - * Creates a new instance of Code value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Code() { - } - - /** - * Creates or finds a Code from its string representation. - * - * @param name a name to look for. - * @return the corresponding Code. - */ - public static Code fromString(String name) { - return fromString(name, Code.class); - } - - /** - * Gets known Code values. - * - * @return known Code values. - */ - public static Collection values() { - return values(Code.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CompatibleVersions.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CompatibleVersions.java deleted file mode 100644 index 950194c26564..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CompatibleVersions.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Version information about a product/service that is compatible with a service mesh revision. - */ -@Fluent -public final class CompatibleVersions implements JsonSerializable { - /* - * The product/service name. - */ - private String name; - - /* - * Product/service versions compatible with a service mesh add-on revision. - */ - private List versions; - - /** - * Creates an instance of CompatibleVersions class. - */ - public CompatibleVersions() { - } - - /** - * Get the name property: The product/service name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The product/service name. - * - * @param name the name value to set. - * @return the CompatibleVersions object itself. - */ - public CompatibleVersions withName(String name) { - this.name = name; - return this; - } - - /** - * Get the versions property: Product/service versions compatible with a service mesh add-on revision. - * - * @return the versions value. - */ - public List versions() { - return this.versions; - } - - /** - * Set the versions property: Product/service versions compatible with a service mesh add-on revision. - * - * @param versions the versions value to set. - * @return the CompatibleVersions object itself. - */ - public CompatibleVersions withVersions(List versions) { - this.versions = versions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeArrayField("versions", this.versions, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CompatibleVersions from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CompatibleVersions 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 CompatibleVersions. - */ - public static CompatibleVersions fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CompatibleVersions deserializedCompatibleVersions = new CompatibleVersions(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedCompatibleVersions.name = reader.getString(); - } else if ("versions".equals(fieldName)) { - List versions = reader.readArray(reader1 -> reader1.getString()); - deserializedCompatibleVersions.versions = versions; - } else { - reader.skipChildren(); - } - } - - return deserializedCompatibleVersions; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ConnectionStatus.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ConnectionStatus.java deleted file mode 100644 index ae33005b5b63..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ConnectionStatus.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The private link service connection status. - */ -public final class ConnectionStatus extends ExpandableStringEnum { - /** - * Static value Pending for ConnectionStatus. - */ - public static final ConnectionStatus PENDING = fromString("Pending"); - - /** - * Static value Approved for ConnectionStatus. - */ - public static final ConnectionStatus APPROVED = fromString("Approved"); - - /** - * Static value Rejected for ConnectionStatus. - */ - public static final ConnectionStatus REJECTED = fromString("Rejected"); - - /** - * Static value Disconnected for ConnectionStatus. - */ - public static final ConnectionStatus DISCONNECTED = fromString("Disconnected"); - - /** - * Creates a new instance of ConnectionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ConnectionStatus() { - } - - /** - * Creates or finds a ConnectionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding ConnectionStatus. - */ - public static ConnectionStatus fromString(String name) { - return fromString(name, ConnectionStatus.class); - } - - /** - * Gets known ConnectionStatus values. - * - * @return known ConnectionStatus values. - */ - public static Collection values() { - return values(ConnectionStatus.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceLinuxProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceLinuxProfile.java deleted file mode 100644 index f78a1d7bc7f0..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceLinuxProfile.java +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -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 Linux VMs in the container service cluster. - */ -@Fluent -public final class ContainerServiceLinuxProfile implements JsonSerializable { - /* - * The administrator username to use for Linux VMs. - */ - private String adminUsername; - - /* - * The SSH configuration for Linux-based VMs running on Azure. - */ - private ContainerServiceSshConfiguration ssh; - - /** - * Creates an instance of ContainerServiceLinuxProfile class. - */ - public ContainerServiceLinuxProfile() { - } - - /** - * Get the adminUsername property: The administrator username to use for Linux VMs. - * - * @return the adminUsername value. - */ - public String adminUsername() { - return this.adminUsername; - } - - /** - * Set the adminUsername property: The administrator username to use for Linux VMs. - * - * @param adminUsername the adminUsername value to set. - * @return the ContainerServiceLinuxProfile object itself. - */ - public ContainerServiceLinuxProfile withAdminUsername(String adminUsername) { - this.adminUsername = adminUsername; - return this; - } - - /** - * Get the ssh property: The SSH configuration for Linux-based VMs running on Azure. - * - * @return the ssh value. - */ - public ContainerServiceSshConfiguration ssh() { - return this.ssh; - } - - /** - * Set the ssh property: The SSH configuration for Linux-based VMs running on Azure. - * - * @param ssh the ssh value to set. - * @return the ContainerServiceLinuxProfile object itself. - */ - public ContainerServiceLinuxProfile withSsh(ContainerServiceSshConfiguration ssh) { - this.ssh = ssh; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (adminUsername() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property adminUsername in model ContainerServiceLinuxProfile")); - } - if (ssh() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property ssh in model ContainerServiceLinuxProfile")); - } else { - ssh().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContainerServiceLinuxProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("adminUsername", this.adminUsername); - jsonWriter.writeJsonField("ssh", this.ssh); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerServiceLinuxProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerServiceLinuxProfile 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 ContainerServiceLinuxProfile. - */ - public static ContainerServiceLinuxProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerServiceLinuxProfile deserializedContainerServiceLinuxProfile = new ContainerServiceLinuxProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("adminUsername".equals(fieldName)) { - deserializedContainerServiceLinuxProfile.adminUsername = reader.getString(); - } else if ("ssh".equals(fieldName)) { - deserializedContainerServiceLinuxProfile.ssh = ContainerServiceSshConfiguration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerServiceLinuxProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java deleted file mode 100644 index 333f0bcc9ba8..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java +++ /dev/null @@ -1,615 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Profile of network configuration. - */ -@Fluent -public final class ContainerServiceNetworkProfile implements JsonSerializable { - /* - * Network plugin used for building the Kubernetes network. - */ - private NetworkPlugin networkPlugin; - - /* - * The mode the network plugin should use. - */ - private NetworkPluginMode networkPluginMode; - - /* - * Network policy used for building the Kubernetes network. - */ - private NetworkPolicy networkPolicy; - - /* - * The network mode Azure CNI is configured with. This cannot be specified if networkPlugin is anything other than - * 'azure'. - */ - private NetworkMode networkMode; - - /* - * Network dataplane used in the Kubernetes cluster. - */ - private NetworkDataplane networkDataplane; - - /* - * Advanced Networking profile for enabling observability and security feature suite on a cluster. For more - * information see aka.ms/aksadvancednetworking. - */ - private AdvancedNetworking advancedNetworking; - - /* - * A CIDR notation IP range from which to assign pod IPs when kubenet is used. - */ - private String podCidr; - - /* - * A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. - */ - private String serviceCidr; - - /* - * An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range - * specified in serviceCidr. - */ - private String dnsServiceIp; - - /* - * The outbound (egress) routing method. This can only be set at cluster creation time and cannot be changed later. - * For more information see [egress outbound type](https://docs.microsoft.com/azure/aks/egress-outboundtype). - */ - private OutboundType outboundType; - - /* - * The load balancer sku for the managed cluster. The default is 'standard'. See [Azure Load Balancer - * SKUs](https://docs.microsoft.com/azure/load-balancer/skus) for more information about the differences between - * load balancer SKUs. - */ - private LoadBalancerSku loadBalancerSku; - - /* - * Profile of the cluster load balancer. - */ - private ManagedClusterLoadBalancerProfile loadBalancerProfile; - - /* - * Profile of the cluster NAT gateway. - */ - private ManagedClusterNatGatewayProfile natGatewayProfile; - - /* - * The profile for Static Egress Gateway addon. For more details about Static Egress Gateway, see - * https://aka.ms/aks/static-egress-gateway. - */ - private ManagedClusterStaticEgressGatewayProfile staticEgressGatewayProfile; - - /* - * The CIDR notation IP ranges from which to assign pod IPs. One IPv4 CIDR is expected for single-stack networking. - * Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking. - */ - private List podCidrs; - - /* - * The CIDR notation IP ranges from which to assign service cluster IPs. One IPv4 CIDR is expected for single-stack - * networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking. They must not - * overlap with any Subnet IP ranges. - */ - private List serviceCidrs; - - /* - * The IP families used to specify IP versions available to the cluster. IP families are used to determine - * single-stack or dual-stack clusters. For single-stack, the expected value is IPv4. For dual-stack, the expected - * values are IPv4 and IPv6. - */ - private List ipFamilies; - - /** - * Creates an instance of ContainerServiceNetworkProfile class. - */ - public ContainerServiceNetworkProfile() { - } - - /** - * Get the networkPlugin property: Network plugin used for building the Kubernetes network. - * - * @return the networkPlugin value. - */ - public NetworkPlugin networkPlugin() { - return this.networkPlugin; - } - - /** - * Set the networkPlugin property: Network plugin used for building the Kubernetes network. - * - * @param networkPlugin the networkPlugin value to set. - * @return the ContainerServiceNetworkProfile object itself. - */ - public ContainerServiceNetworkProfile withNetworkPlugin(NetworkPlugin networkPlugin) { - this.networkPlugin = networkPlugin; - return this; - } - - /** - * Get the networkPluginMode property: The mode the network plugin should use. - * - * @return the networkPluginMode value. - */ - public NetworkPluginMode networkPluginMode() { - return this.networkPluginMode; - } - - /** - * Set the networkPluginMode property: The mode the network plugin should use. - * - * @param networkPluginMode the networkPluginMode value to set. - * @return the ContainerServiceNetworkProfile object itself. - */ - public ContainerServiceNetworkProfile withNetworkPluginMode(NetworkPluginMode networkPluginMode) { - this.networkPluginMode = networkPluginMode; - return this; - } - - /** - * Get the networkPolicy property: Network policy used for building the Kubernetes network. - * - * @return the networkPolicy value. - */ - public NetworkPolicy networkPolicy() { - return this.networkPolicy; - } - - /** - * Set the networkPolicy property: Network policy used for building the Kubernetes network. - * - * @param networkPolicy the networkPolicy value to set. - * @return the ContainerServiceNetworkProfile object itself. - */ - public ContainerServiceNetworkProfile withNetworkPolicy(NetworkPolicy networkPolicy) { - this.networkPolicy = networkPolicy; - return this; - } - - /** - * Get the networkMode property: The network mode Azure CNI is configured with. This cannot be specified if - * networkPlugin is anything other than 'azure'. - * - * @return the networkMode value. - */ - public NetworkMode networkMode() { - return this.networkMode; - } - - /** - * Set the networkMode property: The network mode Azure CNI is configured with. This cannot be specified if - * networkPlugin is anything other than 'azure'. - * - * @param networkMode the networkMode value to set. - * @return the ContainerServiceNetworkProfile object itself. - */ - public ContainerServiceNetworkProfile withNetworkMode(NetworkMode networkMode) { - this.networkMode = networkMode; - return this; - } - - /** - * Get the networkDataplane property: Network dataplane used in the Kubernetes cluster. - * - * @return the networkDataplane value. - */ - public NetworkDataplane networkDataplane() { - return this.networkDataplane; - } - - /** - * Set the networkDataplane property: Network dataplane used in the Kubernetes cluster. - * - * @param networkDataplane the networkDataplane value to set. - * @return the ContainerServiceNetworkProfile object itself. - */ - public ContainerServiceNetworkProfile withNetworkDataplane(NetworkDataplane networkDataplane) { - this.networkDataplane = networkDataplane; - return this; - } - - /** - * Get the advancedNetworking property: Advanced Networking profile for enabling observability and security feature - * suite on a cluster. For more information see aka.ms/aksadvancednetworking. - * - * @return the advancedNetworking value. - */ - public AdvancedNetworking advancedNetworking() { - return this.advancedNetworking; - } - - /** - * Set the advancedNetworking property: Advanced Networking profile for enabling observability and security feature - * suite on a cluster. For more information see aka.ms/aksadvancednetworking. - * - * @param advancedNetworking the advancedNetworking value to set. - * @return the ContainerServiceNetworkProfile object itself. - */ - public ContainerServiceNetworkProfile withAdvancedNetworking(AdvancedNetworking advancedNetworking) { - this.advancedNetworking = advancedNetworking; - return this; - } - - /** - * Get the podCidr property: A CIDR notation IP range from which to assign pod IPs when kubenet is used. - * - * @return the podCidr value. - */ - public String podCidr() { - return this.podCidr; - } - - /** - * Set the podCidr property: A CIDR notation IP range from which to assign pod IPs when kubenet is used. - * - * @param podCidr the podCidr value to set. - * @return the ContainerServiceNetworkProfile object itself. - */ - public ContainerServiceNetworkProfile withPodCidr(String podCidr) { - this.podCidr = podCidr; - return this; - } - - /** - * Get the serviceCidr property: A CIDR notation IP range from which to assign service cluster IPs. It must not - * overlap with any Subnet IP ranges. - * - * @return the serviceCidr value. - */ - public String serviceCidr() { - return this.serviceCidr; - } - - /** - * Set the serviceCidr property: A CIDR notation IP range from which to assign service cluster IPs. It must not - * overlap with any Subnet IP ranges. - * - * @param serviceCidr the serviceCidr value to set. - * @return the ContainerServiceNetworkProfile object itself. - */ - public ContainerServiceNetworkProfile withServiceCidr(String serviceCidr) { - this.serviceCidr = serviceCidr; - return this; - } - - /** - * Get the dnsServiceIp property: An IP address assigned to the Kubernetes DNS service. It must be within the - * Kubernetes service address range specified in serviceCidr. - * - * @return the dnsServiceIp value. - */ - public String dnsServiceIp() { - return this.dnsServiceIp; - } - - /** - * Set the dnsServiceIp property: An IP address assigned to the Kubernetes DNS service. It must be within the - * Kubernetes service address range specified in serviceCidr. - * - * @param dnsServiceIp the dnsServiceIp value to set. - * @return the ContainerServiceNetworkProfile object itself. - */ - public ContainerServiceNetworkProfile withDnsServiceIp(String dnsServiceIp) { - this.dnsServiceIp = dnsServiceIp; - return this; - } - - /** - * Get the outboundType property: The outbound (egress) routing method. This can only be set at cluster creation - * time and cannot be changed later. For more information see [egress outbound - * type](https://docs.microsoft.com/azure/aks/egress-outboundtype). - * - * @return the outboundType value. - */ - public OutboundType outboundType() { - return this.outboundType; - } - - /** - * Set the outboundType property: The outbound (egress) routing method. This can only be set at cluster creation - * time and cannot be changed later. For more information see [egress outbound - * type](https://docs.microsoft.com/azure/aks/egress-outboundtype). - * - * @param outboundType the outboundType value to set. - * @return the ContainerServiceNetworkProfile object itself. - */ - public ContainerServiceNetworkProfile withOutboundType(OutboundType outboundType) { - this.outboundType = outboundType; - return this; - } - - /** - * Get the loadBalancerSku property: The load balancer sku for the managed cluster. The default is 'standard'. See - * [Azure Load Balancer SKUs](https://docs.microsoft.com/azure/load-balancer/skus) for more information about the - * differences between load balancer SKUs. - * - * @return the loadBalancerSku value. - */ - public LoadBalancerSku loadBalancerSku() { - return this.loadBalancerSku; - } - - /** - * Set the loadBalancerSku property: The load balancer sku for the managed cluster. The default is 'standard'. See - * [Azure Load Balancer SKUs](https://docs.microsoft.com/azure/load-balancer/skus) for more information about the - * differences between load balancer SKUs. - * - * @param loadBalancerSku the loadBalancerSku value to set. - * @return the ContainerServiceNetworkProfile object itself. - */ - public ContainerServiceNetworkProfile withLoadBalancerSku(LoadBalancerSku loadBalancerSku) { - this.loadBalancerSku = loadBalancerSku; - return this; - } - - /** - * Get the loadBalancerProfile property: Profile of the cluster load balancer. - * - * @return the loadBalancerProfile value. - */ - public ManagedClusterLoadBalancerProfile loadBalancerProfile() { - return this.loadBalancerProfile; - } - - /** - * Set the loadBalancerProfile property: Profile of the cluster load balancer. - * - * @param loadBalancerProfile the loadBalancerProfile value to set. - * @return the ContainerServiceNetworkProfile object itself. - */ - public ContainerServiceNetworkProfile - withLoadBalancerProfile(ManagedClusterLoadBalancerProfile loadBalancerProfile) { - this.loadBalancerProfile = loadBalancerProfile; - return this; - } - - /** - * Get the natGatewayProfile property: Profile of the cluster NAT gateway. - * - * @return the natGatewayProfile value. - */ - public ManagedClusterNatGatewayProfile natGatewayProfile() { - return this.natGatewayProfile; - } - - /** - * Set the natGatewayProfile property: Profile of the cluster NAT gateway. - * - * @param natGatewayProfile the natGatewayProfile value to set. - * @return the ContainerServiceNetworkProfile object itself. - */ - public ContainerServiceNetworkProfile withNatGatewayProfile(ManagedClusterNatGatewayProfile natGatewayProfile) { - this.natGatewayProfile = natGatewayProfile; - return this; - } - - /** - * Get the staticEgressGatewayProfile property: The profile for Static Egress Gateway addon. For more details about - * Static Egress Gateway, see https://aka.ms/aks/static-egress-gateway. - * - * @return the staticEgressGatewayProfile value. - */ - public ManagedClusterStaticEgressGatewayProfile staticEgressGatewayProfile() { - return this.staticEgressGatewayProfile; - } - - /** - * Set the staticEgressGatewayProfile property: The profile for Static Egress Gateway addon. For more details about - * Static Egress Gateway, see https://aka.ms/aks/static-egress-gateway. - * - * @param staticEgressGatewayProfile the staticEgressGatewayProfile value to set. - * @return the ContainerServiceNetworkProfile object itself. - */ - public ContainerServiceNetworkProfile - withStaticEgressGatewayProfile(ManagedClusterStaticEgressGatewayProfile staticEgressGatewayProfile) { - this.staticEgressGatewayProfile = staticEgressGatewayProfile; - return this; - } - - /** - * Get the podCidrs property: The CIDR notation IP ranges from which to assign pod IPs. One IPv4 CIDR is expected - * for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack - * networking. - * - * @return the podCidrs value. - */ - public List podCidrs() { - return this.podCidrs; - } - - /** - * Set the podCidrs property: The CIDR notation IP ranges from which to assign pod IPs. One IPv4 CIDR is expected - * for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack - * networking. - * - * @param podCidrs the podCidrs value to set. - * @return the ContainerServiceNetworkProfile object itself. - */ - public ContainerServiceNetworkProfile withPodCidrs(List podCidrs) { - this.podCidrs = podCidrs; - return this; - } - - /** - * Get the serviceCidrs property: The CIDR notation IP ranges from which to assign service cluster IPs. One IPv4 - * CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for - * dual-stack networking. They must not overlap with any Subnet IP ranges. - * - * @return the serviceCidrs value. - */ - public List serviceCidrs() { - return this.serviceCidrs; - } - - /** - * Set the serviceCidrs property: The CIDR notation IP ranges from which to assign service cluster IPs. One IPv4 - * CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for - * dual-stack networking. They must not overlap with any Subnet IP ranges. - * - * @param serviceCidrs the serviceCidrs value to set. - * @return the ContainerServiceNetworkProfile object itself. - */ - public ContainerServiceNetworkProfile withServiceCidrs(List serviceCidrs) { - this.serviceCidrs = serviceCidrs; - return this; - } - - /** - * Get the ipFamilies property: The IP families used to specify IP versions available to the cluster. IP families - * are used to determine single-stack or dual-stack clusters. For single-stack, the expected value is IPv4. For - * dual-stack, the expected values are IPv4 and IPv6. - * - * @return the ipFamilies value. - */ - public List ipFamilies() { - return this.ipFamilies; - } - - /** - * Set the ipFamilies property: The IP families used to specify IP versions available to the cluster. IP families - * are used to determine single-stack or dual-stack clusters. For single-stack, the expected value is IPv4. For - * dual-stack, the expected values are IPv4 and IPv6. - * - * @param ipFamilies the ipFamilies value to set. - * @return the ContainerServiceNetworkProfile object itself. - */ - public ContainerServiceNetworkProfile withIpFamilies(List ipFamilies) { - this.ipFamilies = ipFamilies; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (advancedNetworking() != null) { - advancedNetworking().validate(); - } - if (loadBalancerProfile() != null) { - loadBalancerProfile().validate(); - } - if (natGatewayProfile() != null) { - natGatewayProfile().validate(); - } - if (staticEgressGatewayProfile() != null) { - staticEgressGatewayProfile().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("networkPlugin", this.networkPlugin == null ? null : this.networkPlugin.toString()); - jsonWriter.writeStringField("networkPluginMode", - this.networkPluginMode == null ? null : this.networkPluginMode.toString()); - jsonWriter.writeStringField("networkPolicy", this.networkPolicy == null ? null : this.networkPolicy.toString()); - jsonWriter.writeStringField("networkMode", this.networkMode == null ? null : this.networkMode.toString()); - jsonWriter.writeStringField("networkDataplane", - this.networkDataplane == null ? null : this.networkDataplane.toString()); - jsonWriter.writeJsonField("advancedNetworking", this.advancedNetworking); - jsonWriter.writeStringField("podCidr", this.podCidr); - jsonWriter.writeStringField("serviceCidr", this.serviceCidr); - jsonWriter.writeStringField("dnsServiceIP", this.dnsServiceIp); - jsonWriter.writeStringField("outboundType", this.outboundType == null ? null : this.outboundType.toString()); - jsonWriter.writeStringField("loadBalancerSku", - this.loadBalancerSku == null ? null : this.loadBalancerSku.toString()); - jsonWriter.writeJsonField("loadBalancerProfile", this.loadBalancerProfile); - jsonWriter.writeJsonField("natGatewayProfile", this.natGatewayProfile); - jsonWriter.writeJsonField("staticEgressGatewayProfile", this.staticEgressGatewayProfile); - jsonWriter.writeArrayField("podCidrs", this.podCidrs, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("serviceCidrs", this.serviceCidrs, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("ipFamilies", this.ipFamilies, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerServiceNetworkProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerServiceNetworkProfile 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 ContainerServiceNetworkProfile. - */ - public static ContainerServiceNetworkProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerServiceNetworkProfile deserializedContainerServiceNetworkProfile - = new ContainerServiceNetworkProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("networkPlugin".equals(fieldName)) { - deserializedContainerServiceNetworkProfile.networkPlugin - = NetworkPlugin.fromString(reader.getString()); - } else if ("networkPluginMode".equals(fieldName)) { - deserializedContainerServiceNetworkProfile.networkPluginMode - = NetworkPluginMode.fromString(reader.getString()); - } else if ("networkPolicy".equals(fieldName)) { - deserializedContainerServiceNetworkProfile.networkPolicy - = NetworkPolicy.fromString(reader.getString()); - } else if ("networkMode".equals(fieldName)) { - deserializedContainerServiceNetworkProfile.networkMode = NetworkMode.fromString(reader.getString()); - } else if ("networkDataplane".equals(fieldName)) { - deserializedContainerServiceNetworkProfile.networkDataplane - = NetworkDataplane.fromString(reader.getString()); - } else if ("advancedNetworking".equals(fieldName)) { - deserializedContainerServiceNetworkProfile.advancedNetworking = AdvancedNetworking.fromJson(reader); - } else if ("podCidr".equals(fieldName)) { - deserializedContainerServiceNetworkProfile.podCidr = reader.getString(); - } else if ("serviceCidr".equals(fieldName)) { - deserializedContainerServiceNetworkProfile.serviceCidr = reader.getString(); - } else if ("dnsServiceIP".equals(fieldName)) { - deserializedContainerServiceNetworkProfile.dnsServiceIp = reader.getString(); - } else if ("outboundType".equals(fieldName)) { - deserializedContainerServiceNetworkProfile.outboundType - = OutboundType.fromString(reader.getString()); - } else if ("loadBalancerSku".equals(fieldName)) { - deserializedContainerServiceNetworkProfile.loadBalancerSku - = LoadBalancerSku.fromString(reader.getString()); - } else if ("loadBalancerProfile".equals(fieldName)) { - deserializedContainerServiceNetworkProfile.loadBalancerProfile - = ManagedClusterLoadBalancerProfile.fromJson(reader); - } else if ("natGatewayProfile".equals(fieldName)) { - deserializedContainerServiceNetworkProfile.natGatewayProfile - = ManagedClusterNatGatewayProfile.fromJson(reader); - } else if ("staticEgressGatewayProfile".equals(fieldName)) { - deserializedContainerServiceNetworkProfile.staticEgressGatewayProfile - = ManagedClusterStaticEgressGatewayProfile.fromJson(reader); - } else if ("podCidrs".equals(fieldName)) { - List podCidrs = reader.readArray(reader1 -> reader1.getString()); - deserializedContainerServiceNetworkProfile.podCidrs = podCidrs; - } else if ("serviceCidrs".equals(fieldName)) { - List serviceCidrs = reader.readArray(reader1 -> reader1.getString()); - deserializedContainerServiceNetworkProfile.serviceCidrs = serviceCidrs; - } else if ("ipFamilies".equals(fieldName)) { - List ipFamilies = reader.readArray(reader1 -> IpFamily.fromString(reader1.getString())); - deserializedContainerServiceNetworkProfile.ipFamilies = ipFamilies; - } else { - reader.skipChildren(); - } - } - - return deserializedContainerServiceNetworkProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshConfiguration.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshConfiguration.java deleted file mode 100644 index d27bf72b9860..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshConfiguration.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -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 ContainerServiceSshConfiguration implements JsonSerializable { - /* - * The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. - */ - private List publicKeys; - - /** - * Creates an instance of ContainerServiceSshConfiguration class. - */ - public ContainerServiceSshConfiguration() { - } - - /** - * Get the publicKeys property: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of - * 1 key may be specified. - * - * @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. A maximum of - * 1 key may be specified. - * - * @param publicKeys the publicKeys value to set. - * @return the ContainerServiceSshConfiguration object itself. - */ - public ContainerServiceSshConfiguration withPublicKeys(List publicKeys) { - this.publicKeys = publicKeys; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (publicKeys() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property publicKeys in model ContainerServiceSshConfiguration")); - } else { - publicKeys().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContainerServiceSshConfiguration.class); - - /** - * {@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 ContainerServiceSshConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerServiceSshConfiguration 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 ContainerServiceSshConfiguration. - */ - public static ContainerServiceSshConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerServiceSshConfiguration deserializedContainerServiceSshConfiguration - = new ContainerServiceSshConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("publicKeys".equals(fieldName)) { - List publicKeys - = reader.readArray(reader1 -> ContainerServiceSshPublicKey.fromJson(reader1)); - deserializedContainerServiceSshConfiguration.publicKeys = publicKeys; - } else { - reader.skipChildren(); - } - } - - return deserializedContainerServiceSshConfiguration; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshPublicKey.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshPublicKey.java deleted file mode 100644 index b25eeebcf585..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshPublicKey.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -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 data. - */ -@Fluent -public final class ContainerServiceSshPublicKey implements JsonSerializable { - /* - * Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or - * without headers. - */ - private String keyData; - - /** - * Creates an instance of ContainerServiceSshPublicKey class. - */ - public ContainerServiceSshPublicKey() { - } - - /** - * Get the keyData property: Certificate public key used to authenticate with VMs through SSH. The certificate must - * be in PEM format with or without headers. - * - * @return the keyData value. - */ - public String keyData() { - return this.keyData; - } - - /** - * Set the keyData property: Certificate public key used to authenticate with VMs through SSH. The certificate must - * be in PEM format with or without headers. - * - * @param keyData the keyData value to set. - * @return the ContainerServiceSshPublicKey object itself. - */ - public ContainerServiceSshPublicKey withKeyData(String keyData) { - this.keyData = keyData; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyData() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyData in model ContainerServiceSshPublicKey")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContainerServiceSshPublicKey.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("keyData", this.keyData); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerServiceSshPublicKey from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerServiceSshPublicKey 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 ContainerServiceSshPublicKey. - */ - public static ContainerServiceSshPublicKey fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerServiceSshPublicKey deserializedContainerServiceSshPublicKey = new ContainerServiceSshPublicKey(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("keyData".equals(fieldName)) { - deserializedContainerServiceSshPublicKey.keyData = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerServiceSshPublicKey; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CreationData.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CreationData.java deleted file mode 100644 index 4a42a8ae7ac2..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CreationData.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Data used when creating a target resource from a source resource. - */ -@Fluent -public final class CreationData implements JsonSerializable { - /* - * This is the ARM ID of the source object to be used to create the target object. - */ - private String sourceResourceId; - - /** - * Creates an instance of CreationData class. - */ - public CreationData() { - } - - /** - * Get the sourceResourceId property: This is the ARM ID of the source object to be used to create the target - * object. - * - * @return the sourceResourceId value. - */ - public String sourceResourceId() { - return this.sourceResourceId; - } - - /** - * Set the sourceResourceId property: This is the ARM ID of the source object to be used to create the target - * object. - * - * @param sourceResourceId the sourceResourceId value to set. - * @return the CreationData object itself. - */ - public CreationData withSourceResourceId(String sourceResourceId) { - this.sourceResourceId = sourceResourceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sourceResourceId", this.sourceResourceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CreationData from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CreationData 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 CreationData. - */ - public static CreationData fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CreationData deserializedCreationData = new CreationData(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sourceResourceId".equals(fieldName)) { - deserializedCreationData.sourceResourceId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCreationData; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CredentialResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CredentialResult.java deleted file mode 100644 index ae8cd9c8ea16..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CredentialResult.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The credential result response. - */ -@Immutable -public final class CredentialResult implements JsonSerializable { - /* - * The name of the credential. - */ - private String name; - - /* - * Base64-encoded Kubernetes configuration file. - */ - private byte[] value; - - /** - * Creates an instance of CredentialResult class. - */ - public CredentialResult() { - } - - /** - * Get the name property: The name of the credential. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the value property: Base64-encoded Kubernetes configuration file. - * - * @return the value value. - */ - public byte[] value() { - return CoreUtils.clone(this.value); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CredentialResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CredentialResult 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 CredentialResult. - */ - public static CredentialResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CredentialResult deserializedCredentialResult = new CredentialResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedCredentialResult.name = reader.getString(); - } else if ("value".equals(fieldName)) { - deserializedCredentialResult.value = reader.getBinary(); - } else { - reader.skipChildren(); - } - } - - return deserializedCredentialResult; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DailySchedule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DailySchedule.java deleted file mode 100644 index c55656524baf..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DailySchedule.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * For schedules like: 'recur every day' or 'recur every 3 days'. - */ -@Fluent -public final class DailySchedule implements JsonSerializable { - /* - * Specifies the number of days between each set of occurrences. - */ - private int intervalDays; - - /** - * Creates an instance of DailySchedule class. - */ - public DailySchedule() { - } - - /** - * Get the intervalDays property: Specifies the number of days between each set of occurrences. - * - * @return the intervalDays value. - */ - public int intervalDays() { - return this.intervalDays; - } - - /** - * Set the intervalDays property: Specifies the number of days between each set of occurrences. - * - * @param intervalDays the intervalDays value to set. - * @return the DailySchedule object itself. - */ - public DailySchedule withIntervalDays(int intervalDays) { - this.intervalDays = intervalDays; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeIntField("intervalDays", this.intervalDays); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DailySchedule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DailySchedule 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 DailySchedule. - */ - public static DailySchedule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DailySchedule deserializedDailySchedule = new DailySchedule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("intervalDays".equals(fieldName)) { - deserializedDailySchedule.intervalDays = reader.getInt(); - } else { - reader.skipChildren(); - } - } - - return deserializedDailySchedule; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DateSpan.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DateSpan.java deleted file mode 100644 index 48f64b128481..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DateSpan.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.LocalDate; -import java.util.Objects; - -/** - * A date range. For example, between '2022-12-23' and '2023-01-05'. - */ -@Fluent -public final class DateSpan implements JsonSerializable { - /* - * The start date of the date span. - */ - private LocalDate start; - - /* - * The end date of the date span. - */ - private LocalDate end; - - /** - * Creates an instance of DateSpan class. - */ - public DateSpan() { - } - - /** - * Get the start property: The start date of the date span. - * - * @return the start value. - */ - public LocalDate start() { - return this.start; - } - - /** - * Set the start property: The start date of the date span. - * - * @param start the start value to set. - * @return the DateSpan object itself. - */ - public DateSpan withStart(LocalDate start) { - this.start = start; - return this; - } - - /** - * Get the end property: The end date of the date span. - * - * @return the end value. - */ - public LocalDate end() { - return this.end; - } - - /** - * Set the end property: The end date of the date span. - * - * @param end the end value to set. - * @return the DateSpan object itself. - */ - public DateSpan withEnd(LocalDate end) { - this.end = end; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (start() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property start in model DateSpan")); - } - if (end() == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Missing required property end in model DateSpan")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DateSpan.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("start", Objects.toString(this.start, null)); - jsonWriter.writeStringField("end", Objects.toString(this.end, null)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DateSpan from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DateSpan 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 DateSpan. - */ - public static DateSpan fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DateSpan deserializedDateSpan = new DateSpan(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("start".equals(fieldName)) { - deserializedDateSpan.start - = reader.getNullable(nonNullReader -> LocalDate.parse(nonNullReader.getString())); - } else if ("end".equals(fieldName)) { - deserializedDateSpan.end - = reader.getNullable(nonNullReader -> LocalDate.parse(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedDateSpan; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DelegatedResource.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DelegatedResource.java deleted file mode 100644 index b795012803b1..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DelegatedResource.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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.Objects; -import java.util.UUID; - -/** - * Delegated resource properties - internal use only. - */ -@Fluent -public final class DelegatedResource implements JsonSerializable { - /* - * The ARM resource id of the delegated resource - internal use only. - */ - private String resourceId; - - /* - * The tenant id of the delegated resource - internal use only. - */ - private UUID tenantId; - - /* - * The delegation id of the referral delegation (optional) - internal use only. - */ - private String referralResource; - - /* - * The source resource location - internal use only. - */ - private String location; - - /** - * Creates an instance of DelegatedResource class. - */ - public DelegatedResource() { - } - - /** - * Get the resourceId property: The ARM resource id of the delegated resource - internal use only. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId property: The ARM resource id of the delegated resource - internal use only. - * - * @param resourceId the resourceId value to set. - * @return the DelegatedResource object itself. - */ - public DelegatedResource withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the tenantId property: The tenant id of the delegated resource - internal use only. - * - * @return the tenantId value. - */ - public UUID tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: The tenant id of the delegated resource - internal use only. - * - * @param tenantId the tenantId value to set. - * @return the DelegatedResource object itself. - */ - public DelegatedResource withTenantId(UUID tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the referralResource property: The delegation id of the referral delegation (optional) - internal use only. - * - * @return the referralResource value. - */ - public String referralResource() { - return this.referralResource; - } - - /** - * Set the referralResource property: The delegation id of the referral delegation (optional) - internal use only. - * - * @param referralResource the referralResource value to set. - * @return the DelegatedResource object itself. - */ - public DelegatedResource withReferralResource(String referralResource) { - this.referralResource = referralResource; - return this; - } - - /** - * Get the location property: The source resource location - internal use only. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The source resource location - internal use only. - * - * @param location the location value to set. - * @return the DelegatedResource object itself. - */ - public DelegatedResource withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("resourceId", this.resourceId); - jsonWriter.writeStringField("tenantId", Objects.toString(this.tenantId, null)); - jsonWriter.writeStringField("referralResource", this.referralResource); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DelegatedResource from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DelegatedResource 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 DelegatedResource. - */ - public static DelegatedResource fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DelegatedResource deserializedDelegatedResource = new DelegatedResource(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceId".equals(fieldName)) { - deserializedDelegatedResource.resourceId = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedDelegatedResource.tenantId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("referralResource".equals(fieldName)) { - deserializedDelegatedResource.referralResource = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedDelegatedResource.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDelegatedResource; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DeletePolicy.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DeletePolicy.java deleted file mode 100644 index 9fc39e8ee0de..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DeletePolicy.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Delete options of a namespace. - */ -public final class DeletePolicy extends ExpandableStringEnum { - /** - * Static value Keep for DeletePolicy. - */ - public static final DeletePolicy KEEP = fromString("Keep"); - - /** - * Static value Delete for DeletePolicy. - */ - public static final DeletePolicy DELETE = fromString("Delete"); - - /** - * Creates a new instance of DeletePolicy value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DeletePolicy() { - } - - /** - * Creates or finds a DeletePolicy from its string representation. - * - * @param name a name to look for. - * @return the corresponding DeletePolicy. - */ - public static DeletePolicy fromString(String name) { - return fromString(name, DeletePolicy.class); - } - - /** - * Gets known DeletePolicy values. - * - * @return known DeletePolicy values. - */ - public static Collection values() { - return values(DeletePolicy.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDependency.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDependency.java deleted file mode 100644 index 5da756e113d6..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDependency.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * A domain name that AKS agent nodes are reaching at. - */ -@Fluent -public final class EndpointDependency implements JsonSerializable { - /* - * The domain name of the dependency. - */ - private String domainName; - - /* - * The Ports and Protocols used when connecting to domainName. - */ - private List endpointDetails; - - /** - * Creates an instance of EndpointDependency class. - */ - public EndpointDependency() { - } - - /** - * Get the domainName property: The domain name of the dependency. - * - * @return the domainName value. - */ - public String domainName() { - return this.domainName; - } - - /** - * Set the domainName property: The domain name of the dependency. - * - * @param domainName the domainName value to set. - * @return the EndpointDependency object itself. - */ - public EndpointDependency withDomainName(String domainName) { - this.domainName = domainName; - return this; - } - - /** - * Get the endpointDetails property: The Ports and Protocols used when connecting to domainName. - * - * @return the endpointDetails value. - */ - public List endpointDetails() { - return this.endpointDetails; - } - - /** - * Set the endpointDetails property: The Ports and Protocols used when connecting to domainName. - * - * @param endpointDetails the endpointDetails value to set. - * @return the EndpointDependency object itself. - */ - public EndpointDependency withEndpointDetails(List endpointDetails) { - this.endpointDetails = endpointDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (endpointDetails() != null) { - endpointDetails().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("domainName", this.domainName); - jsonWriter.writeArrayField("endpointDetails", this.endpointDetails, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EndpointDependency from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EndpointDependency 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 EndpointDependency. - */ - public static EndpointDependency fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EndpointDependency deserializedEndpointDependency = new EndpointDependency(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("domainName".equals(fieldName)) { - deserializedEndpointDependency.domainName = reader.getString(); - } else if ("endpointDetails".equals(fieldName)) { - List endpointDetails - = reader.readArray(reader1 -> EndpointDetail.fromJson(reader1)); - deserializedEndpointDependency.endpointDetails = endpointDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedEndpointDependency; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDetail.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDetail.java deleted file mode 100644 index ed2f615a1ac2..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDetail.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * connect information from the AKS agent nodes to a single endpoint. - */ -@Fluent -public final class EndpointDetail implements JsonSerializable { - /* - * An IP Address that Domain Name currently resolves to. - */ - private String ipAddress; - - /* - * The port an endpoint is connected to. - */ - private Integer port; - - /* - * The protocol used for connection - */ - private String protocol; - - /* - * Description of the detail - */ - private String description; - - /** - * Creates an instance of EndpointDetail class. - */ - public EndpointDetail() { - } - - /** - * Get the ipAddress property: An IP Address that Domain Name currently resolves to. - * - * @return the ipAddress value. - */ - public String ipAddress() { - return this.ipAddress; - } - - /** - * Set the ipAddress property: An IP Address that Domain Name currently resolves to. - * - * @param ipAddress the ipAddress value to set. - * @return the EndpointDetail object itself. - */ - public EndpointDetail withIpAddress(String ipAddress) { - this.ipAddress = ipAddress; - return this; - } - - /** - * Get the port property: The port an endpoint is connected to. - * - * @return the port value. - */ - public Integer port() { - return this.port; - } - - /** - * Set the port property: The port an endpoint is connected to. - * - * @param port the port value to set. - * @return the EndpointDetail object itself. - */ - public EndpointDetail withPort(Integer port) { - this.port = port; - return this; - } - - /** - * Get the protocol property: The protocol used for connection. - * - * @return the protocol value. - */ - public String protocol() { - return this.protocol; - } - - /** - * Set the protocol property: The protocol used for connection. - * - * @param protocol the protocol value to set. - * @return the EndpointDetail object itself. - */ - public EndpointDetail withProtocol(String protocol) { - this.protocol = protocol; - return this; - } - - /** - * Get the description property: Description of the detail. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description of the detail. - * - * @param description the description value to set. - * @return the EndpointDetail object itself. - */ - public EndpointDetail withDescription(String description) { - this.description = description; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("ipAddress", this.ipAddress); - jsonWriter.writeNumberField("port", this.port); - jsonWriter.writeStringField("protocol", this.protocol); - jsonWriter.writeStringField("description", this.description); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EndpointDetail from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EndpointDetail 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 EndpointDetail. - */ - public static EndpointDetail fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EndpointDetail deserializedEndpointDetail = new EndpointDetail(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ipAddress".equals(fieldName)) { - deserializedEndpointDetail.ipAddress = reader.getString(); - } else if ("port".equals(fieldName)) { - deserializedEndpointDetail.port = reader.getNullable(JsonReader::getInt); - } else if ("protocol".equals(fieldName)) { - deserializedEndpointDetail.protocol = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedEndpointDetail.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEndpointDetail; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Expander.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Expander.java deleted file mode 100644 index 73a681d770ba..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Expander.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The expander to use when scaling up. If not specified, the default is 'random'. See - * [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) for - * more information. - */ -public final class Expander extends ExpandableStringEnum { - /** - * Static value least-waste for Expander. - */ - public static final Expander LEAST_WASTE = fromString("least-waste"); - - /** - * Static value most-pods for Expander. - */ - public static final Expander MOST_PODS = fromString("most-pods"); - - /** - * Static value priority for Expander. - */ - public static final Expander PRIORITY = fromString("priority"); - - /** - * Static value random for Expander. - */ - public static final Expander RANDOM = fromString("random"); - - /** - * Creates a new instance of Expander value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Expander() { - } - - /** - * Creates or finds a Expander from its string representation. - * - * @param name a name to look for. - * @return the corresponding Expander. - */ - public static Expander fromString(String name) { - return fromString(name, Expander.class); - } - - /** - * Gets known Expander values. - * - * @return known Expander values. - */ - public static Collection values() { - return values(Expander.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocation.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocation.java deleted file mode 100644 index 8855d2051c24..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocation.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 ExtendedLocationTypes 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 ExtendedLocationTypes 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(ExtendedLocationTypes type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@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 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 = ExtendedLocationTypes.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedExtendedLocation; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocationTypes.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocationTypes.java deleted file mode 100644 index b5f3d77450db..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocationTypes.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The type of extendedLocation. - */ -public final class ExtendedLocationTypes extends ExpandableStringEnum { - /** - * Static value EdgeZone for ExtendedLocationTypes. - */ - public static final ExtendedLocationTypes EDGE_ZONE = fromString("EdgeZone"); - - /** - * Creates a new instance of ExtendedLocationTypes value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ExtendedLocationTypes() { - } - - /** - * Creates or finds a ExtendedLocationTypes from its string representation. - * - * @param name a name to look for. - * @return the corresponding ExtendedLocationTypes. - */ - public static ExtendedLocationTypes fromString(String name) { - return fromString(name, ExtendedLocationTypes.class); - } - - /** - * Gets known ExtendedLocationTypes values. - * - * @return known ExtendedLocationTypes values. - */ - public static Collection values() { - return values(ExtendedLocationTypes.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Format.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Format.java deleted file mode 100644 index f27af9563915..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Format.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for Format. - */ -public final class Format extends ExpandableStringEnum { - /** - * Static value azure for Format. - */ - public static final Format AZURE = fromString("azure"); - - /** - * Static value exec for Format. - */ - public static final Format EXEC = fromString("exec"); - - /** - * Creates a new instance of Format value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Format() { - } - - /** - * Creates or finds a Format from its string representation. - * - * @param name a name to look for. - * @return the corresponding Format. - */ - public static Format fromString(String name) { - return fromString(name, Format.class); - } - - /** - * Gets known Format values. - * - * @return known Format values. - */ - public static Collection values() { - return values(Format.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuDriver.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuDriver.java deleted file mode 100644 index d606e716dd65..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuDriver.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Whether to install GPU drivers. When it's not specified, default is Install. - */ -public final class GpuDriver extends ExpandableStringEnum { - /** - * Static value Install for GpuDriver. - */ - public static final GpuDriver INSTALL = fromString("Install"); - - /** - * Static value None for GpuDriver. - */ - public static final GpuDriver NONE = fromString("None"); - - /** - * Creates a new instance of GpuDriver value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public GpuDriver() { - } - - /** - * Creates or finds a GpuDriver from its string representation. - * - * @param name a name to look for. - * @return the corresponding GpuDriver. - */ - public static GpuDriver fromString(String name) { - return fromString(name, GpuDriver.class); - } - - /** - * Gets known GpuDriver values. - * - * @return known GpuDriver values. - */ - public static Collection values() { - return values(GpuDriver.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuInstanceProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuInstanceProfile.java deleted file mode 100644 index 706ae87c5b9c..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuInstanceProfile.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. - */ -public final class GpuInstanceProfile extends ExpandableStringEnum { - /** - * Static value MIG1g for GpuInstanceProfile. - */ - public static final GpuInstanceProfile MIG1G = fromString("MIG1g"); - - /** - * Static value MIG2g for GpuInstanceProfile. - */ - public static final GpuInstanceProfile MIG2G = fromString("MIG2g"); - - /** - * Static value MIG3g for GpuInstanceProfile. - */ - public static final GpuInstanceProfile MIG3G = fromString("MIG3g"); - - /** - * Static value MIG4g for GpuInstanceProfile. - */ - public static final GpuInstanceProfile MIG4G = fromString("MIG4g"); - - /** - * Static value MIG7g for GpuInstanceProfile. - */ - public static final GpuInstanceProfile MIG7G = fromString("MIG7g"); - - /** - * Creates a new instance of GpuInstanceProfile value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public GpuInstanceProfile() { - } - - /** - * Creates or finds a GpuInstanceProfile from its string representation. - * - * @param name a name to look for. - * @return the corresponding GpuInstanceProfile. - */ - public static GpuInstanceProfile fromString(String name) { - return fromString(name, GpuInstanceProfile.class); - } - - /** - * Gets known GpuInstanceProfile values. - * - * @return known GpuInstanceProfile values. - */ - public static Collection values() { - return values(GpuInstanceProfile.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java deleted file mode 100644 index 83dd030aabe6..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * GPU settings for the Agent Pool. - */ -@Fluent -public final class GpuProfile implements JsonSerializable { - /* - * Whether to install GPU drivers. When it's not specified, default is Install. - */ - private GpuDriver driver; - - /** - * Creates an instance of GpuProfile class. - */ - public GpuProfile() { - } - - /** - * Get the driver property: Whether to install GPU drivers. When it's not specified, default is Install. - * - * @return the driver value. - */ - public GpuDriver driver() { - return this.driver; - } - - /** - * Set the driver property: Whether to install GPU drivers. When it's not specified, default is Install. - * - * @param driver the driver value to set. - * @return the GpuProfile object itself. - */ - public GpuProfile withDriver(GpuDriver driver) { - this.driver = driver; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("driver", this.driver == null ? null : this.driver.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of GpuProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of GpuProfile 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 GpuProfile. - */ - public static GpuProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - GpuProfile deserializedGpuProfile = new GpuProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("driver".equals(fieldName)) { - deserializedGpuProfile.driver = GpuDriver.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedGpuProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java deleted file mode 100644 index 60e8215db582..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The IP version to use for cluster networking and IP assignment. - */ -public final class IpFamily extends ExpandableStringEnum { - /** - * Static value IPv4 for IpFamily. - */ - public static final IpFamily IPV4 = fromString("IPv4"); - - /** - * Static value IPv6 for IpFamily. - */ - public static final IpFamily IPV6 = fromString("IPv6"); - - /** - * Creates a new instance of IpFamily value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IpFamily() { - } - - /** - * Creates or finds a IpFamily from its string representation. - * - * @param name a name to look for. - * @return the corresponding IpFamily. - */ - public static IpFamily fromString(String name) { - return fromString(name, IpFamily.class); - } - - /** - * Gets known IpFamily values. - * - * @return known IpFamily values. - */ - public static Collection values() { - return values(IpFamily.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpTag.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpTag.java deleted file mode 100644 index 13bb78fc2c6c..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpTag.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 IPTag associated with the object. - */ -@Fluent -public final class IpTag implements JsonSerializable { - /* - * The IP tag type. Example: RoutingPreference. - */ - private String ipTagType; - - /* - * The value of the IP tag associated with the public IP. Example: Internet. - */ - private String tag; - - /** - * Creates an instance of IpTag class. - */ - public IpTag() { - } - - /** - * Get the ipTagType property: The IP tag type. Example: RoutingPreference. - * - * @return the ipTagType value. - */ - public String ipTagType() { - return this.ipTagType; - } - - /** - * Set the ipTagType property: The IP tag type. Example: RoutingPreference. - * - * @param ipTagType the ipTagType value to set. - * @return the IpTag object itself. - */ - public IpTag withIpTagType(String ipTagType) { - this.ipTagType = ipTagType; - return this; - } - - /** - * Get the tag property: The value of the IP tag associated with the public IP. Example: Internet. - * - * @return the tag value. - */ - public String tag() { - return this.tag; - } - - /** - * Set the tag property: The value of the IP tag associated with the public IP. Example: Internet. - * - * @param tag the tag value to set. - * @return the IpTag object itself. - */ - public IpTag withTag(String tag) { - this.tag = tag; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@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 IpTag from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpTag 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 IpTag. - */ - public static IpTag fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpTag deserializedIpTag = new IpTag(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ipTagType".equals(fieldName)) { - deserializedIpTag.ipTagType = reader.getString(); - } else if ("tag".equals(fieldName)) { - deserializedIpTag.tag = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedIpTag; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioCertificateAuthority.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioCertificateAuthority.java deleted file mode 100644 index 379541b09e4a..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioCertificateAuthority.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin certificates as - * described here https://aka.ms/asm-plugin-ca. - */ -@Fluent -public final class IstioCertificateAuthority implements JsonSerializable { - /* - * Plugin certificates information for Service Mesh. - */ - private IstioPluginCertificateAuthority plugin; - - /** - * Creates an instance of IstioCertificateAuthority class. - */ - public IstioCertificateAuthority() { - } - - /** - * Get the plugin property: Plugin certificates information for Service Mesh. - * - * @return the plugin value. - */ - public IstioPluginCertificateAuthority plugin() { - return this.plugin; - } - - /** - * Set the plugin property: Plugin certificates information for Service Mesh. - * - * @param plugin the plugin value to set. - * @return the IstioCertificateAuthority object itself. - */ - public IstioCertificateAuthority withPlugin(IstioPluginCertificateAuthority plugin) { - this.plugin = plugin; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (plugin() != null) { - plugin().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("plugin", this.plugin); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IstioCertificateAuthority from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IstioCertificateAuthority 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 IstioCertificateAuthority. - */ - public static IstioCertificateAuthority fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IstioCertificateAuthority deserializedIstioCertificateAuthority = new IstioCertificateAuthority(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("plugin".equals(fieldName)) { - deserializedIstioCertificateAuthority.plugin = IstioPluginCertificateAuthority.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedIstioCertificateAuthority; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java deleted file mode 100644 index 0dc7eb7ddb66..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Istio components configuration. - */ -@Fluent -public final class IstioComponents implements JsonSerializable { - /* - * Istio ingress gateways. - */ - private List ingressGateways; - - /* - * Istio egress gateways. - */ - private List egressGateways; - - /** - * Creates an instance of IstioComponents class. - */ - public IstioComponents() { - } - - /** - * Get the ingressGateways property: Istio ingress gateways. - * - * @return the ingressGateways value. - */ - public List ingressGateways() { - return this.ingressGateways; - } - - /** - * Set the ingressGateways property: Istio ingress gateways. - * - * @param ingressGateways the ingressGateways value to set. - * @return the IstioComponents object itself. - */ - public IstioComponents withIngressGateways(List ingressGateways) { - this.ingressGateways = ingressGateways; - return this; - } - - /** - * Get the egressGateways property: Istio egress gateways. - * - * @return the egressGateways value. - */ - public List egressGateways() { - return this.egressGateways; - } - - /** - * Set the egressGateways property: Istio egress gateways. - * - * @param egressGateways the egressGateways value to set. - * @return the IstioComponents object itself. - */ - public IstioComponents withEgressGateways(List egressGateways) { - this.egressGateways = egressGateways; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ingressGateways() != null) { - ingressGateways().forEach(e -> e.validate()); - } - if (egressGateways() != null) { - egressGateways().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("ingressGateways", this.ingressGateways, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("egressGateways", this.egressGateways, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IstioComponents from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IstioComponents 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 IstioComponents. - */ - public static IstioComponents fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IstioComponents deserializedIstioComponents = new IstioComponents(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ingressGateways".equals(fieldName)) { - List ingressGateways - = reader.readArray(reader1 -> IstioIngressGateway.fromJson(reader1)); - deserializedIstioComponents.ingressGateways = ingressGateways; - } else if ("egressGateways".equals(fieldName)) { - List egressGateways - = reader.readArray(reader1 -> IstioEgressGateway.fromJson(reader1)); - deserializedIstioComponents.egressGateways = egressGateways; - } else { - reader.skipChildren(); - } - } - - return deserializedIstioComponents; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioEgressGateway.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioEgressGateway.java deleted file mode 100644 index 42ebfbe64cf4..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioEgressGateway.java +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Istio egress gateway configuration. - */ -@Fluent -public final class IstioEgressGateway implements JsonSerializable { - /* - * Whether to enable the egress gateway. - */ - private boolean enabled; - - /* - * Name of the Istio add-on egress gateway. - */ - private String name; - - /* - * Namespace that the Istio add-on egress gateway should be deployed in. If unspecified, the default is - * aks-istio-egress. - */ - private String namespace; - - /* - * Name of the gateway configuration custom resource for the Istio add-on egress gateway. Must be specified when - * enabling the Istio egress gateway. Must be deployed in the same namespace that the Istio egress gateway will be - * deployed in. - */ - private String gatewayConfigurationName; - - /** - * Creates an instance of IstioEgressGateway class. - */ - public IstioEgressGateway() { - } - - /** - * Get the enabled property: Whether to enable the egress gateway. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable the egress gateway. - * - * @param enabled the enabled value to set. - * @return the IstioEgressGateway object itself. - */ - public IstioEgressGateway withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the name property: Name of the Istio add-on egress gateway. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the Istio add-on egress gateway. - * - * @param name the name value to set. - * @return the IstioEgressGateway object itself. - */ - public IstioEgressGateway withName(String name) { - this.name = name; - return this; - } - - /** - * Get the namespace property: Namespace that the Istio add-on egress gateway should be deployed in. If unspecified, - * the default is aks-istio-egress. - * - * @return the namespace value. - */ - public String namespace() { - return this.namespace; - } - - /** - * Set the namespace property: Namespace that the Istio add-on egress gateway should be deployed in. If unspecified, - * the default is aks-istio-egress. - * - * @param namespace the namespace value to set. - * @return the IstioEgressGateway object itself. - */ - public IstioEgressGateway withNamespace(String namespace) { - this.namespace = namespace; - return this; - } - - /** - * Get the gatewayConfigurationName property: Name of the gateway configuration custom resource for the Istio add-on - * egress gateway. Must be specified when enabling the Istio egress gateway. Must be deployed in the same namespace - * that the Istio egress gateway will be deployed in. - * - * @return the gatewayConfigurationName value. - */ - public String gatewayConfigurationName() { - return this.gatewayConfigurationName; - } - - /** - * Set the gatewayConfigurationName property: Name of the gateway configuration custom resource for the Istio add-on - * egress gateway. Must be specified when enabling the Istio egress gateway. Must be deployed in the same namespace - * that the Istio egress gateway will be deployed in. - * - * @param gatewayConfigurationName the gatewayConfigurationName value to set. - * @return the IstioEgressGateway object itself. - */ - public IstioEgressGateway withGatewayConfigurationName(String gatewayConfigurationName) { - this.gatewayConfigurationName = gatewayConfigurationName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model IstioEgressGateway")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IstioEgressGateway.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("namespace", this.namespace); - jsonWriter.writeStringField("gatewayConfigurationName", this.gatewayConfigurationName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IstioEgressGateway from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IstioEgressGateway 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 IstioEgressGateway. - */ - public static IstioEgressGateway fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IstioEgressGateway deserializedIstioEgressGateway = new IstioEgressGateway(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedIstioEgressGateway.enabled = reader.getBoolean(); - } else if ("name".equals(fieldName)) { - deserializedIstioEgressGateway.name = reader.getString(); - } else if ("namespace".equals(fieldName)) { - deserializedIstioEgressGateway.namespace = reader.getString(); - } else if ("gatewayConfigurationName".equals(fieldName)) { - deserializedIstioEgressGateway.gatewayConfigurationName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedIstioEgressGateway; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGateway.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGateway.java deleted file mode 100644 index 89c1dbb810d9..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGateway.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Istio ingress gateway configuration. For now, we support up to one external ingress gateway named - * `aks-istio-ingressgateway-external` and one internal ingress gateway named `aks-istio-ingressgateway-internal`. - */ -@Fluent -public final class IstioIngressGateway implements JsonSerializable { - /* - * Mode of an ingress gateway. - */ - private IstioIngressGatewayMode mode; - - /* - * Whether to enable the ingress gateway. - */ - private boolean enabled; - - /** - * Creates an instance of IstioIngressGateway class. - */ - public IstioIngressGateway() { - } - - /** - * Get the mode property: Mode of an ingress gateway. - * - * @return the mode value. - */ - public IstioIngressGatewayMode mode() { - return this.mode; - } - - /** - * Set the mode property: Mode of an ingress gateway. - * - * @param mode the mode value to set. - * @return the IstioIngressGateway object itself. - */ - public IstioIngressGateway withMode(IstioIngressGatewayMode mode) { - this.mode = mode; - return this; - } - - /** - * Get the enabled property: Whether to enable the ingress gateway. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable the ingress gateway. - * - * @param enabled the enabled value to set. - * @return the IstioIngressGateway object itself. - */ - public IstioIngressGateway withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (mode() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property mode in model IstioIngressGateway")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IstioIngressGateway.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IstioIngressGateway from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IstioIngressGateway 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 IstioIngressGateway. - */ - public static IstioIngressGateway fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IstioIngressGateway deserializedIstioIngressGateway = new IstioIngressGateway(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mode".equals(fieldName)) { - deserializedIstioIngressGateway.mode = IstioIngressGatewayMode.fromString(reader.getString()); - } else if ("enabled".equals(fieldName)) { - deserializedIstioIngressGateway.enabled = reader.getBoolean(); - } else { - reader.skipChildren(); - } - } - - return deserializedIstioIngressGateway; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGatewayMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGatewayMode.java deleted file mode 100644 index 9373db2fab55..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGatewayMode.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Mode of an ingress gateway. - */ -public final class IstioIngressGatewayMode extends ExpandableStringEnum { - /** - * Static value External for IstioIngressGatewayMode. - */ - public static final IstioIngressGatewayMode EXTERNAL = fromString("External"); - - /** - * Static value Internal for IstioIngressGatewayMode. - */ - public static final IstioIngressGatewayMode INTERNAL = fromString("Internal"); - - /** - * Creates a new instance of IstioIngressGatewayMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IstioIngressGatewayMode() { - } - - /** - * Creates or finds a IstioIngressGatewayMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding IstioIngressGatewayMode. - */ - public static IstioIngressGatewayMode fromString(String name) { - return fromString(name, IstioIngressGatewayMode.class); - } - - /** - * Gets known IstioIngressGatewayMode values. - * - * @return known IstioIngressGatewayMode values. - */ - public static Collection values() { - return values(IstioIngressGatewayMode.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioPluginCertificateAuthority.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioPluginCertificateAuthority.java deleted file mode 100644 index 50a9744839c9..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioPluginCertificateAuthority.java +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Plugin certificates information for Service Mesh. - */ -@Fluent -public final class IstioPluginCertificateAuthority implements JsonSerializable { - /* - * The resource ID of the Key Vault. - */ - private String keyVaultId; - - /* - * Intermediate certificate object name in Azure Key Vault. - */ - private String certObjectName; - - /* - * Intermediate certificate private key object name in Azure Key Vault. - */ - private String keyObjectName; - - /* - * Root certificate object name in Azure Key Vault. - */ - private String rootCertObjectName; - - /* - * Certificate chain object name in Azure Key Vault. - */ - private String certChainObjectName; - - /** - * Creates an instance of IstioPluginCertificateAuthority class. - */ - public IstioPluginCertificateAuthority() { - } - - /** - * Get the keyVaultId property: The resource ID of the Key Vault. - * - * @return the keyVaultId value. - */ - public String keyVaultId() { - return this.keyVaultId; - } - - /** - * Set the keyVaultId property: The resource ID of the Key Vault. - * - * @param keyVaultId the keyVaultId value to set. - * @return the IstioPluginCertificateAuthority object itself. - */ - public IstioPluginCertificateAuthority withKeyVaultId(String keyVaultId) { - this.keyVaultId = keyVaultId; - return this; - } - - /** - * Get the certObjectName property: Intermediate certificate object name in Azure Key Vault. - * - * @return the certObjectName value. - */ - public String certObjectName() { - return this.certObjectName; - } - - /** - * Set the certObjectName property: Intermediate certificate object name in Azure Key Vault. - * - * @param certObjectName the certObjectName value to set. - * @return the IstioPluginCertificateAuthority object itself. - */ - public IstioPluginCertificateAuthority withCertObjectName(String certObjectName) { - this.certObjectName = certObjectName; - return this; - } - - /** - * Get the keyObjectName property: Intermediate certificate private key object name in Azure Key Vault. - * - * @return the keyObjectName value. - */ - public String keyObjectName() { - return this.keyObjectName; - } - - /** - * Set the keyObjectName property: Intermediate certificate private key object name in Azure Key Vault. - * - * @param keyObjectName the keyObjectName value to set. - * @return the IstioPluginCertificateAuthority object itself. - */ - public IstioPluginCertificateAuthority withKeyObjectName(String keyObjectName) { - this.keyObjectName = keyObjectName; - return this; - } - - /** - * Get the rootCertObjectName property: Root certificate object name in Azure Key Vault. - * - * @return the rootCertObjectName value. - */ - public String rootCertObjectName() { - return this.rootCertObjectName; - } - - /** - * Set the rootCertObjectName property: Root certificate object name in Azure Key Vault. - * - * @param rootCertObjectName the rootCertObjectName value to set. - * @return the IstioPluginCertificateAuthority object itself. - */ - public IstioPluginCertificateAuthority withRootCertObjectName(String rootCertObjectName) { - this.rootCertObjectName = rootCertObjectName; - return this; - } - - /** - * Get the certChainObjectName property: Certificate chain object name in Azure Key Vault. - * - * @return the certChainObjectName value. - */ - public String certChainObjectName() { - return this.certChainObjectName; - } - - /** - * Set the certChainObjectName property: Certificate chain object name in Azure Key Vault. - * - * @param certChainObjectName the certChainObjectName value to set. - * @return the IstioPluginCertificateAuthority object itself. - */ - public IstioPluginCertificateAuthority withCertChainObjectName(String certChainObjectName) { - this.certChainObjectName = certChainObjectName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("keyVaultId", this.keyVaultId); - jsonWriter.writeStringField("certObjectName", this.certObjectName); - jsonWriter.writeStringField("keyObjectName", this.keyObjectName); - jsonWriter.writeStringField("rootCertObjectName", this.rootCertObjectName); - jsonWriter.writeStringField("certChainObjectName", this.certChainObjectName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IstioPluginCertificateAuthority from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IstioPluginCertificateAuthority 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 IstioPluginCertificateAuthority. - */ - public static IstioPluginCertificateAuthority fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IstioPluginCertificateAuthority deserializedIstioPluginCertificateAuthority - = new IstioPluginCertificateAuthority(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("keyVaultId".equals(fieldName)) { - deserializedIstioPluginCertificateAuthority.keyVaultId = reader.getString(); - } else if ("certObjectName".equals(fieldName)) { - deserializedIstioPluginCertificateAuthority.certObjectName = reader.getString(); - } else if ("keyObjectName".equals(fieldName)) { - deserializedIstioPluginCertificateAuthority.keyObjectName = reader.getString(); - } else if ("rootCertObjectName".equals(fieldName)) { - deserializedIstioPluginCertificateAuthority.rootCertObjectName = reader.getString(); - } else if ("certChainObjectName".equals(fieldName)) { - deserializedIstioPluginCertificateAuthority.certChainObjectName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedIstioPluginCertificateAuthority; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioServiceMesh.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioServiceMesh.java deleted file mode 100644 index dc97b2b58638..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioServiceMesh.java +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Istio service mesh configuration. - */ -@Fluent -public final class IstioServiceMesh implements JsonSerializable { - /* - * Istio components configuration. - */ - private IstioComponents components; - - /* - * Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin certificates as - * described here https://aka.ms/asm-plugin-ca - */ - private IstioCertificateAuthority certificateAuthority; - - /* - * The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value. When - * canary upgrade is in progress, this can only hold two consecutive values. For more information, see: - * https://learn.microsoft.com/en-us/azure/aks/istio-upgrade - */ - private List revisions; - - /** - * Creates an instance of IstioServiceMesh class. - */ - public IstioServiceMesh() { - } - - /** - * Get the components property: Istio components configuration. - * - * @return the components value. - */ - public IstioComponents components() { - return this.components; - } - - /** - * Set the components property: Istio components configuration. - * - * @param components the components value to set. - * @return the IstioServiceMesh object itself. - */ - public IstioServiceMesh withComponents(IstioComponents components) { - this.components = components; - return this; - } - - /** - * Get the certificateAuthority property: Istio Service Mesh Certificate Authority (CA) configuration. For now, we - * only support plugin certificates as described here https://aka.ms/asm-plugin-ca. - * - * @return the certificateAuthority value. - */ - public IstioCertificateAuthority certificateAuthority() { - return this.certificateAuthority; - } - - /** - * Set the certificateAuthority property: Istio Service Mesh Certificate Authority (CA) configuration. For now, we - * only support plugin certificates as described here https://aka.ms/asm-plugin-ca. - * - * @param certificateAuthority the certificateAuthority value to set. - * @return the IstioServiceMesh object itself. - */ - public IstioServiceMesh withCertificateAuthority(IstioCertificateAuthority certificateAuthority) { - this.certificateAuthority = certificateAuthority; - return this; - } - - /** - * Get the revisions property: The list of revisions of the Istio control plane. When an upgrade is not in progress, - * this holds one value. When canary upgrade is in progress, this can only hold two consecutive values. For more - * information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade. - * - * @return the revisions value. - */ - public List revisions() { - return this.revisions; - } - - /** - * Set the revisions property: The list of revisions of the Istio control plane. When an upgrade is not in progress, - * this holds one value. When canary upgrade is in progress, this can only hold two consecutive values. For more - * information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade. - * - * @param revisions the revisions value to set. - * @return the IstioServiceMesh object itself. - */ - public IstioServiceMesh withRevisions(List revisions) { - this.revisions = revisions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (components() != null) { - components().validate(); - } - if (certificateAuthority() != null) { - certificateAuthority().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("components", this.components); - jsonWriter.writeJsonField("certificateAuthority", this.certificateAuthority); - jsonWriter.writeArrayField("revisions", this.revisions, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IstioServiceMesh from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IstioServiceMesh 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 IstioServiceMesh. - */ - public static IstioServiceMesh fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IstioServiceMesh deserializedIstioServiceMesh = new IstioServiceMesh(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("components".equals(fieldName)) { - deserializedIstioServiceMesh.components = IstioComponents.fromJson(reader); - } else if ("certificateAuthority".equals(fieldName)) { - deserializedIstioServiceMesh.certificateAuthority = IstioCertificateAuthority.fromJson(reader); - } else if ("revisions".equals(fieldName)) { - List revisions = reader.readArray(reader1 -> reader1.getString()); - deserializedIstioServiceMesh.revisions = revisions; - } else { - reader.skipChildren(); - } - } - - return deserializedIstioServiceMesh; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KeyVaultNetworkAccessTypes.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KeyVaultNetworkAccessTypes.java deleted file mode 100644 index f3e5532b9b76..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KeyVaultNetworkAccessTypes.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Network access of the key vault. Network access of key vault. The possible values are `Public` and `Private`. - * `Public` means the key vault allows public access from all networks. `Private` means the key vault disables public - * access and enables private link. The default value is `Public`. - */ -public final class KeyVaultNetworkAccessTypes extends ExpandableStringEnum { - /** - * Static value Public for KeyVaultNetworkAccessTypes. - */ - public static final KeyVaultNetworkAccessTypes PUBLIC = fromString("Public"); - - /** - * Static value Private for KeyVaultNetworkAccessTypes. - */ - public static final KeyVaultNetworkAccessTypes PRIVATE = fromString("Private"); - - /** - * Creates a new instance of KeyVaultNetworkAccessTypes value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public KeyVaultNetworkAccessTypes() { - } - - /** - * Creates or finds a KeyVaultNetworkAccessTypes from its string representation. - * - * @param name a name to look for. - * @return the corresponding KeyVaultNetworkAccessTypes. - */ - public static KeyVaultNetworkAccessTypes fromString(String name) { - return fromString(name, KeyVaultNetworkAccessTypes.class); - } - - /** - * Gets known KeyVaultNetworkAccessTypes values. - * - * @return known KeyVaultNetworkAccessTypes values. - */ - public static Collection values() { - return values(KeyVaultNetworkAccessTypes.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java deleted file mode 100644 index a14c1ea5937b..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java +++ /dev/null @@ -1,409 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Kubelet configurations of agent nodes. See [AKS custom node - * configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. - */ -@Fluent -public final class KubeletConfig implements JsonSerializable { - /* - * The CPU Manager policy to use. The default is 'none'. See [Kubernetes CPU management - * policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) - * for more information. Allowed values are 'none' and 'static'. - */ - private String cpuManagerPolicy; - - /* - * If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The default is true. - */ - private Boolean cpuCfsQuota; - - /* - * The CPU CFS quota period value. The default is '100ms.' Valid values are a sequence of decimal numbers with an - * optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', - * 'm', and 'h'. - */ - private String cpuCfsQuotaPeriod; - - /* - * The percent of disk usage after which image garbage collection is always run. To disable image garbage - * collection, set to 100. The default is 85% - */ - private Integer imageGcHighThreshold; - - /* - * The percent of disk usage before which image garbage collection is never run. This cannot be set higher than - * imageGcHighThreshold. The default is 80% - */ - private Integer imageGcLowThreshold; - - /* - * The Topology Manager policy to use. For more information see [Kubernetes Topology - * Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). The default is 'none'. Allowed - * values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. - */ - private String topologyManagerPolicy; - - /* - * Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). - */ - private List allowedUnsafeSysctls; - - /* - * If set to true it will make the Kubelet fail to start if swap is enabled on the node. - */ - private Boolean failSwapOn; - - /* - * The maximum size (e.g. 10Mi) of container log file before it is rotated. - */ - private Integer containerLogMaxSizeMB; - - /* - * The maximum number of container log files that can be present for a container. The number must be ≥ 2. - */ - private Integer containerLogMaxFiles; - - /* - * The maximum number of processes per pod. - */ - private Integer podMaxPids; - - /** - * Creates an instance of KubeletConfig class. - */ - public KubeletConfig() { - } - - /** - * Get the cpuManagerPolicy property: The CPU Manager policy to use. The default is 'none'. See [Kubernetes CPU - * management - * policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) - * for more information. Allowed values are 'none' and 'static'. - * - * @return the cpuManagerPolicy value. - */ - public String cpuManagerPolicy() { - return this.cpuManagerPolicy; - } - - /** - * Set the cpuManagerPolicy property: The CPU Manager policy to use. The default is 'none'. See [Kubernetes CPU - * management - * policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) - * for more information. Allowed values are 'none' and 'static'. - * - * @param cpuManagerPolicy the cpuManagerPolicy value to set. - * @return the KubeletConfig object itself. - */ - public KubeletConfig withCpuManagerPolicy(String cpuManagerPolicy) { - this.cpuManagerPolicy = cpuManagerPolicy; - return this; - } - - /** - * Get the cpuCfsQuota property: If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The - * default is true. - * - * @return the cpuCfsQuota value. - */ - public Boolean cpuCfsQuota() { - return this.cpuCfsQuota; - } - - /** - * Set the cpuCfsQuota property: If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The - * default is true. - * - * @param cpuCfsQuota the cpuCfsQuota value to set. - * @return the KubeletConfig object itself. - */ - public KubeletConfig withCpuCfsQuota(Boolean cpuCfsQuota) { - this.cpuCfsQuota = cpuCfsQuota; - return this; - } - - /** - * Get the cpuCfsQuotaPeriod property: The CPU CFS quota period value. The default is '100ms.' Valid values are a - * sequence of decimal numbers with an optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported - * units are 'ns', 'us', 'ms', 's', 'm', and 'h'. - * - * @return the cpuCfsQuotaPeriod value. - */ - public String cpuCfsQuotaPeriod() { - return this.cpuCfsQuotaPeriod; - } - - /** - * Set the cpuCfsQuotaPeriod property: The CPU CFS quota period value. The default is '100ms.' Valid values are a - * sequence of decimal numbers with an optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported - * units are 'ns', 'us', 'ms', 's', 'm', and 'h'. - * - * @param cpuCfsQuotaPeriod the cpuCfsQuotaPeriod value to set. - * @return the KubeletConfig object itself. - */ - public KubeletConfig withCpuCfsQuotaPeriod(String cpuCfsQuotaPeriod) { - this.cpuCfsQuotaPeriod = cpuCfsQuotaPeriod; - return this; - } - - /** - * Get the imageGcHighThreshold property: The percent of disk usage after which image garbage collection is always - * run. To disable image garbage collection, set to 100. The default is 85%. - * - * @return the imageGcHighThreshold value. - */ - public Integer imageGcHighThreshold() { - return this.imageGcHighThreshold; - } - - /** - * Set the imageGcHighThreshold property: The percent of disk usage after which image garbage collection is always - * run. To disable image garbage collection, set to 100. The default is 85%. - * - * @param imageGcHighThreshold the imageGcHighThreshold value to set. - * @return the KubeletConfig object itself. - */ - public KubeletConfig withImageGcHighThreshold(Integer imageGcHighThreshold) { - this.imageGcHighThreshold = imageGcHighThreshold; - return this; - } - - /** - * Get the imageGcLowThreshold property: The percent of disk usage before which image garbage collection is never - * run. This cannot be set higher than imageGcHighThreshold. The default is 80%. - * - * @return the imageGcLowThreshold value. - */ - public Integer imageGcLowThreshold() { - return this.imageGcLowThreshold; - } - - /** - * Set the imageGcLowThreshold property: The percent of disk usage before which image garbage collection is never - * run. This cannot be set higher than imageGcHighThreshold. The default is 80%. - * - * @param imageGcLowThreshold the imageGcLowThreshold value to set. - * @return the KubeletConfig object itself. - */ - public KubeletConfig withImageGcLowThreshold(Integer imageGcLowThreshold) { - this.imageGcLowThreshold = imageGcLowThreshold; - return this; - } - - /** - * Get the topologyManagerPolicy property: The Topology Manager policy to use. For more information see [Kubernetes - * Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). The default is 'none'. - * Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. - * - * @return the topologyManagerPolicy value. - */ - public String topologyManagerPolicy() { - return this.topologyManagerPolicy; - } - - /** - * Set the topologyManagerPolicy property: The Topology Manager policy to use. For more information see [Kubernetes - * Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). The default is 'none'. - * Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. - * - * @param topologyManagerPolicy the topologyManagerPolicy value to set. - * @return the KubeletConfig object itself. - */ - public KubeletConfig withTopologyManagerPolicy(String topologyManagerPolicy) { - this.topologyManagerPolicy = topologyManagerPolicy; - return this; - } - - /** - * Get the allowedUnsafeSysctls property: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). - * - * @return the allowedUnsafeSysctls value. - */ - public List allowedUnsafeSysctls() { - return this.allowedUnsafeSysctls; - } - - /** - * Set the allowedUnsafeSysctls property: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). - * - * @param allowedUnsafeSysctls the allowedUnsafeSysctls value to set. - * @return the KubeletConfig object itself. - */ - public KubeletConfig withAllowedUnsafeSysctls(List allowedUnsafeSysctls) { - this.allowedUnsafeSysctls = allowedUnsafeSysctls; - return this; - } - - /** - * Get the failSwapOn property: If set to true it will make the Kubelet fail to start if swap is enabled on the - * node. - * - * @return the failSwapOn value. - */ - public Boolean failSwapOn() { - return this.failSwapOn; - } - - /** - * Set the failSwapOn property: If set to true it will make the Kubelet fail to start if swap is enabled on the - * node. - * - * @param failSwapOn the failSwapOn value to set. - * @return the KubeletConfig object itself. - */ - public KubeletConfig withFailSwapOn(Boolean failSwapOn) { - this.failSwapOn = failSwapOn; - return this; - } - - /** - * Get the containerLogMaxSizeMB property: The maximum size (e.g. 10Mi) of container log file before it is rotated. - * - * @return the containerLogMaxSizeMB value. - */ - public Integer containerLogMaxSizeMB() { - return this.containerLogMaxSizeMB; - } - - /** - * Set the containerLogMaxSizeMB property: The maximum size (e.g. 10Mi) of container log file before it is rotated. - * - * @param containerLogMaxSizeMB the containerLogMaxSizeMB value to set. - * @return the KubeletConfig object itself. - */ - public KubeletConfig withContainerLogMaxSizeMB(Integer containerLogMaxSizeMB) { - this.containerLogMaxSizeMB = containerLogMaxSizeMB; - return this; - } - - /** - * Get the containerLogMaxFiles property: The maximum number of container log files that can be present for a - * container. The number must be ≥ 2. - * - * @return the containerLogMaxFiles value. - */ - public Integer containerLogMaxFiles() { - return this.containerLogMaxFiles; - } - - /** - * Set the containerLogMaxFiles property: The maximum number of container log files that can be present for a - * container. The number must be ≥ 2. - * - * @param containerLogMaxFiles the containerLogMaxFiles value to set. - * @return the KubeletConfig object itself. - */ - public KubeletConfig withContainerLogMaxFiles(Integer containerLogMaxFiles) { - this.containerLogMaxFiles = containerLogMaxFiles; - return this; - } - - /** - * Get the podMaxPids property: The maximum number of processes per pod. - * - * @return the podMaxPids value. - */ - public Integer podMaxPids() { - return this.podMaxPids; - } - - /** - * Set the podMaxPids property: The maximum number of processes per pod. - * - * @param podMaxPids the podMaxPids value to set. - * @return the KubeletConfig object itself. - */ - public KubeletConfig withPodMaxPids(Integer podMaxPids) { - this.podMaxPids = podMaxPids; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("cpuManagerPolicy", this.cpuManagerPolicy); - jsonWriter.writeBooleanField("cpuCfsQuota", this.cpuCfsQuota); - jsonWriter.writeStringField("cpuCfsQuotaPeriod", this.cpuCfsQuotaPeriod); - jsonWriter.writeNumberField("imageGcHighThreshold", this.imageGcHighThreshold); - jsonWriter.writeNumberField("imageGcLowThreshold", this.imageGcLowThreshold); - jsonWriter.writeStringField("topologyManagerPolicy", this.topologyManagerPolicy); - jsonWriter.writeArrayField("allowedUnsafeSysctls", this.allowedUnsafeSysctls, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("failSwapOn", this.failSwapOn); - jsonWriter.writeNumberField("containerLogMaxSizeMB", this.containerLogMaxSizeMB); - jsonWriter.writeNumberField("containerLogMaxFiles", this.containerLogMaxFiles); - jsonWriter.writeNumberField("podMaxPids", this.podMaxPids); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of KubeletConfig from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of KubeletConfig 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 KubeletConfig. - */ - public static KubeletConfig fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - KubeletConfig deserializedKubeletConfig = new KubeletConfig(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("cpuManagerPolicy".equals(fieldName)) { - deserializedKubeletConfig.cpuManagerPolicy = reader.getString(); - } else if ("cpuCfsQuota".equals(fieldName)) { - deserializedKubeletConfig.cpuCfsQuota = reader.getNullable(JsonReader::getBoolean); - } else if ("cpuCfsQuotaPeriod".equals(fieldName)) { - deserializedKubeletConfig.cpuCfsQuotaPeriod = reader.getString(); - } else if ("imageGcHighThreshold".equals(fieldName)) { - deserializedKubeletConfig.imageGcHighThreshold = reader.getNullable(JsonReader::getInt); - } else if ("imageGcLowThreshold".equals(fieldName)) { - deserializedKubeletConfig.imageGcLowThreshold = reader.getNullable(JsonReader::getInt); - } else if ("topologyManagerPolicy".equals(fieldName)) { - deserializedKubeletConfig.topologyManagerPolicy = reader.getString(); - } else if ("allowedUnsafeSysctls".equals(fieldName)) { - List allowedUnsafeSysctls = reader.readArray(reader1 -> reader1.getString()); - deserializedKubeletConfig.allowedUnsafeSysctls = allowedUnsafeSysctls; - } else if ("failSwapOn".equals(fieldName)) { - deserializedKubeletConfig.failSwapOn = reader.getNullable(JsonReader::getBoolean); - } else if ("containerLogMaxSizeMB".equals(fieldName)) { - deserializedKubeletConfig.containerLogMaxSizeMB = reader.getNullable(JsonReader::getInt); - } else if ("containerLogMaxFiles".equals(fieldName)) { - deserializedKubeletConfig.containerLogMaxFiles = reader.getNullable(JsonReader::getInt); - } else if ("podMaxPids".equals(fieldName)) { - deserializedKubeletConfig.podMaxPids = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedKubeletConfig; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletDiskType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletDiskType.java deleted file mode 100644 index 18af44555422..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletDiskType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. - */ -public final class KubeletDiskType extends ExpandableStringEnum { - /** - * Static value OS for KubeletDiskType. - */ - public static final KubeletDiskType OS = fromString("OS"); - - /** - * Static value Temporary for KubeletDiskType. - */ - public static final KubeletDiskType TEMPORARY = fromString("Temporary"); - - /** - * Creates a new instance of KubeletDiskType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public KubeletDiskType() { - } - - /** - * Creates or finds a KubeletDiskType from its string representation. - * - * @param name a name to look for. - * @return the corresponding KubeletDiskType. - */ - public static KubeletDiskType fromString(String name) { - return fromString(name, KubeletDiskType.class); - } - - /** - * Gets known KubeletDiskType values. - * - * @return known KubeletDiskType values. - */ - public static Collection values() { - return values(KubeletDiskType.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesPatchVersion.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesPatchVersion.java deleted file mode 100644 index 121098436176..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesPatchVersion.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Kubernetes patch version profile. - */ -@Fluent -public final class KubernetesPatchVersion implements JsonSerializable { - /* - * Possible upgrade path for given patch version - */ - private List upgrades; - - /** - * Creates an instance of KubernetesPatchVersion class. - */ - public KubernetesPatchVersion() { - } - - /** - * Get the upgrades property: Possible upgrade path for given patch version. - * - * @return the upgrades value. - */ - public List upgrades() { - return this.upgrades; - } - - /** - * Set the upgrades property: Possible upgrade path for given patch version. - * - * @param upgrades the upgrades value to set. - * @return the KubernetesPatchVersion object itself. - */ - public KubernetesPatchVersion withUpgrades(List upgrades) { - this.upgrades = upgrades; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("upgrades", this.upgrades, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of KubernetesPatchVersion from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of KubernetesPatchVersion 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 KubernetesPatchVersion. - */ - public static KubernetesPatchVersion fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - KubernetesPatchVersion deserializedKubernetesPatchVersion = new KubernetesPatchVersion(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("upgrades".equals(fieldName)) { - List upgrades = reader.readArray(reader1 -> reader1.getString()); - deserializedKubernetesPatchVersion.upgrades = upgrades; - } else { - reader.skipChildren(); - } - } - - return deserializedKubernetesPatchVersion; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesSupportPlan.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesSupportPlan.java deleted file mode 100644 index bf35959bffb5..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesSupportPlan.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Different support tiers for AKS managed clusters. - */ -public final class KubernetesSupportPlan extends ExpandableStringEnum { - /** - * Static value KubernetesOfficial for KubernetesSupportPlan. - */ - public static final KubernetesSupportPlan KUBERNETES_OFFICIAL = fromString("KubernetesOfficial"); - - /** - * Static value AKSLongTermSupport for KubernetesSupportPlan. - */ - public static final KubernetesSupportPlan AKSLONG_TERM_SUPPORT = fromString("AKSLongTermSupport"); - - /** - * Creates a new instance of KubernetesSupportPlan value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public KubernetesSupportPlan() { - } - - /** - * Creates or finds a KubernetesSupportPlan from its string representation. - * - * @param name a name to look for. - * @return the corresponding KubernetesSupportPlan. - */ - public static KubernetesSupportPlan fromString(String name) { - return fromString(name, KubernetesSupportPlan.class); - } - - /** - * Gets known KubernetesSupportPlan values. - * - * @return known KubernetesSupportPlan values. - */ - public static Collection values() { - return values(KubernetesSupportPlan.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersion.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersion.java deleted file mode 100644 index 809070423d78..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersion.java +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Kubernetes version profile for given major.minor release. - */ -@Fluent -public final class KubernetesVersion implements JsonSerializable { - /* - * major.minor version of Kubernetes release - */ - private String version; - - /* - * Capabilities on this Kubernetes version. - */ - private KubernetesVersionCapabilities capabilities; - - /* - * Whether this version is default. - */ - private Boolean isDefault; - - /* - * Whether this version is in preview mode. - */ - private Boolean isPreview; - - /* - * Patch versions of Kubernetes release - */ - private Map patchVersions; - - /** - * Creates an instance of KubernetesVersion class. - */ - public KubernetesVersion() { - } - - /** - * Get the version property: major.minor version of Kubernetes release. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: major.minor version of Kubernetes release. - * - * @param version the version value to set. - * @return the KubernetesVersion object itself. - */ - public KubernetesVersion withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the capabilities property: Capabilities on this Kubernetes version. - * - * @return the capabilities value. - */ - public KubernetesVersionCapabilities capabilities() { - return this.capabilities; - } - - /** - * Set the capabilities property: Capabilities on this Kubernetes version. - * - * @param capabilities the capabilities value to set. - * @return the KubernetesVersion object itself. - */ - public KubernetesVersion withCapabilities(KubernetesVersionCapabilities capabilities) { - this.capabilities = capabilities; - return this; - } - - /** - * Get the isDefault property: Whether this version is default. - * - * @return the isDefault value. - */ - public Boolean isDefault() { - return this.isDefault; - } - - /** - * Set the isDefault property: Whether this version is default. - * - * @param isDefault the isDefault value to set. - * @return the KubernetesVersion object itself. - */ - public KubernetesVersion withIsDefault(Boolean isDefault) { - this.isDefault = isDefault; - return this; - } - - /** - * Get the isPreview property: Whether this version is in preview mode. - * - * @return the isPreview value. - */ - public Boolean isPreview() { - return this.isPreview; - } - - /** - * Set the isPreview property: Whether this version is in preview mode. - * - * @param isPreview the isPreview value to set. - * @return the KubernetesVersion object itself. - */ - public KubernetesVersion withIsPreview(Boolean isPreview) { - this.isPreview = isPreview; - return this; - } - - /** - * Get the patchVersions property: Patch versions of Kubernetes release. - * - * @return the patchVersions value. - */ - public Map patchVersions() { - return this.patchVersions; - } - - /** - * Set the patchVersions property: Patch versions of Kubernetes release. - * - * @param patchVersions the patchVersions value to set. - * @return the KubernetesVersion object itself. - */ - public KubernetesVersion withPatchVersions(Map patchVersions) { - this.patchVersions = patchVersions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (capabilities() != null) { - capabilities().validate(); - } - if (patchVersions() != null) { - patchVersions().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("version", this.version); - jsonWriter.writeJsonField("capabilities", this.capabilities); - jsonWriter.writeBooleanField("isDefault", this.isDefault); - jsonWriter.writeBooleanField("isPreview", this.isPreview); - jsonWriter.writeMapField("patchVersions", this.patchVersions, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of KubernetesVersion from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of KubernetesVersion 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 KubernetesVersion. - */ - public static KubernetesVersion fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - KubernetesVersion deserializedKubernetesVersion = new KubernetesVersion(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("version".equals(fieldName)) { - deserializedKubernetesVersion.version = reader.getString(); - } else if ("capabilities".equals(fieldName)) { - deserializedKubernetesVersion.capabilities = KubernetesVersionCapabilities.fromJson(reader); - } else if ("isDefault".equals(fieldName)) { - deserializedKubernetesVersion.isDefault = reader.getNullable(JsonReader::getBoolean); - } else if ("isPreview".equals(fieldName)) { - deserializedKubernetesVersion.isPreview = reader.getNullable(JsonReader::getBoolean); - } else if ("patchVersions".equals(fieldName)) { - Map patchVersions - = reader.readMap(reader1 -> KubernetesPatchVersion.fromJson(reader1)); - deserializedKubernetesVersion.patchVersions = patchVersions; - } else { - reader.skipChildren(); - } - } - - return deserializedKubernetesVersion; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersionCapabilities.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersionCapabilities.java deleted file mode 100644 index 5ab9a70114a0..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersionCapabilities.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Capabilities on this Kubernetes version. - */ -@Fluent -public final class KubernetesVersionCapabilities implements JsonSerializable { - /* - * The supportPlan property. - */ - private List supportPlan; - - /** - * Creates an instance of KubernetesVersionCapabilities class. - */ - public KubernetesVersionCapabilities() { - } - - /** - * Get the supportPlan property: The supportPlan property. - * - * @return the supportPlan value. - */ - public List supportPlan() { - return this.supportPlan; - } - - /** - * Set the supportPlan property: The supportPlan property. - * - * @param supportPlan the supportPlan value to set. - * @return the KubernetesVersionCapabilities object itself. - */ - public KubernetesVersionCapabilities withSupportPlan(List supportPlan) { - this.supportPlan = supportPlan; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("supportPlan", this.supportPlan, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of KubernetesVersionCapabilities from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of KubernetesVersionCapabilities 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 KubernetesVersionCapabilities. - */ - public static KubernetesVersionCapabilities fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - KubernetesVersionCapabilities deserializedKubernetesVersionCapabilities - = new KubernetesVersionCapabilities(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("supportPlan".equals(fieldName)) { - List supportPlan - = reader.readArray(reader1 -> KubernetesSupportPlan.fromString(reader1.getString())); - deserializedKubernetesVersionCapabilities.supportPlan = supportPlan; - } else { - reader.skipChildren(); - } - } - - return deserializedKubernetesVersionCapabilities; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LicenseType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LicenseType.java deleted file mode 100644 index a4eedd7f5a74..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LicenseType.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The license type to use for Windows VMs. See [Azure Hybrid User - * Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) for more details. - */ -public final class LicenseType extends ExpandableStringEnum { - /** - * Static value None for LicenseType. - */ - public static final LicenseType NONE = fromString("None"); - - /** - * Static value Windows_Server for LicenseType. - */ - public static final LicenseType WINDOWS_SERVER = fromString("Windows_Server"); - - /** - * Creates a new instance of LicenseType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LicenseType() { - } - - /** - * Creates or finds a LicenseType from its string representation. - * - * @param name a name to look for. - * @return the corresponding LicenseType. - */ - public static LicenseType fromString(String name) { - return fromString(name, LicenseType.class); - } - - /** - * Gets known LicenseType values. - * - * @return known LicenseType values. - */ - public static Collection values() { - return values(LicenseType.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LinuxOSConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LinuxOSConfig.java deleted file mode 100644 index 05443a23cdb4..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LinuxOSConfig.java +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * OS configurations of Linux agent nodes. See [AKS custom node - * configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. - */ -@Fluent -public final class LinuxOSConfig implements JsonSerializable { - /* - * Sysctl settings for Linux agent nodes. - */ - private SysctlConfig sysctls; - - /* - * Whether transparent hugepages are enabled. Valid values are 'always', 'madvise', and 'never'. The default is - * 'always'. For more information see [Transparent - * Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). - */ - private String transparentHugePageEnabled; - - /* - * Whether the kernel should make aggressive use of memory compaction to make more hugepages available. Valid values - * are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information see - * [Transparent - * Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). - */ - private String transparentHugePageDefrag; - - /* - * The size in MB of a swap file that will be created on each node. - */ - private Integer swapFileSizeMB; - - /** - * Creates an instance of LinuxOSConfig class. - */ - public LinuxOSConfig() { - } - - /** - * Get the sysctls property: Sysctl settings for Linux agent nodes. - * - * @return the sysctls value. - */ - public SysctlConfig sysctls() { - return this.sysctls; - } - - /** - * Set the sysctls property: Sysctl settings for Linux agent nodes. - * - * @param sysctls the sysctls value to set. - * @return the LinuxOSConfig object itself. - */ - public LinuxOSConfig withSysctls(SysctlConfig sysctls) { - this.sysctls = sysctls; - return this; - } - - /** - * Get the transparentHugePageEnabled property: Whether transparent hugepages are enabled. Valid values are - * 'always', 'madvise', and 'never'. The default is 'always'. For more information see [Transparent - * Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). - * - * @return the transparentHugePageEnabled value. - */ - public String transparentHugePageEnabled() { - return this.transparentHugePageEnabled; - } - - /** - * Set the transparentHugePageEnabled property: Whether transparent hugepages are enabled. Valid values are - * 'always', 'madvise', and 'never'. The default is 'always'. For more information see [Transparent - * Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). - * - * @param transparentHugePageEnabled the transparentHugePageEnabled value to set. - * @return the LinuxOSConfig object itself. - */ - public LinuxOSConfig withTransparentHugePageEnabled(String transparentHugePageEnabled) { - this.transparentHugePageEnabled = transparentHugePageEnabled; - return this; - } - - /** - * Get the transparentHugePageDefrag property: Whether the kernel should make aggressive use of memory compaction to - * make more hugepages available. Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The - * default is 'madvise'. For more information see [Transparent - * Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). - * - * @return the transparentHugePageDefrag value. - */ - public String transparentHugePageDefrag() { - return this.transparentHugePageDefrag; - } - - /** - * Set the transparentHugePageDefrag property: Whether the kernel should make aggressive use of memory compaction to - * make more hugepages available. Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The - * default is 'madvise'. For more information see [Transparent - * Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). - * - * @param transparentHugePageDefrag the transparentHugePageDefrag value to set. - * @return the LinuxOSConfig object itself. - */ - public LinuxOSConfig withTransparentHugePageDefrag(String transparentHugePageDefrag) { - this.transparentHugePageDefrag = transparentHugePageDefrag; - return this; - } - - /** - * Get the swapFileSizeMB property: The size in MB of a swap file that will be created on each node. - * - * @return the swapFileSizeMB value. - */ - public Integer swapFileSizeMB() { - return this.swapFileSizeMB; - } - - /** - * Set the swapFileSizeMB property: The size in MB of a swap file that will be created on each node. - * - * @param swapFileSizeMB the swapFileSizeMB value to set. - * @return the LinuxOSConfig object itself. - */ - public LinuxOSConfig withSwapFileSizeMB(Integer swapFileSizeMB) { - this.swapFileSizeMB = swapFileSizeMB; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sysctls() != null) { - sysctls().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("sysctls", this.sysctls); - jsonWriter.writeStringField("transparentHugePageEnabled", this.transparentHugePageEnabled); - jsonWriter.writeStringField("transparentHugePageDefrag", this.transparentHugePageDefrag); - jsonWriter.writeNumberField("swapFileSizeMB", this.swapFileSizeMB); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LinuxOSConfig from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LinuxOSConfig 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 LinuxOSConfig. - */ - public static LinuxOSConfig fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LinuxOSConfig deserializedLinuxOSConfig = new LinuxOSConfig(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sysctls".equals(fieldName)) { - deserializedLinuxOSConfig.sysctls = SysctlConfig.fromJson(reader); - } else if ("transparentHugePageEnabled".equals(fieldName)) { - deserializedLinuxOSConfig.transparentHugePageEnabled = reader.getString(); - } else if ("transparentHugePageDefrag".equals(fieldName)) { - deserializedLinuxOSConfig.transparentHugePageDefrag = reader.getString(); - } else if ("swapFileSizeMB".equals(fieldName)) { - deserializedLinuxOSConfig.swapFileSizeMB = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedLinuxOSConfig; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerSku.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerSku.java deleted file mode 100644 index 65598b886c27..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerSku.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The load balancer sku for the managed cluster. The default is 'standard'. See [Azure Load Balancer - * SKUs](https://docs.microsoft.com/azure/load-balancer/skus) for more information about the differences between load - * balancer SKUs. - */ -public final class LoadBalancerSku extends ExpandableStringEnum { - /** - * Static value standard for LoadBalancerSku. - */ - public static final LoadBalancerSku STANDARD = fromString("standard"); - - /** - * Static value basic for LoadBalancerSku. - */ - public static final LoadBalancerSku BASIC = fromString("basic"); - - /** - * Creates a new instance of LoadBalancerSku value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LoadBalancerSku() { - } - - /** - * Creates or finds a LoadBalancerSku from its string representation. - * - * @param name a name to look for. - * @return the corresponding LoadBalancerSku. - */ - public static LoadBalancerSku fromString(String name) { - return fromString(name, LoadBalancerSku.class); - } - - /** - * Gets known LoadBalancerSku values. - * - * @return known LoadBalancerSku values. - */ - public static Collection values() { - return values(LoadBalancerSku.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardDestination.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardDestination.java deleted file mode 100644 index 39c9a39b739f..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardDestination.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Destination server for DNS queries to be forwarded from localDNS. - */ -public final class LocalDnsForwardDestination extends ExpandableStringEnum { - /** - * Static value ClusterCoreDNS for LocalDnsForwardDestination. - */ - public static final LocalDnsForwardDestination CLUSTER_CORE_DNS = fromString("ClusterCoreDNS"); - - /** - * Static value VnetDNS for LocalDnsForwardDestination. - */ - public static final LocalDnsForwardDestination VNET_DNS = fromString("VnetDNS"); - - /** - * Creates a new instance of LocalDnsForwardDestination value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LocalDnsForwardDestination() { - } - - /** - * Creates or finds a LocalDnsForwardDestination from its string representation. - * - * @param name a name to look for. - * @return the corresponding LocalDnsForwardDestination. - */ - public static LocalDnsForwardDestination fromString(String name) { - return fromString(name, LocalDnsForwardDestination.class); - } - - /** - * Gets known LocalDnsForwardDestination values. - * - * @return known LocalDnsForwardDestination values. - */ - public static Collection values() { - return values(LocalDnsForwardDestination.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardPolicy.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardPolicy.java deleted file mode 100644 index 3fd4ced49ccc..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardPolicy.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Forward policy for selecting upstream DNS server. See [forward plugin](https://coredns.io/plugins/forward) for more - * information. - */ -public final class LocalDnsForwardPolicy extends ExpandableStringEnum { - /** - * Static value Sequential for LocalDnsForwardPolicy. - */ - public static final LocalDnsForwardPolicy SEQUENTIAL = fromString("Sequential"); - - /** - * Static value RoundRobin for LocalDnsForwardPolicy. - */ - public static final LocalDnsForwardPolicy ROUND_ROBIN = fromString("RoundRobin"); - - /** - * Static value Random for LocalDnsForwardPolicy. - */ - public static final LocalDnsForwardPolicy RANDOM = fromString("Random"); - - /** - * Creates a new instance of LocalDnsForwardPolicy value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LocalDnsForwardPolicy() { - } - - /** - * Creates or finds a LocalDnsForwardPolicy from its string representation. - * - * @param name a name to look for. - * @return the corresponding LocalDnsForwardPolicy. - */ - public static LocalDnsForwardPolicy fromString(String name) { - return fromString(name, LocalDnsForwardPolicy.class); - } - - /** - * Gets known LocalDnsForwardPolicy values. - * - * @return known LocalDnsForwardPolicy values. - */ - public static Collection values() { - return values(LocalDnsForwardPolicy.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsMode.java deleted file mode 100644 index 0d9ae3ad031b..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsMode.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Mode of enablement for localDNS. - */ -public final class LocalDnsMode extends ExpandableStringEnum { - /** - * Static value Preferred for LocalDnsMode. - */ - public static final LocalDnsMode PREFERRED = fromString("Preferred"); - - /** - * Static value Required for LocalDnsMode. - */ - public static final LocalDnsMode REQUIRED = fromString("Required"); - - /** - * Static value Disabled for LocalDnsMode. - */ - public static final LocalDnsMode DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of LocalDnsMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LocalDnsMode() { - } - - /** - * Creates or finds a LocalDnsMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding LocalDnsMode. - */ - public static LocalDnsMode fromString(String name) { - return fromString(name, LocalDnsMode.class); - } - - /** - * Gets known LocalDnsMode values. - * - * @return known LocalDnsMode values. - */ - public static Collection values() { - return values(LocalDnsMode.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsOverride.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsOverride.java deleted file mode 100644 index 7bd4f379f4ef..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsOverride.java +++ /dev/null @@ -1,305 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Overrides for localDNS profile. - */ -@Fluent -public final class LocalDnsOverride implements JsonSerializable { - /* - * Log level for DNS queries in localDNS. - */ - private LocalDnsQueryLogging queryLogging; - - /* - * Enforce TCP or prefer UDP protocol for connections from localDNS to upstream DNS server. - */ - private LocalDnsProtocol protocol; - - /* - * Destination server for DNS queries to be forwarded from localDNS. - */ - private LocalDnsForwardDestination forwardDestination; - - /* - * Forward policy for selecting upstream DNS server. See [forward plugin](https://coredns.io/plugins/forward) for - * more information. - */ - private LocalDnsForwardPolicy forwardPolicy; - - /* - * Maximum number of concurrent queries. See [forward plugin](https://coredns.io/plugins/forward) for more - * information. - */ - private Integer maxConcurrent; - - /* - * Cache max TTL in seconds. See [cache plugin](https://coredns.io/plugins/cache) for more information. - */ - private Integer cacheDurationInSeconds; - - /* - * Serve stale duration in seconds. See [cache plugin](https://coredns.io/plugins/cache) for more information. - */ - private Integer serveStaleDurationInSeconds; - - /* - * Policy for serving stale data. See [cache plugin](https://coredns.io/plugins/cache) for more information. - */ - private LocalDnsServeStale serveStale; - - /** - * Creates an instance of LocalDnsOverride class. - */ - public LocalDnsOverride() { - } - - /** - * Get the queryLogging property: Log level for DNS queries in localDNS. - * - * @return the queryLogging value. - */ - public LocalDnsQueryLogging queryLogging() { - return this.queryLogging; - } - - /** - * Set the queryLogging property: Log level for DNS queries in localDNS. - * - * @param queryLogging the queryLogging value to set. - * @return the LocalDnsOverride object itself. - */ - public LocalDnsOverride withQueryLogging(LocalDnsQueryLogging queryLogging) { - this.queryLogging = queryLogging; - return this; - } - - /** - * Get the protocol property: Enforce TCP or prefer UDP protocol for connections from localDNS to upstream DNS - * server. - * - * @return the protocol value. - */ - public LocalDnsProtocol protocol() { - return this.protocol; - } - - /** - * Set the protocol property: Enforce TCP or prefer UDP protocol for connections from localDNS to upstream DNS - * server. - * - * @param protocol the protocol value to set. - * @return the LocalDnsOverride object itself. - */ - public LocalDnsOverride withProtocol(LocalDnsProtocol protocol) { - this.protocol = protocol; - return this; - } - - /** - * Get the forwardDestination property: Destination server for DNS queries to be forwarded from localDNS. - * - * @return the forwardDestination value. - */ - public LocalDnsForwardDestination forwardDestination() { - return this.forwardDestination; - } - - /** - * Set the forwardDestination property: Destination server for DNS queries to be forwarded from localDNS. - * - * @param forwardDestination the forwardDestination value to set. - * @return the LocalDnsOverride object itself. - */ - public LocalDnsOverride withForwardDestination(LocalDnsForwardDestination forwardDestination) { - this.forwardDestination = forwardDestination; - return this; - } - - /** - * Get the forwardPolicy property: Forward policy for selecting upstream DNS server. See [forward - * plugin](https://coredns.io/plugins/forward) for more information. - * - * @return the forwardPolicy value. - */ - public LocalDnsForwardPolicy forwardPolicy() { - return this.forwardPolicy; - } - - /** - * Set the forwardPolicy property: Forward policy for selecting upstream DNS server. See [forward - * plugin](https://coredns.io/plugins/forward) for more information. - * - * @param forwardPolicy the forwardPolicy value to set. - * @return the LocalDnsOverride object itself. - */ - public LocalDnsOverride withForwardPolicy(LocalDnsForwardPolicy forwardPolicy) { - this.forwardPolicy = forwardPolicy; - return this; - } - - /** - * Get the maxConcurrent property: Maximum number of concurrent queries. See [forward - * plugin](https://coredns.io/plugins/forward) for more information. - * - * @return the maxConcurrent value. - */ - public Integer maxConcurrent() { - return this.maxConcurrent; - } - - /** - * Set the maxConcurrent property: Maximum number of concurrent queries. See [forward - * plugin](https://coredns.io/plugins/forward) for more information. - * - * @param maxConcurrent the maxConcurrent value to set. - * @return the LocalDnsOverride object itself. - */ - public LocalDnsOverride withMaxConcurrent(Integer maxConcurrent) { - this.maxConcurrent = maxConcurrent; - return this; - } - - /** - * Get the cacheDurationInSeconds property: Cache max TTL in seconds. See [cache - * plugin](https://coredns.io/plugins/cache) for more information. - * - * @return the cacheDurationInSeconds value. - */ - public Integer cacheDurationInSeconds() { - return this.cacheDurationInSeconds; - } - - /** - * Set the cacheDurationInSeconds property: Cache max TTL in seconds. See [cache - * plugin](https://coredns.io/plugins/cache) for more information. - * - * @param cacheDurationInSeconds the cacheDurationInSeconds value to set. - * @return the LocalDnsOverride object itself. - */ - public LocalDnsOverride withCacheDurationInSeconds(Integer cacheDurationInSeconds) { - this.cacheDurationInSeconds = cacheDurationInSeconds; - return this; - } - - /** - * Get the serveStaleDurationInSeconds property: Serve stale duration in seconds. See [cache - * plugin](https://coredns.io/plugins/cache) for more information. - * - * @return the serveStaleDurationInSeconds value. - */ - public Integer serveStaleDurationInSeconds() { - return this.serveStaleDurationInSeconds; - } - - /** - * Set the serveStaleDurationInSeconds property: Serve stale duration in seconds. See [cache - * plugin](https://coredns.io/plugins/cache) for more information. - * - * @param serveStaleDurationInSeconds the serveStaleDurationInSeconds value to set. - * @return the LocalDnsOverride object itself. - */ - public LocalDnsOverride withServeStaleDurationInSeconds(Integer serveStaleDurationInSeconds) { - this.serveStaleDurationInSeconds = serveStaleDurationInSeconds; - return this; - } - - /** - * Get the serveStale property: Policy for serving stale data. See [cache plugin](https://coredns.io/plugins/cache) - * for more information. - * - * @return the serveStale value. - */ - public LocalDnsServeStale serveStale() { - return this.serveStale; - } - - /** - * Set the serveStale property: Policy for serving stale data. See [cache plugin](https://coredns.io/plugins/cache) - * for more information. - * - * @param serveStale the serveStale value to set. - * @return the LocalDnsOverride object itself. - */ - public LocalDnsOverride withServeStale(LocalDnsServeStale serveStale) { - this.serveStale = serveStale; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("queryLogging", this.queryLogging == null ? null : this.queryLogging.toString()); - jsonWriter.writeStringField("protocol", this.protocol == null ? null : this.protocol.toString()); - jsonWriter.writeStringField("forwardDestination", - this.forwardDestination == null ? null : this.forwardDestination.toString()); - jsonWriter.writeStringField("forwardPolicy", this.forwardPolicy == null ? null : this.forwardPolicy.toString()); - jsonWriter.writeNumberField("maxConcurrent", this.maxConcurrent); - jsonWriter.writeNumberField("cacheDurationInSeconds", this.cacheDurationInSeconds); - jsonWriter.writeNumberField("serveStaleDurationInSeconds", this.serveStaleDurationInSeconds); - jsonWriter.writeStringField("serveStale", this.serveStale == null ? null : this.serveStale.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LocalDnsOverride from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LocalDnsOverride 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 LocalDnsOverride. - */ - public static LocalDnsOverride fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LocalDnsOverride deserializedLocalDnsOverride = new LocalDnsOverride(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("queryLogging".equals(fieldName)) { - deserializedLocalDnsOverride.queryLogging = LocalDnsQueryLogging.fromString(reader.getString()); - } else if ("protocol".equals(fieldName)) { - deserializedLocalDnsOverride.protocol = LocalDnsProtocol.fromString(reader.getString()); - } else if ("forwardDestination".equals(fieldName)) { - deserializedLocalDnsOverride.forwardDestination - = LocalDnsForwardDestination.fromString(reader.getString()); - } else if ("forwardPolicy".equals(fieldName)) { - deserializedLocalDnsOverride.forwardPolicy = LocalDnsForwardPolicy.fromString(reader.getString()); - } else if ("maxConcurrent".equals(fieldName)) { - deserializedLocalDnsOverride.maxConcurrent = reader.getNullable(JsonReader::getInt); - } else if ("cacheDurationInSeconds".equals(fieldName)) { - deserializedLocalDnsOverride.cacheDurationInSeconds = reader.getNullable(JsonReader::getInt); - } else if ("serveStaleDurationInSeconds".equals(fieldName)) { - deserializedLocalDnsOverride.serveStaleDurationInSeconds = reader.getNullable(JsonReader::getInt); - } else if ("serveStale".equals(fieldName)) { - deserializedLocalDnsOverride.serveStale = LocalDnsServeStale.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedLocalDnsOverride; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProfile.java deleted file mode 100644 index cbbd0d7cb0bf..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProfile.java +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve performance and - * reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns. - */ -@Fluent -public final class LocalDnsProfile implements JsonSerializable { - /* - * Mode of enablement for localDNS. - */ - private LocalDnsMode mode; - - /* - * System-generated state of localDNS. - */ - private LocalDnsState state; - - /* - * VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default or kubelet (referred to as VnetDNS - * traffic). - */ - private Map vnetDnsOverrides; - - /* - * KubeDNS overrides apply to DNS traffic from pods with dnsPolicy:ClusterFirst (referred to as KubeDNS traffic). - */ - private Map kubeDnsOverrides; - - /** - * Creates an instance of LocalDnsProfile class. - */ - public LocalDnsProfile() { - } - - /** - * Get the mode property: Mode of enablement for localDNS. - * - * @return the mode value. - */ - public LocalDnsMode mode() { - return this.mode; - } - - /** - * Set the mode property: Mode of enablement for localDNS. - * - * @param mode the mode value to set. - * @return the LocalDnsProfile object itself. - */ - public LocalDnsProfile withMode(LocalDnsMode mode) { - this.mode = mode; - return this; - } - - /** - * Get the state property: System-generated state of localDNS. - * - * @return the state value. - */ - public LocalDnsState state() { - return this.state; - } - - /** - * Get the vnetDnsOverrides property: VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default or - * kubelet (referred to as VnetDNS traffic). - * - * @return the vnetDnsOverrides value. - */ - public Map vnetDnsOverrides() { - return this.vnetDnsOverrides; - } - - /** - * Set the vnetDnsOverrides property: VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default or - * kubelet (referred to as VnetDNS traffic). - * - * @param vnetDnsOverrides the vnetDnsOverrides value to set. - * @return the LocalDnsProfile object itself. - */ - public LocalDnsProfile withVnetDnsOverrides(Map vnetDnsOverrides) { - this.vnetDnsOverrides = vnetDnsOverrides; - return this; - } - - /** - * Get the kubeDnsOverrides property: KubeDNS overrides apply to DNS traffic from pods with dnsPolicy:ClusterFirst - * (referred to as KubeDNS traffic). - * - * @return the kubeDnsOverrides value. - */ - public Map kubeDnsOverrides() { - return this.kubeDnsOverrides; - } - - /** - * Set the kubeDnsOverrides property: KubeDNS overrides apply to DNS traffic from pods with dnsPolicy:ClusterFirst - * (referred to as KubeDNS traffic). - * - * @param kubeDnsOverrides the kubeDnsOverrides value to set. - * @return the LocalDnsProfile object itself. - */ - public LocalDnsProfile withKubeDnsOverrides(Map kubeDnsOverrides) { - this.kubeDnsOverrides = kubeDnsOverrides; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (vnetDnsOverrides() != null) { - vnetDnsOverrides().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (kubeDnsOverrides() != null) { - kubeDnsOverrides().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - jsonWriter.writeMapField("vnetDNSOverrides", this.vnetDnsOverrides, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeMapField("kubeDNSOverrides", this.kubeDnsOverrides, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LocalDnsProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LocalDnsProfile 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 LocalDnsProfile. - */ - public static LocalDnsProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LocalDnsProfile deserializedLocalDnsProfile = new LocalDnsProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mode".equals(fieldName)) { - deserializedLocalDnsProfile.mode = LocalDnsMode.fromString(reader.getString()); - } else if ("state".equals(fieldName)) { - deserializedLocalDnsProfile.state = LocalDnsState.fromString(reader.getString()); - } else if ("vnetDNSOverrides".equals(fieldName)) { - Map vnetDnsOverrides - = reader.readMap(reader1 -> LocalDnsOverride.fromJson(reader1)); - deserializedLocalDnsProfile.vnetDnsOverrides = vnetDnsOverrides; - } else if ("kubeDNSOverrides".equals(fieldName)) { - Map kubeDnsOverrides - = reader.readMap(reader1 -> LocalDnsOverride.fromJson(reader1)); - deserializedLocalDnsProfile.kubeDnsOverrides = kubeDnsOverrides; - } else { - reader.skipChildren(); - } - } - - return deserializedLocalDnsProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProtocol.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProtocol.java deleted file mode 100644 index 4ff3a5e7194c..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProtocol.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enforce TCP or prefer UDP protocol for connections from localDNS to upstream DNS server. - */ -public final class LocalDnsProtocol extends ExpandableStringEnum { - /** - * Static value PreferUDP for LocalDnsProtocol. - */ - public static final LocalDnsProtocol PREFER_UDP = fromString("PreferUDP"); - - /** - * Static value ForceTCP for LocalDnsProtocol. - */ - public static final LocalDnsProtocol FORCE_TCP = fromString("ForceTCP"); - - /** - * Creates a new instance of LocalDnsProtocol value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LocalDnsProtocol() { - } - - /** - * Creates or finds a LocalDnsProtocol from its string representation. - * - * @param name a name to look for. - * @return the corresponding LocalDnsProtocol. - */ - public static LocalDnsProtocol fromString(String name) { - return fromString(name, LocalDnsProtocol.class); - } - - /** - * Gets known LocalDnsProtocol values. - * - * @return known LocalDnsProtocol values. - */ - public static Collection values() { - return values(LocalDnsProtocol.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsQueryLogging.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsQueryLogging.java deleted file mode 100644 index 4c27d9badbe9..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsQueryLogging.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Log level for DNS queries in localDNS. - */ -public final class LocalDnsQueryLogging extends ExpandableStringEnum { - /** - * Static value Error for LocalDnsQueryLogging. - */ - public static final LocalDnsQueryLogging ERROR = fromString("Error"); - - /** - * Static value Log for LocalDnsQueryLogging. - */ - public static final LocalDnsQueryLogging LOG = fromString("Log"); - - /** - * Creates a new instance of LocalDnsQueryLogging value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LocalDnsQueryLogging() { - } - - /** - * Creates or finds a LocalDnsQueryLogging from its string representation. - * - * @param name a name to look for. - * @return the corresponding LocalDnsQueryLogging. - */ - public static LocalDnsQueryLogging fromString(String name) { - return fromString(name, LocalDnsQueryLogging.class); - } - - /** - * Gets known LocalDnsQueryLogging values. - * - * @return known LocalDnsQueryLogging values. - */ - public static Collection values() { - return values(LocalDnsQueryLogging.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsServeStale.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsServeStale.java deleted file mode 100644 index ea1184a977f0..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsServeStale.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Policy for serving stale data. See [cache plugin](https://coredns.io/plugins/cache) for more information. - */ -public final class LocalDnsServeStale extends ExpandableStringEnum { - /** - * Static value Verify for LocalDnsServeStale. - */ - public static final LocalDnsServeStale VERIFY = fromString("Verify"); - - /** - * Static value Immediate for LocalDnsServeStale. - */ - public static final LocalDnsServeStale IMMEDIATE = fromString("Immediate"); - - /** - * Static value Disable for LocalDnsServeStale. - */ - public static final LocalDnsServeStale DISABLE = fromString("Disable"); - - /** - * Creates a new instance of LocalDnsServeStale value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LocalDnsServeStale() { - } - - /** - * Creates or finds a LocalDnsServeStale from its string representation. - * - * @param name a name to look for. - * @return the corresponding LocalDnsServeStale. - */ - public static LocalDnsServeStale fromString(String name) { - return fromString(name, LocalDnsServeStale.class); - } - - /** - * Gets known LocalDnsServeStale values. - * - * @return known LocalDnsServeStale values. - */ - public static Collection values() { - return values(LocalDnsServeStale.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsState.java deleted file mode 100644 index 93b21851689e..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsState.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * System-generated state of localDNS. - */ -public final class LocalDnsState extends ExpandableStringEnum { - /** - * Static value Enabled for LocalDnsState. - */ - public static final LocalDnsState ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for LocalDnsState. - */ - public static final LocalDnsState DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of LocalDnsState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LocalDnsState() { - } - - /** - * Creates or finds a LocalDnsState from its string representation. - * - * @param name a name to look for. - * @return the corresponding LocalDnsState. - */ - public static LocalDnsState fromString(String name) { - return fromString(name, LocalDnsState.class); - } - - /** - * Gets known LocalDnsState values. - * - * @return known LocalDnsState values. - */ - public static Collection values() { - return values(LocalDnsState.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineIpAddress.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineIpAddress.java deleted file mode 100644 index a6612cb6fcfd..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineIpAddress.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 machine IP address details. - */ -@Immutable -public final class MachineIpAddress implements JsonSerializable { - /* - * To determine if address belongs IPv4 or IPv6 family - */ - private IpFamily family; - - /* - * IPv4 or IPv6 address of the machine - */ - private String ip; - - /** - * Creates an instance of MachineIpAddress class. - */ - public MachineIpAddress() { - } - - /** - * Get the family property: To determine if address belongs IPv4 or IPv6 family. - * - * @return the family value. - */ - public IpFamily family() { - return this.family; - } - - /** - * Get the ip property: IPv4 or IPv6 address of the machine. - * - * @return the ip value. - */ - public String ip() { - return this.ip; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MachineIpAddress from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MachineIpAddress 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 MachineIpAddress. - */ - public static MachineIpAddress fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MachineIpAddress deserializedMachineIpAddress = new MachineIpAddress(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("family".equals(fieldName)) { - deserializedMachineIpAddress.family = IpFamily.fromString(reader.getString()); - } else if ("ip".equals(fieldName)) { - deserializedMachineIpAddress.ip = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMachineIpAddress; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineListResult.java deleted file mode 100644 index b81e97eb41a2..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineListResult.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 com.azure.resourcemanager.containerservice.fluent.models.MachineInner; -import java.io.IOException; -import java.util.List; - -/** - * The response from the List Machines operation. - */ -@Fluent -public final class MachineListResult implements JsonSerializable { - /* - * The URL to get the next set of machine results. - */ - private String nextLink; - - /* - * The list of Machines in cluster. - */ - private List value; - - /** - * Creates an instance of MachineListResult class. - */ - public MachineListResult() { - } - - /** - * Get the nextLink property: The URL to get the next set of machine results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: The list of Machines in cluster. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of Machines in cluster. - * - * @param value the value value to set. - * @return the MachineListResult object itself. - */ - public MachineListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MachineListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MachineListResult 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 MachineListResult. - */ - public static MachineListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MachineListResult deserializedMachineListResult = new MachineListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nextLink".equals(fieldName)) { - deserializedMachineListResult.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> MachineInner.fromJson(reader1)); - deserializedMachineListResult.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedMachineListResult; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java deleted file mode 100644 index 5a3c9f305386..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; -import java.util.List; - -/** - * network properties of the machine. - */ -@Immutable -public final class MachineNetworkProperties implements JsonSerializable { - /* - * IPv4, IPv6 addresses of the machine - */ - private List ipAddresses; - - /** - * Creates an instance of MachineNetworkProperties class. - */ - public MachineNetworkProperties() { - } - - /** - * Get the ipAddresses property: IPv4, IPv6 addresses of the machine. - * - * @return the ipAddresses value. - */ - public List ipAddresses() { - return this.ipAddresses; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ipAddresses() != null) { - ipAddresses().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MachineNetworkProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MachineNetworkProperties 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 MachineNetworkProperties. - */ - public static MachineNetworkProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MachineNetworkProperties deserializedMachineNetworkProperties = new MachineNetworkProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ipAddresses".equals(fieldName)) { - List ipAddresses - = reader.readArray(reader1 -> MachineIpAddress.fromJson(reader1)); - deserializedMachineNetworkProperties.ipAddresses = ipAddresses; - } else { - reader.skipChildren(); - } - } - - return deserializedMachineNetworkProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java deleted file mode 100644 index 2f167587df26..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 properties of the machine. - */ -@Immutable -public final class MachineProperties implements JsonSerializable { - /* - * network properties of the machine - */ - private MachineNetworkProperties network; - - /* - * Azure resource id of the machine. It can be used to GET underlying VM Instance - */ - private String resourceId; - - /** - * Creates an instance of MachineProperties class. - */ - public MachineProperties() { - } - - /** - * Get the network property: network properties of the machine. - * - * @return the network value. - */ - public MachineNetworkProperties network() { - return this.network; - } - - /** - * Get the resourceId property: Azure resource id of the machine. It can be used to GET underlying VM Instance. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (network() != null) { - network().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MachineProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MachineProperties 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 MachineProperties. - */ - public static MachineProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MachineProperties deserializedMachineProperties = new MachineProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("network".equals(fieldName)) { - deserializedMachineProperties.network = MachineNetworkProperties.fromJson(reader); - } else if ("resourceId".equals(fieldName)) { - deserializedMachineProperties.resourceId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMachineProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceConfigurationListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceConfigurationListResult.java deleted file mode 100644 index 6ceccb60ed57..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceConfigurationListResult.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 com.azure.resourcemanager.containerservice.fluent.models.MaintenanceConfigurationInner; -import java.io.IOException; -import java.util.List; - -/** - * The response from the List maintenance configurations operation. - */ -@Fluent -public final class MaintenanceConfigurationListResult implements JsonSerializable { - /* - * The list of maintenance configurations. - */ - private List value; - - /* - * The URL to get the next set of maintenance configuration results. - */ - private String nextLink; - - /** - * Creates an instance of MaintenanceConfigurationListResult class. - */ - public MaintenanceConfigurationListResult() { - } - - /** - * Get the value property: The list of maintenance configurations. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of maintenance configurations. - * - * @param value the value value to set. - * @return the MaintenanceConfigurationListResult object itself. - */ - public MaintenanceConfigurationListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to get the next set of maintenance configuration results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MaintenanceConfigurationListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MaintenanceConfigurationListResult 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 MaintenanceConfigurationListResult. - */ - public static MaintenanceConfigurationListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MaintenanceConfigurationListResult deserializedMaintenanceConfigurationListResult - = new MaintenanceConfigurationListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> MaintenanceConfigurationInner.fromJson(reader1)); - deserializedMaintenanceConfigurationListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedMaintenanceConfigurationListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMaintenanceConfigurationListResult; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceWindow.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceWindow.java deleted file mode 100644 index 0b6dba6d3575..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceWindow.java +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.LocalDate; -import java.util.List; -import java.util.Objects; - -/** - * Maintenance window used to configure scheduled auto-upgrade for a Managed Cluster. - */ -@Fluent -public final class MaintenanceWindow implements JsonSerializable { - /* - * Recurrence schedule for the maintenance window. - */ - private Schedule schedule; - - /* - * Length of maintenance window range from 4 to 24 hours. - */ - private int durationHours; - - /* - * The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the - * default is '+00:00'. - */ - private String utcOffset; - - /* - * The date the maintenance window activates. If the current date is before this date, the maintenance window is - * inactive and will not be used for upgrades. If not specified, the maintenance window will be active right away. - */ - private LocalDate startDate; - - /* - * The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to - * this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. - */ - private String startTime; - - /* - * Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: - * +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to - * '2023-01-03 22:00' in UTC time. - */ - private List notAllowedDates; - - /** - * Creates an instance of MaintenanceWindow class. - */ - public MaintenanceWindow() { - } - - /** - * Get the schedule property: Recurrence schedule for the maintenance window. - * - * @return the schedule value. - */ - public Schedule schedule() { - return this.schedule; - } - - /** - * Set the schedule property: Recurrence schedule for the maintenance window. - * - * @param schedule the schedule value to set. - * @return the MaintenanceWindow object itself. - */ - public MaintenanceWindow withSchedule(Schedule schedule) { - this.schedule = schedule; - return this; - } - - /** - * Get the durationHours property: Length of maintenance window range from 4 to 24 hours. - * - * @return the durationHours value. - */ - public int durationHours() { - return this.durationHours; - } - - /** - * Set the durationHours property: Length of maintenance window range from 4 to 24 hours. - * - * @param durationHours the durationHours value to set. - * @return the MaintenanceWindow object itself. - */ - public MaintenanceWindow withDurationHours(int durationHours) { - this.durationHours = durationHours; - return this; - } - - /** - * Get the utcOffset property: The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for - * PST. If not specified, the default is '+00:00'. - * - * @return the utcOffset value. - */ - public String utcOffset() { - return this.utcOffset; - } - - /** - * Set the utcOffset property: The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for - * PST. If not specified, the default is '+00:00'. - * - * @param utcOffset the utcOffset value to set. - * @return the MaintenanceWindow object itself. - */ - public MaintenanceWindow withUtcOffset(String utcOffset) { - this.utcOffset = utcOffset; - return this; - } - - /** - * Get the startDate property: The date the maintenance window activates. If the current date is before this date, - * the maintenance window is inactive and will not be used for upgrades. If not specified, the maintenance window - * will be active right away. - * - * @return the startDate value. - */ - public LocalDate startDate() { - return this.startDate; - } - - /** - * Set the startDate property: The date the maintenance window activates. If the current date is before this date, - * the maintenance window is inactive and will not be used for upgrades. If not specified, the maintenance window - * will be active right away. - * - * @param startDate the startDate value to set. - * @return the MaintenanceWindow object itself. - */ - public MaintenanceWindow withStartDate(LocalDate startDate) { - this.startDate = startDate; - return this; - } - - /** - * Get the startTime property: The start time of the maintenance window. Accepted values are from '00:00' to - * '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. - * - * @return the startTime value. - */ - public String startTime() { - return this.startTime; - } - - /** - * Set the startTime property: The start time of the maintenance window. Accepted values are from '00:00' to - * '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. - * - * @param startTime the startTime value to set. - * @return the MaintenanceWindow object itself. - */ - public MaintenanceWindow withStartTime(String startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the notAllowedDates property: Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. - * For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be - * blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time. - * - * @return the notAllowedDates value. - */ - public List notAllowedDates() { - return this.notAllowedDates; - } - - /** - * Set the notAllowedDates property: Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. - * For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be - * blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time. - * - * @param notAllowedDates the notAllowedDates value to set. - * @return the MaintenanceWindow object itself. - */ - public MaintenanceWindow withNotAllowedDates(List notAllowedDates) { - this.notAllowedDates = notAllowedDates; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (schedule() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property schedule in model MaintenanceWindow")); - } else { - schedule().validate(); - } - if (startTime() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property startTime in model MaintenanceWindow")); - } - if (notAllowedDates() != null) { - notAllowedDates().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MaintenanceWindow.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("schedule", this.schedule); - jsonWriter.writeIntField("durationHours", this.durationHours); - jsonWriter.writeStringField("startTime", this.startTime); - jsonWriter.writeStringField("utcOffset", this.utcOffset); - jsonWriter.writeStringField("startDate", Objects.toString(this.startDate, null)); - jsonWriter.writeArrayField("notAllowedDates", this.notAllowedDates, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MaintenanceWindow from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MaintenanceWindow 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 MaintenanceWindow. - */ - public static MaintenanceWindow fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MaintenanceWindow deserializedMaintenanceWindow = new MaintenanceWindow(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("schedule".equals(fieldName)) { - deserializedMaintenanceWindow.schedule = Schedule.fromJson(reader); - } else if ("durationHours".equals(fieldName)) { - deserializedMaintenanceWindow.durationHours = reader.getInt(); - } else if ("startTime".equals(fieldName)) { - deserializedMaintenanceWindow.startTime = reader.getString(); - } else if ("utcOffset".equals(fieldName)) { - deserializedMaintenanceWindow.utcOffset = reader.getString(); - } else if ("startDate".equals(fieldName)) { - deserializedMaintenanceWindow.startDate - = reader.getNullable(nonNullReader -> LocalDate.parse(nonNullReader.getString())); - } else if ("notAllowedDates".equals(fieldName)) { - List notAllowedDates = reader.readArray(reader1 -> DateSpan.fromJson(reader1)); - deserializedMaintenanceWindow.notAllowedDates = notAllowedDates; - } else { - reader.skipChildren(); - } - } - - return deserializedMaintenanceWindow; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAIToolchainOperatorProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAIToolchainOperatorProfile.java deleted file mode 100644 index 5fa694a16e6b..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAIToolchainOperatorProfile.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * When enabling the operator, a set of AKS managed CRDs and controllers will be installed in the cluster. The operator - * automates the deployment of OSS models for inference and/or training purposes. It provides a set of preset models and - * enables distributed inference against them. - */ -@Fluent -public final class ManagedClusterAIToolchainOperatorProfile - implements JsonSerializable { - /* - * Whether to enable AI toolchain operator to the cluster. Indicates if AI toolchain operator enabled or not. - */ - private Boolean enabled; - - /** - * Creates an instance of ManagedClusterAIToolchainOperatorProfile class. - */ - public ManagedClusterAIToolchainOperatorProfile() { - } - - /** - * Get the enabled property: Whether to enable AI toolchain operator to the cluster. Indicates if AI toolchain - * operator enabled or not. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable AI toolchain operator to the cluster. Indicates if AI toolchain - * operator enabled or not. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterAIToolchainOperatorProfile object itself. - */ - public ManagedClusterAIToolchainOperatorProfile withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterAIToolchainOperatorProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterAIToolchainOperatorProfile 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 ManagedClusterAIToolchainOperatorProfile. - */ - public static ManagedClusterAIToolchainOperatorProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterAIToolchainOperatorProfile deserializedManagedClusterAIToolchainOperatorProfile - = new ManagedClusterAIToolchainOperatorProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterAIToolchainOperatorProfile.enabled - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterAIToolchainOperatorProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAadProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAadProfile.java deleted file mode 100644 index 9c324beb571c..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAadProfile.java +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * AADProfile specifies attributes for Azure Active Directory integration. For more details see [managed AAD on - * AKS](https://docs.microsoft.com/azure/aks/managed-aad). - */ -@Fluent -public final class ManagedClusterAadProfile implements JsonSerializable { - /* - * Whether to enable managed AAD. - */ - private Boolean managed; - - /* - * Whether to enable Azure RBAC for Kubernetes authorization. - */ - private Boolean enableAzureRbac; - - /* - * The list of AAD group object IDs that will have admin role of the cluster. - */ - private List adminGroupObjectIDs; - - /* - * (DEPRECATED) The client AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. - */ - private String clientAppId; - - /* - * (DEPRECATED) The server AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. - */ - private String serverAppId; - - /* - * (DEPRECATED) The server AAD application secret. Learn more at https://aka.ms/aks/aad-legacy. - */ - private String serverAppSecret; - - /* - * The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment - * subscription. - */ - private String tenantId; - - /** - * Creates an instance of ManagedClusterAadProfile class. - */ - public ManagedClusterAadProfile() { - } - - /** - * Get the managed property: Whether to enable managed AAD. - * - * @return the managed value. - */ - public Boolean managed() { - return this.managed; - } - - /** - * Set the managed property: Whether to enable managed AAD. - * - * @param managed the managed value to set. - * @return the ManagedClusterAadProfile object itself. - */ - public ManagedClusterAadProfile withManaged(Boolean managed) { - this.managed = managed; - return this; - } - - /** - * Get the enableAzureRbac property: Whether to enable Azure RBAC for Kubernetes authorization. - * - * @return the enableAzureRbac value. - */ - public Boolean enableAzureRbac() { - return this.enableAzureRbac; - } - - /** - * Set the enableAzureRbac property: Whether to enable Azure RBAC for Kubernetes authorization. - * - * @param enableAzureRbac the enableAzureRbac value to set. - * @return the ManagedClusterAadProfile object itself. - */ - public ManagedClusterAadProfile withEnableAzureRbac(Boolean enableAzureRbac) { - this.enableAzureRbac = enableAzureRbac; - return this; - } - - /** - * Get the adminGroupObjectIDs property: The list of AAD group object IDs that will have admin role of the cluster. - * - * @return the adminGroupObjectIDs value. - */ - public List adminGroupObjectIDs() { - return this.adminGroupObjectIDs; - } - - /** - * Set the adminGroupObjectIDs property: The list of AAD group object IDs that will have admin role of the cluster. - * - * @param adminGroupObjectIDs the adminGroupObjectIDs value to set. - * @return the ManagedClusterAadProfile object itself. - */ - public ManagedClusterAadProfile withAdminGroupObjectIDs(List adminGroupObjectIDs) { - this.adminGroupObjectIDs = adminGroupObjectIDs; - return this; - } - - /** - * Get the clientAppId property: (DEPRECATED) The client AAD application ID. Learn more at - * https://aka.ms/aks/aad-legacy. - * - * @return the clientAppId value. - */ - public String clientAppId() { - return this.clientAppId; - } - - /** - * Set the clientAppId property: (DEPRECATED) The client AAD application ID. Learn more at - * https://aka.ms/aks/aad-legacy. - * - * @param clientAppId the clientAppId value to set. - * @return the ManagedClusterAadProfile object itself. - */ - public ManagedClusterAadProfile withClientAppId(String clientAppId) { - this.clientAppId = clientAppId; - return this; - } - - /** - * Get the serverAppId property: (DEPRECATED) The server AAD application ID. Learn more at - * https://aka.ms/aks/aad-legacy. - * - * @return the serverAppId value. - */ - public String serverAppId() { - return this.serverAppId; - } - - /** - * Set the serverAppId property: (DEPRECATED) The server AAD application ID. Learn more at - * https://aka.ms/aks/aad-legacy. - * - * @param serverAppId the serverAppId value to set. - * @return the ManagedClusterAadProfile object itself. - */ - public ManagedClusterAadProfile withServerAppId(String serverAppId) { - this.serverAppId = serverAppId; - return this; - } - - /** - * Get the serverAppSecret property: (DEPRECATED) The server AAD application secret. Learn more at - * https://aka.ms/aks/aad-legacy. - * - * @return the serverAppSecret value. - */ - public String serverAppSecret() { - return this.serverAppSecret; - } - - /** - * Set the serverAppSecret property: (DEPRECATED) The server AAD application secret. Learn more at - * https://aka.ms/aks/aad-legacy. - * - * @param serverAppSecret the serverAppSecret value to set. - * @return the ManagedClusterAadProfile object itself. - */ - public ManagedClusterAadProfile withServerAppSecret(String serverAppSecret) { - this.serverAppSecret = serverAppSecret; - return this; - } - - /** - * Get the tenantId property: The AAD tenant ID to use for authentication. If not specified, will use the tenant of - * the deployment subscription. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: The AAD tenant ID to use for authentication. If not specified, will use the tenant of - * the deployment subscription. - * - * @param tenantId the tenantId value to set. - * @return the ManagedClusterAadProfile object itself. - */ - public ManagedClusterAadProfile withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("managed", this.managed); - jsonWriter.writeBooleanField("enableAzureRBAC", this.enableAzureRbac); - jsonWriter.writeArrayField("adminGroupObjectIDs", this.adminGroupObjectIDs, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("clientAppID", this.clientAppId); - jsonWriter.writeStringField("serverAppID", this.serverAppId); - jsonWriter.writeStringField("serverAppSecret", this.serverAppSecret); - jsonWriter.writeStringField("tenantID", this.tenantId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterAadProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterAadProfile 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 ManagedClusterAadProfile. - */ - public static ManagedClusterAadProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterAadProfile deserializedManagedClusterAadProfile = new ManagedClusterAadProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("managed".equals(fieldName)) { - deserializedManagedClusterAadProfile.managed = reader.getNullable(JsonReader::getBoolean); - } else if ("enableAzureRBAC".equals(fieldName)) { - deserializedManagedClusterAadProfile.enableAzureRbac = reader.getNullable(JsonReader::getBoolean); - } else if ("adminGroupObjectIDs".equals(fieldName)) { - List adminGroupObjectIDs = reader.readArray(reader1 -> reader1.getString()); - deserializedManagedClusterAadProfile.adminGroupObjectIDs = adminGroupObjectIDs; - } else if ("clientAppID".equals(fieldName)) { - deserializedManagedClusterAadProfile.clientAppId = reader.getString(); - } else if ("serverAppID".equals(fieldName)) { - deserializedManagedClusterAadProfile.serverAppId = reader.getString(); - } else if ("serverAppSecret".equals(fieldName)) { - deserializedManagedClusterAadProfile.serverAppSecret = reader.getString(); - } else if ("tenantID".equals(fieldName)) { - deserializedManagedClusterAadProfile.tenantId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterAadProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfile.java deleted file mode 100644 index 22755bce5f5a..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfile.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * A Kubernetes add-on profile for a managed cluster. - */ -@Fluent -public final class ManagedClusterAddonProfile implements JsonSerializable { - /* - * Whether the add-on is enabled or not. - */ - private boolean enabled; - - /* - * Key-value pairs for configuring an add-on. - */ - private Map config; - - /* - * Information of user assigned identity used by this add-on. - */ - private ManagedClusterAddonProfileIdentity identity; - - /** - * Creates an instance of ManagedClusterAddonProfile class. - */ - public ManagedClusterAddonProfile() { - } - - /** - * Get the enabled property: Whether the add-on is enabled or not. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether the add-on is enabled or not. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterAddonProfile object itself. - */ - public ManagedClusterAddonProfile withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the config property: Key-value pairs for configuring an add-on. - * - * @return the config value. - */ - public Map config() { - return this.config; - } - - /** - * Set the config property: Key-value pairs for configuring an add-on. - * - * @param config the config value to set. - * @return the ManagedClusterAddonProfile object itself. - */ - public ManagedClusterAddonProfile withConfig(Map config) { - this.config = config; - return this; - } - - /** - * Get the identity property: Information of user assigned identity used by this add-on. - * - * @return the identity value. - */ - public ManagedClusterAddonProfileIdentity identity() { - return this.identity; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeMapField("config", this.config, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterAddonProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterAddonProfile 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 ManagedClusterAddonProfile. - */ - public static ManagedClusterAddonProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterAddonProfile deserializedManagedClusterAddonProfile = new ManagedClusterAddonProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterAddonProfile.enabled = reader.getBoolean(); - } else if ("config".equals(fieldName)) { - Map config = reader.readMap(reader1 -> reader1.getString()); - deserializedManagedClusterAddonProfile.config = config; - } else if ("identity".equals(fieldName)) { - deserializedManagedClusterAddonProfile.identity - = ManagedClusterAddonProfileIdentity.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterAddonProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfileIdentity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfileIdentity.java deleted file mode 100644 index 020e3e92c4a2..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfileIdentity.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Information of user assigned identity used by this add-on. - */ -@Fluent -public final class ManagedClusterAddonProfileIdentity extends UserAssignedIdentity { - /** - * Creates an instance of ManagedClusterAddonProfileIdentity class. - */ - public ManagedClusterAddonProfileIdentity() { - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAddonProfileIdentity withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAddonProfileIdentity withClientId(String clientId) { - super.withClientId(clientId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAddonProfileIdentity withObjectId(String objectId) { - super.withObjectId(objectId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("resourceId", resourceId()); - jsonWriter.writeStringField("clientId", clientId()); - jsonWriter.writeStringField("objectId", objectId()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterAddonProfileIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterAddonProfileIdentity 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 ManagedClusterAddonProfileIdentity. - */ - public static ManagedClusterAddonProfileIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterAddonProfileIdentity deserializedManagedClusterAddonProfileIdentity - = new ManagedClusterAddonProfileIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceId".equals(fieldName)) { - deserializedManagedClusterAddonProfileIdentity.withResourceId(reader.getString()); - } else if ("clientId".equals(fieldName)) { - deserializedManagedClusterAddonProfileIdentity.withClientId(reader.getString()); - } else if ("objectId".equals(fieldName)) { - deserializedManagedClusterAddonProfileIdentity.withObjectId(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterAddonProfileIdentity; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java deleted file mode 100644 index b5b236a5b5cc..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java +++ /dev/null @@ -1,861 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterAgentPoolProfileProperties; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Profile for the container service agent pool. - */ -@Fluent -public final class ManagedClusterAgentPoolProfile extends ManagedClusterAgentPoolProfileProperties { - /* - * Unique name of the agent pool profile in the context of the subscription and resource group. Windows agent pool - * names must be 6 characters or less. - */ - private String name; - - /* - * The current deployment or provisioning state. - */ - private String provisioningState; - - /* - * The version of node image - */ - private String nodeImageVersion; - - /* - * The version of Kubernetes the Agent Pool is running. If orchestratorVersion is a fully specified version - * , this field will be exactly equal to it. If orchestratorVersion is , this field - * will contain the full version being used. - */ - private String currentOrchestratorVersion; - - /* - * Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is - * updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable - * optimistic concurrency per the normal eTag convention. - */ - private String etag; - - /** - * Creates an instance of ManagedClusterAgentPoolProfile class. - */ - public ManagedClusterAgentPoolProfile() { - } - - /** - * Get the name property: Unique name of the agent pool profile in the context of the subscription and resource - * group. Windows agent pool names must be 6 characters or less. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Unique name of the agent pool profile in the context of the subscription and resource - * group. Windows agent pool names must be 6 characters or less. - * - * @param name the name value to set. - * @return the ManagedClusterAgentPoolProfile object itself. - */ - public ManagedClusterAgentPoolProfile withName(String name) { - this.name = name; - return this; - } - - /** - * Get the provisioningState property: The current deployment or provisioning state. - * - * @return the provisioningState value. - */ - @Override - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the nodeImageVersion property: The version of node image. - * - * @return the nodeImageVersion value. - */ - @Override - public String nodeImageVersion() { - return this.nodeImageVersion; - } - - /** - * Get the currentOrchestratorVersion property: The version of Kubernetes the Agent Pool is running. If - * orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to - * it. If orchestratorVersion is <major.minor>, this field will contain the full <major.minor.patch> - * version being used. - * - * @return the currentOrchestratorVersion value. - */ - @Override - public String currentOrchestratorVersion() { - return this.currentOrchestratorVersion; - } - - /** - * Get the etag property: Unique read-only string used to implement optimistic concurrency. The eTag value will - * change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a - * subsequent request to enable optimistic concurrency per the normal eTag convention. - * - * @return the etag value. - */ - @Override - public String etag() { - return this.etag; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withCount(Integer count) { - super.withCount(count); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withVmSize(String vmSize) { - super.withVmSize(vmSize); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withOsDiskSizeGB(Integer osDiskSizeGB) { - super.withOsDiskSizeGB(osDiskSizeGB); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withOsDiskType(OSDiskType osDiskType) { - super.withOsDiskType(osDiskType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withKubeletDiskType(KubeletDiskType kubeletDiskType) { - super.withKubeletDiskType(kubeletDiskType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withWorkloadRuntime(WorkloadRuntime workloadRuntime) { - super.withWorkloadRuntime(workloadRuntime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withMessageOfTheDay(String messageOfTheDay) { - super.withMessageOfTheDay(messageOfTheDay); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withVnetSubnetId(String vnetSubnetId) { - super.withVnetSubnetId(vnetSubnetId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withPodSubnetId(String podSubnetId) { - super.withPodSubnetId(podSubnetId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withPodIpAllocationMode(PodIpAllocationMode podIpAllocationMode) { - super.withPodIpAllocationMode(podIpAllocationMode); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withMaxPods(Integer maxPods) { - super.withMaxPods(maxPods); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withOsType(OSType osType) { - super.withOsType(osType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withOsSku(OSSku osSku) { - super.withOsSku(osSku); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withMaxCount(Integer maxCount) { - super.withMaxCount(maxCount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withMinCount(Integer minCount) { - super.withMinCount(minCount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withEnableAutoScaling(Boolean enableAutoScaling) { - super.withEnableAutoScaling(enableAutoScaling); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withScaleDownMode(ScaleDownMode scaleDownMode) { - super.withScaleDownMode(scaleDownMode); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withType(AgentPoolType type) { - super.withType(type); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withMode(AgentPoolMode mode) { - super.withMode(mode); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withOrchestratorVersion(String orchestratorVersion) { - super.withOrchestratorVersion(orchestratorVersion); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings) { - super.withUpgradeSettings(upgradeSettings); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withPowerState(PowerState powerState) { - super.withPowerState(powerState); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withAvailabilityZones(List availabilityZones) { - super.withAvailabilityZones(availabilityZones); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withEnableNodePublicIp(Boolean enableNodePublicIp) { - super.withEnableNodePublicIp(enableNodePublicIp); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withNodePublicIpPrefixId(String nodePublicIpPrefixId) { - super.withNodePublicIpPrefixId(nodePublicIpPrefixId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withScaleSetPriority(ScaleSetPriority scaleSetPriority) { - super.withScaleSetPriority(scaleSetPriority); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy) { - super.withScaleSetEvictionPolicy(scaleSetEvictionPolicy); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withSpotMaxPrice(Float spotMaxPrice) { - super.withSpotMaxPrice(spotMaxPrice); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withNodeLabels(Map nodeLabels) { - super.withNodeLabels(nodeLabels); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withNodeTaints(List nodeTaints) { - super.withNodeTaints(nodeTaints); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withProximityPlacementGroupId(String proximityPlacementGroupId) { - super.withProximityPlacementGroupId(proximityPlacementGroupId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withKubeletConfig(KubeletConfig kubeletConfig) { - super.withKubeletConfig(kubeletConfig); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withLinuxOSConfig(LinuxOSConfig linuxOSConfig) { - super.withLinuxOSConfig(linuxOSConfig); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withEnableEncryptionAtHost(Boolean enableEncryptionAtHost) { - super.withEnableEncryptionAtHost(enableEncryptionAtHost); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withEnableUltraSsd(Boolean enableUltraSsd) { - super.withEnableUltraSsd(enableUltraSsd); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withEnableFips(Boolean enableFips) { - super.withEnableFips(enableFips); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile) { - super.withGpuInstanceProfile(gpuInstanceProfile); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withCreationData(CreationData creationData) { - super.withCreationData(creationData); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withCapacityReservationGroupId(String capacityReservationGroupId) { - super.withCapacityReservationGroupId(capacityReservationGroupId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withHostGroupId(String hostGroupId) { - super.withHostGroupId(hostGroupId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withNetworkProfile(AgentPoolNetworkProfile networkProfile) { - super.withNetworkProfile(networkProfile); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { - super.withWindowsProfile(windowsProfile); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withSecurityProfile(AgentPoolSecurityProfile securityProfile) { - super.withSecurityProfile(securityProfile); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withGpuProfile(GpuProfile gpuProfile) { - super.withGpuProfile(gpuProfile); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withGatewayProfile(AgentPoolGatewayProfile gatewayProfile) { - super.withGatewayProfile(gatewayProfile); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withVirtualMachinesProfile(VirtualMachinesProfile virtualMachinesProfile) { - super.withVirtualMachinesProfile(virtualMachinesProfile); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile - withVirtualMachineNodesStatus(List virtualMachineNodesStatus) { - super.withVirtualMachineNodesStatus(virtualMachineNodesStatus); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withStatus(AgentPoolStatus status) { - super.withStatus(status); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withLocalDnsProfile(LocalDnsProfile localDnsProfile) { - super.withLocalDnsProfile(localDnsProfile); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property name in model ManagedClusterAgentPoolProfile")); - } - if (upgradeSettings() != null) { - upgradeSettings().validate(); - } - if (powerState() != null) { - powerState().validate(); - } - if (kubeletConfig() != null) { - kubeletConfig().validate(); - } - if (linuxOSConfig() != null) { - linuxOSConfig().validate(); - } - if (creationData() != null) { - creationData().validate(); - } - if (networkProfile() != null) { - networkProfile().validate(); - } - if (windowsProfile() != null) { - windowsProfile().validate(); - } - if (securityProfile() != null) { - securityProfile().validate(); - } - if (gpuProfile() != null) { - gpuProfile().validate(); - } - if (gatewayProfile() != null) { - gatewayProfile().validate(); - } - if (virtualMachinesProfile() != null) { - virtualMachinesProfile().validate(); - } - if (virtualMachineNodesStatus() != null) { - virtualMachineNodesStatus().forEach(e -> e.validate()); - } - if (status() != null) { - status().validate(); - } - if (localDnsProfile() != null) { - localDnsProfile().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterAgentPoolProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("count", count()); - jsonWriter.writeStringField("vmSize", vmSize()); - jsonWriter.writeNumberField("osDiskSizeGB", osDiskSizeGB()); - jsonWriter.writeStringField("osDiskType", osDiskType() == null ? null : osDiskType().toString()); - jsonWriter.writeStringField("kubeletDiskType", kubeletDiskType() == null ? null : kubeletDiskType().toString()); - jsonWriter.writeStringField("workloadRuntime", workloadRuntime() == null ? null : workloadRuntime().toString()); - jsonWriter.writeStringField("messageOfTheDay", messageOfTheDay()); - jsonWriter.writeStringField("vnetSubnetID", vnetSubnetId()); - jsonWriter.writeStringField("podSubnetID", podSubnetId()); - jsonWriter.writeStringField("podIPAllocationMode", - podIpAllocationMode() == null ? null : podIpAllocationMode().toString()); - jsonWriter.writeNumberField("maxPods", maxPods()); - jsonWriter.writeStringField("osType", osType() == null ? null : osType().toString()); - jsonWriter.writeStringField("osSKU", osSku() == null ? null : osSku().toString()); - jsonWriter.writeNumberField("maxCount", maxCount()); - jsonWriter.writeNumberField("minCount", minCount()); - jsonWriter.writeBooleanField("enableAutoScaling", enableAutoScaling()); - jsonWriter.writeStringField("scaleDownMode", scaleDownMode() == null ? null : scaleDownMode().toString()); - jsonWriter.writeStringField("type", type() == null ? null : type().toString()); - jsonWriter.writeStringField("mode", mode() == null ? null : mode().toString()); - jsonWriter.writeStringField("orchestratorVersion", orchestratorVersion()); - jsonWriter.writeJsonField("upgradeSettings", upgradeSettings()); - jsonWriter.writeJsonField("powerState", powerState()); - jsonWriter.writeArrayField("availabilityZones", availabilityZones(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("enableNodePublicIP", enableNodePublicIp()); - jsonWriter.writeStringField("nodePublicIPPrefixID", nodePublicIpPrefixId()); - jsonWriter.writeStringField("scaleSetPriority", - scaleSetPriority() == null ? null : scaleSetPriority().toString()); - jsonWriter.writeStringField("scaleSetEvictionPolicy", - scaleSetEvictionPolicy() == null ? null : scaleSetEvictionPolicy().toString()); - jsonWriter.writeNumberField("spotMaxPrice", spotMaxPrice()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("nodeLabels", nodeLabels(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("nodeTaints", nodeTaints(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("proximityPlacementGroupID", proximityPlacementGroupId()); - jsonWriter.writeJsonField("kubeletConfig", kubeletConfig()); - jsonWriter.writeJsonField("linuxOSConfig", linuxOSConfig()); - jsonWriter.writeBooleanField("enableEncryptionAtHost", enableEncryptionAtHost()); - jsonWriter.writeBooleanField("enableUltraSSD", enableUltraSsd()); - jsonWriter.writeBooleanField("enableFIPS", enableFips()); - jsonWriter.writeStringField("gpuInstanceProfile", - gpuInstanceProfile() == null ? null : gpuInstanceProfile().toString()); - jsonWriter.writeJsonField("creationData", creationData()); - jsonWriter.writeStringField("capacityReservationGroupID", capacityReservationGroupId()); - jsonWriter.writeStringField("hostGroupID", hostGroupId()); - jsonWriter.writeJsonField("networkProfile", networkProfile()); - jsonWriter.writeJsonField("windowsProfile", windowsProfile()); - jsonWriter.writeJsonField("securityProfile", securityProfile()); - jsonWriter.writeJsonField("gpuProfile", gpuProfile()); - jsonWriter.writeJsonField("gatewayProfile", gatewayProfile()); - jsonWriter.writeJsonField("virtualMachinesProfile", virtualMachinesProfile()); - jsonWriter.writeArrayField("virtualMachineNodesStatus", virtualMachineNodesStatus(), - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("status", status()); - jsonWriter.writeJsonField("localDNSProfile", localDnsProfile()); - jsonWriter.writeStringField("name", this.name); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterAgentPoolProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterAgentPoolProfile 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 ManagedClusterAgentPoolProfile. - */ - public static ManagedClusterAgentPoolProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterAgentPoolProfile deserializedManagedClusterAgentPoolProfile - = new ManagedClusterAgentPoolProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("eTag".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.etag = reader.getString(); - } else if ("count".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withCount(reader.getNullable(JsonReader::getInt)); - } else if ("vmSize".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withVmSize(reader.getString()); - } else if ("osDiskSizeGB".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withOsDiskSizeGB(reader.getNullable(JsonReader::getInt)); - } else if ("osDiskType".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withOsDiskType(OSDiskType.fromString(reader.getString())); - } else if ("kubeletDiskType".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withKubeletDiskType(KubeletDiskType.fromString(reader.getString())); - } else if ("workloadRuntime".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withWorkloadRuntime(WorkloadRuntime.fromString(reader.getString())); - } else if ("messageOfTheDay".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withMessageOfTheDay(reader.getString()); - } else if ("vnetSubnetID".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withVnetSubnetId(reader.getString()); - } else if ("podSubnetID".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withPodSubnetId(reader.getString()); - } else if ("podIPAllocationMode".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withPodIpAllocationMode(PodIpAllocationMode.fromString(reader.getString())); - } else if ("maxPods".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withMaxPods(reader.getNullable(JsonReader::getInt)); - } else if ("osType".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withOsType(OSType.fromString(reader.getString())); - } else if ("osSKU".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withOsSku(OSSku.fromString(reader.getString())); - } else if ("maxCount".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withMaxCount(reader.getNullable(JsonReader::getInt)); - } else if ("minCount".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withMinCount(reader.getNullable(JsonReader::getInt)); - } else if ("enableAutoScaling".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withEnableAutoScaling(reader.getNullable(JsonReader::getBoolean)); - } else if ("scaleDownMode".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withScaleDownMode(ScaleDownMode.fromString(reader.getString())); - } else if ("type".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withType(AgentPoolType.fromString(reader.getString())); - } else if ("mode".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withMode(AgentPoolMode.fromString(reader.getString())); - } else if ("orchestratorVersion".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withOrchestratorVersion(reader.getString()); - } else if ("currentOrchestratorVersion".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.currentOrchestratorVersion = reader.getString(); - } else if ("nodeImageVersion".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.nodeImageVersion = reader.getString(); - } else if ("upgradeSettings".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withUpgradeSettings(AgentPoolUpgradeSettings.fromJson(reader)); - } else if ("provisioningState".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.provisioningState = reader.getString(); - } else if ("powerState".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withPowerState(PowerState.fromJson(reader)); - } else if ("availabilityZones".equals(fieldName)) { - List availabilityZones = reader.readArray(reader1 -> reader1.getString()); - deserializedManagedClusterAgentPoolProfile.withAvailabilityZones(availabilityZones); - } else if ("enableNodePublicIP".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withEnableNodePublicIp(reader.getNullable(JsonReader::getBoolean)); - } else if ("nodePublicIPPrefixID".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withNodePublicIpPrefixId(reader.getString()); - } else if ("scaleSetPriority".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withScaleSetPriority(ScaleSetPriority.fromString(reader.getString())); - } else if ("scaleSetEvictionPolicy".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withScaleSetEvictionPolicy(ScaleSetEvictionPolicy.fromString(reader.getString())); - } else if ("spotMaxPrice".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withSpotMaxPrice(reader.getNullable(JsonReader::getFloat)); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedManagedClusterAgentPoolProfile.withTags(tags); - } else if ("nodeLabels".equals(fieldName)) { - Map nodeLabels = reader.readMap(reader1 -> reader1.getString()); - deserializedManagedClusterAgentPoolProfile.withNodeLabels(nodeLabels); - } else if ("nodeTaints".equals(fieldName)) { - List nodeTaints = reader.readArray(reader1 -> reader1.getString()); - deserializedManagedClusterAgentPoolProfile.withNodeTaints(nodeTaints); - } else if ("proximityPlacementGroupID".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withProximityPlacementGroupId(reader.getString()); - } else if ("kubeletConfig".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withKubeletConfig(KubeletConfig.fromJson(reader)); - } else if ("linuxOSConfig".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withLinuxOSConfig(LinuxOSConfig.fromJson(reader)); - } else if ("enableEncryptionAtHost".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withEnableEncryptionAtHost(reader.getNullable(JsonReader::getBoolean)); - } else if ("enableUltraSSD".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withEnableUltraSsd(reader.getNullable(JsonReader::getBoolean)); - } else if ("enableFIPS".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withEnableFips(reader.getNullable(JsonReader::getBoolean)); - } else if ("gpuInstanceProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withGpuInstanceProfile(GpuInstanceProfile.fromString(reader.getString())); - } else if ("creationData".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withCreationData(CreationData.fromJson(reader)); - } else if ("capacityReservationGroupID".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withCapacityReservationGroupId(reader.getString()); - } else if ("hostGroupID".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withHostGroupId(reader.getString()); - } else if ("networkProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withNetworkProfile(AgentPoolNetworkProfile.fromJson(reader)); - } else if ("windowsProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withWindowsProfile(AgentPoolWindowsProfile.fromJson(reader)); - } else if ("securityProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withSecurityProfile(AgentPoolSecurityProfile.fromJson(reader)); - } else if ("gpuProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withGpuProfile(GpuProfile.fromJson(reader)); - } else if ("gatewayProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withGatewayProfile(AgentPoolGatewayProfile.fromJson(reader)); - } else if ("virtualMachinesProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withVirtualMachinesProfile(VirtualMachinesProfile.fromJson(reader)); - } else if ("virtualMachineNodesStatus".equals(fieldName)) { - List virtualMachineNodesStatus - = reader.readArray(reader1 -> VirtualMachineNodes.fromJson(reader1)); - deserializedManagedClusterAgentPoolProfile.withVirtualMachineNodesStatus(virtualMachineNodesStatus); - } else if ("status".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withStatus(AgentPoolStatus.fromJson(reader)); - } else if ("localDNSProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withLocalDnsProfile(LocalDnsProfile.fromJson(reader)); - } else if ("name".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.name = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterAgentPoolProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java deleted file mode 100644 index b1ba9d300a4e..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java +++ /dev/null @@ -1,299 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Access profile for managed cluster API server. - */ -@Fluent -public final class ManagedClusterApiServerAccessProfile - implements JsonSerializable { - /* - * The IP ranges authorized to access the Kubernetes API server. IP ranges are specified in CIDR format, e.g. - * 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are - * using a Basic Load Balancer. For more information see [API server authorized IP - * ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). - */ - private List authorizedIpRanges; - - /* - * Whether to create the cluster as a private cluster or not. For more details, see [Creating a private AKS - * cluster](https://docs.microsoft.com/azure/aks/private-clusters). - */ - private Boolean enablePrivateCluster; - - /* - * The private DNS zone mode for the cluster. The default is System. For more details see [configure private DNS - * zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). Allowed values are - * 'system' and 'none'. - */ - private String privateDnsZone; - - /* - * Whether to create additional public FQDN for private cluster or not. - */ - private Boolean enablePrivateClusterPublicFqdn; - - /* - * Whether to disable run command for the cluster or not. - */ - private Boolean disableRunCommand; - - /* - * Whether to enable apiserver vnet integration for the cluster or not. See aka.ms/AksVnetIntegration for more - * details. - */ - private Boolean enableVnetIntegration; - - /* - * The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new cluster with - * BYO Vnet, or when updating an existing cluster to enable apiserver vnet integration. - */ - private String subnetId; - - /** - * Creates an instance of ManagedClusterApiServerAccessProfile class. - */ - public ManagedClusterApiServerAccessProfile() { - } - - /** - * Get the authorizedIpRanges property: The IP ranges authorized to access the Kubernetes API server. IP ranges are - * specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP - * Per Node, or clusters that are using a Basic Load Balancer. For more information see [API server authorized IP - * ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). - * - * @return the authorizedIpRanges value. - */ - public List authorizedIpRanges() { - return this.authorizedIpRanges; - } - - /** - * Set the authorizedIpRanges property: The IP ranges authorized to access the Kubernetes API server. IP ranges are - * specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP - * Per Node, or clusters that are using a Basic Load Balancer. For more information see [API server authorized IP - * ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). - * - * @param authorizedIpRanges the authorizedIpRanges value to set. - * @return the ManagedClusterApiServerAccessProfile object itself. - */ - public ManagedClusterApiServerAccessProfile withAuthorizedIpRanges(List authorizedIpRanges) { - this.authorizedIpRanges = authorizedIpRanges; - return this; - } - - /** - * Get the enablePrivateCluster property: Whether to create the cluster as a private cluster or not. For more - * details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). - * - * @return the enablePrivateCluster value. - */ - public Boolean enablePrivateCluster() { - return this.enablePrivateCluster; - } - - /** - * Set the enablePrivateCluster property: Whether to create the cluster as a private cluster or not. For more - * details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). - * - * @param enablePrivateCluster the enablePrivateCluster value to set. - * @return the ManagedClusterApiServerAccessProfile object itself. - */ - public ManagedClusterApiServerAccessProfile withEnablePrivateCluster(Boolean enablePrivateCluster) { - this.enablePrivateCluster = enablePrivateCluster; - return this; - } - - /** - * Get the privateDnsZone property: The private DNS zone mode for the cluster. The default is System. For more - * details see [configure private DNS - * zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). Allowed values are - * 'system' and 'none'. - * - * @return the privateDnsZone value. - */ - public String privateDnsZone() { - return this.privateDnsZone; - } - - /** - * Set the privateDnsZone property: The private DNS zone mode for the cluster. The default is System. For more - * details see [configure private DNS - * zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). Allowed values are - * 'system' and 'none'. - * - * @param privateDnsZone the privateDnsZone value to set. - * @return the ManagedClusterApiServerAccessProfile object itself. - */ - public ManagedClusterApiServerAccessProfile withPrivateDnsZone(String privateDnsZone) { - this.privateDnsZone = privateDnsZone; - return this; - } - - /** - * Get the enablePrivateClusterPublicFqdn property: Whether to create additional public FQDN for private cluster or - * not. - * - * @return the enablePrivateClusterPublicFqdn value. - */ - public Boolean enablePrivateClusterPublicFqdn() { - return this.enablePrivateClusterPublicFqdn; - } - - /** - * Set the enablePrivateClusterPublicFqdn property: Whether to create additional public FQDN for private cluster or - * not. - * - * @param enablePrivateClusterPublicFqdn the enablePrivateClusterPublicFqdn value to set. - * @return the ManagedClusterApiServerAccessProfile object itself. - */ - public ManagedClusterApiServerAccessProfile - withEnablePrivateClusterPublicFqdn(Boolean enablePrivateClusterPublicFqdn) { - this.enablePrivateClusterPublicFqdn = enablePrivateClusterPublicFqdn; - return this; - } - - /** - * Get the disableRunCommand property: Whether to disable run command for the cluster or not. - * - * @return the disableRunCommand value. - */ - public Boolean disableRunCommand() { - return this.disableRunCommand; - } - - /** - * Set the disableRunCommand property: Whether to disable run command for the cluster or not. - * - * @param disableRunCommand the disableRunCommand value to set. - * @return the ManagedClusterApiServerAccessProfile object itself. - */ - public ManagedClusterApiServerAccessProfile withDisableRunCommand(Boolean disableRunCommand) { - this.disableRunCommand = disableRunCommand; - return this; - } - - /** - * Get the enableVnetIntegration property: Whether to enable apiserver vnet integration for the cluster or not. See - * aka.ms/AksVnetIntegration for more details. - * - * @return the enableVnetIntegration value. - */ - public Boolean enableVnetIntegration() { - return this.enableVnetIntegration; - } - - /** - * Set the enableVnetIntegration property: Whether to enable apiserver vnet integration for the cluster or not. See - * aka.ms/AksVnetIntegration for more details. - * - * @param enableVnetIntegration the enableVnetIntegration value to set. - * @return the ManagedClusterApiServerAccessProfile object itself. - */ - public ManagedClusterApiServerAccessProfile withEnableVnetIntegration(Boolean enableVnetIntegration) { - this.enableVnetIntegration = enableVnetIntegration; - return this; - } - - /** - * Get the subnetId property: The subnet to be used when apiserver vnet integration is enabled. It is required when - * creating a new cluster with BYO Vnet, or when updating an existing cluster to enable apiserver vnet integration. - * - * @return the subnetId value. - */ - public String subnetId() { - return this.subnetId; - } - - /** - * Set the subnetId property: The subnet to be used when apiserver vnet integration is enabled. It is required when - * creating a new cluster with BYO Vnet, or when updating an existing cluster to enable apiserver vnet integration. - * - * @param subnetId the subnetId value to set. - * @return the ManagedClusterApiServerAccessProfile object itself. - */ - public ManagedClusterApiServerAccessProfile withSubnetId(String subnetId) { - this.subnetId = subnetId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("authorizedIPRanges", this.authorizedIpRanges, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("enablePrivateCluster", this.enablePrivateCluster); - jsonWriter.writeStringField("privateDNSZone", this.privateDnsZone); - jsonWriter.writeBooleanField("enablePrivateClusterPublicFQDN", this.enablePrivateClusterPublicFqdn); - jsonWriter.writeBooleanField("disableRunCommand", this.disableRunCommand); - jsonWriter.writeBooleanField("enableVnetIntegration", this.enableVnetIntegration); - jsonWriter.writeStringField("subnetId", this.subnetId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterApiServerAccessProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterApiServerAccessProfile 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 ManagedClusterApiServerAccessProfile. - */ - public static ManagedClusterApiServerAccessProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterApiServerAccessProfile deserializedManagedClusterApiServerAccessProfile - = new ManagedClusterApiServerAccessProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("authorizedIPRanges".equals(fieldName)) { - List authorizedIpRanges = reader.readArray(reader1 -> reader1.getString()); - deserializedManagedClusterApiServerAccessProfile.authorizedIpRanges = authorizedIpRanges; - } else if ("enablePrivateCluster".equals(fieldName)) { - deserializedManagedClusterApiServerAccessProfile.enablePrivateCluster - = reader.getNullable(JsonReader::getBoolean); - } else if ("privateDNSZone".equals(fieldName)) { - deserializedManagedClusterApiServerAccessProfile.privateDnsZone = reader.getString(); - } else if ("enablePrivateClusterPublicFQDN".equals(fieldName)) { - deserializedManagedClusterApiServerAccessProfile.enablePrivateClusterPublicFqdn - = reader.getNullable(JsonReader::getBoolean); - } else if ("disableRunCommand".equals(fieldName)) { - deserializedManagedClusterApiServerAccessProfile.disableRunCommand - = reader.getNullable(JsonReader::getBoolean); - } else if ("enableVnetIntegration".equals(fieldName)) { - deserializedManagedClusterApiServerAccessProfile.enableVnetIntegration - = reader.getNullable(JsonReader::getBoolean); - } else if ("subnetId".equals(fieldName)) { - deserializedManagedClusterApiServerAccessProfile.subnetId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterApiServerAccessProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java deleted file mode 100644 index cf6a236cb42e..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Auto upgrade profile for a managed cluster. - */ -@Fluent -public final class ManagedClusterAutoUpgradeProfile implements JsonSerializable { - /* - * The upgrade channel for auto upgrade. The default is 'none'. For more information see [setting the AKS cluster - * auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). - */ - private UpgradeChannel upgradeChannel; - - /* - * Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage. - */ - private NodeOSUpgradeChannel nodeOSUpgradeChannel; - - /** - * Creates an instance of ManagedClusterAutoUpgradeProfile class. - */ - public ManagedClusterAutoUpgradeProfile() { - } - - /** - * Get the upgradeChannel property: The upgrade channel for auto upgrade. The default is 'none'. For more - * information see [setting the AKS cluster auto-upgrade - * channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). - * - * @return the upgradeChannel value. - */ - public UpgradeChannel upgradeChannel() { - return this.upgradeChannel; - } - - /** - * Set the upgradeChannel property: The upgrade channel for auto upgrade. The default is 'none'. For more - * information see [setting the AKS cluster auto-upgrade - * channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). - * - * @param upgradeChannel the upgradeChannel value to set. - * @return the ManagedClusterAutoUpgradeProfile object itself. - */ - public ManagedClusterAutoUpgradeProfile withUpgradeChannel(UpgradeChannel upgradeChannel) { - this.upgradeChannel = upgradeChannel; - return this; - } - - /** - * Get the nodeOSUpgradeChannel property: Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. - * The default is NodeImage. - * - * @return the nodeOSUpgradeChannel value. - */ - public NodeOSUpgradeChannel nodeOSUpgradeChannel() { - return this.nodeOSUpgradeChannel; - } - - /** - * Set the nodeOSUpgradeChannel property: Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. - * The default is NodeImage. - * - * @param nodeOSUpgradeChannel the nodeOSUpgradeChannel value to set. - * @return the ManagedClusterAutoUpgradeProfile object itself. - */ - public ManagedClusterAutoUpgradeProfile withNodeOSUpgradeChannel(NodeOSUpgradeChannel nodeOSUpgradeChannel) { - this.nodeOSUpgradeChannel = nodeOSUpgradeChannel; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("upgradeChannel", - this.upgradeChannel == null ? null : this.upgradeChannel.toString()); - jsonWriter.writeStringField("nodeOSUpgradeChannel", - this.nodeOSUpgradeChannel == null ? null : this.nodeOSUpgradeChannel.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterAutoUpgradeProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterAutoUpgradeProfile 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 ManagedClusterAutoUpgradeProfile. - */ - public static ManagedClusterAutoUpgradeProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterAutoUpgradeProfile deserializedManagedClusterAutoUpgradeProfile - = new ManagedClusterAutoUpgradeProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("upgradeChannel".equals(fieldName)) { - deserializedManagedClusterAutoUpgradeProfile.upgradeChannel - = UpgradeChannel.fromString(reader.getString()); - } else if ("nodeOSUpgradeChannel".equals(fieldName)) { - deserializedManagedClusterAutoUpgradeProfile.nodeOSUpgradeChannel - = NodeOSUpgradeChannel.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterAutoUpgradeProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java deleted file mode 100644 index 929046a73d98..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Azure Monitor addon profiles for monitoring the managed cluster. - */ -@Fluent -public final class ManagedClusterAzureMonitorProfile implements JsonSerializable { - /* - * Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes - * infrastructure metrics to send to an Azure Monitor Workspace and configure additional scraping for custom - * targets. See aka.ms/AzureManagedPrometheus for an overview. - */ - private ManagedClusterAzureMonitorProfileMetrics metrics; - - /** - * Creates an instance of ManagedClusterAzureMonitorProfile class. - */ - public ManagedClusterAzureMonitorProfile() { - } - - /** - * Get the metrics property: Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect - * out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace and configure additional - * scraping for custom targets. See aka.ms/AzureManagedPrometheus for an overview. - * - * @return the metrics value. - */ - public ManagedClusterAzureMonitorProfileMetrics metrics() { - return this.metrics; - } - - /** - * Set the metrics property: Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect - * out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace and configure additional - * scraping for custom targets. See aka.ms/AzureManagedPrometheus for an overview. - * - * @param metrics the metrics value to set. - * @return the ManagedClusterAzureMonitorProfile object itself. - */ - public ManagedClusterAzureMonitorProfile withMetrics(ManagedClusterAzureMonitorProfileMetrics metrics) { - this.metrics = metrics; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (metrics() != null) { - metrics().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("metrics", this.metrics); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterAzureMonitorProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterAzureMonitorProfile 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 ManagedClusterAzureMonitorProfile. - */ - public static ManagedClusterAzureMonitorProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterAzureMonitorProfile deserializedManagedClusterAzureMonitorProfile - = new ManagedClusterAzureMonitorProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("metrics".equals(fieldName)) { - deserializedManagedClusterAzureMonitorProfile.metrics - = ManagedClusterAzureMonitorProfileMetrics.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterAzureMonitorProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java deleted file mode 100644 index c6fd51a2703f..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the - * kube-state-metrics pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for - * details. - */ -@Fluent -public final class ManagedClusterAzureMonitorProfileKubeStateMetrics - implements JsonSerializable { - /* - * Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric - * (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By default the metric contains only - * resource name and namespace labels. - */ - private String metricLabelsAllowlist; - - /* - * Comma-separated list of Kubernetes annotation keys that will be used in the resource's labels metric (Example: - * 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). By default the metric contains only - * resource name and namespace labels. - */ - private String metricAnnotationsAllowList; - - /** - * Creates an instance of ManagedClusterAzureMonitorProfileKubeStateMetrics class. - */ - public ManagedClusterAzureMonitorProfileKubeStateMetrics() { - } - - /** - * Get the metricLabelsAllowlist property: Comma-separated list of additional Kubernetes label keys that will be - * used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By - * default the metric contains only resource name and namespace labels. - * - * @return the metricLabelsAllowlist value. - */ - public String metricLabelsAllowlist() { - return this.metricLabelsAllowlist; - } - - /** - * Set the metricLabelsAllowlist property: Comma-separated list of additional Kubernetes label keys that will be - * used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By - * default the metric contains only resource name and namespace labels. - * - * @param metricLabelsAllowlist the metricLabelsAllowlist value to set. - * @return the ManagedClusterAzureMonitorProfileKubeStateMetrics object itself. - */ - public ManagedClusterAzureMonitorProfileKubeStateMetrics withMetricLabelsAllowlist(String metricLabelsAllowlist) { - this.metricLabelsAllowlist = metricLabelsAllowlist; - return this; - } - - /** - * Get the metricAnnotationsAllowList property: Comma-separated list of Kubernetes annotation keys that will be used - * in the resource's labels metric (Example: 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). - * By default the metric contains only resource name and namespace labels. - * - * @return the metricAnnotationsAllowList value. - */ - public String metricAnnotationsAllowList() { - return this.metricAnnotationsAllowList; - } - - /** - * Set the metricAnnotationsAllowList property: Comma-separated list of Kubernetes annotation keys that will be used - * in the resource's labels metric (Example: 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). - * By default the metric contains only resource name and namespace labels. - * - * @param metricAnnotationsAllowList the metricAnnotationsAllowList value to set. - * @return the ManagedClusterAzureMonitorProfileKubeStateMetrics object itself. - */ - public ManagedClusterAzureMonitorProfileKubeStateMetrics - withMetricAnnotationsAllowList(String metricAnnotationsAllowList) { - this.metricAnnotationsAllowList = metricAnnotationsAllowList; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("metricLabelsAllowlist", this.metricLabelsAllowlist); - jsonWriter.writeStringField("metricAnnotationsAllowList", this.metricAnnotationsAllowList); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterAzureMonitorProfileKubeStateMetrics from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterAzureMonitorProfileKubeStateMetrics 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 ManagedClusterAzureMonitorProfileKubeStateMetrics. - */ - public static ManagedClusterAzureMonitorProfileKubeStateMetrics fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterAzureMonitorProfileKubeStateMetrics deserializedManagedClusterAzureMonitorProfileKubeStateMetrics - = new ManagedClusterAzureMonitorProfileKubeStateMetrics(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("metricLabelsAllowlist".equals(fieldName)) { - deserializedManagedClusterAzureMonitorProfileKubeStateMetrics.metricLabelsAllowlist - = reader.getString(); - } else if ("metricAnnotationsAllowList".equals(fieldName)) { - deserializedManagedClusterAzureMonitorProfileKubeStateMetrics.metricAnnotationsAllowList - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterAzureMonitorProfileKubeStateMetrics; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java deleted file mode 100644 index c429294b7ad5..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes - * infrastructure metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. - * See aka.ms/AzureManagedPrometheus for an overview. - */ -@Fluent -public final class ManagedClusterAzureMonitorProfileMetrics - implements JsonSerializable { - /* - * Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See - * aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling. - */ - private boolean enabled; - - /* - * Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the - * kube-state-metrics pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for - * details. - */ - private ManagedClusterAzureMonitorProfileKubeStateMetrics kubeStateMetrics; - - /** - * Creates an instance of ManagedClusterAzureMonitorProfileMetrics class. - */ - public ManagedClusterAzureMonitorProfileMetrics() { - } - - /** - * Get the enabled property: Whether to enable or disable the Azure Managed Prometheus addon for Prometheus - * monitoring. See aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable or disable the Azure Managed Prometheus addon for Prometheus - * monitoring. See aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterAzureMonitorProfileMetrics object itself. - */ - public ManagedClusterAzureMonitorProfileMetrics withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the kubeStateMetrics property: Kube State Metrics profile for the Azure Managed Prometheus addon. These - * optional settings are for the kube-state-metrics pod that is deployed with the addon. See - * aka.ms/AzureManagedPrometheus-optional-parameters for details. - * - * @return the kubeStateMetrics value. - */ - public ManagedClusterAzureMonitorProfileKubeStateMetrics kubeStateMetrics() { - return this.kubeStateMetrics; - } - - /** - * Set the kubeStateMetrics property: Kube State Metrics profile for the Azure Managed Prometheus addon. These - * optional settings are for the kube-state-metrics pod that is deployed with the addon. See - * aka.ms/AzureManagedPrometheus-optional-parameters for details. - * - * @param kubeStateMetrics the kubeStateMetrics value to set. - * @return the ManagedClusterAzureMonitorProfileMetrics object itself. - */ - public ManagedClusterAzureMonitorProfileMetrics - withKubeStateMetrics(ManagedClusterAzureMonitorProfileKubeStateMetrics kubeStateMetrics) { - this.kubeStateMetrics = kubeStateMetrics; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (kubeStateMetrics() != null) { - kubeStateMetrics().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeJsonField("kubeStateMetrics", this.kubeStateMetrics); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterAzureMonitorProfileMetrics from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterAzureMonitorProfileMetrics 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 ManagedClusterAzureMonitorProfileMetrics. - */ - public static ManagedClusterAzureMonitorProfileMetrics fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterAzureMonitorProfileMetrics deserializedManagedClusterAzureMonitorProfileMetrics - = new ManagedClusterAzureMonitorProfileMetrics(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterAzureMonitorProfileMetrics.enabled = reader.getBoolean(); - } else if ("kubeStateMetrics".equals(fieldName)) { - deserializedManagedClusterAzureMonitorProfileMetrics.kubeStateMetrics - = ManagedClusterAzureMonitorProfileKubeStateMetrics.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterAzureMonitorProfileMetrics; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterBootstrapProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterBootstrapProfile.java deleted file mode 100644 index eeb903b5db62..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterBootstrapProfile.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 bootstrap profile. - */ -@Fluent -public final class ManagedClusterBootstrapProfile implements JsonSerializable { - /* - * The artifact source. The source where the artifacts are downloaded from. - */ - private ArtifactSource artifactSource; - - /* - * The resource Id of Azure Container Registry. The registry must have private network access, premium SKU and zone - * redundancy. - */ - private String containerRegistryId; - - /** - * Creates an instance of ManagedClusterBootstrapProfile class. - */ - public ManagedClusterBootstrapProfile() { - } - - /** - * Get the artifactSource property: The artifact source. The source where the artifacts are downloaded from. - * - * @return the artifactSource value. - */ - public ArtifactSource artifactSource() { - return this.artifactSource; - } - - /** - * Set the artifactSource property: The artifact source. The source where the artifacts are downloaded from. - * - * @param artifactSource the artifactSource value to set. - * @return the ManagedClusterBootstrapProfile object itself. - */ - public ManagedClusterBootstrapProfile withArtifactSource(ArtifactSource artifactSource) { - this.artifactSource = artifactSource; - return this; - } - - /** - * Get the containerRegistryId property: The resource Id of Azure Container Registry. The registry must have private - * network access, premium SKU and zone redundancy. - * - * @return the containerRegistryId value. - */ - public String containerRegistryId() { - return this.containerRegistryId; - } - - /** - * Set the containerRegistryId property: The resource Id of Azure Container Registry. The registry must have private - * network access, premium SKU and zone redundancy. - * - * @param containerRegistryId the containerRegistryId value to set. - * @return the ManagedClusterBootstrapProfile object itself. - */ - public ManagedClusterBootstrapProfile withContainerRegistryId(String containerRegistryId) { - this.containerRegistryId = containerRegistryId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("artifactSource", - this.artifactSource == null ? null : this.artifactSource.toString()); - jsonWriter.writeStringField("containerRegistryId", this.containerRegistryId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterBootstrapProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterBootstrapProfile 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 ManagedClusterBootstrapProfile. - */ - public static ManagedClusterBootstrapProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterBootstrapProfile deserializedManagedClusterBootstrapProfile - = new ManagedClusterBootstrapProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("artifactSource".equals(fieldName)) { - deserializedManagedClusterBootstrapProfile.artifactSource - = ArtifactSource.fromString(reader.getString()); - } else if ("containerRegistryId".equals(fieldName)) { - deserializedManagedClusterBootstrapProfile.containerRegistryId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterBootstrapProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterCostAnalysis.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterCostAnalysis.java deleted file mode 100644 index c7c1b0473e7d..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterCostAnalysis.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 cost analysis configuration for the cluster. - */ -@Fluent -public final class ManagedClusterCostAnalysis implements JsonSerializable { - /* - * Whether to enable cost analysis. The Managed Cluster sku.tier must be set to 'Standard' or 'Premium' to enable - * this feature. Enabling this will add Kubernetes Namespace and Deployment details to the Cost Analysis views in - * the Azure portal. If not specified, the default is false. For more information see aka.ms/aks/docs/cost-analysis. - */ - private Boolean enabled; - - /** - * Creates an instance of ManagedClusterCostAnalysis class. - */ - public ManagedClusterCostAnalysis() { - } - - /** - * Get the enabled property: Whether to enable cost analysis. The Managed Cluster sku.tier must be set to 'Standard' - * or 'Premium' to enable this feature. Enabling this will add Kubernetes Namespace and Deployment details to the - * Cost Analysis views in the Azure portal. If not specified, the default is false. For more information see - * aka.ms/aks/docs/cost-analysis. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable cost analysis. The Managed Cluster sku.tier must be set to 'Standard' - * or 'Premium' to enable this feature. Enabling this will add Kubernetes Namespace and Deployment details to the - * Cost Analysis views in the Azure portal. If not specified, the default is false. For more information see - * aka.ms/aks/docs/cost-analysis. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterCostAnalysis object itself. - */ - public ManagedClusterCostAnalysis withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterCostAnalysis from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterCostAnalysis 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 ManagedClusterCostAnalysis. - */ - public static ManagedClusterCostAnalysis fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterCostAnalysis deserializedManagedClusterCostAnalysis = new ManagedClusterCostAnalysis(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterCostAnalysis.enabled = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterCostAnalysis; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java deleted file mode 100644 index 24bb81b69756..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Cluster HTTP proxy configuration. - */ -@Fluent -public final class ManagedClusterHttpProxyConfig implements JsonSerializable { - /* - * The HTTP proxy server endpoint to use. - */ - private String httpProxy; - - /* - * The HTTPS proxy server endpoint to use. - */ - private String httpsProxy; - - /* - * The endpoints that should not go through proxy. - */ - private List noProxy; - - /* - * Alternative CA cert to use for connecting to proxy servers. - */ - private String trustedCa; - - /** - * Creates an instance of ManagedClusterHttpProxyConfig class. - */ - public ManagedClusterHttpProxyConfig() { - } - - /** - * Get the httpProxy property: The HTTP proxy server endpoint to use. - * - * @return the httpProxy value. - */ - public String httpProxy() { - return this.httpProxy; - } - - /** - * Set the httpProxy property: The HTTP proxy server endpoint to use. - * - * @param httpProxy the httpProxy value to set. - * @return the ManagedClusterHttpProxyConfig object itself. - */ - public ManagedClusterHttpProxyConfig withHttpProxy(String httpProxy) { - this.httpProxy = httpProxy; - return this; - } - - /** - * Get the httpsProxy property: The HTTPS proxy server endpoint to use. - * - * @return the httpsProxy value. - */ - public String httpsProxy() { - return this.httpsProxy; - } - - /** - * Set the httpsProxy property: The HTTPS proxy server endpoint to use. - * - * @param httpsProxy the httpsProxy value to set. - * @return the ManagedClusterHttpProxyConfig object itself. - */ - public ManagedClusterHttpProxyConfig withHttpsProxy(String httpsProxy) { - this.httpsProxy = httpsProxy; - return this; - } - - /** - * Get the noProxy property: The endpoints that should not go through proxy. - * - * @return the noProxy value. - */ - public List noProxy() { - return this.noProxy; - } - - /** - * Set the noProxy property: The endpoints that should not go through proxy. - * - * @param noProxy the noProxy value to set. - * @return the ManagedClusterHttpProxyConfig object itself. - */ - public ManagedClusterHttpProxyConfig withNoProxy(List noProxy) { - this.noProxy = noProxy; - return this; - } - - /** - * Get the trustedCa property: Alternative CA cert to use for connecting to proxy servers. - * - * @return the trustedCa value. - */ - public String trustedCa() { - return this.trustedCa; - } - - /** - * Set the trustedCa property: Alternative CA cert to use for connecting to proxy servers. - * - * @param trustedCa the trustedCa value to set. - * @return the ManagedClusterHttpProxyConfig object itself. - */ - public ManagedClusterHttpProxyConfig withTrustedCa(String trustedCa) { - this.trustedCa = trustedCa; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("httpProxy", this.httpProxy); - jsonWriter.writeStringField("httpsProxy", this.httpsProxy); - jsonWriter.writeArrayField("noProxy", this.noProxy, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("trustedCa", this.trustedCa); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterHttpProxyConfig from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterHttpProxyConfig 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 ManagedClusterHttpProxyConfig. - */ - public static ManagedClusterHttpProxyConfig fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterHttpProxyConfig deserializedManagedClusterHttpProxyConfig - = new ManagedClusterHttpProxyConfig(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("httpProxy".equals(fieldName)) { - deserializedManagedClusterHttpProxyConfig.httpProxy = reader.getString(); - } else if ("httpsProxy".equals(fieldName)) { - deserializedManagedClusterHttpProxyConfig.httpsProxy = reader.getString(); - } else if ("noProxy".equals(fieldName)) { - List noProxy = reader.readArray(reader1 -> reader1.getString()); - deserializedManagedClusterHttpProxyConfig.noProxy = noProxy; - } else if ("trustedCa".equals(fieldName)) { - deserializedManagedClusterHttpProxyConfig.trustedCa = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterHttpProxyConfig; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIdentity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIdentity.java deleted file mode 100644 index cef1345cc612..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIdentity.java +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 managed cluster. - */ -@Fluent -public final class ManagedClusterIdentity implements JsonSerializable { - /* - * The principal id of the system assigned identity which is used by master components. - */ - private String principalId; - - /* - * The tenant id of the system assigned identity which is used by master components. - */ - private String tenantId; - - /* - * The type of identity used for the managed cluster. For more information see [use managed identities in - * AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). - */ - private ResourceIdentityType type; - - /* - * The delegated identity resources assigned to this managed cluster. This can only be set by another Azure Resource - * Provider, and managed cluster only accept one delegated identity resource. Internal use only. - */ - private Map delegatedResources; - - /* - * The user identity associated with the managed cluster. This identity will be used in control plane. Only one user - * assigned identity is allowed. The keys must be ARM resource IDs in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/ - * userAssignedIdentities/{identityName}'. - */ - private Map userAssignedIdentities; - - /** - * Creates an instance of ManagedClusterIdentity class. - */ - public ManagedClusterIdentity() { - } - - /** - * Get the principalId property: The principal id of the system assigned identity which is used by master - * components. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: The tenant id of the system assigned identity which is used by master components. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the type property: The type of identity used for the managed cluster. For more information see [use managed - * identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). - * - * @return the type value. - */ - public ResourceIdentityType type() { - return this.type; - } - - /** - * Set the type property: The type of identity used for the managed cluster. For more information see [use managed - * identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). - * - * @param type the type value to set. - * @return the ManagedClusterIdentity object itself. - */ - public ManagedClusterIdentity withType(ResourceIdentityType type) { - this.type = type; - return this; - } - - /** - * Get the delegatedResources property: The delegated identity resources assigned to this managed cluster. This can - * only be set by another Azure Resource Provider, and managed cluster only accept one delegated identity resource. - * Internal use only. - * - * @return the delegatedResources value. - */ - public Map delegatedResources() { - return this.delegatedResources; - } - - /** - * Set the delegatedResources property: The delegated identity resources assigned to this managed cluster. This can - * only be set by another Azure Resource Provider, and managed cluster only accept one delegated identity resource. - * Internal use only. - * - * @param delegatedResources the delegatedResources value to set. - * @return the ManagedClusterIdentity object itself. - */ - public ManagedClusterIdentity withDelegatedResources(Map delegatedResources) { - this.delegatedResources = delegatedResources; - return this; - } - - /** - * Get the userAssignedIdentities property: The user identity associated with the managed cluster. This identity - * will be used in control plane. Only one user assigned identity is allowed. The keys must 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 user identity associated with the managed cluster. This identity - * will be used in control plane. Only one user assigned identity is allowed. The keys must 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 ManagedClusterIdentity object itself. - */ - public ManagedClusterIdentity withUserAssignedIdentities( - Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (delegatedResources() != null) { - delegatedResources().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (userAssignedIdentities() != null) { - userAssignedIdentities().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeMapField("delegatedResources", this.delegatedResources, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterIdentity 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 ManagedClusterIdentity. - */ - public static ManagedClusterIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterIdentity deserializedManagedClusterIdentity = new ManagedClusterIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("principalId".equals(fieldName)) { - deserializedManagedClusterIdentity.principalId = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedManagedClusterIdentity.tenantId = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedManagedClusterIdentity.type = ResourceIdentityType.fromString(reader.getString()); - } else if ("delegatedResources".equals(fieldName)) { - Map delegatedResources - = reader.readMap(reader1 -> DelegatedResource.fromJson(reader1)); - deserializedManagedClusterIdentity.delegatedResources = delegatedResources; - } else if ("userAssignedIdentities".equals(fieldName)) { - Map userAssignedIdentities = reader - .readMap(reader1 -> ManagedServiceIdentityUserAssignedIdentitiesValue.fromJson(reader1)); - deserializedManagedClusterIdentity.userAssignedIdentities = userAssignedIdentities; - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterIdentity; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java deleted file mode 100644 index ce50126d08fe..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Ingress profile for the container service cluster. - */ -@Fluent -public final class ManagedClusterIngressProfile implements JsonSerializable { - /* - * App Routing settings for the ingress profile. You can find an overview and onboarding guide for this feature at - * https://learn.microsoft.com/en-us/azure/aks/app-routing?tabs=default%2Cdeploy-app-default. - */ - private ManagedClusterIngressProfileWebAppRouting webAppRouting; - - /** - * Creates an instance of ManagedClusterIngressProfile class. - */ - public ManagedClusterIngressProfile() { - } - - /** - * Get the webAppRouting property: App Routing settings for the ingress profile. You can find an overview and - * onboarding guide for this feature at - * https://learn.microsoft.com/en-us/azure/aks/app-routing?tabs=default%2Cdeploy-app-default. - * - * @return the webAppRouting value. - */ - public ManagedClusterIngressProfileWebAppRouting webAppRouting() { - return this.webAppRouting; - } - - /** - * Set the webAppRouting property: App Routing settings for the ingress profile. You can find an overview and - * onboarding guide for this feature at - * https://learn.microsoft.com/en-us/azure/aks/app-routing?tabs=default%2Cdeploy-app-default. - * - * @param webAppRouting the webAppRouting value to set. - * @return the ManagedClusterIngressProfile object itself. - */ - public ManagedClusterIngressProfile withWebAppRouting(ManagedClusterIngressProfileWebAppRouting webAppRouting) { - this.webAppRouting = webAppRouting; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (webAppRouting() != null) { - webAppRouting().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("webAppRouting", this.webAppRouting); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterIngressProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterIngressProfile 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 ManagedClusterIngressProfile. - */ - public static ManagedClusterIngressProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterIngressProfile deserializedManagedClusterIngressProfile = new ManagedClusterIngressProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("webAppRouting".equals(fieldName)) { - deserializedManagedClusterIngressProfile.webAppRouting - = ManagedClusterIngressProfileWebAppRouting.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterIngressProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileNginx.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileNginx.java deleted file mode 100644 index 77f558888778..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileNginx.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 ManagedClusterIngressProfileNginx model. - */ -@Fluent -public final class ManagedClusterIngressProfileNginx implements JsonSerializable { - /* - * Ingress type for the default NginxIngressController custom resource - */ - private NginxIngressControllerType defaultIngressControllerType; - - /** - * Creates an instance of ManagedClusterIngressProfileNginx class. - */ - public ManagedClusterIngressProfileNginx() { - } - - /** - * Get the defaultIngressControllerType property: Ingress type for the default NginxIngressController custom - * resource. - * - * @return the defaultIngressControllerType value. - */ - public NginxIngressControllerType defaultIngressControllerType() { - return this.defaultIngressControllerType; - } - - /** - * Set the defaultIngressControllerType property: Ingress type for the default NginxIngressController custom - * resource. - * - * @param defaultIngressControllerType the defaultIngressControllerType value to set. - * @return the ManagedClusterIngressProfileNginx object itself. - */ - public ManagedClusterIngressProfileNginx - withDefaultIngressControllerType(NginxIngressControllerType defaultIngressControllerType) { - this.defaultIngressControllerType = defaultIngressControllerType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("defaultIngressControllerType", - this.defaultIngressControllerType == null ? null : this.defaultIngressControllerType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterIngressProfileNginx from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterIngressProfileNginx 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 ManagedClusterIngressProfileNginx. - */ - public static ManagedClusterIngressProfileNginx fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterIngressProfileNginx deserializedManagedClusterIngressProfileNginx - = new ManagedClusterIngressProfileNginx(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("defaultIngressControllerType".equals(fieldName)) { - deserializedManagedClusterIngressProfileNginx.defaultIngressControllerType - = NginxIngressControllerType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterIngressProfileNginx; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java deleted file mode 100644 index 7c7ac44b3702..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Application Routing add-on settings for the ingress profile. - */ -@Fluent -public final class ManagedClusterIngressProfileWebAppRouting - implements JsonSerializable { - /* - * Whether to enable the Application Routing add-on. - */ - private Boolean enabled; - - /* - * Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application - * Routing add-on is enabled. Public and private DNS zones can be in different resource groups, but all public DNS - * zones must be in the same resource group and all private DNS zones must be in the same resource group. - */ - private List dnsZoneResourceIds; - - /* - * Configuration for the default NginxIngressController. See more at - * https://learn.microsoft.com/en-us/azure/aks/app-routing-nginx-configuration#the-default-nginx-ingress-controller. - */ - private ManagedClusterIngressProfileNginx nginx; - - /* - * Managed identity of the Application Routing add-on. This is the identity that should be granted permissions, for - * example, to manage the associated Azure DNS resource and get certificates from Azure Key Vault. See [this - * overview of the add-on](https://learn.microsoft.com/en-us/azure/aks/web-app-routing?tabs=with-osm) for more - * instructions. - */ - private UserAssignedIdentity identity; - - /** - * Creates an instance of ManagedClusterIngressProfileWebAppRouting class. - */ - public ManagedClusterIngressProfileWebAppRouting() { - } - - /** - * Get the enabled property: Whether to enable the Application Routing add-on. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable the Application Routing add-on. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterIngressProfileWebAppRouting object itself. - */ - public ManagedClusterIngressProfileWebAppRouting withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the dnsZoneResourceIds property: Resource IDs of the DNS zones to be associated with the Application Routing - * add-on. Used only when Application Routing add-on is enabled. Public and private DNS zones can be in different - * resource groups, but all public DNS zones must be in the same resource group and all private DNS zones must be in - * the same resource group. - * - * @return the dnsZoneResourceIds value. - */ - public List dnsZoneResourceIds() { - return this.dnsZoneResourceIds; - } - - /** - * Set the dnsZoneResourceIds property: Resource IDs of the DNS zones to be associated with the Application Routing - * add-on. Used only when Application Routing add-on is enabled. Public and private DNS zones can be in different - * resource groups, but all public DNS zones must be in the same resource group and all private DNS zones must be in - * the same resource group. - * - * @param dnsZoneResourceIds the dnsZoneResourceIds value to set. - * @return the ManagedClusterIngressProfileWebAppRouting object itself. - */ - public ManagedClusterIngressProfileWebAppRouting withDnsZoneResourceIds(List dnsZoneResourceIds) { - this.dnsZoneResourceIds = dnsZoneResourceIds; - return this; - } - - /** - * Get the nginx property: Configuration for the default NginxIngressController. See more at - * https://learn.microsoft.com/en-us/azure/aks/app-routing-nginx-configuration#the-default-nginx-ingress-controller. - * - * @return the nginx value. - */ - public ManagedClusterIngressProfileNginx nginx() { - return this.nginx; - } - - /** - * Set the nginx property: Configuration for the default NginxIngressController. See more at - * https://learn.microsoft.com/en-us/azure/aks/app-routing-nginx-configuration#the-default-nginx-ingress-controller. - * - * @param nginx the nginx value to set. - * @return the ManagedClusterIngressProfileWebAppRouting object itself. - */ - public ManagedClusterIngressProfileWebAppRouting withNginx(ManagedClusterIngressProfileNginx nginx) { - this.nginx = nginx; - return this; - } - - /** - * Get the identity property: Managed identity of the Application Routing add-on. This is the identity that should - * be granted permissions, for example, to manage the associated Azure DNS resource and get certificates from Azure - * Key Vault. See [this overview of the - * add-on](https://learn.microsoft.com/en-us/azure/aks/web-app-routing?tabs=with-osm) for more instructions. - * - * @return the identity value. - */ - public UserAssignedIdentity identity() { - return this.identity; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (nginx() != null) { - nginx().validate(); - } - if (identity() != null) { - identity().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeArrayField("dnsZoneResourceIds", this.dnsZoneResourceIds, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("nginx", this.nginx); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterIngressProfileWebAppRouting from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterIngressProfileWebAppRouting 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 ManagedClusterIngressProfileWebAppRouting. - */ - public static ManagedClusterIngressProfileWebAppRouting fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterIngressProfileWebAppRouting deserializedManagedClusterIngressProfileWebAppRouting - = new ManagedClusterIngressProfileWebAppRouting(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterIngressProfileWebAppRouting.enabled - = reader.getNullable(JsonReader::getBoolean); - } else if ("dnsZoneResourceIds".equals(fieldName)) { - List dnsZoneResourceIds = reader.readArray(reader1 -> reader1.getString()); - deserializedManagedClusterIngressProfileWebAppRouting.dnsZoneResourceIds = dnsZoneResourceIds; - } else if ("nginx".equals(fieldName)) { - deserializedManagedClusterIngressProfileWebAppRouting.nginx - = ManagedClusterIngressProfileNginx.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedManagedClusterIngressProfileWebAppRouting.identity - = UserAssignedIdentity.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterIngressProfileWebAppRouting; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterListResult.java deleted file mode 100644 index d8449127fa9e..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterListResult.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterInner; -import java.io.IOException; -import java.util.List; - -/** - * The response from the List Managed Clusters operation. - */ -@Fluent -public final class ManagedClusterListResult implements JsonSerializable { - /* - * The list of managed clusters. - */ - private List value; - - /* - * The URL to get the next set of managed cluster results. - */ - private String nextLink; - - /** - * Creates an instance of ManagedClusterListResult class. - */ - public ManagedClusterListResult() { - } - - /** - * Get the value property: The list of managed clusters. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of managed clusters. - * - * @param value the value value to set. - * @return the ManagedClusterListResult object itself. - */ - public ManagedClusterListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to get the next set of managed cluster results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterListResult 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 ManagedClusterListResult. - */ - public static ManagedClusterListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterListResult deserializedManagedClusterListResult = new ManagedClusterListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ManagedClusterInner.fromJson(reader1)); - deserializedManagedClusterListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedManagedClusterListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterListResult; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java deleted file mode 100644 index b01a7427e97b..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Profile of the managed cluster load balancer. - */ -@Fluent -public final class ManagedClusterLoadBalancerProfile implements JsonSerializable { - /* - * Desired managed outbound IPs for the cluster load balancer. - */ - private ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIPs; - - /* - * Desired outbound IP Prefix resources for the cluster load balancer. - */ - private ManagedClusterLoadBalancerProfileOutboundIpPrefixes outboundIpPrefixes; - - /* - * Desired outbound IP resources for the cluster load balancer. - */ - private ManagedClusterLoadBalancerProfileOutboundIPs outboundIPs; - - /* - * The effective outbound IP resources of the cluster load balancer. - */ - private List effectiveOutboundIPs; - - /* - * The desired number of allocated SNAT ports per VM. Allowed values are in the range of 0 to 64000 (inclusive). The - * default value is 0 which results in Azure dynamically allocating ports. - */ - private Integer allocatedOutboundPorts; - - /* - * Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The - * default value is 30 minutes. - */ - private Integer idleTimeoutInMinutes; - - /* - * Enable multiple standard load balancers per AKS cluster or not. - */ - private Boolean enableMultipleStandardLoadBalancers; - - /* - * The type of the managed inbound Load Balancer BackendPool. - */ - private BackendPoolType backendPoolType; - - /** - * Creates an instance of ManagedClusterLoadBalancerProfile class. - */ - public ManagedClusterLoadBalancerProfile() { - } - - /** - * Get the managedOutboundIPs property: Desired managed outbound IPs for the cluster load balancer. - * - * @return the managedOutboundIPs value. - */ - public ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIPs() { - return this.managedOutboundIPs; - } - - /** - * Set the managedOutboundIPs property: Desired managed outbound IPs for the cluster load balancer. - * - * @param managedOutboundIPs the managedOutboundIPs value to set. - * @return the ManagedClusterLoadBalancerProfile object itself. - */ - public ManagedClusterLoadBalancerProfile - withManagedOutboundIPs(ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIPs) { - this.managedOutboundIPs = managedOutboundIPs; - return this; - } - - /** - * Get the outboundIpPrefixes property: Desired outbound IP Prefix resources for the cluster load balancer. - * - * @return the outboundIpPrefixes value. - */ - public ManagedClusterLoadBalancerProfileOutboundIpPrefixes outboundIpPrefixes() { - return this.outboundIpPrefixes; - } - - /** - * Set the outboundIpPrefixes property: Desired outbound IP Prefix resources for the cluster load balancer. - * - * @param outboundIpPrefixes the outboundIpPrefixes value to set. - * @return the ManagedClusterLoadBalancerProfile object itself. - */ - public ManagedClusterLoadBalancerProfile - withOutboundIpPrefixes(ManagedClusterLoadBalancerProfileOutboundIpPrefixes outboundIpPrefixes) { - this.outboundIpPrefixes = outboundIpPrefixes; - return this; - } - - /** - * Get the outboundIPs property: Desired outbound IP resources for the cluster load balancer. - * - * @return the outboundIPs value. - */ - public ManagedClusterLoadBalancerProfileOutboundIPs outboundIPs() { - return this.outboundIPs; - } - - /** - * Set the outboundIPs property: Desired outbound IP resources for the cluster load balancer. - * - * @param outboundIPs the outboundIPs value to set. - * @return the ManagedClusterLoadBalancerProfile object itself. - */ - public ManagedClusterLoadBalancerProfile withOutboundIPs(ManagedClusterLoadBalancerProfileOutboundIPs outboundIPs) { - this.outboundIPs = outboundIPs; - return this; - } - - /** - * Get the effectiveOutboundIPs property: The effective outbound IP resources of the cluster load balancer. - * - * @return the effectiveOutboundIPs value. - */ - public List effectiveOutboundIPs() { - return this.effectiveOutboundIPs; - } - - /** - * Get the allocatedOutboundPorts property: The desired number of allocated SNAT ports per VM. Allowed values are in - * the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports. - * - * @return the allocatedOutboundPorts value. - */ - public Integer allocatedOutboundPorts() { - return this.allocatedOutboundPorts; - } - - /** - * Set the allocatedOutboundPorts property: The desired number of allocated SNAT ports per VM. Allowed values are in - * the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports. - * - * @param allocatedOutboundPorts the allocatedOutboundPorts value to set. - * @return the ManagedClusterLoadBalancerProfile object itself. - */ - public ManagedClusterLoadBalancerProfile withAllocatedOutboundPorts(Integer allocatedOutboundPorts) { - this.allocatedOutboundPorts = allocatedOutboundPorts; - return this; - } - - /** - * Get the idleTimeoutInMinutes property: Desired outbound flow idle timeout in minutes. Allowed values are in the - * range of 4 to 120 (inclusive). The default value is 30 minutes. - * - * @return the idleTimeoutInMinutes value. - */ - public Integer idleTimeoutInMinutes() { - return this.idleTimeoutInMinutes; - } - - /** - * Set the idleTimeoutInMinutes property: Desired outbound flow idle timeout in minutes. Allowed values are in the - * range of 4 to 120 (inclusive). The default value is 30 minutes. - * - * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set. - * @return the ManagedClusterLoadBalancerProfile object itself. - */ - public ManagedClusterLoadBalancerProfile withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes) { - this.idleTimeoutInMinutes = idleTimeoutInMinutes; - return this; - } - - /** - * Get the enableMultipleStandardLoadBalancers property: Enable multiple standard load balancers per AKS cluster or - * not. - * - * @return the enableMultipleStandardLoadBalancers value. - */ - public Boolean enableMultipleStandardLoadBalancers() { - return this.enableMultipleStandardLoadBalancers; - } - - /** - * Set the enableMultipleStandardLoadBalancers property: Enable multiple standard load balancers per AKS cluster or - * not. - * - * @param enableMultipleStandardLoadBalancers the enableMultipleStandardLoadBalancers value to set. - * @return the ManagedClusterLoadBalancerProfile object itself. - */ - public ManagedClusterLoadBalancerProfile - withEnableMultipleStandardLoadBalancers(Boolean enableMultipleStandardLoadBalancers) { - this.enableMultipleStandardLoadBalancers = enableMultipleStandardLoadBalancers; - return this; - } - - /** - * Get the backendPoolType property: The type of the managed inbound Load Balancer BackendPool. - * - * @return the backendPoolType value. - */ - public BackendPoolType backendPoolType() { - return this.backendPoolType; - } - - /** - * Set the backendPoolType property: The type of the managed inbound Load Balancer BackendPool. - * - * @param backendPoolType the backendPoolType value to set. - * @return the ManagedClusterLoadBalancerProfile object itself. - */ - public ManagedClusterLoadBalancerProfile withBackendPoolType(BackendPoolType backendPoolType) { - this.backendPoolType = backendPoolType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (managedOutboundIPs() != null) { - managedOutboundIPs().validate(); - } - if (outboundIpPrefixes() != null) { - outboundIpPrefixes().validate(); - } - if (outboundIPs() != null) { - outboundIPs().validate(); - } - if (effectiveOutboundIPs() != null) { - effectiveOutboundIPs().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("managedOutboundIPs", this.managedOutboundIPs); - jsonWriter.writeJsonField("outboundIPPrefixes", this.outboundIpPrefixes); - jsonWriter.writeJsonField("outboundIPs", this.outboundIPs); - jsonWriter.writeNumberField("allocatedOutboundPorts", this.allocatedOutboundPorts); - jsonWriter.writeNumberField("idleTimeoutInMinutes", this.idleTimeoutInMinutes); - jsonWriter.writeBooleanField("enableMultipleStandardLoadBalancers", this.enableMultipleStandardLoadBalancers); - jsonWriter.writeStringField("backendPoolType", - this.backendPoolType == null ? null : this.backendPoolType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterLoadBalancerProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterLoadBalancerProfile 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 ManagedClusterLoadBalancerProfile. - */ - public static ManagedClusterLoadBalancerProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterLoadBalancerProfile deserializedManagedClusterLoadBalancerProfile - = new ManagedClusterLoadBalancerProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("managedOutboundIPs".equals(fieldName)) { - deserializedManagedClusterLoadBalancerProfile.managedOutboundIPs - = ManagedClusterLoadBalancerProfileManagedOutboundIPs.fromJson(reader); - } else if ("outboundIPPrefixes".equals(fieldName)) { - deserializedManagedClusterLoadBalancerProfile.outboundIpPrefixes - = ManagedClusterLoadBalancerProfileOutboundIpPrefixes.fromJson(reader); - } else if ("outboundIPs".equals(fieldName)) { - deserializedManagedClusterLoadBalancerProfile.outboundIPs - = ManagedClusterLoadBalancerProfileOutboundIPs.fromJson(reader); - } else if ("effectiveOutboundIPs".equals(fieldName)) { - List effectiveOutboundIPs - = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); - deserializedManagedClusterLoadBalancerProfile.effectiveOutboundIPs = effectiveOutboundIPs; - } else if ("allocatedOutboundPorts".equals(fieldName)) { - deserializedManagedClusterLoadBalancerProfile.allocatedOutboundPorts - = reader.getNullable(JsonReader::getInt); - } else if ("idleTimeoutInMinutes".equals(fieldName)) { - deserializedManagedClusterLoadBalancerProfile.idleTimeoutInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("enableMultipleStandardLoadBalancers".equals(fieldName)) { - deserializedManagedClusterLoadBalancerProfile.enableMultipleStandardLoadBalancers - = reader.getNullable(JsonReader::getBoolean); - } else if ("backendPoolType".equals(fieldName)) { - deserializedManagedClusterLoadBalancerProfile.backendPoolType - = BackendPoolType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterLoadBalancerProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java deleted file mode 100644 index 6b059301fd54..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Desired managed outbound IPs for the cluster load balancer. - */ -@Fluent -public final class ManagedClusterLoadBalancerProfileManagedOutboundIPs - implements JsonSerializable { - /* - * The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values - * must be in the range of 1 to 100 (inclusive). The default value is 1. - */ - private Integer count; - - /* - * The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values - * must be in the range of 1 to 100 (inclusive). The default value is 0 for single-stack and 1 for dual-stack. - */ - private Integer countIPv6; - - /** - * Creates an instance of ManagedClusterLoadBalancerProfileManagedOutboundIPs class. - */ - public ManagedClusterLoadBalancerProfileManagedOutboundIPs() { - } - - /** - * Get the count property: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load - * balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. - * - * @return the count value. - */ - public Integer count() { - return this.count; - } - - /** - * Set the count property: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load - * balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. - * - * @param count the count value to set. - * @return the ManagedClusterLoadBalancerProfileManagedOutboundIPs object itself. - */ - public ManagedClusterLoadBalancerProfileManagedOutboundIPs withCount(Integer count) { - this.count = count; - return this; - } - - /** - * Get the countIPv6 property: The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load - * balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 0 for single-stack - * and 1 for dual-stack. - * - * @return the countIPv6 value. - */ - public Integer countIPv6() { - return this.countIPv6; - } - - /** - * Set the countIPv6 property: The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load - * balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 0 for single-stack - * and 1 for dual-stack. - * - * @param countIPv6 the countIPv6 value to set. - * @return the ManagedClusterLoadBalancerProfileManagedOutboundIPs object itself. - */ - public ManagedClusterLoadBalancerProfileManagedOutboundIPs withCountIPv6(Integer countIPv6) { - this.countIPv6 = countIPv6; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("count", this.count); - jsonWriter.writeNumberField("countIPv6", this.countIPv6); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterLoadBalancerProfileManagedOutboundIPs from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterLoadBalancerProfileManagedOutboundIPs 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 ManagedClusterLoadBalancerProfileManagedOutboundIPs. - */ - public static ManagedClusterLoadBalancerProfileManagedOutboundIPs fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterLoadBalancerProfileManagedOutboundIPs deserializedManagedClusterLoadBalancerProfileManagedOutboundIPs - = new ManagedClusterLoadBalancerProfileManagedOutboundIPs(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("count".equals(fieldName)) { - deserializedManagedClusterLoadBalancerProfileManagedOutboundIPs.count - = reader.getNullable(JsonReader::getInt); - } else if ("countIPv6".equals(fieldName)) { - deserializedManagedClusterLoadBalancerProfileManagedOutboundIPs.countIPv6 - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterLoadBalancerProfileManagedOutboundIPs; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIPs.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIPs.java deleted file mode 100644 index dad12a301e4e..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIPs.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Desired outbound IP resources for the cluster load balancer. - */ -@Fluent -public final class ManagedClusterLoadBalancerProfileOutboundIPs - implements JsonSerializable { - /* - * A list of public IP resources. - */ - private List publicIPs; - - /** - * Creates an instance of ManagedClusterLoadBalancerProfileOutboundIPs class. - */ - public ManagedClusterLoadBalancerProfileOutboundIPs() { - } - - /** - * Get the publicIPs property: A list of public IP resources. - * - * @return the publicIPs value. - */ - public List publicIPs() { - return this.publicIPs; - } - - /** - * Set the publicIPs property: A list of public IP resources. - * - * @param publicIPs the publicIPs value to set. - * @return the ManagedClusterLoadBalancerProfileOutboundIPs object itself. - */ - public ManagedClusterLoadBalancerProfileOutboundIPs withPublicIPs(List publicIPs) { - this.publicIPs = publicIPs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (publicIPs() != null) { - publicIPs().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("publicIPs", this.publicIPs, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterLoadBalancerProfileOutboundIPs from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterLoadBalancerProfileOutboundIPs 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 ManagedClusterLoadBalancerProfileOutboundIPs. - */ - public static ManagedClusterLoadBalancerProfileOutboundIPs fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterLoadBalancerProfileOutboundIPs deserializedManagedClusterLoadBalancerProfileOutboundIPs - = new ManagedClusterLoadBalancerProfileOutboundIPs(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("publicIPs".equals(fieldName)) { - List publicIPs - = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); - deserializedManagedClusterLoadBalancerProfileOutboundIPs.publicIPs = publicIPs; - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterLoadBalancerProfileOutboundIPs; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java deleted file mode 100644 index f28ebf921629..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Desired outbound IP Prefix resources for the cluster load balancer. - */ -@Fluent -public final class ManagedClusterLoadBalancerProfileOutboundIpPrefixes - implements JsonSerializable { - /* - * A list of public IP prefix resources. - */ - private List publicIpPrefixes; - - /** - * Creates an instance of ManagedClusterLoadBalancerProfileOutboundIpPrefixes class. - */ - public ManagedClusterLoadBalancerProfileOutboundIpPrefixes() { - } - - /** - * Get the publicIpPrefixes property: A list of public IP prefix resources. - * - * @return the publicIpPrefixes value. - */ - public List publicIpPrefixes() { - return this.publicIpPrefixes; - } - - /** - * Set the publicIpPrefixes property: A list of public IP prefix resources. - * - * @param publicIpPrefixes the publicIpPrefixes value to set. - * @return the ManagedClusterLoadBalancerProfileOutboundIpPrefixes object itself. - */ - public ManagedClusterLoadBalancerProfileOutboundIpPrefixes - withPublicIpPrefixes(List publicIpPrefixes) { - this.publicIpPrefixes = publicIpPrefixes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (publicIpPrefixes() != null) { - publicIpPrefixes().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("publicIPPrefixes", this.publicIpPrefixes, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterLoadBalancerProfileOutboundIpPrefixes from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterLoadBalancerProfileOutboundIpPrefixes 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 ManagedClusterLoadBalancerProfileOutboundIpPrefixes. - */ - public static ManagedClusterLoadBalancerProfileOutboundIpPrefixes fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterLoadBalancerProfileOutboundIpPrefixes deserializedManagedClusterLoadBalancerProfileOutboundIpPrefixes - = new ManagedClusterLoadBalancerProfileOutboundIpPrefixes(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("publicIPPrefixes".equals(fieldName)) { - List publicIpPrefixes - = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); - deserializedManagedClusterLoadBalancerProfileOutboundIpPrefixes.publicIpPrefixes = publicIpPrefixes; - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterLoadBalancerProfileOutboundIpPrefixes; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterManagedOutboundIpProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterManagedOutboundIpProfile.java deleted file mode 100644 index 916a45258c47..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterManagedOutboundIpProfile.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 of the managed outbound IP resources of the managed cluster. - */ -@Fluent -public final class ManagedClusterManagedOutboundIpProfile - implements JsonSerializable { - /* - * The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 - * (inclusive). The default value is 1. - */ - private Integer count; - - /** - * Creates an instance of ManagedClusterManagedOutboundIpProfile class. - */ - public ManagedClusterManagedOutboundIpProfile() { - } - - /** - * Get the count property: The desired number of outbound IPs created/managed by Azure. Allowed values must be in - * the range of 1 to 16 (inclusive). The default value is 1. - * - * @return the count value. - */ - public Integer count() { - return this.count; - } - - /** - * Set the count property: The desired number of outbound IPs created/managed by Azure. Allowed values must be in - * the range of 1 to 16 (inclusive). The default value is 1. - * - * @param count the count value to set. - * @return the ManagedClusterManagedOutboundIpProfile object itself. - */ - public ManagedClusterManagedOutboundIpProfile withCount(Integer count) { - this.count = count; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("count", this.count); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterManagedOutboundIpProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterManagedOutboundIpProfile 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 ManagedClusterManagedOutboundIpProfile. - */ - public static ManagedClusterManagedOutboundIpProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterManagedOutboundIpProfile deserializedManagedClusterManagedOutboundIpProfile - = new ManagedClusterManagedOutboundIpProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("count".equals(fieldName)) { - deserializedManagedClusterManagedOutboundIpProfile.count = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterManagedOutboundIpProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterMetricsProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterMetricsProfile.java deleted file mode 100644 index dd2199d93948..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterMetricsProfile.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 metrics profile for the ManagedCluster. - */ -@Fluent -public final class ManagedClusterMetricsProfile implements JsonSerializable { - /* - * The configuration for detailed per-Kubernetes resource cost analysis. - */ - private ManagedClusterCostAnalysis costAnalysis; - - /** - * Creates an instance of ManagedClusterMetricsProfile class. - */ - public ManagedClusterMetricsProfile() { - } - - /** - * Get the costAnalysis property: The configuration for detailed per-Kubernetes resource cost analysis. - * - * @return the costAnalysis value. - */ - public ManagedClusterCostAnalysis costAnalysis() { - return this.costAnalysis; - } - - /** - * Set the costAnalysis property: The configuration for detailed per-Kubernetes resource cost analysis. - * - * @param costAnalysis the costAnalysis value to set. - * @return the ManagedClusterMetricsProfile object itself. - */ - public ManagedClusterMetricsProfile withCostAnalysis(ManagedClusterCostAnalysis costAnalysis) { - this.costAnalysis = costAnalysis; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (costAnalysis() != null) { - costAnalysis().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("costAnalysis", this.costAnalysis); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterMetricsProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterMetricsProfile 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 ManagedClusterMetricsProfile. - */ - public static ManagedClusterMetricsProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterMetricsProfile deserializedManagedClusterMetricsProfile = new ManagedClusterMetricsProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("costAnalysis".equals(fieldName)) { - deserializedManagedClusterMetricsProfile.costAnalysis = ManagedClusterCostAnalysis.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterMetricsProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNatGatewayProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNatGatewayProfile.java deleted file mode 100644 index 3a466a995ba3..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNatGatewayProfile.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Profile of the managed cluster NAT gateway. - */ -@Fluent -public final class ManagedClusterNatGatewayProfile implements JsonSerializable { - /* - * Profile of the managed outbound IP resources of the cluster NAT gateway. - */ - private ManagedClusterManagedOutboundIpProfile managedOutboundIpProfile; - - /* - * The effective outbound IP resources of the cluster NAT gateway. - */ - private List effectiveOutboundIPs; - - /* - * Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The - * default value is 4 minutes. - */ - private Integer idleTimeoutInMinutes; - - /** - * Creates an instance of ManagedClusterNatGatewayProfile class. - */ - public ManagedClusterNatGatewayProfile() { - } - - /** - * Get the managedOutboundIpProfile property: Profile of the managed outbound IP resources of the cluster NAT - * gateway. - * - * @return the managedOutboundIpProfile value. - */ - public ManagedClusterManagedOutboundIpProfile managedOutboundIpProfile() { - return this.managedOutboundIpProfile; - } - - /** - * Set the managedOutboundIpProfile property: Profile of the managed outbound IP resources of the cluster NAT - * gateway. - * - * @param managedOutboundIpProfile the managedOutboundIpProfile value to set. - * @return the ManagedClusterNatGatewayProfile object itself. - */ - public ManagedClusterNatGatewayProfile - withManagedOutboundIpProfile(ManagedClusterManagedOutboundIpProfile managedOutboundIpProfile) { - this.managedOutboundIpProfile = managedOutboundIpProfile; - return this; - } - - /** - * Get the effectiveOutboundIPs property: The effective outbound IP resources of the cluster NAT gateway. - * - * @return the effectiveOutboundIPs value. - */ - public List effectiveOutboundIPs() { - return this.effectiveOutboundIPs; - } - - /** - * Get the idleTimeoutInMinutes property: Desired outbound flow idle timeout in minutes. Allowed values are in the - * range of 4 to 120 (inclusive). The default value is 4 minutes. - * - * @return the idleTimeoutInMinutes value. - */ - public Integer idleTimeoutInMinutes() { - return this.idleTimeoutInMinutes; - } - - /** - * Set the idleTimeoutInMinutes property: Desired outbound flow idle timeout in minutes. Allowed values are in the - * range of 4 to 120 (inclusive). The default value is 4 minutes. - * - * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set. - * @return the ManagedClusterNatGatewayProfile object itself. - */ - public ManagedClusterNatGatewayProfile withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes) { - this.idleTimeoutInMinutes = idleTimeoutInMinutes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (managedOutboundIpProfile() != null) { - managedOutboundIpProfile().validate(); - } - if (effectiveOutboundIPs() != null) { - effectiveOutboundIPs().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("managedOutboundIPProfile", this.managedOutboundIpProfile); - jsonWriter.writeNumberField("idleTimeoutInMinutes", this.idleTimeoutInMinutes); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterNatGatewayProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterNatGatewayProfile 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 ManagedClusterNatGatewayProfile. - */ - public static ManagedClusterNatGatewayProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterNatGatewayProfile deserializedManagedClusterNatGatewayProfile - = new ManagedClusterNatGatewayProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("managedOutboundIPProfile".equals(fieldName)) { - deserializedManagedClusterNatGatewayProfile.managedOutboundIpProfile - = ManagedClusterManagedOutboundIpProfile.fromJson(reader); - } else if ("effectiveOutboundIPs".equals(fieldName)) { - List effectiveOutboundIPs - = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); - deserializedManagedClusterNatGatewayProfile.effectiveOutboundIPs = effectiveOutboundIPs; - } else if ("idleTimeoutInMinutes".equals(fieldName)) { - deserializedManagedClusterNatGatewayProfile.idleTimeoutInMinutes - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterNatGatewayProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeProvisioningProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeProvisioningProfile.java deleted file mode 100644 index 4c8e0383fbfd..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeProvisioningProfile.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 ManagedClusterNodeProvisioningProfile model. - */ -@Fluent -public final class ManagedClusterNodeProvisioningProfile - implements JsonSerializable { - /* - * The node provisioning mode. If not specified, the default is Manual. - */ - private NodeProvisioningMode mode; - - /* - * The set of default Karpenter NodePools (CRDs) configured for node provisioning. This field has no effect unless - * mode is 'Auto'. Warning: Changing this from Auto to None on an existing cluster will cause the default Karpenter - * NodePools to be deleted, which will drain and delete the nodes associated with those pools. It is strongly - * recommended to not do this unless there are idle nodes ready to take the pods evicted by that action. If not - * specified, the default is Auto. For more information see aka.ms/aks/nap#node-pools. - */ - private NodeProvisioningDefaultNodePools defaultNodePools; - - /** - * Creates an instance of ManagedClusterNodeProvisioningProfile class. - */ - public ManagedClusterNodeProvisioningProfile() { - } - - /** - * Get the mode property: The node provisioning mode. If not specified, the default is Manual. - * - * @return the mode value. - */ - public NodeProvisioningMode mode() { - return this.mode; - } - - /** - * Set the mode property: The node provisioning mode. If not specified, the default is Manual. - * - * @param mode the mode value to set. - * @return the ManagedClusterNodeProvisioningProfile object itself. - */ - public ManagedClusterNodeProvisioningProfile withMode(NodeProvisioningMode mode) { - this.mode = mode; - return this; - } - - /** - * Get the defaultNodePools property: The set of default Karpenter NodePools (CRDs) configured for node - * provisioning. This field has no effect unless mode is 'Auto'. Warning: Changing this from Auto to None on an - * existing cluster will cause the default Karpenter NodePools to be deleted, which will drain and delete the nodes - * associated with those pools. It is strongly recommended to not do this unless there are idle nodes ready to take - * the pods evicted by that action. If not specified, the default is Auto. For more information see - * aka.ms/aks/nap#node-pools. - * - * @return the defaultNodePools value. - */ - public NodeProvisioningDefaultNodePools defaultNodePools() { - return this.defaultNodePools; - } - - /** - * Set the defaultNodePools property: The set of default Karpenter NodePools (CRDs) configured for node - * provisioning. This field has no effect unless mode is 'Auto'. Warning: Changing this from Auto to None on an - * existing cluster will cause the default Karpenter NodePools to be deleted, which will drain and delete the nodes - * associated with those pools. It is strongly recommended to not do this unless there are idle nodes ready to take - * the pods evicted by that action. If not specified, the default is Auto. For more information see - * aka.ms/aks/nap#node-pools. - * - * @param defaultNodePools the defaultNodePools value to set. - * @return the ManagedClusterNodeProvisioningProfile object itself. - */ - public ManagedClusterNodeProvisioningProfile - withDefaultNodePools(NodeProvisioningDefaultNodePools defaultNodePools) { - this.defaultNodePools = defaultNodePools; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - jsonWriter.writeStringField("defaultNodePools", - this.defaultNodePools == null ? null : this.defaultNodePools.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterNodeProvisioningProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterNodeProvisioningProfile 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 ManagedClusterNodeProvisioningProfile. - */ - public static ManagedClusterNodeProvisioningProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterNodeProvisioningProfile deserializedManagedClusterNodeProvisioningProfile - = new ManagedClusterNodeProvisioningProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mode".equals(fieldName)) { - deserializedManagedClusterNodeProvisioningProfile.mode - = NodeProvisioningMode.fromString(reader.getString()); - } else if ("defaultNodePools".equals(fieldName)) { - deserializedManagedClusterNodeProvisioningProfile.defaultNodePools - = NodeProvisioningDefaultNodePools.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterNodeProvisioningProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java deleted file mode 100644 index e3485eccdee3..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Node resource group lockdown profile for a managed cluster. - */ -@Fluent -public final class ManagedClusterNodeResourceGroupProfile - implements JsonSerializable { - /* - * The restriction level applied to the cluster's node resource group. If not specified, the default is - * 'Unrestricted' - */ - private RestrictionLevel restrictionLevel; - - /** - * Creates an instance of ManagedClusterNodeResourceGroupProfile class. - */ - public ManagedClusterNodeResourceGroupProfile() { - } - - /** - * Get the restrictionLevel property: The restriction level applied to the cluster's node resource group. If not - * specified, the default is 'Unrestricted'. - * - * @return the restrictionLevel value. - */ - public RestrictionLevel restrictionLevel() { - return this.restrictionLevel; - } - - /** - * Set the restrictionLevel property: The restriction level applied to the cluster's node resource group. If not - * specified, the default is 'Unrestricted'. - * - * @param restrictionLevel the restrictionLevel value to set. - * @return the ManagedClusterNodeResourceGroupProfile object itself. - */ - public ManagedClusterNodeResourceGroupProfile withRestrictionLevel(RestrictionLevel restrictionLevel) { - this.restrictionLevel = restrictionLevel; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("restrictionLevel", - this.restrictionLevel == null ? null : this.restrictionLevel.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterNodeResourceGroupProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterNodeResourceGroupProfile 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 ManagedClusterNodeResourceGroupProfile. - */ - public static ManagedClusterNodeResourceGroupProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterNodeResourceGroupProfile deserializedManagedClusterNodeResourceGroupProfile - = new ManagedClusterNodeResourceGroupProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("restrictionLevel".equals(fieldName)) { - deserializedManagedClusterNodeResourceGroupProfile.restrictionLevel - = RestrictionLevel.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterNodeResourceGroupProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterOidcIssuerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterOidcIssuerProfile.java deleted file mode 100644 index b8b9da10b000..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterOidcIssuerProfile.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 OIDC issuer profile of the Managed Cluster. - */ -@Fluent -public final class ManagedClusterOidcIssuerProfile implements JsonSerializable { - /* - * The OIDC issuer url of the Managed Cluster. - */ - private String issuerUrl; - - /* - * Whether the OIDC issuer is enabled. - */ - private Boolean enabled; - - /** - * Creates an instance of ManagedClusterOidcIssuerProfile class. - */ - public ManagedClusterOidcIssuerProfile() { - } - - /** - * Get the issuerUrl property: The OIDC issuer url of the Managed Cluster. - * - * @return the issuerUrl value. - */ - public String issuerUrl() { - return this.issuerUrl; - } - - /** - * Get the enabled property: Whether the OIDC issuer is enabled. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether the OIDC issuer is enabled. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterOidcIssuerProfile object itself. - */ - public ManagedClusterOidcIssuerProfile withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterOidcIssuerProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterOidcIssuerProfile 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 ManagedClusterOidcIssuerProfile. - */ - public static ManagedClusterOidcIssuerProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterOidcIssuerProfile deserializedManagedClusterOidcIssuerProfile - = new ManagedClusterOidcIssuerProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("issuerURL".equals(fieldName)) { - deserializedManagedClusterOidcIssuerProfile.issuerUrl = reader.getString(); - } else if ("enabled".equals(fieldName)) { - deserializedManagedClusterOidcIssuerProfile.enabled = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterOidcIssuerProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentity.java deleted file mode 100644 index b2224a1c3e76..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentity.java +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Details about the pod identity assigned to the Managed Cluster. - */ -@Fluent -public final class ManagedClusterPodIdentity implements JsonSerializable { - /* - * The name of the pod identity. - */ - private String name; - - /* - * The namespace of the pod identity. - */ - private String namespace; - - /* - * The binding selector to use for the AzureIdentityBinding resource. - */ - private String bindingSelector; - - /* - * The user assigned identity details. - */ - private UserAssignedIdentity identity; - - /* - * The current provisioning state of the pod identity. - */ - private ManagedClusterPodIdentityProvisioningState provisioningState; - - /* - * The provisioningInfo property. - */ - private ManagedClusterPodIdentityProvisioningInfo provisioningInfo; - - /** - * Creates an instance of ManagedClusterPodIdentity class. - */ - public ManagedClusterPodIdentity() { - } - - /** - * Get the name property: The name of the pod identity. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the pod identity. - * - * @param name the name value to set. - * @return the ManagedClusterPodIdentity object itself. - */ - public ManagedClusterPodIdentity withName(String name) { - this.name = name; - return this; - } - - /** - * Get the namespace property: The namespace of the pod identity. - * - * @return the namespace value. - */ - public String namespace() { - return this.namespace; - } - - /** - * Set the namespace property: The namespace of the pod identity. - * - * @param namespace the namespace value to set. - * @return the ManagedClusterPodIdentity object itself. - */ - public ManagedClusterPodIdentity withNamespace(String namespace) { - this.namespace = namespace; - return this; - } - - /** - * Get the bindingSelector property: The binding selector to use for the AzureIdentityBinding resource. - * - * @return the bindingSelector value. - */ - public String bindingSelector() { - return this.bindingSelector; - } - - /** - * Set the bindingSelector property: The binding selector to use for the AzureIdentityBinding resource. - * - * @param bindingSelector the bindingSelector value to set. - * @return the ManagedClusterPodIdentity object itself. - */ - public ManagedClusterPodIdentity withBindingSelector(String bindingSelector) { - this.bindingSelector = bindingSelector; - return this; - } - - /** - * Get the identity property: The user assigned identity details. - * - * @return the identity value. - */ - public UserAssignedIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The user assigned identity details. - * - * @param identity the identity value to set. - * @return the ManagedClusterPodIdentity object itself. - */ - public ManagedClusterPodIdentity withIdentity(UserAssignedIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the provisioningState property: The current provisioning state of the pod identity. - * - * @return the provisioningState value. - */ - public ManagedClusterPodIdentityProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the provisioningInfo property: The provisioningInfo property. - * - * @return the provisioningInfo value. - */ - public ManagedClusterPodIdentityProvisioningInfo provisioningInfo() { - return this.provisioningInfo; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model ManagedClusterPodIdentity")); - } - if (namespace() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property namespace in model ManagedClusterPodIdentity")); - } - if (identity() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property identity in model ManagedClusterPodIdentity")); - } else { - identity().validate(); - } - if (provisioningInfo() != null) { - provisioningInfo().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterPodIdentity.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("namespace", this.namespace); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeStringField("bindingSelector", this.bindingSelector); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterPodIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterPodIdentity 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 ManagedClusterPodIdentity. - */ - public static ManagedClusterPodIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterPodIdentity deserializedManagedClusterPodIdentity = new ManagedClusterPodIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedManagedClusterPodIdentity.name = reader.getString(); - } else if ("namespace".equals(fieldName)) { - deserializedManagedClusterPodIdentity.namespace = reader.getString(); - } else if ("identity".equals(fieldName)) { - deserializedManagedClusterPodIdentity.identity = UserAssignedIdentity.fromJson(reader); - } else if ("bindingSelector".equals(fieldName)) { - deserializedManagedClusterPodIdentity.bindingSelector = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedManagedClusterPodIdentity.provisioningState - = ManagedClusterPodIdentityProvisioningState.fromString(reader.getString()); - } else if ("provisioningInfo".equals(fieldName)) { - deserializedManagedClusterPodIdentity.provisioningInfo - = ManagedClusterPodIdentityProvisioningInfo.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterPodIdentity; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityException.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityException.java deleted file mode 100644 index 100cdff0b894..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityException.java +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -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; - -/** - * A pod identity exception, which allows pods with certain labels to access the Azure Instance Metadata Service (IMDS) - * endpoint without being intercepted by the node-managed identity (NMI) server. See [disable AAD Pod Identity for a - * specific Pod/Application](https://azure.github.io/aad-pod-identity/docs/configure/application_exception/) for more - * details. - */ -@Fluent -public final class ManagedClusterPodIdentityException implements JsonSerializable { - /* - * The name of the pod identity exception. - */ - private String name; - - /* - * The namespace of the pod identity exception. - */ - private String namespace; - - /* - * The pod labels to match. - */ - private Map podLabels; - - /** - * Creates an instance of ManagedClusterPodIdentityException class. - */ - public ManagedClusterPodIdentityException() { - } - - /** - * Get the name property: The name of the pod identity exception. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the pod identity exception. - * - * @param name the name value to set. - * @return the ManagedClusterPodIdentityException object itself. - */ - public ManagedClusterPodIdentityException withName(String name) { - this.name = name; - return this; - } - - /** - * Get the namespace property: The namespace of the pod identity exception. - * - * @return the namespace value. - */ - public String namespace() { - return this.namespace; - } - - /** - * Set the namespace property: The namespace of the pod identity exception. - * - * @param namespace the namespace value to set. - * @return the ManagedClusterPodIdentityException object itself. - */ - public ManagedClusterPodIdentityException withNamespace(String namespace) { - this.namespace = namespace; - return this; - } - - /** - * Get the podLabels property: The pod labels to match. - * - * @return the podLabels value. - */ - public Map podLabels() { - return this.podLabels; - } - - /** - * Set the podLabels property: The pod labels to match. - * - * @param podLabels the podLabels value to set. - * @return the ManagedClusterPodIdentityException object itself. - */ - public ManagedClusterPodIdentityException withPodLabels(Map podLabels) { - this.podLabels = podLabels; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property name in model ManagedClusterPodIdentityException")); - } - if (namespace() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property namespace in model ManagedClusterPodIdentityException")); - } - if (podLabels() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property podLabels in model ManagedClusterPodIdentityException")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterPodIdentityException.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("namespace", this.namespace); - jsonWriter.writeMapField("podLabels", this.podLabels, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterPodIdentityException from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterPodIdentityException 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 ManagedClusterPodIdentityException. - */ - public static ManagedClusterPodIdentityException fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterPodIdentityException deserializedManagedClusterPodIdentityException - = new ManagedClusterPodIdentityException(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedManagedClusterPodIdentityException.name = reader.getString(); - } else if ("namespace".equals(fieldName)) { - deserializedManagedClusterPodIdentityException.namespace = reader.getString(); - } else if ("podLabels".equals(fieldName)) { - Map podLabels = reader.readMap(reader1 -> reader1.getString()); - deserializedManagedClusterPodIdentityException.podLabels = podLabels; - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterPodIdentityException; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProfile.java deleted file mode 100644 index 0a7c6c40a30f..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProfile.java +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 pod identity profile of the Managed Cluster. See [use AAD pod - * identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on pod identity - * integration. - */ -@Fluent -public final class ManagedClusterPodIdentityProfile implements JsonSerializable { - /* - * Whether the pod identity addon is enabled. - */ - private Boolean enabled; - - /* - * Whether pod identity is allowed to run on clusters with Kubenet networking. Running in Kubenet is disabled by - * default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. See [using Kubenet - * network plugin with AAD Pod - * Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure- - * active-directory-pod-managed-identities) for more information. - */ - private Boolean allowNetworkPluginKubenet; - - /* - * The pod identities to use in the cluster. - */ - private List userAssignedIdentities; - - /* - * The pod identity exceptions to allow. - */ - private List userAssignedIdentityExceptions; - - /** - * Creates an instance of ManagedClusterPodIdentityProfile class. - */ - public ManagedClusterPodIdentityProfile() { - } - - /** - * Get the enabled property: Whether the pod identity addon is enabled. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether the pod identity addon is enabled. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterPodIdentityProfile object itself. - */ - public ManagedClusterPodIdentityProfile withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the allowNetworkPluginKubenet property: Whether pod identity is allowed to run on clusters with Kubenet - * networking. Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and - * the risks of IP spoofing. See [using Kubenet network plugin with AAD Pod - * Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) - * for more information. - * - * @return the allowNetworkPluginKubenet value. - */ - public Boolean allowNetworkPluginKubenet() { - return this.allowNetworkPluginKubenet; - } - - /** - * Set the allowNetworkPluginKubenet property: Whether pod identity is allowed to run on clusters with Kubenet - * networking. Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and - * the risks of IP spoofing. See [using Kubenet network plugin with AAD Pod - * Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) - * for more information. - * - * @param allowNetworkPluginKubenet the allowNetworkPluginKubenet value to set. - * @return the ManagedClusterPodIdentityProfile object itself. - */ - public ManagedClusterPodIdentityProfile withAllowNetworkPluginKubenet(Boolean allowNetworkPluginKubenet) { - this.allowNetworkPluginKubenet = allowNetworkPluginKubenet; - return this; - } - - /** - * Get the userAssignedIdentities property: The pod identities to use in the cluster. - * - * @return the userAssignedIdentities value. - */ - public List userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: The pod identities to use in the cluster. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the ManagedClusterPodIdentityProfile object itself. - */ - public ManagedClusterPodIdentityProfile - withUserAssignedIdentities(List userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * Get the userAssignedIdentityExceptions property: The pod identity exceptions to allow. - * - * @return the userAssignedIdentityExceptions value. - */ - public List userAssignedIdentityExceptions() { - return this.userAssignedIdentityExceptions; - } - - /** - * Set the userAssignedIdentityExceptions property: The pod identity exceptions to allow. - * - * @param userAssignedIdentityExceptions the userAssignedIdentityExceptions value to set. - * @return the ManagedClusterPodIdentityProfile object itself. - */ - public ManagedClusterPodIdentityProfile - withUserAssignedIdentityExceptions(List userAssignedIdentityExceptions) { - this.userAssignedIdentityExceptions = userAssignedIdentityExceptions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (userAssignedIdentities() != null) { - userAssignedIdentities().forEach(e -> e.validate()); - } - if (userAssignedIdentityExceptions() != null) { - userAssignedIdentityExceptions().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeBooleanField("allowNetworkPluginKubenet", this.allowNetworkPluginKubenet); - jsonWriter.writeArrayField("userAssignedIdentities", this.userAssignedIdentities, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("userAssignedIdentityExceptions", this.userAssignedIdentityExceptions, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterPodIdentityProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterPodIdentityProfile 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 ManagedClusterPodIdentityProfile. - */ - public static ManagedClusterPodIdentityProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterPodIdentityProfile deserializedManagedClusterPodIdentityProfile - = new ManagedClusterPodIdentityProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterPodIdentityProfile.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("allowNetworkPluginKubenet".equals(fieldName)) { - deserializedManagedClusterPodIdentityProfile.allowNetworkPluginKubenet - = reader.getNullable(JsonReader::getBoolean); - } else if ("userAssignedIdentities".equals(fieldName)) { - List userAssignedIdentities - = reader.readArray(reader1 -> ManagedClusterPodIdentity.fromJson(reader1)); - deserializedManagedClusterPodIdentityProfile.userAssignedIdentities = userAssignedIdentities; - } else if ("userAssignedIdentityExceptions".equals(fieldName)) { - List userAssignedIdentityExceptions - = reader.readArray(reader1 -> ManagedClusterPodIdentityException.fromJson(reader1)); - deserializedManagedClusterPodIdentityProfile.userAssignedIdentityExceptions - = userAssignedIdentityExceptions; - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterPodIdentityProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningError.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningError.java deleted file mode 100644 index e9077e1475ca..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningError.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * An error response from the pod identity provisioning. - */ -@Fluent -public final class ManagedClusterPodIdentityProvisioningError - implements JsonSerializable { - /* - * Details about the error. - */ - private ManagedClusterPodIdentityProvisioningErrorBody error; - - /** - * Creates an instance of ManagedClusterPodIdentityProvisioningError class. - */ - public ManagedClusterPodIdentityProvisioningError() { - } - - /** - * Get the error property: Details about the error. - * - * @return the error value. - */ - public ManagedClusterPodIdentityProvisioningErrorBody error() { - return this.error; - } - - /** - * Set the error property: Details about the error. - * - * @param error the error value to set. - * @return the ManagedClusterPodIdentityProvisioningError object itself. - */ - public ManagedClusterPodIdentityProvisioningError withError(ManagedClusterPodIdentityProvisioningErrorBody error) { - this.error = error; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (error() != null) { - error().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("error", this.error); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterPodIdentityProvisioningError from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterPodIdentityProvisioningError 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 ManagedClusterPodIdentityProvisioningError. - */ - public static ManagedClusterPodIdentityProvisioningError fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterPodIdentityProvisioningError deserializedManagedClusterPodIdentityProvisioningError - = new ManagedClusterPodIdentityProvisioningError(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("error".equals(fieldName)) { - deserializedManagedClusterPodIdentityProvisioningError.error - = ManagedClusterPodIdentityProvisioningErrorBody.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterPodIdentityProvisioningError; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningErrorBody.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningErrorBody.java deleted file mode 100644 index bb3ef75fa8cf..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningErrorBody.java +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * An error response from the pod identity provisioning. - */ -@Fluent -public final class ManagedClusterPodIdentityProvisioningErrorBody - implements JsonSerializable { - /* - * An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - */ - private String code; - - /* - * A message describing the error, intended to be suitable for display in a user interface. - */ - private String message; - - /* - * The target of the particular error. For example, the name of the property in error. - */ - private String target; - - /* - * A list of additional details about the error. - */ - private List details; - - /** - * Creates an instance of ManagedClusterPodIdentityProvisioningErrorBody class. - */ - public ManagedClusterPodIdentityProvisioningErrorBody() { - } - - /** - * Get the code property: An identifier for the error. Codes are invariant and are intended to be consumed - * programmatically. - * - * @return the code value. - */ - public String code() { - return this.code; - } - - /** - * Set the code property: An identifier for the error. Codes are invariant and are intended to be consumed - * programmatically. - * - * @param code the code value to set. - * @return the ManagedClusterPodIdentityProvisioningErrorBody object itself. - */ - public ManagedClusterPodIdentityProvisioningErrorBody withCode(String code) { - this.code = code; - return this; - } - - /** - * Get the message property: A message describing the error, intended to be suitable for display in a user - * interface. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: A message describing the error, intended to be suitable for display in a user - * interface. - * - * @param message the message value to set. - * @return the ManagedClusterPodIdentityProvisioningErrorBody object itself. - */ - public ManagedClusterPodIdentityProvisioningErrorBody withMessage(String message) { - this.message = message; - return this; - } - - /** - * Get the target property: The target of the particular error. For example, the name of the property in error. - * - * @return the target value. - */ - public String target() { - return this.target; - } - - /** - * Set the target property: The target of the particular error. For example, the name of the property in error. - * - * @param target the target value to set. - * @return the ManagedClusterPodIdentityProvisioningErrorBody object itself. - */ - public ManagedClusterPodIdentityProvisioningErrorBody withTarget(String target) { - this.target = target; - return this; - } - - /** - * Get the details property: A list of additional details about the error. - * - * @return the details value. - */ - public List details() { - return this.details; - } - - /** - * Set the details property: A list of additional details about the error. - * - * @param details the details value to set. - * @return the ManagedClusterPodIdentityProvisioningErrorBody object itself. - */ - public ManagedClusterPodIdentityProvisioningErrorBody - withDetails(List details) { - this.details = details; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (details() != null) { - details().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("code", this.code); - jsonWriter.writeStringField("message", this.message); - jsonWriter.writeStringField("target", this.target); - jsonWriter.writeArrayField("details", this.details, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterPodIdentityProvisioningErrorBody from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterPodIdentityProvisioningErrorBody 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 ManagedClusterPodIdentityProvisioningErrorBody. - */ - public static ManagedClusterPodIdentityProvisioningErrorBody fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterPodIdentityProvisioningErrorBody deserializedManagedClusterPodIdentityProvisioningErrorBody - = new ManagedClusterPodIdentityProvisioningErrorBody(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("code".equals(fieldName)) { - deserializedManagedClusterPodIdentityProvisioningErrorBody.code = reader.getString(); - } else if ("message".equals(fieldName)) { - deserializedManagedClusterPodIdentityProvisioningErrorBody.message = reader.getString(); - } else if ("target".equals(fieldName)) { - deserializedManagedClusterPodIdentityProvisioningErrorBody.target = reader.getString(); - } else if ("details".equals(fieldName)) { - List details - = reader.readArray(reader1 -> ManagedClusterPodIdentityProvisioningErrorBody.fromJson(reader1)); - deserializedManagedClusterPodIdentityProvisioningErrorBody.details = details; - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterPodIdentityProvisioningErrorBody; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningInfo.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningInfo.java deleted file mode 100644 index 74967743b474..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningInfo.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 ManagedClusterPodIdentityProvisioningInfo model. - */ -@Fluent -public final class ManagedClusterPodIdentityProvisioningInfo - implements JsonSerializable { - /* - * Pod identity assignment error (if any). - */ - private ManagedClusterPodIdentityProvisioningError error; - - /** - * Creates an instance of ManagedClusterPodIdentityProvisioningInfo class. - */ - public ManagedClusterPodIdentityProvisioningInfo() { - } - - /** - * Get the error property: Pod identity assignment error (if any). - * - * @return the error value. - */ - public ManagedClusterPodIdentityProvisioningError error() { - return this.error; - } - - /** - * Set the error property: Pod identity assignment error (if any). - * - * @param error the error value to set. - * @return the ManagedClusterPodIdentityProvisioningInfo object itself. - */ - public ManagedClusterPodIdentityProvisioningInfo withError(ManagedClusterPodIdentityProvisioningError error) { - this.error = error; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (error() != null) { - error().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("error", this.error); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterPodIdentityProvisioningInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterPodIdentityProvisioningInfo 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 ManagedClusterPodIdentityProvisioningInfo. - */ - public static ManagedClusterPodIdentityProvisioningInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterPodIdentityProvisioningInfo deserializedManagedClusterPodIdentityProvisioningInfo - = new ManagedClusterPodIdentityProvisioningInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("error".equals(fieldName)) { - deserializedManagedClusterPodIdentityProvisioningInfo.error - = ManagedClusterPodIdentityProvisioningError.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterPodIdentityProvisioningInfo; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningState.java deleted file mode 100644 index 546e97059df1..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningState.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The current provisioning state of the pod identity. - */ -public final class ManagedClusterPodIdentityProvisioningState - extends ExpandableStringEnum { - /** - * Static value Assigned for ManagedClusterPodIdentityProvisioningState. - */ - public static final ManagedClusterPodIdentityProvisioningState ASSIGNED = fromString("Assigned"); - - /** - * Static value Canceled for ManagedClusterPodIdentityProvisioningState. - */ - public static final ManagedClusterPodIdentityProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value Deleting for ManagedClusterPodIdentityProvisioningState. - */ - public static final ManagedClusterPodIdentityProvisioningState DELETING = fromString("Deleting"); - - /** - * Static value Failed for ManagedClusterPodIdentityProvisioningState. - */ - public static final ManagedClusterPodIdentityProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Succeeded for ManagedClusterPodIdentityProvisioningState. - */ - public static final ManagedClusterPodIdentityProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Updating for ManagedClusterPodIdentityProvisioningState. - */ - public static final ManagedClusterPodIdentityProvisioningState UPDATING = fromString("Updating"); - - /** - * Creates a new instance of ManagedClusterPodIdentityProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ManagedClusterPodIdentityProvisioningState() { - } - - /** - * Creates or finds a ManagedClusterPodIdentityProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedClusterPodIdentityProvisioningState. - */ - public static ManagedClusterPodIdentityProvisioningState fromString(String name) { - return fromString(name, ManagedClusterPodIdentityProvisioningState.class); - } - - /** - * Gets known ManagedClusterPodIdentityProvisioningState values. - * - * @return known ManagedClusterPodIdentityProvisioningState values. - */ - public static Collection values() { - return values(ManagedClusterPodIdentityProvisioningState.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java deleted file mode 100644 index 433b50af7fe1..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -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 list of available upgrade versions. - */ -@Fluent -public final class ManagedClusterPoolUpgradeProfile implements JsonSerializable { - /* - * The Kubernetes version (major.minor.patch). - */ - private String kubernetesVersion; - - /* - * The Agent Pool name. - */ - private String name; - - /* - * OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - */ - private OSType osType; - - /* - * List of orchestrator types and versions available for upgrade. - */ - private List upgrades; - - /** - * Creates an instance of ManagedClusterPoolUpgradeProfile class. - */ - public ManagedClusterPoolUpgradeProfile() { - } - - /** - * Get the kubernetesVersion property: The Kubernetes version (major.minor.patch). - * - * @return the kubernetesVersion value. - */ - public String kubernetesVersion() { - return this.kubernetesVersion; - } - - /** - * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). - * - * @param kubernetesVersion the kubernetesVersion value to set. - * @return the ManagedClusterPoolUpgradeProfile object itself. - */ - public ManagedClusterPoolUpgradeProfile withKubernetesVersion(String kubernetesVersion) { - this.kubernetesVersion = kubernetesVersion; - return this; - } - - /** - * Get the name property: The Agent Pool name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The Agent Pool name. - * - * @param name the name value to set. - * @return the ManagedClusterPoolUpgradeProfile object itself. - */ - public ManagedClusterPoolUpgradeProfile withName(String name) { - this.name = name; - return this; - } - - /** - * Get the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - * - * @return the osType value. - */ - public OSType osType() { - return this.osType; - } - - /** - * Set the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - * - * @param osType the osType value to set. - * @return the ManagedClusterPoolUpgradeProfile object itself. - */ - public ManagedClusterPoolUpgradeProfile withOsType(OSType osType) { - this.osType = osType; - return this; - } - - /** - * Get the upgrades property: List of orchestrator types and versions available for upgrade. - * - * @return the upgrades value. - */ - public List upgrades() { - return this.upgrades; - } - - /** - * Set the upgrades property: List of orchestrator types and versions available for upgrade. - * - * @param upgrades the upgrades value to set. - * @return the ManagedClusterPoolUpgradeProfile object itself. - */ - public ManagedClusterPoolUpgradeProfile withUpgrades(List upgrades) { - this.upgrades = upgrades; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (kubernetesVersion() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property kubernetesVersion in model ManagedClusterPoolUpgradeProfile")); - } - if (osType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property osType in model ManagedClusterPoolUpgradeProfile")); - } - if (upgrades() != null) { - upgrades().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterPoolUpgradeProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); - jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeArrayField("upgrades", this.upgrades, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterPoolUpgradeProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterPoolUpgradeProfile 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 ManagedClusterPoolUpgradeProfile. - */ - public static ManagedClusterPoolUpgradeProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterPoolUpgradeProfile deserializedManagedClusterPoolUpgradeProfile - = new ManagedClusterPoolUpgradeProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("kubernetesVersion".equals(fieldName)) { - deserializedManagedClusterPoolUpgradeProfile.kubernetesVersion = reader.getString(); - } else if ("osType".equals(fieldName)) { - deserializedManagedClusterPoolUpgradeProfile.osType = OSType.fromString(reader.getString()); - } else if ("name".equals(fieldName)) { - deserializedManagedClusterPoolUpgradeProfile.name = reader.getString(); - } else if ("upgrades".equals(fieldName)) { - List upgrades - = reader.readArray(reader1 -> ManagedClusterPoolUpgradeProfileUpgradesItem.fromJson(reader1)); - deserializedManagedClusterPoolUpgradeProfile.upgrades = upgrades; - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterPoolUpgradeProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java deleted file mode 100644 index 57acd9ecdb9e..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 ManagedClusterPoolUpgradeProfileUpgradesItem model. - */ -@Fluent -public final class ManagedClusterPoolUpgradeProfileUpgradesItem - implements JsonSerializable { - /* - * The Kubernetes version (major.minor.patch). - */ - private String kubernetesVersion; - - /* - * Whether the Kubernetes version is currently in preview. - */ - private Boolean isPreview; - - /** - * Creates an instance of ManagedClusterPoolUpgradeProfileUpgradesItem class. - */ - public ManagedClusterPoolUpgradeProfileUpgradesItem() { - } - - /** - * Get the kubernetesVersion property: The Kubernetes version (major.minor.patch). - * - * @return the kubernetesVersion value. - */ - public String kubernetesVersion() { - return this.kubernetesVersion; - } - - /** - * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). - * - * @param kubernetesVersion the kubernetesVersion value to set. - * @return the ManagedClusterPoolUpgradeProfileUpgradesItem object itself. - */ - public ManagedClusterPoolUpgradeProfileUpgradesItem withKubernetesVersion(String kubernetesVersion) { - this.kubernetesVersion = kubernetesVersion; - return this; - } - - /** - * Get the isPreview property: Whether the Kubernetes version is currently in preview. - * - * @return the isPreview value. - */ - public Boolean isPreview() { - return this.isPreview; - } - - /** - * Set the isPreview property: Whether the Kubernetes version is currently in preview. - * - * @param isPreview the isPreview value to set. - * @return the ManagedClusterPoolUpgradeProfileUpgradesItem object itself. - */ - public ManagedClusterPoolUpgradeProfileUpgradesItem withIsPreview(Boolean isPreview) { - this.isPreview = isPreview; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); - jsonWriter.writeBooleanField("isPreview", this.isPreview); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterPoolUpgradeProfileUpgradesItem from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterPoolUpgradeProfileUpgradesItem 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 ManagedClusterPoolUpgradeProfileUpgradesItem. - */ - public static ManagedClusterPoolUpgradeProfileUpgradesItem fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterPoolUpgradeProfileUpgradesItem deserializedManagedClusterPoolUpgradeProfileUpgradesItem - = new ManagedClusterPoolUpgradeProfileUpgradesItem(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("kubernetesVersion".equals(fieldName)) { - deserializedManagedClusterPoolUpgradeProfileUpgradesItem.kubernetesVersion = reader.getString(); - } else if ("isPreview".equals(fieldName)) { - deserializedManagedClusterPoolUpgradeProfileUpgradesItem.isPreview - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterPoolUpgradeProfileUpgradesItem; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java deleted file mode 100644 index b4e194a1ef21..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java +++ /dev/null @@ -1,735 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Parameters to be applied to the cluster-autoscaler when enabled. - */ -@Fluent -public final class ManagedClusterPropertiesAutoScalerProfile - implements JsonSerializable { - /* - * Detects similar node pools and balances the number of nodes between them. Valid values are 'true' and 'false' - */ - private String balanceSimilarNodeGroups; - - /* - * DaemonSet pods will be gracefully terminated from empty nodes. If set to true, all daemonset pods on empty nodes - * will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen - * for scaling. If set to false, the node will be deleted without ensuring that daemonset pods are deleted or - * evicted. - */ - private Boolean daemonsetEvictionForEmptyNodes; - - /* - * DaemonSet pods will be gracefully terminated from non-empty nodes. If set to true, all daemonset pods on occupied - * nodes will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be - * chosen for scaling. If set to false, the node will be deleted without ensuring that daemonset pods are deleted or - * evicted. - */ - private Boolean daemonsetEvictionForOccupiedNodes; - - /* - * Should CA ignore DaemonSet pods when calculating resource utilization for scaling down. If set to true, the - * resources used by daemonset will be taken into account when making scaling down decisions. - */ - private Boolean ignoreDaemonsetsUtilization; - - /* - * The expander to use when scaling up. If not specified, the default is 'random'. See - * [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) - * for more information. - */ - private Expander expander; - - /* - * The maximum number of empty nodes that can be deleted at the same time. This must be a positive integer. The - * default is 10. - */ - private String maxEmptyBulkDelete; - - /* - * The maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node. - * The default is 600. - */ - private String maxGracefulTerminationSec; - - /* - * The maximum time the autoscaler waits for a node to be provisioned. The default is '15m'. Values must be an - * integer followed by an 'm'. No unit of time other than minutes (m) is supported. - */ - private String maxNodeProvisionTime; - - /* - * The maximum percentage of unready nodes in the cluster. After this percentage is exceeded, cluster autoscaler - * halts operations. The default is 45. The maximum is 100 and the minimum is 0. - */ - private String maxTotalUnreadyPercentage; - - /* - * Ignore unscheduled pods before they're a certain age. For scenarios like burst/batch scale where you don't want - * CA to act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods - * before they're a certain age. The default is '0s'. Values must be an integer followed by a unit ('s' for seconds, - * 'm' for minutes, 'h' for hours, etc). - */ - private String newPodScaleUpDelay; - - /* - * The number of allowed unready nodes, irrespective of max-total-unready-percentage. This must be an integer. The - * default is 3. - */ - private String okTotalUnreadyCount; - - /* - * How often cluster is reevaluated for scale up or down. The default is '10'. Values must be an integer number of - * seconds. - */ - private String scanInterval; - - /* - * How long after scale up that scale down evaluation resumes. The default is '10m'. Values must be an integer - * followed by an 'm'. No unit of time other than minutes (m) is supported. - */ - private String scaleDownDelayAfterAdd; - - /* - * How long after node deletion that scale down evaluation resumes. The default is the scan-interval. Values must be - * an integer followed by an 'm'. No unit of time other than minutes (m) is supported. - */ - private String scaleDownDelayAfterDelete; - - /* - * How long after scale down failure that scale down evaluation resumes. The default is '3m'. Values must be an - * integer followed by an 'm'. No unit of time other than minutes (m) is supported. - */ - private String scaleDownDelayAfterFailure; - - /* - * How long a node should be unneeded before it is eligible for scale down. The default is '10m'. Values must be an - * integer followed by an 'm'. No unit of time other than minutes (m) is supported. - */ - private String scaleDownUnneededTime; - - /* - * How long an unready node should be unneeded before it is eligible for scale down. The default is '20m'. Values - * must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. - */ - private String scaleDownUnreadyTime; - - /* - * Node utilization level, defined as sum of requested resources divided by capacity, below which a node can be - * considered for scale down. The default is '0.5'. - */ - private String scaleDownUtilizationThreshold; - - /* - * If cluster autoscaler will skip deleting nodes with pods with local storage, for example, EmptyDir or HostPath. - * The default is true. - */ - private String skipNodesWithLocalStorage; - - /* - * If cluster autoscaler will skip deleting nodes with pods from kube-system (except for DaemonSet or mirror pods). - * The default is true. - */ - private String skipNodesWithSystemPods; - - /** - * Creates an instance of ManagedClusterPropertiesAutoScalerProfile class. - */ - public ManagedClusterPropertiesAutoScalerProfile() { - } - - /** - * Get the balanceSimilarNodeGroups property: Detects similar node pools and balances the number of nodes between - * them. Valid values are 'true' and 'false'. - * - * @return the balanceSimilarNodeGroups value. - */ - public String balanceSimilarNodeGroups() { - return this.balanceSimilarNodeGroups; - } - - /** - * Set the balanceSimilarNodeGroups property: Detects similar node pools and balances the number of nodes between - * them. Valid values are 'true' and 'false'. - * - * @param balanceSimilarNodeGroups the balanceSimilarNodeGroups value to set. - * @return the ManagedClusterPropertiesAutoScalerProfile object itself. - */ - public ManagedClusterPropertiesAutoScalerProfile withBalanceSimilarNodeGroups(String balanceSimilarNodeGroups) { - this.balanceSimilarNodeGroups = balanceSimilarNodeGroups; - return this; - } - - /** - * Get the daemonsetEvictionForEmptyNodes property: DaemonSet pods will be gracefully terminated from empty nodes. - * If set to true, all daemonset pods on empty nodes will be evicted before deletion of the node. If the daemonset - * pod cannot be evicted another node will be chosen for scaling. If set to false, the node will be deleted without - * ensuring that daemonset pods are deleted or evicted. - * - * @return the daemonsetEvictionForEmptyNodes value. - */ - public Boolean daemonsetEvictionForEmptyNodes() { - return this.daemonsetEvictionForEmptyNodes; - } - - /** - * Set the daemonsetEvictionForEmptyNodes property: DaemonSet pods will be gracefully terminated from empty nodes. - * If set to true, all daemonset pods on empty nodes will be evicted before deletion of the node. If the daemonset - * pod cannot be evicted another node will be chosen for scaling. If set to false, the node will be deleted without - * ensuring that daemonset pods are deleted or evicted. - * - * @param daemonsetEvictionForEmptyNodes the daemonsetEvictionForEmptyNodes value to set. - * @return the ManagedClusterPropertiesAutoScalerProfile object itself. - */ - public ManagedClusterPropertiesAutoScalerProfile - withDaemonsetEvictionForEmptyNodes(Boolean daemonsetEvictionForEmptyNodes) { - this.daemonsetEvictionForEmptyNodes = daemonsetEvictionForEmptyNodes; - return this; - } - - /** - * Get the daemonsetEvictionForOccupiedNodes property: DaemonSet pods will be gracefully terminated from non-empty - * nodes. If set to true, all daemonset pods on occupied nodes will be evicted before deletion of the node. If the - * daemonset pod cannot be evicted another node will be chosen for scaling. If set to false, the node will be - * deleted without ensuring that daemonset pods are deleted or evicted. - * - * @return the daemonsetEvictionForOccupiedNodes value. - */ - public Boolean daemonsetEvictionForOccupiedNodes() { - return this.daemonsetEvictionForOccupiedNodes; - } - - /** - * Set the daemonsetEvictionForOccupiedNodes property: DaemonSet pods will be gracefully terminated from non-empty - * nodes. If set to true, all daemonset pods on occupied nodes will be evicted before deletion of the node. If the - * daemonset pod cannot be evicted another node will be chosen for scaling. If set to false, the node will be - * deleted without ensuring that daemonset pods are deleted or evicted. - * - * @param daemonsetEvictionForOccupiedNodes the daemonsetEvictionForOccupiedNodes value to set. - * @return the ManagedClusterPropertiesAutoScalerProfile object itself. - */ - public ManagedClusterPropertiesAutoScalerProfile - withDaemonsetEvictionForOccupiedNodes(Boolean daemonsetEvictionForOccupiedNodes) { - this.daemonsetEvictionForOccupiedNodes = daemonsetEvictionForOccupiedNodes; - return this; - } - - /** - * Get the ignoreDaemonsetsUtilization property: Should CA ignore DaemonSet pods when calculating resource - * utilization for scaling down. If set to true, the resources used by daemonset will be taken into account when - * making scaling down decisions. - * - * @return the ignoreDaemonsetsUtilization value. - */ - public Boolean ignoreDaemonsetsUtilization() { - return this.ignoreDaemonsetsUtilization; - } - - /** - * Set the ignoreDaemonsetsUtilization property: Should CA ignore DaemonSet pods when calculating resource - * utilization for scaling down. If set to true, the resources used by daemonset will be taken into account when - * making scaling down decisions. - * - * @param ignoreDaemonsetsUtilization the ignoreDaemonsetsUtilization value to set. - * @return the ManagedClusterPropertiesAutoScalerProfile object itself. - */ - public ManagedClusterPropertiesAutoScalerProfile - withIgnoreDaemonsetsUtilization(Boolean ignoreDaemonsetsUtilization) { - this.ignoreDaemonsetsUtilization = ignoreDaemonsetsUtilization; - return this; - } - - /** - * Get the expander property: The expander to use when scaling up. If not specified, the default is 'random'. See - * [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) - * for more information. - * - * @return the expander value. - */ - public Expander expander() { - return this.expander; - } - - /** - * Set the expander property: The expander to use when scaling up. If not specified, the default is 'random'. See - * [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) - * for more information. - * - * @param expander the expander value to set. - * @return the ManagedClusterPropertiesAutoScalerProfile object itself. - */ - public ManagedClusterPropertiesAutoScalerProfile withExpander(Expander expander) { - this.expander = expander; - return this; - } - - /** - * Get the maxEmptyBulkDelete property: The maximum number of empty nodes that can be deleted at the same time. This - * must be a positive integer. The default is 10. - * - * @return the maxEmptyBulkDelete value. - */ - public String maxEmptyBulkDelete() { - return this.maxEmptyBulkDelete; - } - - /** - * Set the maxEmptyBulkDelete property: The maximum number of empty nodes that can be deleted at the same time. This - * must be a positive integer. The default is 10. - * - * @param maxEmptyBulkDelete the maxEmptyBulkDelete value to set. - * @return the ManagedClusterPropertiesAutoScalerProfile object itself. - */ - public ManagedClusterPropertiesAutoScalerProfile withMaxEmptyBulkDelete(String maxEmptyBulkDelete) { - this.maxEmptyBulkDelete = maxEmptyBulkDelete; - return this; - } - - /** - * Get the maxGracefulTerminationSec property: The maximum number of seconds the cluster autoscaler waits for pod - * termination when trying to scale down a node. The default is 600. - * - * @return the maxGracefulTerminationSec value. - */ - public String maxGracefulTerminationSec() { - return this.maxGracefulTerminationSec; - } - - /** - * Set the maxGracefulTerminationSec property: The maximum number of seconds the cluster autoscaler waits for pod - * termination when trying to scale down a node. The default is 600. - * - * @param maxGracefulTerminationSec the maxGracefulTerminationSec value to set. - * @return the ManagedClusterPropertiesAutoScalerProfile object itself. - */ - public ManagedClusterPropertiesAutoScalerProfile withMaxGracefulTerminationSec(String maxGracefulTerminationSec) { - this.maxGracefulTerminationSec = maxGracefulTerminationSec; - return this; - } - - /** - * Get the maxNodeProvisionTime property: The maximum time the autoscaler waits for a node to be provisioned. The - * default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is - * supported. - * - * @return the maxNodeProvisionTime value. - */ - public String maxNodeProvisionTime() { - return this.maxNodeProvisionTime; - } - - /** - * Set the maxNodeProvisionTime property: The maximum time the autoscaler waits for a node to be provisioned. The - * default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is - * supported. - * - * @param maxNodeProvisionTime the maxNodeProvisionTime value to set. - * @return the ManagedClusterPropertiesAutoScalerProfile object itself. - */ - public ManagedClusterPropertiesAutoScalerProfile withMaxNodeProvisionTime(String maxNodeProvisionTime) { - this.maxNodeProvisionTime = maxNodeProvisionTime; - return this; - } - - /** - * Get the maxTotalUnreadyPercentage property: The maximum percentage of unready nodes in the cluster. After this - * percentage is exceeded, cluster autoscaler halts operations. The default is 45. The maximum is 100 and the - * minimum is 0. - * - * @return the maxTotalUnreadyPercentage value. - */ - public String maxTotalUnreadyPercentage() { - return this.maxTotalUnreadyPercentage; - } - - /** - * Set the maxTotalUnreadyPercentage property: The maximum percentage of unready nodes in the cluster. After this - * percentage is exceeded, cluster autoscaler halts operations. The default is 45. The maximum is 100 and the - * minimum is 0. - * - * @param maxTotalUnreadyPercentage the maxTotalUnreadyPercentage value to set. - * @return the ManagedClusterPropertiesAutoScalerProfile object itself. - */ - public ManagedClusterPropertiesAutoScalerProfile withMaxTotalUnreadyPercentage(String maxTotalUnreadyPercentage) { - this.maxTotalUnreadyPercentage = maxTotalUnreadyPercentage; - return this; - } - - /** - * Get the newPodScaleUpDelay property: Ignore unscheduled pods before they're a certain age. For scenarios like - * burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all the pods, you - * can tell CA to ignore unscheduled pods before they're a certain age. The default is '0s'. Values must be an - * integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). - * - * @return the newPodScaleUpDelay value. - */ - public String newPodScaleUpDelay() { - return this.newPodScaleUpDelay; - } - - /** - * Set the newPodScaleUpDelay property: Ignore unscheduled pods before they're a certain age. For scenarios like - * burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all the pods, you - * can tell CA to ignore unscheduled pods before they're a certain age. The default is '0s'. Values must be an - * integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). - * - * @param newPodScaleUpDelay the newPodScaleUpDelay value to set. - * @return the ManagedClusterPropertiesAutoScalerProfile object itself. - */ - public ManagedClusterPropertiesAutoScalerProfile withNewPodScaleUpDelay(String newPodScaleUpDelay) { - this.newPodScaleUpDelay = newPodScaleUpDelay; - return this; - } - - /** - * Get the okTotalUnreadyCount property: The number of allowed unready nodes, irrespective of - * max-total-unready-percentage. This must be an integer. The default is 3. - * - * @return the okTotalUnreadyCount value. - */ - public String okTotalUnreadyCount() { - return this.okTotalUnreadyCount; - } - - /** - * Set the okTotalUnreadyCount property: The number of allowed unready nodes, irrespective of - * max-total-unready-percentage. This must be an integer. The default is 3. - * - * @param okTotalUnreadyCount the okTotalUnreadyCount value to set. - * @return the ManagedClusterPropertiesAutoScalerProfile object itself. - */ - public ManagedClusterPropertiesAutoScalerProfile withOkTotalUnreadyCount(String okTotalUnreadyCount) { - this.okTotalUnreadyCount = okTotalUnreadyCount; - return this; - } - - /** - * Get the scanInterval property: How often cluster is reevaluated for scale up or down. The default is '10'. Values - * must be an integer number of seconds. - * - * @return the scanInterval value. - */ - public String scanInterval() { - return this.scanInterval; - } - - /** - * Set the scanInterval property: How often cluster is reevaluated for scale up or down. The default is '10'. Values - * must be an integer number of seconds. - * - * @param scanInterval the scanInterval value to set. - * @return the ManagedClusterPropertiesAutoScalerProfile object itself. - */ - public ManagedClusterPropertiesAutoScalerProfile withScanInterval(String scanInterval) { - this.scanInterval = scanInterval; - return this; - } - - /** - * Get the scaleDownDelayAfterAdd property: How long after scale up that scale down evaluation resumes. The default - * is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. - * - * @return the scaleDownDelayAfterAdd value. - */ - public String scaleDownDelayAfterAdd() { - return this.scaleDownDelayAfterAdd; - } - - /** - * Set the scaleDownDelayAfterAdd property: How long after scale up that scale down evaluation resumes. The default - * is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. - * - * @param scaleDownDelayAfterAdd the scaleDownDelayAfterAdd value to set. - * @return the ManagedClusterPropertiesAutoScalerProfile object itself. - */ - public ManagedClusterPropertiesAutoScalerProfile withScaleDownDelayAfterAdd(String scaleDownDelayAfterAdd) { - this.scaleDownDelayAfterAdd = scaleDownDelayAfterAdd; - return this; - } - - /** - * Get the scaleDownDelayAfterDelete property: How long after node deletion that scale down evaluation resumes. The - * default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes - * (m) is supported. - * - * @return the scaleDownDelayAfterDelete value. - */ - public String scaleDownDelayAfterDelete() { - return this.scaleDownDelayAfterDelete; - } - - /** - * Set the scaleDownDelayAfterDelete property: How long after node deletion that scale down evaluation resumes. The - * default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes - * (m) is supported. - * - * @param scaleDownDelayAfterDelete the scaleDownDelayAfterDelete value to set. - * @return the ManagedClusterPropertiesAutoScalerProfile object itself. - */ - public ManagedClusterPropertiesAutoScalerProfile withScaleDownDelayAfterDelete(String scaleDownDelayAfterDelete) { - this.scaleDownDelayAfterDelete = scaleDownDelayAfterDelete; - return this; - } - - /** - * Get the scaleDownDelayAfterFailure property: How long after scale down failure that scale down evaluation - * resumes. The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes - * (m) is supported. - * - * @return the scaleDownDelayAfterFailure value. - */ - public String scaleDownDelayAfterFailure() { - return this.scaleDownDelayAfterFailure; - } - - /** - * Set the scaleDownDelayAfterFailure property: How long after scale down failure that scale down evaluation - * resumes. The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes - * (m) is supported. - * - * @param scaleDownDelayAfterFailure the scaleDownDelayAfterFailure value to set. - * @return the ManagedClusterPropertiesAutoScalerProfile object itself. - */ - public ManagedClusterPropertiesAutoScalerProfile withScaleDownDelayAfterFailure(String scaleDownDelayAfterFailure) { - this.scaleDownDelayAfterFailure = scaleDownDelayAfterFailure; - return this; - } - - /** - * Get the scaleDownUnneededTime property: How long a node should be unneeded before it is eligible for scale down. - * The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is - * supported. - * - * @return the scaleDownUnneededTime value. - */ - public String scaleDownUnneededTime() { - return this.scaleDownUnneededTime; - } - - /** - * Set the scaleDownUnneededTime property: How long a node should be unneeded before it is eligible for scale down. - * The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is - * supported. - * - * @param scaleDownUnneededTime the scaleDownUnneededTime value to set. - * @return the ManagedClusterPropertiesAutoScalerProfile object itself. - */ - public ManagedClusterPropertiesAutoScalerProfile withScaleDownUnneededTime(String scaleDownUnneededTime) { - this.scaleDownUnneededTime = scaleDownUnneededTime; - return this; - } - - /** - * Get the scaleDownUnreadyTime property: How long an unready node should be unneeded before it is eligible for - * scale down. The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than - * minutes (m) is supported. - * - * @return the scaleDownUnreadyTime value. - */ - public String scaleDownUnreadyTime() { - return this.scaleDownUnreadyTime; - } - - /** - * Set the scaleDownUnreadyTime property: How long an unready node should be unneeded before it is eligible for - * scale down. The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than - * minutes (m) is supported. - * - * @param scaleDownUnreadyTime the scaleDownUnreadyTime value to set. - * @return the ManagedClusterPropertiesAutoScalerProfile object itself. - */ - public ManagedClusterPropertiesAutoScalerProfile withScaleDownUnreadyTime(String scaleDownUnreadyTime) { - this.scaleDownUnreadyTime = scaleDownUnreadyTime; - return this; - } - - /** - * Get the scaleDownUtilizationThreshold property: Node utilization level, defined as sum of requested resources - * divided by capacity, below which a node can be considered for scale down. The default is '0.5'. - * - * @return the scaleDownUtilizationThreshold value. - */ - public String scaleDownUtilizationThreshold() { - return this.scaleDownUtilizationThreshold; - } - - /** - * Set the scaleDownUtilizationThreshold property: Node utilization level, defined as sum of requested resources - * divided by capacity, below which a node can be considered for scale down. The default is '0.5'. - * - * @param scaleDownUtilizationThreshold the scaleDownUtilizationThreshold value to set. - * @return the ManagedClusterPropertiesAutoScalerProfile object itself. - */ - public ManagedClusterPropertiesAutoScalerProfile - withScaleDownUtilizationThreshold(String scaleDownUtilizationThreshold) { - this.scaleDownUtilizationThreshold = scaleDownUtilizationThreshold; - return this; - } - - /** - * Get the skipNodesWithLocalStorage property: If cluster autoscaler will skip deleting nodes with pods with local - * storage, for example, EmptyDir or HostPath. The default is true. - * - * @return the skipNodesWithLocalStorage value. - */ - public String skipNodesWithLocalStorage() { - return this.skipNodesWithLocalStorage; - } - - /** - * Set the skipNodesWithLocalStorage property: If cluster autoscaler will skip deleting nodes with pods with local - * storage, for example, EmptyDir or HostPath. The default is true. - * - * @param skipNodesWithLocalStorage the skipNodesWithLocalStorage value to set. - * @return the ManagedClusterPropertiesAutoScalerProfile object itself. - */ - public ManagedClusterPropertiesAutoScalerProfile withSkipNodesWithLocalStorage(String skipNodesWithLocalStorage) { - this.skipNodesWithLocalStorage = skipNodesWithLocalStorage; - return this; - } - - /** - * Get the skipNodesWithSystemPods property: If cluster autoscaler will skip deleting nodes with pods from - * kube-system (except for DaemonSet or mirror pods). The default is true. - * - * @return the skipNodesWithSystemPods value. - */ - public String skipNodesWithSystemPods() { - return this.skipNodesWithSystemPods; - } - - /** - * Set the skipNodesWithSystemPods property: If cluster autoscaler will skip deleting nodes with pods from - * kube-system (except for DaemonSet or mirror pods). The default is true. - * - * @param skipNodesWithSystemPods the skipNodesWithSystemPods value to set. - * @return the ManagedClusterPropertiesAutoScalerProfile object itself. - */ - public ManagedClusterPropertiesAutoScalerProfile withSkipNodesWithSystemPods(String skipNodesWithSystemPods) { - this.skipNodesWithSystemPods = skipNodesWithSystemPods; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("balance-similar-node-groups", this.balanceSimilarNodeGroups); - jsonWriter.writeBooleanField("daemonset-eviction-for-empty-nodes", this.daemonsetEvictionForEmptyNodes); - jsonWriter.writeBooleanField("daemonset-eviction-for-occupied-nodes", this.daemonsetEvictionForOccupiedNodes); - jsonWriter.writeBooleanField("ignore-daemonsets-utilization", this.ignoreDaemonsetsUtilization); - jsonWriter.writeStringField("expander", this.expander == null ? null : this.expander.toString()); - jsonWriter.writeStringField("max-empty-bulk-delete", this.maxEmptyBulkDelete); - jsonWriter.writeStringField("max-graceful-termination-sec", this.maxGracefulTerminationSec); - jsonWriter.writeStringField("max-node-provision-time", this.maxNodeProvisionTime); - jsonWriter.writeStringField("max-total-unready-percentage", this.maxTotalUnreadyPercentage); - jsonWriter.writeStringField("new-pod-scale-up-delay", this.newPodScaleUpDelay); - jsonWriter.writeStringField("ok-total-unready-count", this.okTotalUnreadyCount); - jsonWriter.writeStringField("scan-interval", this.scanInterval); - jsonWriter.writeStringField("scale-down-delay-after-add", this.scaleDownDelayAfterAdd); - jsonWriter.writeStringField("scale-down-delay-after-delete", this.scaleDownDelayAfterDelete); - jsonWriter.writeStringField("scale-down-delay-after-failure", this.scaleDownDelayAfterFailure); - jsonWriter.writeStringField("scale-down-unneeded-time", this.scaleDownUnneededTime); - jsonWriter.writeStringField("scale-down-unready-time", this.scaleDownUnreadyTime); - jsonWriter.writeStringField("scale-down-utilization-threshold", this.scaleDownUtilizationThreshold); - jsonWriter.writeStringField("skip-nodes-with-local-storage", this.skipNodesWithLocalStorage); - jsonWriter.writeStringField("skip-nodes-with-system-pods", this.skipNodesWithSystemPods); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterPropertiesAutoScalerProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterPropertiesAutoScalerProfile 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 ManagedClusterPropertiesAutoScalerProfile. - */ - public static ManagedClusterPropertiesAutoScalerProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterPropertiesAutoScalerProfile deserializedManagedClusterPropertiesAutoScalerProfile - = new ManagedClusterPropertiesAutoScalerProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("balance-similar-node-groups".equals(fieldName)) { - deserializedManagedClusterPropertiesAutoScalerProfile.balanceSimilarNodeGroups = reader.getString(); - } else if ("daemonset-eviction-for-empty-nodes".equals(fieldName)) { - deserializedManagedClusterPropertiesAutoScalerProfile.daemonsetEvictionForEmptyNodes - = reader.getNullable(JsonReader::getBoolean); - } else if ("daemonset-eviction-for-occupied-nodes".equals(fieldName)) { - deserializedManagedClusterPropertiesAutoScalerProfile.daemonsetEvictionForOccupiedNodes - = reader.getNullable(JsonReader::getBoolean); - } else if ("ignore-daemonsets-utilization".equals(fieldName)) { - deserializedManagedClusterPropertiesAutoScalerProfile.ignoreDaemonsetsUtilization - = reader.getNullable(JsonReader::getBoolean); - } else if ("expander".equals(fieldName)) { - deserializedManagedClusterPropertiesAutoScalerProfile.expander - = Expander.fromString(reader.getString()); - } else if ("max-empty-bulk-delete".equals(fieldName)) { - deserializedManagedClusterPropertiesAutoScalerProfile.maxEmptyBulkDelete = reader.getString(); - } else if ("max-graceful-termination-sec".equals(fieldName)) { - deserializedManagedClusterPropertiesAutoScalerProfile.maxGracefulTerminationSec - = reader.getString(); - } else if ("max-node-provision-time".equals(fieldName)) { - deserializedManagedClusterPropertiesAutoScalerProfile.maxNodeProvisionTime = reader.getString(); - } else if ("max-total-unready-percentage".equals(fieldName)) { - deserializedManagedClusterPropertiesAutoScalerProfile.maxTotalUnreadyPercentage - = reader.getString(); - } else if ("new-pod-scale-up-delay".equals(fieldName)) { - deserializedManagedClusterPropertiesAutoScalerProfile.newPodScaleUpDelay = reader.getString(); - } else if ("ok-total-unready-count".equals(fieldName)) { - deserializedManagedClusterPropertiesAutoScalerProfile.okTotalUnreadyCount = reader.getString(); - } else if ("scan-interval".equals(fieldName)) { - deserializedManagedClusterPropertiesAutoScalerProfile.scanInterval = reader.getString(); - } else if ("scale-down-delay-after-add".equals(fieldName)) { - deserializedManagedClusterPropertiesAutoScalerProfile.scaleDownDelayAfterAdd = reader.getString(); - } else if ("scale-down-delay-after-delete".equals(fieldName)) { - deserializedManagedClusterPropertiesAutoScalerProfile.scaleDownDelayAfterDelete - = reader.getString(); - } else if ("scale-down-delay-after-failure".equals(fieldName)) { - deserializedManagedClusterPropertiesAutoScalerProfile.scaleDownDelayAfterFailure - = reader.getString(); - } else if ("scale-down-unneeded-time".equals(fieldName)) { - deserializedManagedClusterPropertiesAutoScalerProfile.scaleDownUnneededTime = reader.getString(); - } else if ("scale-down-unready-time".equals(fieldName)) { - deserializedManagedClusterPropertiesAutoScalerProfile.scaleDownUnreadyTime = reader.getString(); - } else if ("scale-down-utilization-threshold".equals(fieldName)) { - deserializedManagedClusterPropertiesAutoScalerProfile.scaleDownUtilizationThreshold - = reader.getString(); - } else if ("skip-nodes-with-local-storage".equals(fieldName)) { - deserializedManagedClusterPropertiesAutoScalerProfile.skipNodesWithLocalStorage - = reader.getString(); - } else if ("skip-nodes-with-system-pods".equals(fieldName)) { - deserializedManagedClusterPropertiesAutoScalerProfile.skipNodesWithSystemPods = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterPropertiesAutoScalerProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java deleted file mode 100644 index 014323f743dc..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Security profile for the container service cluster. - */ -@Fluent -public final class ManagedClusterSecurityProfile implements JsonSerializable { - /* - * Microsoft Defender settings for the security profile. - */ - private ManagedClusterSecurityProfileDefender defender; - - /* - * Azure Key Vault [key management service](https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/) - * settings for the security profile. - */ - private AzureKeyVaultKms azureKeyVaultKms; - - /* - * Workload identity settings for the security profile. Workload identity enables Kubernetes applications to access - * Azure cloud resources securely with Azure AD. See https://aka.ms/aks/wi for more details. - */ - private ManagedClusterSecurityProfileWorkloadIdentity workloadIdentity; - - /* - * Image Cleaner settings for the security profile. - */ - private ManagedClusterSecurityProfileImageCleaner imageCleaner; - - /* - * A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more - * information see [Custom CA Trust - * Certificates](https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority). - */ - private List customCATrustCertificates; - - /** - * Creates an instance of ManagedClusterSecurityProfile class. - */ - public ManagedClusterSecurityProfile() { - } - - /** - * Get the defender property: Microsoft Defender settings for the security profile. - * - * @return the defender value. - */ - public ManagedClusterSecurityProfileDefender defender() { - return this.defender; - } - - /** - * Set the defender property: Microsoft Defender settings for the security profile. - * - * @param defender the defender value to set. - * @return the ManagedClusterSecurityProfile object itself. - */ - public ManagedClusterSecurityProfile withDefender(ManagedClusterSecurityProfileDefender defender) { - this.defender = defender; - return this; - } - - /** - * Get the azureKeyVaultKms property: Azure Key Vault [key management - * service](https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/) settings for the security profile. - * - * @return the azureKeyVaultKms value. - */ - public AzureKeyVaultKms azureKeyVaultKms() { - return this.azureKeyVaultKms; - } - - /** - * Set the azureKeyVaultKms property: Azure Key Vault [key management - * service](https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/) settings for the security profile. - * - * @param azureKeyVaultKms the azureKeyVaultKms value to set. - * @return the ManagedClusterSecurityProfile object itself. - */ - public ManagedClusterSecurityProfile withAzureKeyVaultKms(AzureKeyVaultKms azureKeyVaultKms) { - this.azureKeyVaultKms = azureKeyVaultKms; - return this; - } - - /** - * Get the workloadIdentity property: Workload identity settings for the security profile. Workload identity enables - * Kubernetes applications to access Azure cloud resources securely with Azure AD. See https://aka.ms/aks/wi for - * more details. - * - * @return the workloadIdentity value. - */ - public ManagedClusterSecurityProfileWorkloadIdentity workloadIdentity() { - return this.workloadIdentity; - } - - /** - * Set the workloadIdentity property: Workload identity settings for the security profile. Workload identity enables - * Kubernetes applications to access Azure cloud resources securely with Azure AD. See https://aka.ms/aks/wi for - * more details. - * - * @param workloadIdentity the workloadIdentity value to set. - * @return the ManagedClusterSecurityProfile object itself. - */ - public ManagedClusterSecurityProfile - withWorkloadIdentity(ManagedClusterSecurityProfileWorkloadIdentity workloadIdentity) { - this.workloadIdentity = workloadIdentity; - return this; - } - - /** - * Get the imageCleaner property: Image Cleaner settings for the security profile. - * - * @return the imageCleaner value. - */ - public ManagedClusterSecurityProfileImageCleaner imageCleaner() { - return this.imageCleaner; - } - - /** - * Set the imageCleaner property: Image Cleaner settings for the security profile. - * - * @param imageCleaner the imageCleaner value to set. - * @return the ManagedClusterSecurityProfile object itself. - */ - public ManagedClusterSecurityProfile withImageCleaner(ManagedClusterSecurityProfileImageCleaner imageCleaner) { - this.imageCleaner = imageCleaner; - return this; - } - - /** - * Get the customCATrustCertificates property: A list of up to 10 base64 encoded CAs that will be added to the trust - * store on all nodes in the cluster. For more information see [Custom CA Trust - * Certificates](https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority). - * - * @return the customCATrustCertificates value. - */ - public List customCATrustCertificates() { - return this.customCATrustCertificates; - } - - /** - * Set the customCATrustCertificates property: A list of up to 10 base64 encoded CAs that will be added to the trust - * store on all nodes in the cluster. For more information see [Custom CA Trust - * Certificates](https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority). - * - * @param customCATrustCertificates the customCATrustCertificates value to set. - * @return the ManagedClusterSecurityProfile object itself. - */ - public ManagedClusterSecurityProfile withCustomCATrustCertificates(List customCATrustCertificates) { - this.customCATrustCertificates = customCATrustCertificates; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (defender() != null) { - defender().validate(); - } - if (azureKeyVaultKms() != null) { - azureKeyVaultKms().validate(); - } - if (workloadIdentity() != null) { - workloadIdentity().validate(); - } - if (imageCleaner() != null) { - imageCleaner().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("defender", this.defender); - jsonWriter.writeJsonField("azureKeyVaultKms", this.azureKeyVaultKms); - jsonWriter.writeJsonField("workloadIdentity", this.workloadIdentity); - jsonWriter.writeJsonField("imageCleaner", this.imageCleaner); - jsonWriter.writeArrayField("customCATrustCertificates", this.customCATrustCertificates, - (writer, element) -> writer.writeBinary(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterSecurityProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterSecurityProfile 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 ManagedClusterSecurityProfile. - */ - public static ManagedClusterSecurityProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterSecurityProfile deserializedManagedClusterSecurityProfile - = new ManagedClusterSecurityProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("defender".equals(fieldName)) { - deserializedManagedClusterSecurityProfile.defender - = ManagedClusterSecurityProfileDefender.fromJson(reader); - } else if ("azureKeyVaultKms".equals(fieldName)) { - deserializedManagedClusterSecurityProfile.azureKeyVaultKms = AzureKeyVaultKms.fromJson(reader); - } else if ("workloadIdentity".equals(fieldName)) { - deserializedManagedClusterSecurityProfile.workloadIdentity - = ManagedClusterSecurityProfileWorkloadIdentity.fromJson(reader); - } else if ("imageCleaner".equals(fieldName)) { - deserializedManagedClusterSecurityProfile.imageCleaner - = ManagedClusterSecurityProfileImageCleaner.fromJson(reader); - } else if ("customCATrustCertificates".equals(fieldName)) { - List customCATrustCertificates = reader.readArray(reader1 -> reader1.getBinary()); - deserializedManagedClusterSecurityProfile.customCATrustCertificates = customCATrustCertificates; - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterSecurityProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java deleted file mode 100644 index 78e8613b9bdb..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Microsoft Defender settings for the security profile. - */ -@Fluent -public final class ManagedClusterSecurityProfileDefender - implements JsonSerializable { - /* - * Resource ID of the Log Analytics workspace to be associated with Microsoft Defender. When Microsoft Defender is - * enabled, this field is required and must be a valid workspace resource ID. When Microsoft Defender is disabled, - * leave the field empty. - */ - private String logAnalyticsWorkspaceResourceId; - - /* - * Microsoft Defender threat detection for Cloud settings for the security profile. - */ - private ManagedClusterSecurityProfileDefenderSecurityMonitoring securityMonitoring; - - /** - * Creates an instance of ManagedClusterSecurityProfileDefender class. - */ - public ManagedClusterSecurityProfileDefender() { - } - - /** - * Get the logAnalyticsWorkspaceResourceId property: Resource ID of the Log Analytics workspace to be associated - * with Microsoft Defender. When Microsoft Defender is enabled, this field is required and must be a valid workspace - * resource ID. When Microsoft Defender is disabled, leave the field empty. - * - * @return the logAnalyticsWorkspaceResourceId value. - */ - public String logAnalyticsWorkspaceResourceId() { - return this.logAnalyticsWorkspaceResourceId; - } - - /** - * Set the logAnalyticsWorkspaceResourceId property: Resource ID of the Log Analytics workspace to be associated - * with Microsoft Defender. When Microsoft Defender is enabled, this field is required and must be a valid workspace - * resource ID. When Microsoft Defender is disabled, leave the field empty. - * - * @param logAnalyticsWorkspaceResourceId the logAnalyticsWorkspaceResourceId value to set. - * @return the ManagedClusterSecurityProfileDefender object itself. - */ - public ManagedClusterSecurityProfileDefender - withLogAnalyticsWorkspaceResourceId(String logAnalyticsWorkspaceResourceId) { - this.logAnalyticsWorkspaceResourceId = logAnalyticsWorkspaceResourceId; - return this; - } - - /** - * Get the securityMonitoring property: Microsoft Defender threat detection for Cloud settings for the security - * profile. - * - * @return the securityMonitoring value. - */ - public ManagedClusterSecurityProfileDefenderSecurityMonitoring securityMonitoring() { - return this.securityMonitoring; - } - - /** - * Set the securityMonitoring property: Microsoft Defender threat detection for Cloud settings for the security - * profile. - * - * @param securityMonitoring the securityMonitoring value to set. - * @return the ManagedClusterSecurityProfileDefender object itself. - */ - public ManagedClusterSecurityProfileDefender - withSecurityMonitoring(ManagedClusterSecurityProfileDefenderSecurityMonitoring securityMonitoring) { - this.securityMonitoring = securityMonitoring; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (securityMonitoring() != null) { - securityMonitoring().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("logAnalyticsWorkspaceResourceId", this.logAnalyticsWorkspaceResourceId); - jsonWriter.writeJsonField("securityMonitoring", this.securityMonitoring); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterSecurityProfileDefender from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterSecurityProfileDefender 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 ManagedClusterSecurityProfileDefender. - */ - public static ManagedClusterSecurityProfileDefender fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterSecurityProfileDefender deserializedManagedClusterSecurityProfileDefender - = new ManagedClusterSecurityProfileDefender(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("logAnalyticsWorkspaceResourceId".equals(fieldName)) { - deserializedManagedClusterSecurityProfileDefender.logAnalyticsWorkspaceResourceId - = reader.getString(); - } else if ("securityMonitoring".equals(fieldName)) { - deserializedManagedClusterSecurityProfileDefender.securityMonitoring - = ManagedClusterSecurityProfileDefenderSecurityMonitoring.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterSecurityProfileDefender; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java deleted file mode 100644 index d0da2997534e..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Microsoft Defender settings for the security profile threat detection. - */ -@Fluent -public final class ManagedClusterSecurityProfileDefenderSecurityMonitoring - implements JsonSerializable { - /* - * Whether to enable Defender threat detection - */ - private Boolean enabled; - - /** - * Creates an instance of ManagedClusterSecurityProfileDefenderSecurityMonitoring class. - */ - public ManagedClusterSecurityProfileDefenderSecurityMonitoring() { - } - - /** - * Get the enabled property: Whether to enable Defender threat detection. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable Defender threat detection. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterSecurityProfileDefenderSecurityMonitoring object itself. - */ - public ManagedClusterSecurityProfileDefenderSecurityMonitoring withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterSecurityProfileDefenderSecurityMonitoring from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterSecurityProfileDefenderSecurityMonitoring 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 ManagedClusterSecurityProfileDefenderSecurityMonitoring. - */ - public static ManagedClusterSecurityProfileDefenderSecurityMonitoring fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterSecurityProfileDefenderSecurityMonitoring deserializedManagedClusterSecurityProfileDefenderSecurityMonitoring - = new ManagedClusterSecurityProfileDefenderSecurityMonitoring(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterSecurityProfileDefenderSecurityMonitoring.enabled - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterSecurityProfileDefenderSecurityMonitoring; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageCleaner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageCleaner.java deleted file mode 100644 index 700820e65270..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageCleaner.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Image Cleaner removes unused images from nodes, freeing up disk space and helping to reduce attack surface area. Here - * are settings for the security profile. - */ -@Fluent -public final class ManagedClusterSecurityProfileImageCleaner - implements JsonSerializable { - /* - * Whether to enable Image Cleaner on AKS cluster. - */ - private Boolean enabled; - - /* - * Image Cleaner scanning interval in hours. - */ - private Integer intervalHours; - - /** - * Creates an instance of ManagedClusterSecurityProfileImageCleaner class. - */ - public ManagedClusterSecurityProfileImageCleaner() { - } - - /** - * Get the enabled property: Whether to enable Image Cleaner on AKS cluster. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable Image Cleaner on AKS cluster. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterSecurityProfileImageCleaner object itself. - */ - public ManagedClusterSecurityProfileImageCleaner withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the intervalHours property: Image Cleaner scanning interval in hours. - * - * @return the intervalHours value. - */ - public Integer intervalHours() { - return this.intervalHours; - } - - /** - * Set the intervalHours property: Image Cleaner scanning interval in hours. - * - * @param intervalHours the intervalHours value to set. - * @return the ManagedClusterSecurityProfileImageCleaner object itself. - */ - public ManagedClusterSecurityProfileImageCleaner withIntervalHours(Integer intervalHours) { - this.intervalHours = intervalHours; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeNumberField("intervalHours", this.intervalHours); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterSecurityProfileImageCleaner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterSecurityProfileImageCleaner 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 ManagedClusterSecurityProfileImageCleaner. - */ - public static ManagedClusterSecurityProfileImageCleaner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterSecurityProfileImageCleaner deserializedManagedClusterSecurityProfileImageCleaner - = new ManagedClusterSecurityProfileImageCleaner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterSecurityProfileImageCleaner.enabled - = reader.getNullable(JsonReader::getBoolean); - } else if ("intervalHours".equals(fieldName)) { - deserializedManagedClusterSecurityProfileImageCleaner.intervalHours - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterSecurityProfileImageCleaner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileWorkloadIdentity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileWorkloadIdentity.java deleted file mode 100644 index cc7af8f1f25a..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileWorkloadIdentity.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Workload identity settings for the security profile. - */ -@Fluent -public final class ManagedClusterSecurityProfileWorkloadIdentity - implements JsonSerializable { - /* - * Whether to enable workload identity. - */ - private Boolean enabled; - - /** - * Creates an instance of ManagedClusterSecurityProfileWorkloadIdentity class. - */ - public ManagedClusterSecurityProfileWorkloadIdentity() { - } - - /** - * Get the enabled property: Whether to enable workload identity. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable workload identity. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterSecurityProfileWorkloadIdentity object itself. - */ - public ManagedClusterSecurityProfileWorkloadIdentity withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterSecurityProfileWorkloadIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterSecurityProfileWorkloadIdentity 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 ManagedClusterSecurityProfileWorkloadIdentity. - */ - public static ManagedClusterSecurityProfileWorkloadIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterSecurityProfileWorkloadIdentity deserializedManagedClusterSecurityProfileWorkloadIdentity - = new ManagedClusterSecurityProfileWorkloadIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterSecurityProfileWorkloadIdentity.enabled - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterSecurityProfileWorkloadIdentity; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterServicePrincipalProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterServicePrincipalProfile.java deleted file mode 100644 index 6f82f9aed391..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterServicePrincipalProfile.java +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Information about a service principal identity for the cluster to use for manipulating Azure APIs. - */ -@Fluent -public final class ManagedClusterServicePrincipalProfile - implements JsonSerializable { - /* - * The ID for the service principal. - */ - private String clientId; - - /* - * The secret password associated with the service principal in plain text. - */ - private String secret; - - /** - * Creates an instance of ManagedClusterServicePrincipalProfile class. - */ - public ManagedClusterServicePrincipalProfile() { - } - - /** - * Get the clientId property: The ID for the service principal. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId property: The ID for the service principal. - * - * @param clientId the clientId value to set. - * @return the ManagedClusterServicePrincipalProfile object itself. - */ - public ManagedClusterServicePrincipalProfile withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the secret property: The secret password associated with the service principal in plain text. - * - * @return the secret value. - */ - public String secret() { - return this.secret; - } - - /** - * Set the secret property: The secret password associated with the service principal in plain text. - * - * @param secret the secret value to set. - * @return the ManagedClusterServicePrincipalProfile object itself. - */ - public ManagedClusterServicePrincipalProfile withSecret(String secret) { - this.secret = secret; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (clientId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property clientId in model ManagedClusterServicePrincipalProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterServicePrincipalProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("clientId", this.clientId); - jsonWriter.writeStringField("secret", this.secret); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterServicePrincipalProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterServicePrincipalProfile 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 ManagedClusterServicePrincipalProfile. - */ - public static ManagedClusterServicePrincipalProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterServicePrincipalProfile deserializedManagedClusterServicePrincipalProfile - = new ManagedClusterServicePrincipalProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("clientId".equals(fieldName)) { - deserializedManagedClusterServicePrincipalProfile.clientId = reader.getString(); - } else if ("secret".equals(fieldName)) { - deserializedManagedClusterServicePrincipalProfile.secret = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterServicePrincipalProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSku.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSku.java deleted file mode 100644 index 25b666b9f8d7..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSku.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 SKU of a Managed Cluster. - */ -@Fluent -public final class ManagedClusterSku implements JsonSerializable { - /* - * The name of a managed cluster SKU. - */ - private ManagedClusterSkuName name; - - /* - * The tier of a managed cluster SKU. If not specified, the default is 'Free'. See [AKS Pricing - * Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) for more details. - */ - private ManagedClusterSkuTier tier; - - /** - * Creates an instance of ManagedClusterSku class. - */ - public ManagedClusterSku() { - } - - /** - * Get the name property: The name of a managed cluster SKU. - * - * @return the name value. - */ - public ManagedClusterSkuName name() { - return this.name; - } - - /** - * Set the name property: The name of a managed cluster SKU. - * - * @param name the name value to set. - * @return the ManagedClusterSku object itself. - */ - public ManagedClusterSku withName(ManagedClusterSkuName name) { - this.name = name; - return this; - } - - /** - * Get the tier property: The tier of a managed cluster SKU. If not specified, the default is 'Free'. See [AKS - * Pricing Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) for more details. - * - * @return the tier value. - */ - public ManagedClusterSkuTier tier() { - return this.tier; - } - - /** - * Set the tier property: The tier of a managed cluster SKU. If not specified, the default is 'Free'. See [AKS - * Pricing Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) for more details. - * - * @param tier the tier value to set. - * @return the ManagedClusterSku object itself. - */ - public ManagedClusterSku withTier(ManagedClusterSkuTier tier) { - this.tier = tier; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@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 ManagedClusterSku from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterSku 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 ManagedClusterSku. - */ - public static ManagedClusterSku fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterSku deserializedManagedClusterSku = new ManagedClusterSku(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedManagedClusterSku.name = ManagedClusterSkuName.fromString(reader.getString()); - } else if ("tier".equals(fieldName)) { - deserializedManagedClusterSku.tier = ManagedClusterSkuTier.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterSku; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuName.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuName.java deleted file mode 100644 index 306cf49fc131..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuName.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The name of a managed cluster SKU. - */ -public final class ManagedClusterSkuName extends ExpandableStringEnum { - /** - * Static value Base for ManagedClusterSkuName. - */ - public static final ManagedClusterSkuName BASE = fromString("Base"); - - /** - * Static value Automatic for ManagedClusterSkuName. - */ - public static final ManagedClusterSkuName AUTOMATIC = fromString("Automatic"); - - /** - * Creates a new instance of ManagedClusterSkuName value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ManagedClusterSkuName() { - } - - /** - * Creates or finds a ManagedClusterSkuName from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedClusterSkuName. - */ - public static ManagedClusterSkuName fromString(String name) { - return fromString(name, ManagedClusterSkuName.class); - } - - /** - * Gets known ManagedClusterSkuName values. - * - * @return known ManagedClusterSkuName values. - */ - public static Collection values() { - return values(ManagedClusterSkuName.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuTier.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuTier.java deleted file mode 100644 index dda63fccb506..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuTier.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The tier of a managed cluster SKU. If not specified, the default is 'Free'. See [AKS Pricing - * Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) for more details. - */ -public final class ManagedClusterSkuTier extends ExpandableStringEnum { - /** - * Static value Premium for ManagedClusterSkuTier. - */ - public static final ManagedClusterSkuTier PREMIUM = fromString("Premium"); - - /** - * Static value Standard for ManagedClusterSkuTier. - */ - public static final ManagedClusterSkuTier STANDARD = fromString("Standard"); - - /** - * Static value Free for ManagedClusterSkuTier. - */ - public static final ManagedClusterSkuTier FREE = fromString("Free"); - - /** - * Creates a new instance of ManagedClusterSkuTier value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ManagedClusterSkuTier() { - } - - /** - * Creates or finds a ManagedClusterSkuTier from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedClusterSkuTier. - */ - public static ManagedClusterSkuTier fromString(String name) { - return fromString(name, ManagedClusterSkuTier.class); - } - - /** - * Gets known ManagedClusterSkuTier values. - * - * @return known ManagedClusterSkuTier values. - */ - public static Collection values() { - return values(ManagedClusterSkuTier.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStaticEgressGatewayProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStaticEgressGatewayProfile.java deleted file mode 100644 index c75598f87142..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStaticEgressGatewayProfile.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 Static Egress Gateway addon configuration for the cluster. - */ -@Fluent -public final class ManagedClusterStaticEgressGatewayProfile - implements JsonSerializable { - /* - * Enable Static Egress Gateway addon. Indicates if Static Egress Gateway addon is enabled or not. - */ - private Boolean enabled; - - /** - * Creates an instance of ManagedClusterStaticEgressGatewayProfile class. - */ - public ManagedClusterStaticEgressGatewayProfile() { - } - - /** - * Get the enabled property: Enable Static Egress Gateway addon. Indicates if Static Egress Gateway addon is enabled - * or not. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Enable Static Egress Gateway addon. Indicates if Static Egress Gateway addon is enabled - * or not. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterStaticEgressGatewayProfile object itself. - */ - public ManagedClusterStaticEgressGatewayProfile withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterStaticEgressGatewayProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterStaticEgressGatewayProfile 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 ManagedClusterStaticEgressGatewayProfile. - */ - public static ManagedClusterStaticEgressGatewayProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterStaticEgressGatewayProfile deserializedManagedClusterStaticEgressGatewayProfile - = new ManagedClusterStaticEgressGatewayProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterStaticEgressGatewayProfile.enabled - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterStaticEgressGatewayProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStatus.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStatus.java deleted file mode 100644 index 753a202164b9..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStatus.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.exception.ManagementError; -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 read-only information about the Managed Cluster. - */ -@Immutable -public final class ManagedClusterStatus implements JsonSerializable { - /* - * The error details information of the managed cluster. Preserves the detailed info of failure. If there was no - * error, this field is omitted. - */ - private ManagementError provisioningError; - - /** - * Creates an instance of ManagedClusterStatus class. - */ - public ManagedClusterStatus() { - } - - /** - * Get the provisioningError property: The error details information of the managed cluster. Preserves the detailed - * info of failure. If there was no error, this field is omitted. - * - * @return the provisioningError value. - */ - public ManagementError provisioningError() { - return this.provisioningError; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterStatus from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterStatus 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 ManagedClusterStatus. - */ - public static ManagedClusterStatus fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterStatus deserializedManagedClusterStatus = new ManagedClusterStatus(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningError".equals(fieldName)) { - deserializedManagedClusterStatus.provisioningError = ManagementError.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterStatus; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfile.java deleted file mode 100644 index 4597f55159a4..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfile.java +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Storage profile for the container service cluster. - */ -@Fluent -public final class ManagedClusterStorageProfile implements JsonSerializable { - /* - * AzureDisk CSI Driver settings for the storage profile. - */ - private ManagedClusterStorageProfileDiskCsiDriver diskCsiDriver; - - /* - * AzureFile CSI Driver settings for the storage profile. - */ - private ManagedClusterStorageProfileFileCsiDriver fileCsiDriver; - - /* - * Snapshot Controller settings for the storage profile. - */ - private ManagedClusterStorageProfileSnapshotController snapshotController; - - /* - * AzureBlob CSI Driver settings for the storage profile. - */ - private ManagedClusterStorageProfileBlobCsiDriver blobCsiDriver; - - /** - * Creates an instance of ManagedClusterStorageProfile class. - */ - public ManagedClusterStorageProfile() { - } - - /** - * Get the diskCsiDriver property: AzureDisk CSI Driver settings for the storage profile. - * - * @return the diskCsiDriver value. - */ - public ManagedClusterStorageProfileDiskCsiDriver diskCsiDriver() { - return this.diskCsiDriver; - } - - /** - * Set the diskCsiDriver property: AzureDisk CSI Driver settings for the storage profile. - * - * @param diskCsiDriver the diskCsiDriver value to set. - * @return the ManagedClusterStorageProfile object itself. - */ - public ManagedClusterStorageProfile withDiskCsiDriver(ManagedClusterStorageProfileDiskCsiDriver diskCsiDriver) { - this.diskCsiDriver = diskCsiDriver; - return this; - } - - /** - * Get the fileCsiDriver property: AzureFile CSI Driver settings for the storage profile. - * - * @return the fileCsiDriver value. - */ - public ManagedClusterStorageProfileFileCsiDriver fileCsiDriver() { - return this.fileCsiDriver; - } - - /** - * Set the fileCsiDriver property: AzureFile CSI Driver settings for the storage profile. - * - * @param fileCsiDriver the fileCsiDriver value to set. - * @return the ManagedClusterStorageProfile object itself. - */ - public ManagedClusterStorageProfile withFileCsiDriver(ManagedClusterStorageProfileFileCsiDriver fileCsiDriver) { - this.fileCsiDriver = fileCsiDriver; - return this; - } - - /** - * Get the snapshotController property: Snapshot Controller settings for the storage profile. - * - * @return the snapshotController value. - */ - public ManagedClusterStorageProfileSnapshotController snapshotController() { - return this.snapshotController; - } - - /** - * Set the snapshotController property: Snapshot Controller settings for the storage profile. - * - * @param snapshotController the snapshotController value to set. - * @return the ManagedClusterStorageProfile object itself. - */ - public ManagedClusterStorageProfile - withSnapshotController(ManagedClusterStorageProfileSnapshotController snapshotController) { - this.snapshotController = snapshotController; - return this; - } - - /** - * Get the blobCsiDriver property: AzureBlob CSI Driver settings for the storage profile. - * - * @return the blobCsiDriver value. - */ - public ManagedClusterStorageProfileBlobCsiDriver blobCsiDriver() { - return this.blobCsiDriver; - } - - /** - * Set the blobCsiDriver property: AzureBlob CSI Driver settings for the storage profile. - * - * @param blobCsiDriver the blobCsiDriver value to set. - * @return the ManagedClusterStorageProfile object itself. - */ - public ManagedClusterStorageProfile withBlobCsiDriver(ManagedClusterStorageProfileBlobCsiDriver blobCsiDriver) { - this.blobCsiDriver = blobCsiDriver; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (diskCsiDriver() != null) { - diskCsiDriver().validate(); - } - if (fileCsiDriver() != null) { - fileCsiDriver().validate(); - } - if (snapshotController() != null) { - snapshotController().validate(); - } - if (blobCsiDriver() != null) { - blobCsiDriver().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("diskCSIDriver", this.diskCsiDriver); - jsonWriter.writeJsonField("fileCSIDriver", this.fileCsiDriver); - jsonWriter.writeJsonField("snapshotController", this.snapshotController); - jsonWriter.writeJsonField("blobCSIDriver", this.blobCsiDriver); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterStorageProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterStorageProfile 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 ManagedClusterStorageProfile. - */ - public static ManagedClusterStorageProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterStorageProfile deserializedManagedClusterStorageProfile = new ManagedClusterStorageProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskCSIDriver".equals(fieldName)) { - deserializedManagedClusterStorageProfile.diskCsiDriver - = ManagedClusterStorageProfileDiskCsiDriver.fromJson(reader); - } else if ("fileCSIDriver".equals(fieldName)) { - deserializedManagedClusterStorageProfile.fileCsiDriver - = ManagedClusterStorageProfileFileCsiDriver.fromJson(reader); - } else if ("snapshotController".equals(fieldName)) { - deserializedManagedClusterStorageProfile.snapshotController - = ManagedClusterStorageProfileSnapshotController.fromJson(reader); - } else if ("blobCSIDriver".equals(fieldName)) { - deserializedManagedClusterStorageProfile.blobCsiDriver - = ManagedClusterStorageProfileBlobCsiDriver.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterStorageProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileBlobCsiDriver.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileBlobCsiDriver.java deleted file mode 100644 index b0cd41ff4c82..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileBlobCsiDriver.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * AzureBlob CSI Driver settings for the storage profile. - */ -@Fluent -public final class ManagedClusterStorageProfileBlobCsiDriver - implements JsonSerializable { - /* - * Whether to enable AzureBlob CSI Driver. The default value is false. - */ - private Boolean enabled; - - /** - * Creates an instance of ManagedClusterStorageProfileBlobCsiDriver class. - */ - public ManagedClusterStorageProfileBlobCsiDriver() { - } - - /** - * Get the enabled property: Whether to enable AzureBlob CSI Driver. The default value is false. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable AzureBlob CSI Driver. The default value is false. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterStorageProfileBlobCsiDriver object itself. - */ - public ManagedClusterStorageProfileBlobCsiDriver withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterStorageProfileBlobCsiDriver from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterStorageProfileBlobCsiDriver 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 ManagedClusterStorageProfileBlobCsiDriver. - */ - public static ManagedClusterStorageProfileBlobCsiDriver fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterStorageProfileBlobCsiDriver deserializedManagedClusterStorageProfileBlobCsiDriver - = new ManagedClusterStorageProfileBlobCsiDriver(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterStorageProfileBlobCsiDriver.enabled - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterStorageProfileBlobCsiDriver; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java deleted file mode 100644 index 7a94fabab0c8..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * AzureDisk CSI Driver settings for the storage profile. - */ -@Fluent -public final class ManagedClusterStorageProfileDiskCsiDriver - implements JsonSerializable { - /* - * Whether to enable AzureDisk CSI Driver. The default value is true. - */ - private Boolean enabled; - - /** - * Creates an instance of ManagedClusterStorageProfileDiskCsiDriver class. - */ - public ManagedClusterStorageProfileDiskCsiDriver() { - } - - /** - * Get the enabled property: Whether to enable AzureDisk CSI Driver. The default value is true. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable AzureDisk CSI Driver. The default value is true. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterStorageProfileDiskCsiDriver object itself. - */ - public ManagedClusterStorageProfileDiskCsiDriver withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterStorageProfileDiskCsiDriver from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterStorageProfileDiskCsiDriver 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 ManagedClusterStorageProfileDiskCsiDriver. - */ - public static ManagedClusterStorageProfileDiskCsiDriver fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterStorageProfileDiskCsiDriver deserializedManagedClusterStorageProfileDiskCsiDriver - = new ManagedClusterStorageProfileDiskCsiDriver(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterStorageProfileDiskCsiDriver.enabled - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterStorageProfileDiskCsiDriver; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileFileCsiDriver.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileFileCsiDriver.java deleted file mode 100644 index 73233e8c6dae..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileFileCsiDriver.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * AzureFile CSI Driver settings for the storage profile. - */ -@Fluent -public final class ManagedClusterStorageProfileFileCsiDriver - implements JsonSerializable { - /* - * Whether to enable AzureFile CSI Driver. The default value is true. - */ - private Boolean enabled; - - /** - * Creates an instance of ManagedClusterStorageProfileFileCsiDriver class. - */ - public ManagedClusterStorageProfileFileCsiDriver() { - } - - /** - * Get the enabled property: Whether to enable AzureFile CSI Driver. The default value is true. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable AzureFile CSI Driver. The default value is true. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterStorageProfileFileCsiDriver object itself. - */ - public ManagedClusterStorageProfileFileCsiDriver withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterStorageProfileFileCsiDriver from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterStorageProfileFileCsiDriver 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 ManagedClusterStorageProfileFileCsiDriver. - */ - public static ManagedClusterStorageProfileFileCsiDriver fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterStorageProfileFileCsiDriver deserializedManagedClusterStorageProfileFileCsiDriver - = new ManagedClusterStorageProfileFileCsiDriver(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterStorageProfileFileCsiDriver.enabled - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterStorageProfileFileCsiDriver; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileSnapshotController.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileSnapshotController.java deleted file mode 100644 index 3f4f4e3b0522..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileSnapshotController.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Snapshot Controller settings for the storage profile. - */ -@Fluent -public final class ManagedClusterStorageProfileSnapshotController - implements JsonSerializable { - /* - * Whether to enable Snapshot Controller. The default value is true. - */ - private Boolean enabled; - - /** - * Creates an instance of ManagedClusterStorageProfileSnapshotController class. - */ - public ManagedClusterStorageProfileSnapshotController() { - } - - /** - * Get the enabled property: Whether to enable Snapshot Controller. The default value is true. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable Snapshot Controller. The default value is true. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterStorageProfileSnapshotController object itself. - */ - public ManagedClusterStorageProfileSnapshotController withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterStorageProfileSnapshotController from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterStorageProfileSnapshotController 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 ManagedClusterStorageProfileSnapshotController. - */ - public static ManagedClusterStorageProfileSnapshotController fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterStorageProfileSnapshotController deserializedManagedClusterStorageProfileSnapshotController - = new ManagedClusterStorageProfileSnapshotController(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterStorageProfileSnapshotController.enabled - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterStorageProfileSnapshotController; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWindowsProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWindowsProfile.java deleted file mode 100644 index 06c292e83565..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWindowsProfile.java +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -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 Windows VMs in the managed cluster. - */ -@Fluent -public final class ManagedClusterWindowsProfile implements JsonSerializable { - /* - * Specifies the name of the administrator account.

**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:** 1 character

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

**Minimum-length:** 8 characters

- * **Max-length:** 123 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!" - */ - private String adminPassword; - - /* - * The license type to use for Windows VMs. See [Azure Hybrid User - * Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) for more details. - */ - private LicenseType licenseType; - - /* - * Whether to enable CSI proxy. For more details on CSI proxy, see the [CSI proxy GitHub - * repo](https://github.com/kubernetes-csi/csi-proxy). - */ - private Boolean enableCsiProxy; - - /* - * The Windows gMSA Profile in the Managed Cluster. - */ - private WindowsGmsaProfile gmsaProfile; - - /** - * Creates an instance of ManagedClusterWindowsProfile class. - */ - public ManagedClusterWindowsProfile() { - } - - /** - * Get the adminUsername property: Specifies the name of the administrator account. <br><br> - * **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:** 1 character - * <br><br> **Max-length:** 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> - * **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:** 1 character - * <br><br> **Max-length:** 20 characters. - * - * @param adminUsername the adminUsername value to set. - * @return the ManagedClusterWindowsProfile object itself. - */ - public ManagedClusterWindowsProfile withAdminUsername(String adminUsername) { - this.adminUsername = adminUsername; - return this; - } - - /** - * Get the adminPassword property: Specifies the password of the administrator account. <br><br> - * **Minimum-length:** 8 characters <br><br> **Max-length:** 123 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!". - * - * @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:** 8 characters <br><br> **Max-length:** 123 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!". - * - * @param adminPassword the adminPassword value to set. - * @return the ManagedClusterWindowsProfile object itself. - */ - public ManagedClusterWindowsProfile withAdminPassword(String adminPassword) { - this.adminPassword = adminPassword; - return this; - } - - /** - * Get the licenseType property: The license type to use for Windows VMs. See [Azure Hybrid User - * Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) for more details. - * - * @return the licenseType value. - */ - public LicenseType licenseType() { - return this.licenseType; - } - - /** - * Set the licenseType property: The license type to use for Windows VMs. See [Azure Hybrid User - * Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) for more details. - * - * @param licenseType the licenseType value to set. - * @return the ManagedClusterWindowsProfile object itself. - */ - public ManagedClusterWindowsProfile withLicenseType(LicenseType licenseType) { - this.licenseType = licenseType; - return this; - } - - /** - * Get the enableCsiProxy property: Whether to enable CSI proxy. For more details on CSI proxy, see the [CSI proxy - * GitHub repo](https://github.com/kubernetes-csi/csi-proxy). - * - * @return the enableCsiProxy value. - */ - public Boolean enableCsiProxy() { - return this.enableCsiProxy; - } - - /** - * Set the enableCsiProxy property: Whether to enable CSI proxy. For more details on CSI proxy, see the [CSI proxy - * GitHub repo](https://github.com/kubernetes-csi/csi-proxy). - * - * @param enableCsiProxy the enableCsiProxy value to set. - * @return the ManagedClusterWindowsProfile object itself. - */ - public ManagedClusterWindowsProfile withEnableCsiProxy(Boolean enableCsiProxy) { - this.enableCsiProxy = enableCsiProxy; - return this; - } - - /** - * Get the gmsaProfile property: The Windows gMSA Profile in the Managed Cluster. - * - * @return the gmsaProfile value. - */ - public WindowsGmsaProfile gmsaProfile() { - return this.gmsaProfile; - } - - /** - * Set the gmsaProfile property: The Windows gMSA Profile in the Managed Cluster. - * - * @param gmsaProfile the gmsaProfile value to set. - * @return the ManagedClusterWindowsProfile object itself. - */ - public ManagedClusterWindowsProfile withGmsaProfile(WindowsGmsaProfile gmsaProfile) { - this.gmsaProfile = gmsaProfile; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (adminUsername() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property adminUsername in model ManagedClusterWindowsProfile")); - } - if (gmsaProfile() != null) { - gmsaProfile().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterWindowsProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("adminUsername", this.adminUsername); - jsonWriter.writeStringField("adminPassword", this.adminPassword); - jsonWriter.writeStringField("licenseType", this.licenseType == null ? null : this.licenseType.toString()); - jsonWriter.writeBooleanField("enableCSIProxy", this.enableCsiProxy); - jsonWriter.writeJsonField("gmsaProfile", this.gmsaProfile); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterWindowsProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterWindowsProfile 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 ManagedClusterWindowsProfile. - */ - public static ManagedClusterWindowsProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterWindowsProfile deserializedManagedClusterWindowsProfile = new ManagedClusterWindowsProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("adminUsername".equals(fieldName)) { - deserializedManagedClusterWindowsProfile.adminUsername = reader.getString(); - } else if ("adminPassword".equals(fieldName)) { - deserializedManagedClusterWindowsProfile.adminPassword = reader.getString(); - } else if ("licenseType".equals(fieldName)) { - deserializedManagedClusterWindowsProfile.licenseType = LicenseType.fromString(reader.getString()); - } else if ("enableCSIProxy".equals(fieldName)) { - deserializedManagedClusterWindowsProfile.enableCsiProxy - = reader.getNullable(JsonReader::getBoolean); - } else if ("gmsaProfile".equals(fieldName)) { - deserializedManagedClusterWindowsProfile.gmsaProfile = WindowsGmsaProfile.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterWindowsProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfile.java deleted file mode 100644 index c8824d320110..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfile.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Workload Auto-scaler profile for the managed cluster. - */ -@Fluent -public final class ManagedClusterWorkloadAutoScalerProfile - implements JsonSerializable { - /* - * KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. - */ - private ManagedClusterWorkloadAutoScalerProfileKeda keda; - - /* - * VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. - */ - private ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler verticalPodAutoscaler; - - /** - * Creates an instance of ManagedClusterWorkloadAutoScalerProfile class. - */ - public ManagedClusterWorkloadAutoScalerProfile() { - } - - /** - * Get the keda property: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. - * - * @return the keda value. - */ - public ManagedClusterWorkloadAutoScalerProfileKeda keda() { - return this.keda; - } - - /** - * Set the keda property: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. - * - * @param keda the keda value to set. - * @return the ManagedClusterWorkloadAutoScalerProfile object itself. - */ - public ManagedClusterWorkloadAutoScalerProfile withKeda(ManagedClusterWorkloadAutoScalerProfileKeda keda) { - this.keda = keda; - return this; - } - - /** - * Get the verticalPodAutoscaler property: VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler - * profile. - * - * @return the verticalPodAutoscaler value. - */ - public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler verticalPodAutoscaler() { - return this.verticalPodAutoscaler; - } - - /** - * Set the verticalPodAutoscaler property: VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler - * profile. - * - * @param verticalPodAutoscaler the verticalPodAutoscaler value to set. - * @return the ManagedClusterWorkloadAutoScalerProfile object itself. - */ - public ManagedClusterWorkloadAutoScalerProfile - withVerticalPodAutoscaler(ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler verticalPodAutoscaler) { - this.verticalPodAutoscaler = verticalPodAutoscaler; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keda() != null) { - keda().validate(); - } - if (verticalPodAutoscaler() != null) { - verticalPodAutoscaler().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("keda", this.keda); - jsonWriter.writeJsonField("verticalPodAutoscaler", this.verticalPodAutoscaler); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterWorkloadAutoScalerProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterWorkloadAutoScalerProfile 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 ManagedClusterWorkloadAutoScalerProfile. - */ - public static ManagedClusterWorkloadAutoScalerProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterWorkloadAutoScalerProfile deserializedManagedClusterWorkloadAutoScalerProfile - = new ManagedClusterWorkloadAutoScalerProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("keda".equals(fieldName)) { - deserializedManagedClusterWorkloadAutoScalerProfile.keda - = ManagedClusterWorkloadAutoScalerProfileKeda.fromJson(reader); - } else if ("verticalPodAutoscaler".equals(fieldName)) { - deserializedManagedClusterWorkloadAutoScalerProfile.verticalPodAutoscaler - = ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterWorkloadAutoScalerProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileKeda.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileKeda.java deleted file mode 100644 index 471caebbf88e..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileKeda.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. - */ -@Fluent -public final class ManagedClusterWorkloadAutoScalerProfileKeda - implements JsonSerializable { - /* - * Whether to enable KEDA. - */ - private boolean enabled; - - /** - * Creates an instance of ManagedClusterWorkloadAutoScalerProfileKeda class. - */ - public ManagedClusterWorkloadAutoScalerProfileKeda() { - } - - /** - * Get the enabled property: Whether to enable KEDA. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable KEDA. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterWorkloadAutoScalerProfileKeda object itself. - */ - public ManagedClusterWorkloadAutoScalerProfileKeda withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterWorkloadAutoScalerProfileKeda from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterWorkloadAutoScalerProfileKeda 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 ManagedClusterWorkloadAutoScalerProfileKeda. - */ - public static ManagedClusterWorkloadAutoScalerProfileKeda fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterWorkloadAutoScalerProfileKeda deserializedManagedClusterWorkloadAutoScalerProfileKeda - = new ManagedClusterWorkloadAutoScalerProfileKeda(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterWorkloadAutoScalerProfileKeda.enabled = reader.getBoolean(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterWorkloadAutoScalerProfileKeda; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java deleted file mode 100644 index 391810a872f1..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. - */ -@Fluent -public final class ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler - implements JsonSerializable { - /* - * Whether to enable VPA. Default value is false. - */ - private boolean enabled; - - /** - * Creates an instance of ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler class. - */ - public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler() { - } - - /** - * Get the enabled property: Whether to enable VPA. Default value is false. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable VPA. Default value is false. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler object itself. - */ - public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler 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 - * ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler. - */ - public static ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler deserializedManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler - = new ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.enabled - = reader.getBoolean(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultHeaders.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultHeaders.java deleted file mode 100644 index cb77721bccf6..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultHeaders.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The ManagedClustersGetCommandResultHeaders model. - */ -@Fluent -public final class ManagedClustersGetCommandResultHeaders { - /* - * The Location property. - */ - private String location; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of ManagedClustersGetCommandResultHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public ManagedClustersGetCommandResultHeaders(HttpHeaders rawHeaders) { - this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); - } - - /** - * Get the location property: The Location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The Location property. - * - * @param location the location value to set. - * @return the ManagedClustersGetCommandResultHeaders object itself. - */ - public ManagedClustersGetCommandResultHeaders withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultResponse.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultResponse.java deleted file mode 100644 index eb663da3cc0e..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultResponse.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.containerservice.fluent.models.RunCommandResultInner; - -/** - * Contains all response data for the getCommandResult operation. - */ -public final class ManagedClustersGetCommandResultResponse - extends ResponseBase { - /** - * Creates an instance of ManagedClustersGetCommandResultResponse. - * - * @param request the request which resulted in this ManagedClustersGetCommandResultResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public ManagedClustersGetCommandResultResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - RunCommandResultInner value, ManagedClustersGetCommandResultHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public RunCommandResultInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedNamespaceListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedNamespaceListResult.java deleted file mode 100644 index f1bbb2e4cfff..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedNamespaceListResult.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 com.azure.resourcemanager.containerservice.fluent.models.ManagedNamespaceInner; -import java.io.IOException; -import java.util.List; - -/** - * The result of a request to list managed namespaces in a managed cluster. - */ -@Fluent -public final class ManagedNamespaceListResult implements JsonSerializable { - /* - * The list of managed namespaces. - */ - private List value; - - /* - * The URI to fetch the next page of results, if any. - */ - private String nextLink; - - /** - * Creates an instance of ManagedNamespaceListResult class. - */ - public ManagedNamespaceListResult() { - } - - /** - * Get the value property: The list of managed namespaces. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of managed namespaces. - * - * @param value the value value to set. - * @return the ManagedNamespaceListResult object itself. - */ - public ManagedNamespaceListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URI to fetch the next page of results, if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The URI to fetch the next page of results, if any. - * - * @param nextLink the nextLink value to set. - * @return the ManagedNamespaceListResult object itself. - */ - public ManagedNamespaceListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedNamespaceListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedNamespaceListResult 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 ManagedNamespaceListResult. - */ - public static ManagedNamespaceListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedNamespaceListResult deserializedManagedNamespaceListResult = new ManagedNamespaceListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ManagedNamespaceInner.fromJson(reader1)); - deserializedManagedNamespaceListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedManagedNamespaceListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedNamespaceListResult; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedServiceIdentityUserAssignedIdentitiesValue.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedServiceIdentityUserAssignedIdentitiesValue.java deleted file mode 100644 index 7c9a80b972c7..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedServiceIdentityUserAssignedIdentitiesValue.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 ManagedServiceIdentityUserAssignedIdentitiesValue model. - */ -@Immutable -public final class ManagedServiceIdentityUserAssignedIdentitiesValue - 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 ManagedServiceIdentityUserAssignedIdentitiesValue class. - */ - public ManagedServiceIdentityUserAssignedIdentitiesValue() { - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedServiceIdentityUserAssignedIdentitiesValue from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedServiceIdentityUserAssignedIdentitiesValue 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 ManagedServiceIdentityUserAssignedIdentitiesValue. - */ - public static ManagedServiceIdentityUserAssignedIdentitiesValue fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedServiceIdentityUserAssignedIdentitiesValue deserializedManagedServiceIdentityUserAssignedIdentitiesValue - = new ManagedServiceIdentityUserAssignedIdentitiesValue(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("principalId".equals(fieldName)) { - deserializedManagedServiceIdentityUserAssignedIdentitiesValue.principalId = reader.getString(); - } else if ("clientId".equals(fieldName)) { - deserializedManagedServiceIdentityUserAssignedIdentitiesValue.clientId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedServiceIdentityUserAssignedIdentitiesValue; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManualScaleProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManualScaleProfile.java deleted file mode 100644 index 4bf360185d67..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManualScaleProfile.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Specifications on number of machines. - */ -@Fluent -public final class ManualScaleProfile implements JsonSerializable { - /* - * VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', 'Standard_E16s_v3' or - * 'Standard_D16s_v5'. - */ - private String size; - - /* - * Number of nodes. - */ - private Integer count; - - /** - * Creates an instance of ManualScaleProfile class. - */ - public ManualScaleProfile() { - } - - /** - * Get the size property: VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', - * 'Standard_E16s_v3' or 'Standard_D16s_v5'. - * - * @return the size value. - */ - public String size() { - return this.size; - } - - /** - * Set the size property: VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', - * 'Standard_E16s_v3' or 'Standard_D16s_v5'. - * - * @param size the size value to set. - * @return the ManualScaleProfile object itself. - */ - public ManualScaleProfile withSize(String size) { - this.size = size; - return this; - } - - /** - * Get the count property: Number of nodes. - * - * @return the count value. - */ - public Integer count() { - return this.count; - } - - /** - * Set the count property: Number of nodes. - * - * @param count the count value to set. - * @return the ManualScaleProfile object itself. - */ - public ManualScaleProfile withCount(Integer count) { - this.count = count; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("size", this.size); - jsonWriter.writeNumberField("count", this.count); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManualScaleProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManualScaleProfile 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 ManualScaleProfile. - */ - public static ManualScaleProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManualScaleProfile deserializedManualScaleProfile = new ManualScaleProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("size".equals(fieldName)) { - deserializedManualScaleProfile.size = reader.getString(); - } else if ("count".equals(fieldName)) { - deserializedManualScaleProfile.count = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedManualScaleProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevision.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevision.java deleted file mode 100644 index 486f88627e9a..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevision.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Holds information on upgrades and compatibility for given major.minor mesh release. - */ -@Fluent -public class MeshRevision implements JsonSerializable { - /* - * The revision of the mesh release. - */ - private String revision; - - /* - * List of revisions available for upgrade of a specific mesh revision - */ - private List upgrades; - - /* - * List of items this revision of service mesh is compatible with, and their associated versions. - */ - private List compatibleWith; - - /** - * Creates an instance of MeshRevision class. - */ - public MeshRevision() { - } - - /** - * Get the revision property: The revision of the mesh release. - * - * @return the revision value. - */ - public String revision() { - return this.revision; - } - - /** - * Set the revision property: The revision of the mesh release. - * - * @param revision the revision value to set. - * @return the MeshRevision object itself. - */ - public MeshRevision withRevision(String revision) { - this.revision = revision; - return this; - } - - /** - * Get the upgrades property: List of revisions available for upgrade of a specific mesh revision. - * - * @return the upgrades value. - */ - public List upgrades() { - return this.upgrades; - } - - /** - * Set the upgrades property: List of revisions available for upgrade of a specific mesh revision. - * - * @param upgrades the upgrades value to set. - * @return the MeshRevision object itself. - */ - public MeshRevision withUpgrades(List upgrades) { - this.upgrades = upgrades; - return this; - } - - /** - * Get the compatibleWith property: List of items this revision of service mesh is compatible with, and their - * associated versions. - * - * @return the compatibleWith value. - */ - public List compatibleWith() { - return this.compatibleWith; - } - - /** - * Set the compatibleWith property: List of items this revision of service mesh is compatible with, and their - * associated versions. - * - * @param compatibleWith the compatibleWith value to set. - * @return the MeshRevision object itself. - */ - public MeshRevision withCompatibleWith(List compatibleWith) { - this.compatibleWith = compatibleWith; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (compatibleWith() != null) { - compatibleWith().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("revision", this.revision); - jsonWriter.writeArrayField("upgrades", this.upgrades, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("compatibleWith", this.compatibleWith, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MeshRevision from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MeshRevision 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 MeshRevision. - */ - public static MeshRevision fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MeshRevision deserializedMeshRevision = new MeshRevision(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("revision".equals(fieldName)) { - deserializedMeshRevision.revision = reader.getString(); - } else if ("upgrades".equals(fieldName)) { - List upgrades = reader.readArray(reader1 -> reader1.getString()); - deserializedMeshRevision.upgrades = upgrades; - } else if ("compatibleWith".equals(fieldName)) { - List compatibleWith - = reader.readArray(reader1 -> CompatibleVersions.fromJson(reader1)); - deserializedMeshRevision.compatibleWith = compatibleWith; - } else { - reader.skipChildren(); - } - } - - return deserializedMeshRevision; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileList.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileList.java deleted file mode 100644 index ede5ff1e96ef..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileList.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 com.azure.resourcemanager.containerservice.fluent.models.MeshRevisionProfileInner; -import java.io.IOException; -import java.util.List; - -/** - * Holds an array of MeshRevisionsProfiles. - */ -@Fluent -public final class MeshRevisionProfileList implements JsonSerializable { - /* - * Array of service mesh add-on revision profiles for all supported mesh modes. - */ - private List value; - - /* - * The URL to get the next set of mesh revision profile. - */ - private String nextLink; - - /** - * Creates an instance of MeshRevisionProfileList class. - */ - public MeshRevisionProfileList() { - } - - /** - * Get the value property: Array of service mesh add-on revision profiles for all supported mesh modes. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of service mesh add-on revision profiles for all supported mesh modes. - * - * @param value the value value to set. - * @return the MeshRevisionProfileList object itself. - */ - public MeshRevisionProfileList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to get the next set of mesh revision profile. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MeshRevisionProfileList from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MeshRevisionProfileList 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 MeshRevisionProfileList. - */ - public static MeshRevisionProfileList fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MeshRevisionProfileList deserializedMeshRevisionProfileList = new MeshRevisionProfileList(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> MeshRevisionProfileInner.fromJson(reader1)); - deserializedMeshRevisionProfileList.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedMeshRevisionProfileList.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMeshRevisionProfileList; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileProperties.java deleted file mode 100644 index a3b99aca0acf..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileProperties.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Mesh revision profile properties for a mesh. - */ -@Fluent -public final class MeshRevisionProfileProperties implements JsonSerializable { - /* - * The meshRevisions property. - */ - private List meshRevisions; - - /** - * Creates an instance of MeshRevisionProfileProperties class. - */ - public MeshRevisionProfileProperties() { - } - - /** - * Get the meshRevisions property: The meshRevisions property. - * - * @return the meshRevisions value. - */ - public List meshRevisions() { - return this.meshRevisions; - } - - /** - * Set the meshRevisions property: The meshRevisions property. - * - * @param meshRevisions the meshRevisions value to set. - * @return the MeshRevisionProfileProperties object itself. - */ - public MeshRevisionProfileProperties withMeshRevisions(List meshRevisions) { - this.meshRevisions = meshRevisions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (meshRevisions() != null) { - meshRevisions().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("meshRevisions", this.meshRevisions, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MeshRevisionProfileProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MeshRevisionProfileProperties 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 MeshRevisionProfileProperties. - */ - public static MeshRevisionProfileProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MeshRevisionProfileProperties deserializedMeshRevisionProfileProperties - = new MeshRevisionProfileProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("meshRevisions".equals(fieldName)) { - List meshRevisions = reader.readArray(reader1 -> MeshRevision.fromJson(reader1)); - deserializedMeshRevisionProfileProperties.meshRevisions = meshRevisions; - } else { - reader.skipChildren(); - } - } - - return deserializedMeshRevisionProfileProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileList.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileList.java deleted file mode 100644 index a4942856c0f3..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileList.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 com.azure.resourcemanager.containerservice.fluent.models.MeshUpgradeProfileInner; -import java.io.IOException; -import java.util.List; - -/** - * Holds an array of MeshUpgradeProfiles. - */ -@Fluent -public final class MeshUpgradeProfileList implements JsonSerializable { - /* - * Array of supported service mesh add-on upgrade profiles. - */ - private List value; - - /* - * The URL to get the next set of mesh upgrade profile. - */ - private String nextLink; - - /** - * Creates an instance of MeshUpgradeProfileList class. - */ - public MeshUpgradeProfileList() { - } - - /** - * Get the value property: Array of supported service mesh add-on upgrade profiles. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of supported service mesh add-on upgrade profiles. - * - * @param value the value value to set. - * @return the MeshUpgradeProfileList object itself. - */ - public MeshUpgradeProfileList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to get the next set of mesh upgrade profile. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MeshUpgradeProfileList from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MeshUpgradeProfileList 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 MeshUpgradeProfileList. - */ - public static MeshUpgradeProfileList fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MeshUpgradeProfileList deserializedMeshUpgradeProfileList = new MeshUpgradeProfileList(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> MeshUpgradeProfileInner.fromJson(reader1)); - deserializedMeshUpgradeProfileList.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedMeshUpgradeProfileList.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMeshUpgradeProfileList; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileProperties.java deleted file mode 100644 index 82eb185db101..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileProperties.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Mesh upgrade profile properties for a major.minor release. - */ -@Fluent -public final class MeshUpgradeProfileProperties extends MeshRevision { - /** - * Creates an instance of MeshUpgradeProfileProperties class. - */ - public MeshUpgradeProfileProperties() { - } - - /** - * {@inheritDoc} - */ - @Override - public MeshUpgradeProfileProperties withRevision(String revision) { - super.withRevision(revision); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public MeshUpgradeProfileProperties withUpgrades(List upgrades) { - super.withUpgrades(upgrades); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public MeshUpgradeProfileProperties withCompatibleWith(List compatibleWith) { - super.withCompatibleWith(compatibleWith); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (compatibleWith() != null) { - compatibleWith().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("revision", revision()); - jsonWriter.writeArrayField("upgrades", upgrades(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("compatibleWith", compatibleWith(), (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MeshUpgradeProfileProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MeshUpgradeProfileProperties 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 MeshUpgradeProfileProperties. - */ - public static MeshUpgradeProfileProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MeshUpgradeProfileProperties deserializedMeshUpgradeProfileProperties = new MeshUpgradeProfileProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("revision".equals(fieldName)) { - deserializedMeshUpgradeProfileProperties.withRevision(reader.getString()); - } else if ("upgrades".equals(fieldName)) { - List upgrades = reader.readArray(reader1 -> reader1.getString()); - deserializedMeshUpgradeProfileProperties.withUpgrades(upgrades); - } else if ("compatibleWith".equals(fieldName)) { - List compatibleWith - = reader.readArray(reader1 -> CompatibleVersions.fromJson(reader1)); - deserializedMeshUpgradeProfileProperties.withCompatibleWith(compatibleWith); - } else { - reader.skipChildren(); - } - } - - return deserializedMeshUpgradeProfileProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProperties.java deleted file mode 100644 index 4abf775728e9..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProperties.java +++ /dev/null @@ -1,299 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Properties of a namespace managed by ARM. - */ -@Fluent -public final class NamespaceProperties implements JsonSerializable { - /* - * The current provisioning state of the namespace. - */ - private NamespaceProvisioningState provisioningState; - - /* - * The labels of managed namespace. - */ - private Map labels; - - /* - * The annotations of managed namespace. - */ - private Map annotations; - - /* - * The special FQDN used by the Azure Portal to access the Managed Cluster. This FQDN is for use only by the Azure - * Portal and should not be used by other clients. The Azure Portal requires certain Cross-Origin Resource Sharing - * (CORS) headers to be sent in some responses, which Kubernetes APIServer doesn't handle by default. This special - * FQDN supports CORS, allowing the Azure Portal to function properly. - */ - private String portalFqdn; - - /* - * The default resource quota enforced upon the namespace. Customers can have other Kubernetes resource quota - * objects under the namespace. Resource quotas are additive; if multiple resource quotas are applied to a given - * namespace, then the effective limit will be one such that all quotas on the namespace can be satisfied. - */ - private ResourceQuota defaultResourceQuota; - - /* - * The default network policy enforced upon the namespace. Customers can have other Kubernetes network policy - * objects under the namespace. Network policies are additive; if a policy or policies apply to a given pod for a - * given direction, the connections allowed in that direction for the pod is the union of what all applicable - * policies allow. - */ - private NetworkPolicies defaultNetworkPolicy; - - /* - * Action if Kubernetes namespace with same name already exists. - */ - private AdoptionPolicy adoptionPolicy; - - /* - * Delete options of a namespace. - */ - private DeletePolicy deletePolicy; - - /** - * Creates an instance of NamespaceProperties class. - */ - public NamespaceProperties() { - } - - /** - * Get the provisioningState property: The current provisioning state of the namespace. - * - * @return the provisioningState value. - */ - public NamespaceProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the labels property: The labels of managed namespace. - * - * @return the labels value. - */ - public Map labels() { - return this.labels; - } - - /** - * Set the labels property: The labels of managed namespace. - * - * @param labels the labels value to set. - * @return the NamespaceProperties object itself. - */ - public NamespaceProperties withLabels(Map labels) { - this.labels = labels; - return this; - } - - /** - * Get the annotations property: The annotations of managed namespace. - * - * @return the annotations value. - */ - public Map annotations() { - return this.annotations; - } - - /** - * Set the annotations property: The annotations of managed namespace. - * - * @param annotations the annotations value to set. - * @return the NamespaceProperties object itself. - */ - public NamespaceProperties withAnnotations(Map annotations) { - this.annotations = annotations; - return this; - } - - /** - * Get the portalFqdn property: The special FQDN used by the Azure Portal to access the Managed Cluster. This FQDN - * is for use only by the Azure Portal and should not be used by other clients. The Azure Portal requires certain - * Cross-Origin Resource Sharing (CORS) headers to be sent in some responses, which Kubernetes APIServer doesn't - * handle by default. This special FQDN supports CORS, allowing the Azure Portal to function properly. - * - * @return the portalFqdn value. - */ - public String portalFqdn() { - return this.portalFqdn; - } - - /** - * Get the defaultResourceQuota property: The default resource quota enforced upon the namespace. Customers can have - * other Kubernetes resource quota objects under the namespace. Resource quotas are additive; if multiple resource - * quotas are applied to a given namespace, then the effective limit will be one such that all quotas on the - * namespace can be satisfied. - * - * @return the defaultResourceQuota value. - */ - public ResourceQuota defaultResourceQuota() { - return this.defaultResourceQuota; - } - - /** - * Set the defaultResourceQuota property: The default resource quota enforced upon the namespace. Customers can have - * other Kubernetes resource quota objects under the namespace. Resource quotas are additive; if multiple resource - * quotas are applied to a given namespace, then the effective limit will be one such that all quotas on the - * namespace can be satisfied. - * - * @param defaultResourceQuota the defaultResourceQuota value to set. - * @return the NamespaceProperties object itself. - */ - public NamespaceProperties withDefaultResourceQuota(ResourceQuota defaultResourceQuota) { - this.defaultResourceQuota = defaultResourceQuota; - return this; - } - - /** - * Get the defaultNetworkPolicy property: The default network policy enforced upon the namespace. Customers can have - * other Kubernetes network policy objects under the namespace. Network policies are additive; if a policy or - * policies apply to a given pod for a given direction, the connections allowed in that direction for the pod is the - * union of what all applicable policies allow. - * - * @return the defaultNetworkPolicy value. - */ - public NetworkPolicies defaultNetworkPolicy() { - return this.defaultNetworkPolicy; - } - - /** - * Set the defaultNetworkPolicy property: The default network policy enforced upon the namespace. Customers can have - * other Kubernetes network policy objects under the namespace. Network policies are additive; if a policy or - * policies apply to a given pod for a given direction, the connections allowed in that direction for the pod is the - * union of what all applicable policies allow. - * - * @param defaultNetworkPolicy the defaultNetworkPolicy value to set. - * @return the NamespaceProperties object itself. - */ - public NamespaceProperties withDefaultNetworkPolicy(NetworkPolicies defaultNetworkPolicy) { - this.defaultNetworkPolicy = defaultNetworkPolicy; - return this; - } - - /** - * Get the adoptionPolicy property: Action if Kubernetes namespace with same name already exists. - * - * @return the adoptionPolicy value. - */ - public AdoptionPolicy adoptionPolicy() { - return this.adoptionPolicy; - } - - /** - * Set the adoptionPolicy property: Action if Kubernetes namespace with same name already exists. - * - * @param adoptionPolicy the adoptionPolicy value to set. - * @return the NamespaceProperties object itself. - */ - public NamespaceProperties withAdoptionPolicy(AdoptionPolicy adoptionPolicy) { - this.adoptionPolicy = adoptionPolicy; - return this; - } - - /** - * Get the deletePolicy property: Delete options of a namespace. - * - * @return the deletePolicy value. - */ - public DeletePolicy deletePolicy() { - return this.deletePolicy; - } - - /** - * Set the deletePolicy property: Delete options of a namespace. - * - * @param deletePolicy the deletePolicy value to set. - * @return the NamespaceProperties object itself. - */ - public NamespaceProperties withDeletePolicy(DeletePolicy deletePolicy) { - this.deletePolicy = deletePolicy; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (defaultResourceQuota() != null) { - defaultResourceQuota().validate(); - } - if (defaultNetworkPolicy() != null) { - defaultNetworkPolicy().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("labels", this.labels, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("annotations", this.annotations, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("defaultResourceQuota", this.defaultResourceQuota); - jsonWriter.writeJsonField("defaultNetworkPolicy", this.defaultNetworkPolicy); - jsonWriter.writeStringField("adoptionPolicy", - this.adoptionPolicy == null ? null : this.adoptionPolicy.toString()); - jsonWriter.writeStringField("deletePolicy", this.deletePolicy == null ? null : this.deletePolicy.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NamespaceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NamespaceProperties 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 NamespaceProperties. - */ - public static NamespaceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NamespaceProperties deserializedNamespaceProperties = new NamespaceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedNamespaceProperties.provisioningState - = NamespaceProvisioningState.fromString(reader.getString()); - } else if ("labels".equals(fieldName)) { - Map labels = reader.readMap(reader1 -> reader1.getString()); - deserializedNamespaceProperties.labels = labels; - } else if ("annotations".equals(fieldName)) { - Map annotations = reader.readMap(reader1 -> reader1.getString()); - deserializedNamespaceProperties.annotations = annotations; - } else if ("portalFqdn".equals(fieldName)) { - deserializedNamespaceProperties.portalFqdn = reader.getString(); - } else if ("defaultResourceQuota".equals(fieldName)) { - deserializedNamespaceProperties.defaultResourceQuota = ResourceQuota.fromJson(reader); - } else if ("defaultNetworkPolicy".equals(fieldName)) { - deserializedNamespaceProperties.defaultNetworkPolicy = NetworkPolicies.fromJson(reader); - } else if ("adoptionPolicy".equals(fieldName)) { - deserializedNamespaceProperties.adoptionPolicy = AdoptionPolicy.fromString(reader.getString()); - } else if ("deletePolicy".equals(fieldName)) { - deserializedNamespaceProperties.deletePolicy = DeletePolicy.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedNamespaceProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProvisioningState.java deleted file mode 100644 index c52c72d0eefd..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProvisioningState.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The current provisioning state of the namespace. - */ -public final class NamespaceProvisioningState extends ExpandableStringEnum { - /** - * Static value Updating for NamespaceProvisioningState. - */ - public static final NamespaceProvisioningState UPDATING = fromString("Updating"); - - /** - * Static value Deleting for NamespaceProvisioningState. - */ - public static final NamespaceProvisioningState DELETING = fromString("Deleting"); - - /** - * Static value Creating for NamespaceProvisioningState. - */ - public static final NamespaceProvisioningState CREATING = fromString("Creating"); - - /** - * Static value Succeeded for NamespaceProvisioningState. - */ - public static final NamespaceProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for NamespaceProvisioningState. - */ - public static final NamespaceProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Canceled for NamespaceProvisioningState. - */ - public static final NamespaceProvisioningState CANCELED = fromString("Canceled"); - - /** - * Creates a new instance of NamespaceProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NamespaceProvisioningState() { - } - - /** - * Creates or finds a NamespaceProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding NamespaceProvisioningState. - */ - public static NamespaceProvisioningState fromString(String name) { - return fromString(name, NamespaceProvisioningState.class); - } - - /** - * Gets known NamespaceProvisioningState values. - * - * @return known NamespaceProvisioningState values. - */ - public static Collection values() { - return values(NamespaceProvisioningState.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkDataplane.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkDataplane.java deleted file mode 100644 index aba8540b5e7e..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkDataplane.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Network dataplane used in the Kubernetes cluster. - */ -public final class NetworkDataplane extends ExpandableStringEnum { - /** - * Static value azure for NetworkDataplane. - */ - public static final NetworkDataplane AZURE = fromString("azure"); - - /** - * Static value cilium for NetworkDataplane. - */ - public static final NetworkDataplane CILIUM = fromString("cilium"); - - /** - * Creates a new instance of NetworkDataplane value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkDataplane() { - } - - /** - * Creates or finds a NetworkDataplane from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkDataplane. - */ - public static NetworkDataplane fromString(String name) { - return fromString(name, NetworkDataplane.class); - } - - /** - * Gets known NetworkDataplane values. - * - * @return known NetworkDataplane values. - */ - public static Collection values() { - return values(NetworkDataplane.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkMode.java deleted file mode 100644 index d6fb206936a3..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkMode.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The network mode Azure CNI is configured with. This cannot be specified if networkPlugin is anything other than - * 'azure'. - */ -public final class NetworkMode extends ExpandableStringEnum { - /** - * Static value transparent for NetworkMode. - */ - public static final NetworkMode TRANSPARENT = fromString("transparent"); - - /** - * Static value bridge for NetworkMode. - */ - public static final NetworkMode BRIDGE = fromString("bridge"); - - /** - * Creates a new instance of NetworkMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkMode() { - } - - /** - * Creates or finds a NetworkMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkMode. - */ - public static NetworkMode fromString(String name) { - return fromString(name, NetworkMode.class); - } - - /** - * Gets known NetworkMode values. - * - * @return known NetworkMode values. - */ - public static Collection values() { - return values(NetworkMode.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPlugin.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPlugin.java deleted file mode 100644 index ac78ed293a37..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPlugin.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Network plugin used for building the Kubernetes network. - */ -public final class NetworkPlugin extends ExpandableStringEnum { - /** - * Static value azure for NetworkPlugin. - */ - public static final NetworkPlugin AZURE = fromString("azure"); - - /** - * Static value kubenet for NetworkPlugin. - */ - public static final NetworkPlugin KUBENET = fromString("kubenet"); - - /** - * Static value none for NetworkPlugin. - */ - public static final NetworkPlugin NONE = fromString("none"); - - /** - * Creates a new instance of NetworkPlugin value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkPlugin() { - } - - /** - * Creates or finds a NetworkPlugin from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkPlugin. - */ - public static NetworkPlugin fromString(String name) { - return fromString(name, NetworkPlugin.class); - } - - /** - * Gets known NetworkPlugin values. - * - * @return known NetworkPlugin values. - */ - public static Collection values() { - return values(NetworkPlugin.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPluginMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPluginMode.java deleted file mode 100644 index eee6c3486d77..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPluginMode.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The mode the network plugin should use. - */ -public final class NetworkPluginMode extends ExpandableStringEnum { - /** - * Static value overlay for NetworkPluginMode. - */ - public static final NetworkPluginMode OVERLAY = fromString("overlay"); - - /** - * Creates a new instance of NetworkPluginMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkPluginMode() { - } - - /** - * Creates or finds a NetworkPluginMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkPluginMode. - */ - public static NetworkPluginMode fromString(String name) { - return fromString(name, NetworkPluginMode.class); - } - - /** - * Gets known NetworkPluginMode values. - * - * @return known NetworkPluginMode values. - */ - public static Collection values() { - return values(NetworkPluginMode.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicies.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicies.java deleted file mode 100644 index dcd97845c911..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicies.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Default network policy of the namespace, specifying ingress and egress rules. - */ -@Fluent -public final class NetworkPolicies implements JsonSerializable { - /* - * Ingress policy for the network. - */ - private PolicyRule ingress; - - /* - * Egress policy for the network. - */ - private PolicyRule egress; - - /** - * Creates an instance of NetworkPolicies class. - */ - public NetworkPolicies() { - } - - /** - * Get the ingress property: Ingress policy for the network. - * - * @return the ingress value. - */ - public PolicyRule ingress() { - return this.ingress; - } - - /** - * Set the ingress property: Ingress policy for the network. - * - * @param ingress the ingress value to set. - * @return the NetworkPolicies object itself. - */ - public NetworkPolicies withIngress(PolicyRule ingress) { - this.ingress = ingress; - return this; - } - - /** - * Get the egress property: Egress policy for the network. - * - * @return the egress value. - */ - public PolicyRule egress() { - return this.egress; - } - - /** - * Set the egress property: Egress policy for the network. - * - * @param egress the egress value to set. - * @return the NetworkPolicies object itself. - */ - public NetworkPolicies withEgress(PolicyRule egress) { - this.egress = egress; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("ingress", this.ingress == null ? null : this.ingress.toString()); - jsonWriter.writeStringField("egress", this.egress == null ? null : this.egress.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkPolicies from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkPolicies 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 NetworkPolicies. - */ - public static NetworkPolicies fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkPolicies deserializedNetworkPolicies = new NetworkPolicies(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ingress".equals(fieldName)) { - deserializedNetworkPolicies.ingress = PolicyRule.fromString(reader.getString()); - } else if ("egress".equals(fieldName)) { - deserializedNetworkPolicies.egress = PolicyRule.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkPolicies; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicy.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicy.java deleted file mode 100644 index 7841e4178e79..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicy.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Network policy used for building the Kubernetes network. - */ -public final class NetworkPolicy extends ExpandableStringEnum { - /** - * Static value none for NetworkPolicy. - */ - public static final NetworkPolicy NONE = fromString("none"); - - /** - * Static value calico for NetworkPolicy. - */ - public static final NetworkPolicy CALICO = fromString("calico"); - - /** - * Static value azure for NetworkPolicy. - */ - public static final NetworkPolicy AZURE = fromString("azure"); - - /** - * Static value cilium for NetworkPolicy. - */ - public static final NetworkPolicy CILIUM = fromString("cilium"); - - /** - * Creates a new instance of NetworkPolicy value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkPolicy() { - } - - /** - * Creates or finds a NetworkPolicy from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkPolicy. - */ - public static NetworkPolicy fromString(String name) { - return fromString(name, NetworkPolicy.class); - } - - /** - * Gets known NetworkPolicy values. - * - * @return known NetworkPolicy values. - */ - public static Collection values() { - return values(NetworkPolicy.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NginxIngressControllerType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NginxIngressControllerType.java deleted file mode 100644 index ec0dd92c299c..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NginxIngressControllerType.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Ingress type for the default NginxIngressController custom resource. - */ -public final class NginxIngressControllerType extends ExpandableStringEnum { - /** - * Static value AnnotationControlled for NginxIngressControllerType. - */ - public static final NginxIngressControllerType ANNOTATION_CONTROLLED = fromString("AnnotationControlled"); - - /** - * Static value External for NginxIngressControllerType. - */ - public static final NginxIngressControllerType EXTERNAL = fromString("External"); - - /** - * Static value Internal for NginxIngressControllerType. - */ - public static final NginxIngressControllerType INTERNAL = fromString("Internal"); - - /** - * Static value None for NginxIngressControllerType. - */ - public static final NginxIngressControllerType NONE = fromString("None"); - - /** - * Creates a new instance of NginxIngressControllerType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NginxIngressControllerType() { - } - - /** - * Creates or finds a NginxIngressControllerType from its string representation. - * - * @param name a name to look for. - * @return the corresponding NginxIngressControllerType. - */ - public static NginxIngressControllerType fromString(String name) { - return fromString(name, NginxIngressControllerType.class); - } - - /** - * Gets known NginxIngressControllerType values. - * - * @return known NginxIngressControllerType values. - */ - public static Collection values() { - return values(NginxIngressControllerType.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java deleted file mode 100644 index 8f9de197ee22..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage. - */ -public final class NodeOSUpgradeChannel extends ExpandableStringEnum { - /** - * Static value None for NodeOSUpgradeChannel. - */ - public static final NodeOSUpgradeChannel NONE = fromString("None"); - - /** - * Static value Unmanaged for NodeOSUpgradeChannel. - */ - public static final NodeOSUpgradeChannel UNMANAGED = fromString("Unmanaged"); - - /** - * Static value NodeImage for NodeOSUpgradeChannel. - */ - public static final NodeOSUpgradeChannel NODE_IMAGE = fromString("NodeImage"); - - /** - * Static value SecurityPatch for NodeOSUpgradeChannel. - */ - public static final NodeOSUpgradeChannel SECURITY_PATCH = fromString("SecurityPatch"); - - /** - * Creates a new instance of NodeOSUpgradeChannel value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NodeOSUpgradeChannel() { - } - - /** - * Creates or finds a NodeOSUpgradeChannel from its string representation. - * - * @param name a name to look for. - * @return the corresponding NodeOSUpgradeChannel. - */ - public static NodeOSUpgradeChannel fromString(String name) { - return fromString(name, NodeOSUpgradeChannel.class); - } - - /** - * Gets known NodeOSUpgradeChannel values. - * - * @return known NodeOSUpgradeChannel values. - */ - public static Collection values() { - return values(NodeOSUpgradeChannel.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningDefaultNodePools.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningDefaultNodePools.java deleted file mode 100644 index e9eb4ca1aea5..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningDefaultNodePools.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The set of default Karpenter NodePools (CRDs) configured for node provisioning. This field has no effect unless mode - * is 'Auto'. Warning: Changing this from Auto to None on an existing cluster will cause the default Karpenter NodePools - * to be deleted, which will drain and delete the nodes associated with those pools. It is strongly recommended to not - * do this unless there are idle nodes ready to take the pods evicted by that action. If not specified, the default is - * Auto. For more information see aka.ms/aks/nap#node-pools. - */ -public final class NodeProvisioningDefaultNodePools extends ExpandableStringEnum { - /** - * Static value None for NodeProvisioningDefaultNodePools. - */ - public static final NodeProvisioningDefaultNodePools NONE = fromString("None"); - - /** - * Static value Auto for NodeProvisioningDefaultNodePools. - */ - public static final NodeProvisioningDefaultNodePools AUTO = fromString("Auto"); - - /** - * Creates a new instance of NodeProvisioningDefaultNodePools value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NodeProvisioningDefaultNodePools() { - } - - /** - * Creates or finds a NodeProvisioningDefaultNodePools from its string representation. - * - * @param name a name to look for. - * @return the corresponding NodeProvisioningDefaultNodePools. - */ - public static NodeProvisioningDefaultNodePools fromString(String name) { - return fromString(name, NodeProvisioningDefaultNodePools.class); - } - - /** - * Gets known NodeProvisioningDefaultNodePools values. - * - * @return known NodeProvisioningDefaultNodePools values. - */ - public static Collection values() { - return values(NodeProvisioningDefaultNodePools.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningMode.java deleted file mode 100644 index 18a2c360e7fe..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningMode.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The node provisioning mode. If not specified, the default is Manual. - */ -public final class NodeProvisioningMode extends ExpandableStringEnum { - /** - * Static value Manual for NodeProvisioningMode. - */ - public static final NodeProvisioningMode MANUAL = fromString("Manual"); - - /** - * Static value Auto for NodeProvisioningMode. - */ - public static final NodeProvisioningMode AUTO = fromString("Auto"); - - /** - * Creates a new instance of NodeProvisioningMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NodeProvisioningMode() { - } - - /** - * Creates or finds a NodeProvisioningMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding NodeProvisioningMode. - */ - public static NodeProvisioningMode fromString(String name) { - return fromString(name, NodeProvisioningMode.class); - } - - /** - * Gets known NodeProvisioningMode values. - * - * @return known NodeProvisioningMode values. - */ - public static Collection values() { - return values(NodeProvisioningMode.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSDiskType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSDiskType.java deleted file mode 100644 index cea6111635cd..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSDiskType.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the VM supports it and has - * a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after - * creation. For more information see [Ephemeral - * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). - */ -public final class OSDiskType extends ExpandableStringEnum { - /** - * Static value Managed for OSDiskType. - */ - public static final OSDiskType MANAGED = fromString("Managed"); - - /** - * Static value Ephemeral for OSDiskType. - */ - public static final OSDiskType EPHEMERAL = fromString("Ephemeral"); - - /** - * Creates a new instance of OSDiskType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OSDiskType() { - } - - /** - * Creates or finds a OSDiskType from its string representation. - * - * @param name a name to look for. - * @return the corresponding OSDiskType. - */ - public static OSDiskType fromString(String name) { - return fromString(name, OSDiskType.class); - } - - /** - * Gets known OSDiskType values. - * - * @return known OSDiskType values. - */ - public static Collection values() { - return values(OSDiskType.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java deleted file mode 100644 index 988675bd21e2..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 - * when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. - */ -public final class OSSku extends ExpandableStringEnum { - /** - * Static value Ubuntu for OSSku. - */ - public static final OSSku UBUNTU = fromString("Ubuntu"); - - /** - * Static value AzureLinux for OSSku. - */ - public static final OSSku AZURE_LINUX = fromString("AzureLinux"); - - /** - * Static value AzureLinux3 for OSSku. - */ - public static final OSSku AZURE_LINUX3 = fromString("AzureLinux3"); - - /** - * Static value CBLMariner for OSSku. - */ - public static final OSSku CBLMARINER = fromString("CBLMariner"); - - /** - * Static value Windows2019 for OSSku. - */ - public static final OSSku WINDOWS2019 = fromString("Windows2019"); - - /** - * Static value Windows2022 for OSSku. - */ - public static final OSSku WINDOWS2022 = fromString("Windows2022"); - - /** - * Static value Ubuntu2204 for OSSku. - */ - public static final OSSku UBUNTU2204 = fromString("Ubuntu2204"); - - /** - * Static value Ubuntu2404 for OSSku. - */ - public static final OSSku UBUNTU2404 = fromString("Ubuntu2404"); - - /** - * Creates a new instance of OSSku value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OSSku() { - } - - /** - * Creates or finds a OSSku from its string representation. - * - * @param name a name to look for. - * @return the corresponding OSSku. - */ - public static OSSku fromString(String name) { - return fromString(name, OSSku.class); - } - - /** - * Gets known OSSku values. - * - * @return known OSSku values. - */ - public static Collection values() { - return values(OSSku.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OperationListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OperationListResult.java deleted file mode 100644 index 27f661bee59a..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OperationListResult.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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.containerservice.fluent.models.OperationValueInner; -import java.io.IOException; -import java.util.List; - -/** - * The List Operation response. - */ -@Immutable -public final class OperationListResult implements JsonSerializable { - /* - * The list of operations - */ - private List value; - - /** - * Creates an instance of OperationListResult class. - */ - public OperationListResult() { - } - - /** - * Get the value property: The list of operations. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationListResult 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 OperationListResult. - */ - public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationListResult deserializedOperationListResult = new OperationListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> OperationValueInner.fromJson(reader1)); - deserializedOperationListResult.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedOperationListResult; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundEnvironmentEndpointCollection.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundEnvironmentEndpointCollection.java deleted file mode 100644 index 07355841e66a..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundEnvironmentEndpointCollection.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.fluent.models.OutboundEnvironmentEndpointInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of OutboundEnvironmentEndpoint. - */ -@Fluent -public final class OutboundEnvironmentEndpointCollection - implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of OutboundEnvironmentEndpointCollection class. - */ - public OutboundEnvironmentEndpointCollection() { - } - - /** - * Get the value property: Collection of resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of resources. - * - * @param value the value value to set. - * @return the OutboundEnvironmentEndpointCollection object itself. - */ - public OutboundEnvironmentEndpointCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model OutboundEnvironmentEndpointCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OutboundEnvironmentEndpointCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OutboundEnvironmentEndpointCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OutboundEnvironmentEndpointCollection 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 OutboundEnvironmentEndpointCollection. - */ - public static OutboundEnvironmentEndpointCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OutboundEnvironmentEndpointCollection deserializedOutboundEnvironmentEndpointCollection - = new OutboundEnvironmentEndpointCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> OutboundEnvironmentEndpointInner.fromJson(reader1)); - deserializedOutboundEnvironmentEndpointCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOutboundEnvironmentEndpointCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOutboundEnvironmentEndpointCollection; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundType.java deleted file mode 100644 index c4415e9f4e44..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundType.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The outbound (egress) routing method. This can only be set at cluster creation time and cannot be changed later. For - * more information see [egress outbound type](https://docs.microsoft.com/azure/aks/egress-outboundtype). - */ -public final class OutboundType extends ExpandableStringEnum { - /** - * Static value loadBalancer for OutboundType. - */ - public static final OutboundType LOAD_BALANCER = fromString("loadBalancer"); - - /** - * Static value userDefinedRouting for OutboundType. - */ - public static final OutboundType USER_DEFINED_ROUTING = fromString("userDefinedRouting"); - - /** - * Static value managedNATGateway for OutboundType. - */ - public static final OutboundType MANAGED_NATGATEWAY = fromString("managedNATGateway"); - - /** - * Static value userAssignedNATGateway for OutboundType. - */ - public static final OutboundType USER_ASSIGNED_NATGATEWAY = fromString("userAssignedNATGateway"); - - /** - * Static value none for OutboundType. - */ - public static final OutboundType NONE = fromString("none"); - - /** - * Creates a new instance of OutboundType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OutboundType() { - } - - /** - * Creates or finds a OutboundType from its string representation. - * - * @param name a name to look for. - * @return the corresponding OutboundType. - */ - public static OutboundType fromString(String name) { - return fromString(name, OutboundType.class); - } - - /** - * Gets known OutboundType values. - * - * @return known OutboundType values. - */ - public static Collection values() { - return values(OutboundType.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodIpAllocationMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodIpAllocationMode.java deleted file mode 100644 index f04f79bc76d1..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodIpAllocationMode.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default - * is 'DynamicIndividual'. - */ -public final class PodIpAllocationMode extends ExpandableStringEnum { - /** - * Static value DynamicIndividual for PodIpAllocationMode. - */ - public static final PodIpAllocationMode DYNAMIC_INDIVIDUAL = fromString("DynamicIndividual"); - - /** - * Static value StaticBlock for PodIpAllocationMode. - */ - public static final PodIpAllocationMode STATIC_BLOCK = fromString("StaticBlock"); - - /** - * Creates a new instance of PodIpAllocationMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PodIpAllocationMode() { - } - - /** - * Creates or finds a PodIpAllocationMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding PodIpAllocationMode. - */ - public static PodIpAllocationMode fromString(String name) { - return fromString(name, PodIpAllocationMode.class); - } - - /** - * Gets known PodIpAllocationMode values. - * - * @return known PodIpAllocationMode values. - */ - public static Collection values() { - return values(PodIpAllocationMode.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PolicyRule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PolicyRule.java deleted file mode 100644 index e0be3112b570..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PolicyRule.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum representing different network policy rules. - */ -public final class PolicyRule extends ExpandableStringEnum { - /** - * Static value DenyAll for PolicyRule. - */ - public static final PolicyRule DENY_ALL = fromString("DenyAll"); - - /** - * Static value AllowAll for PolicyRule. - */ - public static final PolicyRule ALLOW_ALL = fromString("AllowAll"); - - /** - * Static value AllowSameNamespace for PolicyRule. - */ - public static final PolicyRule ALLOW_SAME_NAMESPACE = fromString("AllowSameNamespace"); - - /** - * Creates a new instance of PolicyRule value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PolicyRule() { - } - - /** - * Creates or finds a PolicyRule from its string representation. - * - * @param name a name to look for. - * @return the corresponding PolicyRule. - */ - public static PolicyRule fromString(String name) { - return fromString(name, PolicyRule.class); - } - - /** - * Gets known PolicyRule values. - * - * @return known PolicyRule values. - */ - public static Collection values() { - return values(PolicyRule.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PortRange.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PortRange.java deleted file mode 100644 index 4747a3ebbaaf..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PortRange.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 port range. - */ -@Fluent -public final class PortRange implements JsonSerializable { - /* - * The minimum port that is included in the range. It should be ranged from 1 to 65535, and be less than or equal to - * portEnd. - */ - private Integer portStart; - - /* - * The maximum port that is included in the range. It should be ranged from 1 to 65535, and be greater than or equal - * to portStart. - */ - private Integer portEnd; - - /* - * The network protocol of the port. - */ - private Protocol protocol; - - /** - * Creates an instance of PortRange class. - */ - public PortRange() { - } - - /** - * Get the portStart property: The minimum port that is included in the range. It should be ranged from 1 to 65535, - * and be less than or equal to portEnd. - * - * @return the portStart value. - */ - public Integer portStart() { - return this.portStart; - } - - /** - * Set the portStart property: The minimum port that is included in the range. It should be ranged from 1 to 65535, - * and be less than or equal to portEnd. - * - * @param portStart the portStart value to set. - * @return the PortRange object itself. - */ - public PortRange withPortStart(Integer portStart) { - this.portStart = portStart; - return this; - } - - /** - * Get the portEnd property: The maximum port that is included in the range. It should be ranged from 1 to 65535, - * and be greater than or equal to portStart. - * - * @return the portEnd value. - */ - public Integer portEnd() { - return this.portEnd; - } - - /** - * Set the portEnd property: The maximum port that is included in the range. It should be ranged from 1 to 65535, - * and be greater than or equal to portStart. - * - * @param portEnd the portEnd value to set. - * @return the PortRange object itself. - */ - public PortRange withPortEnd(Integer portEnd) { - this.portEnd = portEnd; - return this; - } - - /** - * Get the protocol property: The network protocol of the port. - * - * @return the protocol value. - */ - public Protocol protocol() { - return this.protocol; - } - - /** - * Set the protocol property: The network protocol of the port. - * - * @param protocol the protocol value to set. - * @return the PortRange object itself. - */ - public PortRange withProtocol(Protocol protocol) { - this.protocol = protocol; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("portStart", this.portStart); - jsonWriter.writeNumberField("portEnd", this.portEnd); - jsonWriter.writeStringField("protocol", this.protocol == null ? null : this.protocol.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PortRange from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PortRange 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 PortRange. - */ - public static PortRange fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PortRange deserializedPortRange = new PortRange(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("portStart".equals(fieldName)) { - deserializedPortRange.portStart = reader.getNullable(JsonReader::getInt); - } else if ("portEnd".equals(fieldName)) { - deserializedPortRange.portEnd = reader.getNullable(JsonReader::getInt); - } else if ("protocol".equals(fieldName)) { - deserializedPortRange.protocol = Protocol.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedPortRange; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PowerState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PowerState.java deleted file mode 100644 index 0343811403b8..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PowerState.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 Power State of the cluster. - */ -@Fluent -public final class PowerState implements JsonSerializable { - /* - * Tells whether the cluster is Running or Stopped - */ - private Code code; - - /** - * Creates an instance of PowerState class. - */ - public PowerState() { - } - - /** - * Get the code property: Tells whether the cluster is Running or Stopped. - * - * @return the code value. - */ - public Code code() { - return this.code; - } - - /** - * Set the code property: Tells whether the cluster is Running or Stopped. - * - * @param code the code value to set. - * @return the PowerState object itself. - */ - public PowerState withCode(Code code) { - this.code = code; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("code", this.code == null ? null : this.code.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PowerState from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PowerState 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 PowerState. - */ - public static PowerState fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PowerState deserializedPowerState = new PowerState(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("code".equals(fieldName)) { - deserializedPowerState.code = Code.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedPowerState; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpoint.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpoint.java deleted file mode 100644 index 727c95cdda56..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpoint.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Private endpoint which a connection belongs to. - */ -@Fluent -public final class PrivateEndpoint implements JsonSerializable { - /* - * The resource ID of the private endpoint - */ - private String id; - - /** - * Creates an instance of PrivateEndpoint class. - */ - public PrivateEndpoint() { - } - - /** - * Get the id property: The resource ID of the private endpoint. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The resource ID of the private endpoint. - * - * @param id the id value to set. - * @return the PrivateEndpoint object itself. - */ - public PrivateEndpoint withId(String id) { - this.id = id; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpoint from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpoint 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 PrivateEndpoint. - */ - public static PrivateEndpoint fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpoint deserializedPrivateEndpoint = new PrivateEndpoint(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPrivateEndpoint.id = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpoint; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpointConnectionProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpointConnectionProvisioningState.java deleted file mode 100644 index 5c68c55a7c6a..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpointConnectionProvisioningState.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The current provisioning state. - */ -public final class PrivateEndpointConnectionProvisioningState - extends ExpandableStringEnum { - /** - * Static value Canceled for PrivateEndpointConnectionProvisioningState. - */ - public static final PrivateEndpointConnectionProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value Creating for PrivateEndpointConnectionProvisioningState. - */ - public static final PrivateEndpointConnectionProvisioningState CREATING = fromString("Creating"); - - /** - * Static value Deleting for PrivateEndpointConnectionProvisioningState. - */ - public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); - - /** - * Static value Failed for PrivateEndpointConnectionProvisioningState. - */ - public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Succeeded for PrivateEndpointConnectionProvisioningState. - */ - public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Creates a new instance of PrivateEndpointConnectionProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PrivateEndpointConnectionProvisioningState() { - } - - /** - * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding PrivateEndpointConnectionProvisioningState. - */ - public static PrivateEndpointConnectionProvisioningState fromString(String name) { - return fromString(name, PrivateEndpointConnectionProvisioningState.class); - } - - /** - * Gets known PrivateEndpointConnectionProvisioningState values. - * - * @return known PrivateEndpointConnectionProvisioningState values. - */ - public static Collection values() { - return values(PrivateEndpointConnectionProvisioningState.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateLinkServiceConnectionState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateLinkServiceConnectionState.java deleted file mode 100644 index 372d754fa982..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateLinkServiceConnectionState.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 state of a private link service connection. - */ -@Fluent -public final class PrivateLinkServiceConnectionState implements JsonSerializable { - /* - * The private link service connection status. - */ - private ConnectionStatus status; - - /* - * The private link service connection description. - */ - private String description; - - /** - * Creates an instance of PrivateLinkServiceConnectionState class. - */ - public PrivateLinkServiceConnectionState() { - } - - /** - * Get the status property: The private link service connection status. - * - * @return the status value. - */ - public ConnectionStatus status() { - return this.status; - } - - /** - * Set the status property: The private link service connection status. - * - * @param status the status value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withStatus(ConnectionStatus status) { - this.status = status; - return this; - } - - /** - * Get the description property: The private link service connection description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The private link service connection description. - * - * @param description the description value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withDescription(String description) { - this.description = description; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - jsonWriter.writeStringField("description", this.description); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkServiceConnectionState from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkServiceConnectionState 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 PrivateLinkServiceConnectionState. - */ - public static PrivateLinkServiceConnectionState fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkServiceConnectionState deserializedPrivateLinkServiceConnectionState - = new PrivateLinkServiceConnectionState(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedPrivateLinkServiceConnectionState.status - = ConnectionStatus.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedPrivateLinkServiceConnectionState.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkServiceConnectionState; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Protocol.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Protocol.java deleted file mode 100644 index 6254a5bf8b22..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Protocol.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The network protocol of the port. - */ -public final class Protocol extends ExpandableStringEnum { - /** - * Static value TCP for Protocol. - */ - public static final Protocol TCP = fromString("TCP"); - - /** - * Static value UDP for Protocol. - */ - public static final Protocol UDP = fromString("UDP"); - - /** - * Creates a new instance of Protocol value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Protocol() { - } - - /** - * Creates or finds a Protocol from its string representation. - * - * @param name a name to look for. - * @return the corresponding Protocol. - */ - public static Protocol fromString(String name) { - return fromString(name, Protocol.class); - } - - /** - * Gets known Protocol values. - * - * @return known Protocol values. - */ - public static Collection values() { - return values(Protocol.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java deleted file mode 100644 index fbe44e756c02..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * PublicNetworkAccess of the managedCluster. Allow or deny public network access for AKS. - */ -public final class PublicNetworkAccess extends ExpandableStringEnum { - /** - * Static value Enabled for PublicNetworkAccess. - */ - public static final PublicNetworkAccess ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for PublicNetworkAccess. - */ - public static final PublicNetworkAccess DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of PublicNetworkAccess value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PublicNetworkAccess() { - } - - /** - * Creates or finds a PublicNetworkAccess from its string representation. - * - * @param name a name to look for. - * @return the corresponding PublicNetworkAccess. - */ - public static PublicNetworkAccess fromString(String name) { - return fromString(name, PublicNetworkAccess.class); - } - - /** - * Gets known PublicNetworkAccess values. - * - * @return known PublicNetworkAccess values. - */ - public static Collection values() { - return values(PublicNetworkAccess.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java deleted file mode 100644 index aa8addd1d0cf..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. - */ -@Fluent -public final class RelativeMonthlySchedule implements JsonSerializable { - /* - * Specifies the number of months between each set of occurrences. - */ - private int intervalMonths; - - /* - * The week index. Specifies on which week of the month the dayOfWeek applies. - */ - private Type weekIndex; - - /* - * Specifies on which day of the week the maintenance occurs. - */ - private WeekDay dayOfWeek; - - /** - * Creates an instance of RelativeMonthlySchedule class. - */ - public RelativeMonthlySchedule() { - } - - /** - * Get the intervalMonths property: Specifies the number of months between each set of occurrences. - * - * @return the intervalMonths value. - */ - public int intervalMonths() { - return this.intervalMonths; - } - - /** - * Set the intervalMonths property: Specifies the number of months between each set of occurrences. - * - * @param intervalMonths the intervalMonths value to set. - * @return the RelativeMonthlySchedule object itself. - */ - public RelativeMonthlySchedule withIntervalMonths(int intervalMonths) { - this.intervalMonths = intervalMonths; - return this; - } - - /** - * Get the weekIndex property: The week index. Specifies on which week of the month the dayOfWeek applies. - * - * @return the weekIndex value. - */ - public Type weekIndex() { - return this.weekIndex; - } - - /** - * Set the weekIndex property: The week index. Specifies on which week of the month the dayOfWeek applies. - * - * @param weekIndex the weekIndex value to set. - * @return the RelativeMonthlySchedule object itself. - */ - public RelativeMonthlySchedule withWeekIndex(Type weekIndex) { - this.weekIndex = weekIndex; - return this; - } - - /** - * Get the dayOfWeek property: Specifies on which day of the week the maintenance occurs. - * - * @return the dayOfWeek value. - */ - public WeekDay dayOfWeek() { - return this.dayOfWeek; - } - - /** - * Set the dayOfWeek property: Specifies on which day of the week the maintenance occurs. - * - * @param dayOfWeek the dayOfWeek value to set. - * @return the RelativeMonthlySchedule object itself. - */ - public RelativeMonthlySchedule withDayOfWeek(WeekDay dayOfWeek) { - this.dayOfWeek = dayOfWeek; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (weekIndex() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property weekIndex in model RelativeMonthlySchedule")); - } - if (dayOfWeek() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property dayOfWeek in model RelativeMonthlySchedule")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RelativeMonthlySchedule.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeIntField("intervalMonths", this.intervalMonths); - jsonWriter.writeStringField("weekIndex", this.weekIndex == null ? null : this.weekIndex.toString()); - jsonWriter.writeStringField("dayOfWeek", this.dayOfWeek == null ? null : this.dayOfWeek.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RelativeMonthlySchedule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RelativeMonthlySchedule 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 RelativeMonthlySchedule. - */ - public static RelativeMonthlySchedule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RelativeMonthlySchedule deserializedRelativeMonthlySchedule = new RelativeMonthlySchedule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("intervalMonths".equals(fieldName)) { - deserializedRelativeMonthlySchedule.intervalMonths = reader.getInt(); - } else if ("weekIndex".equals(fieldName)) { - deserializedRelativeMonthlySchedule.weekIndex = Type.fromString(reader.getString()); - } else if ("dayOfWeek".equals(fieldName)) { - deserializedRelativeMonthlySchedule.dayOfWeek = WeekDay.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedRelativeMonthlySchedule; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceIdentityType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceIdentityType.java deleted file mode 100644 index 82cdb1874ff7..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceIdentityType.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -/** - * The type of identity used for the managed cluster. For more information see [use managed identities in - * AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). - */ -public enum ResourceIdentityType { - /** - * Enum value SystemAssigned. - */ - SYSTEM_ASSIGNED("SystemAssigned"), - - /** - * Enum value UserAssigned. - */ - USER_ASSIGNED("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/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceQuota.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceQuota.java deleted file mode 100644 index 0864b9f04fc2..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceQuota.java +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Resource quota for the namespace. - */ -@Fluent -public final class ResourceQuota implements JsonSerializable { - /* - * CPU request of the namespace in one-thousandth CPU form. See [CPU resource - * units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu) for more - * details. - */ - private String cpuRequest; - - /* - * CPU limit of the namespace in one-thousandth CPU form. See [CPU resource - * units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu) for more - * details. - */ - private String cpuLimit; - - /* - * Memory request of the namespace in the power-of-two equivalents form: Ei, Pi, Ti, Gi, Mi, Ki. See [Memory - * resource units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory) - * for more details. - */ - private String memoryRequest; - - /* - * Memory limit of the namespace in the power-of-two equivalents form: Ei, Pi, Ti, Gi, Mi, Ki. See [Memory resource - * units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory) for more - * details. - */ - private String memoryLimit; - - /** - * Creates an instance of ResourceQuota class. - */ - public ResourceQuota() { - } - - /** - * Get the cpuRequest property: CPU request of the namespace in one-thousandth CPU form. See [CPU resource - * units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu) for more - * details. - * - * @return the cpuRequest value. - */ - public String cpuRequest() { - return this.cpuRequest; - } - - /** - * Set the cpuRequest property: CPU request of the namespace in one-thousandth CPU form. See [CPU resource - * units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu) for more - * details. - * - * @param cpuRequest the cpuRequest value to set. - * @return the ResourceQuota object itself. - */ - public ResourceQuota withCpuRequest(String cpuRequest) { - this.cpuRequest = cpuRequest; - return this; - } - - /** - * Get the cpuLimit property: CPU limit of the namespace in one-thousandth CPU form. See [CPU resource - * units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu) for more - * details. - * - * @return the cpuLimit value. - */ - public String cpuLimit() { - return this.cpuLimit; - } - - /** - * Set the cpuLimit property: CPU limit of the namespace in one-thousandth CPU form. See [CPU resource - * units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu) for more - * details. - * - * @param cpuLimit the cpuLimit value to set. - * @return the ResourceQuota object itself. - */ - public ResourceQuota withCpuLimit(String cpuLimit) { - this.cpuLimit = cpuLimit; - return this; - } - - /** - * Get the memoryRequest property: Memory request of the namespace in the power-of-two equivalents form: Ei, Pi, Ti, - * Gi, Mi, Ki. See [Memory resource - * units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory) for more - * details. - * - * @return the memoryRequest value. - */ - public String memoryRequest() { - return this.memoryRequest; - } - - /** - * Set the memoryRequest property: Memory request of the namespace in the power-of-two equivalents form: Ei, Pi, Ti, - * Gi, Mi, Ki. See [Memory resource - * units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory) for more - * details. - * - * @param memoryRequest the memoryRequest value to set. - * @return the ResourceQuota object itself. - */ - public ResourceQuota withMemoryRequest(String memoryRequest) { - this.memoryRequest = memoryRequest; - return this; - } - - /** - * Get the memoryLimit property: Memory limit of the namespace in the power-of-two equivalents form: Ei, Pi, Ti, Gi, - * Mi, Ki. See [Memory resource - * units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory) for more - * details. - * - * @return the memoryLimit value. - */ - public String memoryLimit() { - return this.memoryLimit; - } - - /** - * Set the memoryLimit property: Memory limit of the namespace in the power-of-two equivalents form: Ei, Pi, Ti, Gi, - * Mi, Ki. See [Memory resource - * units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory) for more - * details. - * - * @param memoryLimit the memoryLimit value to set. - * @return the ResourceQuota object itself. - */ - public ResourceQuota withMemoryLimit(String memoryLimit) { - this.memoryLimit = memoryLimit; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("cpuRequest", this.cpuRequest); - jsonWriter.writeStringField("cpuLimit", this.cpuLimit); - jsonWriter.writeStringField("memoryRequest", this.memoryRequest); - jsonWriter.writeStringField("memoryLimit", this.memoryLimit); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResourceQuota from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResourceQuota 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 ResourceQuota. - */ - public static ResourceQuota fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResourceQuota deserializedResourceQuota = new ResourceQuota(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("cpuRequest".equals(fieldName)) { - deserializedResourceQuota.cpuRequest = reader.getString(); - } else if ("cpuLimit".equals(fieldName)) { - deserializedResourceQuota.cpuLimit = reader.getString(); - } else if ("memoryRequest".equals(fieldName)) { - deserializedResourceQuota.memoryRequest = reader.getString(); - } else if ("memoryLimit".equals(fieldName)) { - deserializedResourceQuota.memoryLimit = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedResourceQuota; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceReference.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceReference.java deleted file mode 100644 index 85d638939747..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceReference.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 reference to an Azure resource. - */ -@Fluent -public final class ResourceReference implements JsonSerializable { - /* - * The fully qualified Azure resource id. - */ - private String id; - - /** - * Creates an instance of ResourceReference class. - */ - public ResourceReference() { - } - - /** - * Get the id property: The fully qualified Azure resource id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The fully qualified Azure resource id. - * - * @param id the id value to set. - * @return the ResourceReference object itself. - */ - public ResourceReference withId(String id) { - this.id = id; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResourceReference from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResourceReference 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 ResourceReference. - */ - public static ResourceReference fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResourceReference deserializedResourceReference = new ResourceReference(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedResourceReference.id = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedResourceReference; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java deleted file mode 100644 index 70664c2e4cac..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The restriction level applied to the cluster's node resource group. If not specified, the default is 'Unrestricted'. - */ -public final class RestrictionLevel extends ExpandableStringEnum { - /** - * Static value Unrestricted for RestrictionLevel. - */ - public static final RestrictionLevel UNRESTRICTED = fromString("Unrestricted"); - - /** - * Static value ReadOnly for RestrictionLevel. - */ - public static final RestrictionLevel READ_ONLY = fromString("ReadOnly"); - - /** - * Creates a new instance of RestrictionLevel value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RestrictionLevel() { - } - - /** - * Creates or finds a RestrictionLevel from its string representation. - * - * @param name a name to look for. - * @return the corresponding RestrictionLevel. - */ - public static RestrictionLevel fromString(String name) { - return fromString(name, RestrictionLevel.class); - } - - /** - * Gets known RestrictionLevel values. - * - * @return known RestrictionLevel values. - */ - public static Collection values() { - return values(RestrictionLevel.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RunCommandRequest.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RunCommandRequest.java deleted file mode 100644 index ff3faecec4df..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RunCommandRequest.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -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 run command request. - */ -@Fluent -public final class RunCommandRequest implements JsonSerializable { - /* - * The command to run. - */ - private String command; - - /* - * A base64 encoded zip file containing the files required by the command. - */ - private String context; - - /* - * AuthToken issued for AKS AAD Server App. - */ - private String clusterToken; - - /** - * Creates an instance of RunCommandRequest class. - */ - public RunCommandRequest() { - } - - /** - * Get the command property: The command to run. - * - * @return the command value. - */ - public String command() { - return this.command; - } - - /** - * Set the command property: The command to run. - * - * @param command the command value to set. - * @return the RunCommandRequest object itself. - */ - public RunCommandRequest withCommand(String command) { - this.command = command; - return this; - } - - /** - * Get the context property: A base64 encoded zip file containing the files required by the command. - * - * @return the context value. - */ - public String context() { - return this.context; - } - - /** - * Set the context property: A base64 encoded zip file containing the files required by the command. - * - * @param context the context value to set. - * @return the RunCommandRequest object itself. - */ - public RunCommandRequest withContext(String context) { - this.context = context; - return this; - } - - /** - * Get the clusterToken property: AuthToken issued for AKS AAD Server App. - * - * @return the clusterToken value. - */ - public String clusterToken() { - return this.clusterToken; - } - - /** - * Set the clusterToken property: AuthToken issued for AKS AAD Server App. - * - * @param clusterToken the clusterToken value to set. - * @return the RunCommandRequest object itself. - */ - public RunCommandRequest withClusterToken(String clusterToken) { - this.clusterToken = clusterToken; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (command() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property command in model RunCommandRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RunCommandRequest.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("command", this.command); - jsonWriter.writeStringField("context", this.context); - jsonWriter.writeStringField("clusterToken", this.clusterToken); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RunCommandRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RunCommandRequest 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 RunCommandRequest. - */ - public static RunCommandRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RunCommandRequest deserializedRunCommandRequest = new RunCommandRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("command".equals(fieldName)) { - deserializedRunCommandRequest.command = reader.getString(); - } else if ("context".equals(fieldName)) { - deserializedRunCommandRequest.context = reader.getString(); - } else if ("clusterToken".equals(fieldName)) { - deserializedRunCommandRequest.clusterToken = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRunCommandRequest; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleDownMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleDownMode.java deleted file mode 100644 index 94132cc69826..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleDownMode.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Describes how VMs are added to or removed from Agent Pools. See [billing - * states](https://docs.microsoft.com/azure/virtual-machines/states-billing). - */ -public final class ScaleDownMode extends ExpandableStringEnum { - /** - * Static value Delete for ScaleDownMode. - */ - public static final ScaleDownMode DELETE = fromString("Delete"); - - /** - * Static value Deallocate for ScaleDownMode. - */ - public static final ScaleDownMode DEALLOCATE = fromString("Deallocate"); - - /** - * Creates a new instance of ScaleDownMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScaleDownMode() { - } - - /** - * Creates or finds a ScaleDownMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScaleDownMode. - */ - public static ScaleDownMode fromString(String name) { - return fromString(name, ScaleDownMode.class); - } - - /** - * Gets known ScaleDownMode values. - * - * @return known ScaleDownMode values. - */ - public static Collection values() { - return values(ScaleDownMode.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java deleted file mode 100644 index 1796156c2698..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Specifications on how to scale a VirtualMachines agent pool. - */ -@Fluent -public final class ScaleProfile implements JsonSerializable { - /* - * Specifications on how to scale the VirtualMachines agent pool to a fixed size. - */ - private List manual; - - /** - * Creates an instance of ScaleProfile class. - */ - public ScaleProfile() { - } - - /** - * Get the manual property: Specifications on how to scale the VirtualMachines agent pool to a fixed size. - * - * @return the manual value. - */ - public List manual() { - return this.manual; - } - - /** - * Set the manual property: Specifications on how to scale the VirtualMachines agent pool to a fixed size. - * - * @param manual the manual value to set. - * @return the ScaleProfile object itself. - */ - public ScaleProfile withManual(List manual) { - this.manual = manual; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (manual() != null) { - manual().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("manual", this.manual, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScaleProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScaleProfile 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 ScaleProfile. - */ - public static ScaleProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScaleProfile deserializedScaleProfile = new ScaleProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("manual".equals(fieldName)) { - List manual = reader.readArray(reader1 -> ManualScaleProfile.fromJson(reader1)); - deserializedScaleProfile.manual = manual; - } else { - reader.skipChildren(); - } - } - - return deserializedScaleProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetEvictionPolicy.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetEvictionPolicy.java deleted file mode 100644 index 741e98374bbd..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetEvictionPolicy.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The Virtual Machine Scale Set eviction policy. The eviction policy specifies what to do with the VM when it is - * evicted. The default is Delete. For more information about eviction see [spot - * VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms). - */ -public final class ScaleSetEvictionPolicy extends ExpandableStringEnum { - /** - * Static value Delete for ScaleSetEvictionPolicy. - */ - public static final ScaleSetEvictionPolicy DELETE = fromString("Delete"); - - /** - * Static value Deallocate for ScaleSetEvictionPolicy. - */ - public static final ScaleSetEvictionPolicy DEALLOCATE = fromString("Deallocate"); - - /** - * Creates a new instance of ScaleSetEvictionPolicy value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScaleSetEvictionPolicy() { - } - - /** - * Creates or finds a ScaleSetEvictionPolicy from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScaleSetEvictionPolicy. - */ - public static ScaleSetEvictionPolicy fromString(String name) { - return fromString(name, ScaleSetEvictionPolicy.class); - } - - /** - * Gets known ScaleSetEvictionPolicy values. - * - * @return known ScaleSetEvictionPolicy values. - */ - public static Collection values() { - return values(ScaleSetEvictionPolicy.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetPriority.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetPriority.java deleted file mode 100644 index 05fc6bce3ab4..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetPriority.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The Virtual Machine Scale Set priority. - */ -public final class ScaleSetPriority extends ExpandableStringEnum { - /** - * Static value Spot for ScaleSetPriority. - */ - public static final ScaleSetPriority SPOT = fromString("Spot"); - - /** - * Static value Regular for ScaleSetPriority. - */ - public static final ScaleSetPriority REGULAR = fromString("Regular"); - - /** - * Creates a new instance of ScaleSetPriority value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScaleSetPriority() { - } - - /** - * Creates or finds a ScaleSetPriority from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScaleSetPriority. - */ - public static ScaleSetPriority fromString(String name) { - return fromString(name, ScaleSetPriority.class); - } - - /** - * Gets known ScaleSetPriority values. - * - * @return known ScaleSetPriority values. - */ - public static Collection values() { - return values(ScaleSetPriority.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Schedule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Schedule.java deleted file mode 100644 index 777d7a00dbcb..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Schedule.java +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * One and only one of the schedule types should be specified. Choose either 'daily', 'weekly', 'absoluteMonthly' or - * 'relativeMonthly' for your maintenance schedule. - */ -@Fluent -public final class Schedule implements JsonSerializable { - /* - * For schedules like: 'recur every day' or 'recur every 3 days'. - */ - private DailySchedule daily; - - /* - * For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. - */ - private WeeklySchedule weekly; - - /* - * For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. - */ - private AbsoluteMonthlySchedule absoluteMonthly; - - /* - * For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. - */ - private RelativeMonthlySchedule relativeMonthly; - - /** - * Creates an instance of Schedule class. - */ - public Schedule() { - } - - /** - * Get the daily property: For schedules like: 'recur every day' or 'recur every 3 days'. - * - * @return the daily value. - */ - public DailySchedule daily() { - return this.daily; - } - - /** - * Set the daily property: For schedules like: 'recur every day' or 'recur every 3 days'. - * - * @param daily the daily value to set. - * @return the Schedule object itself. - */ - public Schedule withDaily(DailySchedule daily) { - this.daily = daily; - return this; - } - - /** - * Get the weekly property: For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. - * - * @return the weekly value. - */ - public WeeklySchedule weekly() { - return this.weekly; - } - - /** - * Set the weekly property: For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. - * - * @param weekly the weekly value to set. - * @return the Schedule object itself. - */ - public Schedule withWeekly(WeeklySchedule weekly) { - this.weekly = weekly; - return this; - } - - /** - * Get the absoluteMonthly property: For schedules like: 'recur every month on the 15th' or 'recur every 3 months on - * the 20th'. - * - * @return the absoluteMonthly value. - */ - public AbsoluteMonthlySchedule absoluteMonthly() { - return this.absoluteMonthly; - } - - /** - * Set the absoluteMonthly property: For schedules like: 'recur every month on the 15th' or 'recur every 3 months on - * the 20th'. - * - * @param absoluteMonthly the absoluteMonthly value to set. - * @return the Schedule object itself. - */ - public Schedule withAbsoluteMonthly(AbsoluteMonthlySchedule absoluteMonthly) { - this.absoluteMonthly = absoluteMonthly; - return this; - } - - /** - * Get the relativeMonthly property: For schedules like: 'recur every month on the first Monday' or 'recur every 3 - * months on last Friday'. - * - * @return the relativeMonthly value. - */ - public RelativeMonthlySchedule relativeMonthly() { - return this.relativeMonthly; - } - - /** - * Set the relativeMonthly property: For schedules like: 'recur every month on the first Monday' or 'recur every 3 - * months on last Friday'. - * - * @param relativeMonthly the relativeMonthly value to set. - * @return the Schedule object itself. - */ - public Schedule withRelativeMonthly(RelativeMonthlySchedule relativeMonthly) { - this.relativeMonthly = relativeMonthly; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (daily() != null) { - daily().validate(); - } - if (weekly() != null) { - weekly().validate(); - } - if (absoluteMonthly() != null) { - absoluteMonthly().validate(); - } - if (relativeMonthly() != null) { - relativeMonthly().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("daily", this.daily); - jsonWriter.writeJsonField("weekly", this.weekly); - jsonWriter.writeJsonField("absoluteMonthly", this.absoluteMonthly); - jsonWriter.writeJsonField("relativeMonthly", this.relativeMonthly); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Schedule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Schedule 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 Schedule. - */ - public static Schedule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Schedule deserializedSchedule = new Schedule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("daily".equals(fieldName)) { - deserializedSchedule.daily = DailySchedule.fromJson(reader); - } else if ("weekly".equals(fieldName)) { - deserializedSchedule.weekly = WeeklySchedule.fromJson(reader); - } else if ("absoluteMonthly".equals(fieldName)) { - deserializedSchedule.absoluteMonthly = AbsoluteMonthlySchedule.fromJson(reader); - } else if ("relativeMonthly".equals(fieldName)) { - deserializedSchedule.relativeMonthly = RelativeMonthlySchedule.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSchedule; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshMode.java deleted file mode 100644 index 1f586d09055c..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshMode.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Mode of the service mesh. - */ -public final class ServiceMeshMode extends ExpandableStringEnum { - /** - * Static value Istio for ServiceMeshMode. - */ - public static final ServiceMeshMode ISTIO = fromString("Istio"); - - /** - * Static value Disabled for ServiceMeshMode. - */ - public static final ServiceMeshMode DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of ServiceMeshMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ServiceMeshMode() { - } - - /** - * Creates or finds a ServiceMeshMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding ServiceMeshMode. - */ - public static ServiceMeshMode fromString(String name) { - return fromString(name, ServiceMeshMode.class); - } - - /** - * Gets known ServiceMeshMode values. - * - * @return known ServiceMeshMode values. - */ - public static Collection values() { - return values(ServiceMeshMode.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshProfile.java deleted file mode 100644 index f66122abba02..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshProfile.java +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Service mesh profile for a managed cluster. - */ -@Fluent -public final class ServiceMeshProfile implements JsonSerializable { - /* - * Mode of the service mesh. - */ - private ServiceMeshMode mode; - - /* - * Istio service mesh configuration. - */ - private IstioServiceMesh istio; - - /** - * Creates an instance of ServiceMeshProfile class. - */ - public ServiceMeshProfile() { - } - - /** - * Get the mode property: Mode of the service mesh. - * - * @return the mode value. - */ - public ServiceMeshMode mode() { - return this.mode; - } - - /** - * Set the mode property: Mode of the service mesh. - * - * @param mode the mode value to set. - * @return the ServiceMeshProfile object itself. - */ - public ServiceMeshProfile withMode(ServiceMeshMode mode) { - this.mode = mode; - return this; - } - - /** - * Get the istio property: Istio service mesh configuration. - * - * @return the istio value. - */ - public IstioServiceMesh istio() { - return this.istio; - } - - /** - * Set the istio property: Istio service mesh configuration. - * - * @param istio the istio value to set. - * @return the ServiceMeshProfile object itself. - */ - public ServiceMeshProfile withIstio(IstioServiceMesh istio) { - this.istio = istio; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (mode() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property mode in model ServiceMeshProfile")); - } - if (istio() != null) { - istio().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ServiceMeshProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - jsonWriter.writeJsonField("istio", this.istio); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ServiceMeshProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServiceMeshProfile 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 ServiceMeshProfile. - */ - public static ServiceMeshProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ServiceMeshProfile deserializedServiceMeshProfile = new ServiceMeshProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mode".equals(fieldName)) { - deserializedServiceMeshProfile.mode = ServiceMeshMode.fromString(reader.getString()); - } else if ("istio".equals(fieldName)) { - deserializedServiceMeshProfile.istio = IstioServiceMesh.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedServiceMeshProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotListResult.java deleted file mode 100644 index ceadaedc9030..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotListResult.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 com.azure.resourcemanager.containerservice.fluent.models.SnapshotInner; -import java.io.IOException; -import java.util.List; - -/** - * The response from the List Snapshots operation. - */ -@Fluent -public final class SnapshotListResult implements JsonSerializable { - /* - * The list of snapshots. - */ - private List value; - - /* - * The URL to get the next set of snapshot results. - */ - private String nextLink; - - /** - * Creates an instance of SnapshotListResult class. - */ - public SnapshotListResult() { - } - - /** - * Get the value property: The list of snapshots. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of snapshots. - * - * @param value the value value to set. - * @return the SnapshotListResult object itself. - */ - public SnapshotListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to get the next set of snapshot results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SnapshotListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SnapshotListResult 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 SnapshotListResult. - */ - public static SnapshotListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SnapshotListResult deserializedSnapshotListResult = new SnapshotListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> SnapshotInner.fromJson(reader1)); - deserializedSnapshotListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedSnapshotListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSnapshotListResult; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java deleted file mode 100644 index f538d165b648..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The type of a snapshot. The default is NodePool. - */ -public final class SnapshotType extends ExpandableStringEnum { - /** - * Static value NodePool for SnapshotType. - */ - public static final SnapshotType NODE_POOL = fromString("NodePool"); - - /** - * Creates a new instance of SnapshotType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SnapshotType() { - } - - /** - * Creates or finds a SnapshotType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SnapshotType. - */ - public static SnapshotType fromString(String name) { - return fromString(name, SnapshotType.class); - } - - /** - * Gets known SnapshotType values. - * - * @return known SnapshotType values. - */ - public static Collection values() { - return values(SnapshotType.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SysctlConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SysctlConfig.java deleted file mode 100644 index 54dd49cd01f0..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SysctlConfig.java +++ /dev/null @@ -1,849 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Sysctl settings for Linux agent nodes. - */ -@Fluent -public final class SysctlConfig implements JsonSerializable { - /* - * Sysctl setting net.core.somaxconn. - */ - private Integer netCoreSomaxconn; - - /* - * Sysctl setting net.core.netdev_max_backlog. - */ - private Integer netCoreNetdevMaxBacklog; - - /* - * Sysctl setting net.core.rmem_default. - */ - private Integer netCoreRmemDefault; - - /* - * Sysctl setting net.core.rmem_max. - */ - private Integer netCoreRmemMax; - - /* - * Sysctl setting net.core.wmem_default. - */ - private Integer netCoreWmemDefault; - - /* - * Sysctl setting net.core.wmem_max. - */ - private Integer netCoreWmemMax; - - /* - * Sysctl setting net.core.optmem_max. - */ - private Integer netCoreOptmemMax; - - /* - * Sysctl setting net.ipv4.tcp_max_syn_backlog. - */ - private Integer netIpv4TcpMaxSynBacklog; - - /* - * Sysctl setting net.ipv4.tcp_max_tw_buckets. - */ - private Integer netIpv4TcpMaxTwBuckets; - - /* - * Sysctl setting net.ipv4.tcp_fin_timeout. - */ - private Integer netIpv4TcpFinTimeout; - - /* - * Sysctl setting net.ipv4.tcp_keepalive_time. - */ - private Integer netIpv4TcpKeepaliveTime; - - /* - * Sysctl setting net.ipv4.tcp_keepalive_probes. - */ - private Integer netIpv4TcpKeepaliveProbes; - - /* - * Sysctl setting net.ipv4.tcp_keepalive_intvl. - */ - private Integer netIpv4TcpkeepaliveIntvl; - - /* - * Sysctl setting net.ipv4.tcp_tw_reuse. - */ - private Boolean netIpv4TcpTwReuse; - - /* - * Sysctl setting net.ipv4.ip_local_port_range. - */ - private String netIpv4IpLocalPortRange; - - /* - * Sysctl setting net.ipv4.neigh.default.gc_thresh1. - */ - private Integer netIpv4NeighDefaultGcThresh1; - - /* - * Sysctl setting net.ipv4.neigh.default.gc_thresh2. - */ - private Integer netIpv4NeighDefaultGcThresh2; - - /* - * Sysctl setting net.ipv4.neigh.default.gc_thresh3. - */ - private Integer netIpv4NeighDefaultGcThresh3; - - /* - * Sysctl setting net.netfilter.nf_conntrack_max. - */ - private Integer netNetfilterNfConntrackMax; - - /* - * Sysctl setting net.netfilter.nf_conntrack_buckets. - */ - private Integer netNetfilterNfConntrackBuckets; - - /* - * Sysctl setting fs.inotify.max_user_watches. - */ - private Integer fsInotifyMaxUserWatches; - - /* - * Sysctl setting fs.file-max. - */ - private Integer fsFileMax; - - /* - * Sysctl setting fs.aio-max-nr. - */ - private Integer fsAioMaxNr; - - /* - * Sysctl setting fs.nr_open. - */ - private Integer fsNrOpen; - - /* - * Sysctl setting kernel.threads-max. - */ - private Integer kernelThreadsMax; - - /* - * Sysctl setting vm.max_map_count. - */ - private Integer vmMaxMapCount; - - /* - * Sysctl setting vm.swappiness. - */ - private Integer vmSwappiness; - - /* - * Sysctl setting vm.vfs_cache_pressure. - */ - private Integer vmVfsCachePressure; - - /** - * Creates an instance of SysctlConfig class. - */ - public SysctlConfig() { - } - - /** - * Get the netCoreSomaxconn property: Sysctl setting net.core.somaxconn. - * - * @return the netCoreSomaxconn value. - */ - public Integer netCoreSomaxconn() { - return this.netCoreSomaxconn; - } - - /** - * Set the netCoreSomaxconn property: Sysctl setting net.core.somaxconn. - * - * @param netCoreSomaxconn the netCoreSomaxconn value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withNetCoreSomaxconn(Integer netCoreSomaxconn) { - this.netCoreSomaxconn = netCoreSomaxconn; - return this; - } - - /** - * Get the netCoreNetdevMaxBacklog property: Sysctl setting net.core.netdev_max_backlog. - * - * @return the netCoreNetdevMaxBacklog value. - */ - public Integer netCoreNetdevMaxBacklog() { - return this.netCoreNetdevMaxBacklog; - } - - /** - * Set the netCoreNetdevMaxBacklog property: Sysctl setting net.core.netdev_max_backlog. - * - * @param netCoreNetdevMaxBacklog the netCoreNetdevMaxBacklog value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withNetCoreNetdevMaxBacklog(Integer netCoreNetdevMaxBacklog) { - this.netCoreNetdevMaxBacklog = netCoreNetdevMaxBacklog; - return this; - } - - /** - * Get the netCoreRmemDefault property: Sysctl setting net.core.rmem_default. - * - * @return the netCoreRmemDefault value. - */ - public Integer netCoreRmemDefault() { - return this.netCoreRmemDefault; - } - - /** - * Set the netCoreRmemDefault property: Sysctl setting net.core.rmem_default. - * - * @param netCoreRmemDefault the netCoreRmemDefault value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withNetCoreRmemDefault(Integer netCoreRmemDefault) { - this.netCoreRmemDefault = netCoreRmemDefault; - return this; - } - - /** - * Get the netCoreRmemMax property: Sysctl setting net.core.rmem_max. - * - * @return the netCoreRmemMax value. - */ - public Integer netCoreRmemMax() { - return this.netCoreRmemMax; - } - - /** - * Set the netCoreRmemMax property: Sysctl setting net.core.rmem_max. - * - * @param netCoreRmemMax the netCoreRmemMax value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withNetCoreRmemMax(Integer netCoreRmemMax) { - this.netCoreRmemMax = netCoreRmemMax; - return this; - } - - /** - * Get the netCoreWmemDefault property: Sysctl setting net.core.wmem_default. - * - * @return the netCoreWmemDefault value. - */ - public Integer netCoreWmemDefault() { - return this.netCoreWmemDefault; - } - - /** - * Set the netCoreWmemDefault property: Sysctl setting net.core.wmem_default. - * - * @param netCoreWmemDefault the netCoreWmemDefault value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withNetCoreWmemDefault(Integer netCoreWmemDefault) { - this.netCoreWmemDefault = netCoreWmemDefault; - return this; - } - - /** - * Get the netCoreWmemMax property: Sysctl setting net.core.wmem_max. - * - * @return the netCoreWmemMax value. - */ - public Integer netCoreWmemMax() { - return this.netCoreWmemMax; - } - - /** - * Set the netCoreWmemMax property: Sysctl setting net.core.wmem_max. - * - * @param netCoreWmemMax the netCoreWmemMax value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withNetCoreWmemMax(Integer netCoreWmemMax) { - this.netCoreWmemMax = netCoreWmemMax; - return this; - } - - /** - * Get the netCoreOptmemMax property: Sysctl setting net.core.optmem_max. - * - * @return the netCoreOptmemMax value. - */ - public Integer netCoreOptmemMax() { - return this.netCoreOptmemMax; - } - - /** - * Set the netCoreOptmemMax property: Sysctl setting net.core.optmem_max. - * - * @param netCoreOptmemMax the netCoreOptmemMax value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withNetCoreOptmemMax(Integer netCoreOptmemMax) { - this.netCoreOptmemMax = netCoreOptmemMax; - return this; - } - - /** - * Get the netIpv4TcpMaxSynBacklog property: Sysctl setting net.ipv4.tcp_max_syn_backlog. - * - * @return the netIpv4TcpMaxSynBacklog value. - */ - public Integer netIpv4TcpMaxSynBacklog() { - return this.netIpv4TcpMaxSynBacklog; - } - - /** - * Set the netIpv4TcpMaxSynBacklog property: Sysctl setting net.ipv4.tcp_max_syn_backlog. - * - * @param netIpv4TcpMaxSynBacklog the netIpv4TcpMaxSynBacklog value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withNetIpv4TcpMaxSynBacklog(Integer netIpv4TcpMaxSynBacklog) { - this.netIpv4TcpMaxSynBacklog = netIpv4TcpMaxSynBacklog; - return this; - } - - /** - * Get the netIpv4TcpMaxTwBuckets property: Sysctl setting net.ipv4.tcp_max_tw_buckets. - * - * @return the netIpv4TcpMaxTwBuckets value. - */ - public Integer netIpv4TcpMaxTwBuckets() { - return this.netIpv4TcpMaxTwBuckets; - } - - /** - * Set the netIpv4TcpMaxTwBuckets property: Sysctl setting net.ipv4.tcp_max_tw_buckets. - * - * @param netIpv4TcpMaxTwBuckets the netIpv4TcpMaxTwBuckets value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withNetIpv4TcpMaxTwBuckets(Integer netIpv4TcpMaxTwBuckets) { - this.netIpv4TcpMaxTwBuckets = netIpv4TcpMaxTwBuckets; - return this; - } - - /** - * Get the netIpv4TcpFinTimeout property: Sysctl setting net.ipv4.tcp_fin_timeout. - * - * @return the netIpv4TcpFinTimeout value. - */ - public Integer netIpv4TcpFinTimeout() { - return this.netIpv4TcpFinTimeout; - } - - /** - * Set the netIpv4TcpFinTimeout property: Sysctl setting net.ipv4.tcp_fin_timeout. - * - * @param netIpv4TcpFinTimeout the netIpv4TcpFinTimeout value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withNetIpv4TcpFinTimeout(Integer netIpv4TcpFinTimeout) { - this.netIpv4TcpFinTimeout = netIpv4TcpFinTimeout; - return this; - } - - /** - * Get the netIpv4TcpKeepaliveTime property: Sysctl setting net.ipv4.tcp_keepalive_time. - * - * @return the netIpv4TcpKeepaliveTime value. - */ - public Integer netIpv4TcpKeepaliveTime() { - return this.netIpv4TcpKeepaliveTime; - } - - /** - * Set the netIpv4TcpKeepaliveTime property: Sysctl setting net.ipv4.tcp_keepalive_time. - * - * @param netIpv4TcpKeepaliveTime the netIpv4TcpKeepaliveTime value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withNetIpv4TcpKeepaliveTime(Integer netIpv4TcpKeepaliveTime) { - this.netIpv4TcpKeepaliveTime = netIpv4TcpKeepaliveTime; - return this; - } - - /** - * Get the netIpv4TcpKeepaliveProbes property: Sysctl setting net.ipv4.tcp_keepalive_probes. - * - * @return the netIpv4TcpKeepaliveProbes value. - */ - public Integer netIpv4TcpKeepaliveProbes() { - return this.netIpv4TcpKeepaliveProbes; - } - - /** - * Set the netIpv4TcpKeepaliveProbes property: Sysctl setting net.ipv4.tcp_keepalive_probes. - * - * @param netIpv4TcpKeepaliveProbes the netIpv4TcpKeepaliveProbes value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withNetIpv4TcpKeepaliveProbes(Integer netIpv4TcpKeepaliveProbes) { - this.netIpv4TcpKeepaliveProbes = netIpv4TcpKeepaliveProbes; - return this; - } - - /** - * Get the netIpv4TcpkeepaliveIntvl property: Sysctl setting net.ipv4.tcp_keepalive_intvl. - * - * @return the netIpv4TcpkeepaliveIntvl value. - */ - public Integer netIpv4TcpkeepaliveIntvl() { - return this.netIpv4TcpkeepaliveIntvl; - } - - /** - * Set the netIpv4TcpkeepaliveIntvl property: Sysctl setting net.ipv4.tcp_keepalive_intvl. - * - * @param netIpv4TcpkeepaliveIntvl the netIpv4TcpkeepaliveIntvl value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withNetIpv4TcpkeepaliveIntvl(Integer netIpv4TcpkeepaliveIntvl) { - this.netIpv4TcpkeepaliveIntvl = netIpv4TcpkeepaliveIntvl; - return this; - } - - /** - * Get the netIpv4TcpTwReuse property: Sysctl setting net.ipv4.tcp_tw_reuse. - * - * @return the netIpv4TcpTwReuse value. - */ - public Boolean netIpv4TcpTwReuse() { - return this.netIpv4TcpTwReuse; - } - - /** - * Set the netIpv4TcpTwReuse property: Sysctl setting net.ipv4.tcp_tw_reuse. - * - * @param netIpv4TcpTwReuse the netIpv4TcpTwReuse value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withNetIpv4TcpTwReuse(Boolean netIpv4TcpTwReuse) { - this.netIpv4TcpTwReuse = netIpv4TcpTwReuse; - return this; - } - - /** - * Get the netIpv4IpLocalPortRange property: Sysctl setting net.ipv4.ip_local_port_range. - * - * @return the netIpv4IpLocalPortRange value. - */ - public String netIpv4IpLocalPortRange() { - return this.netIpv4IpLocalPortRange; - } - - /** - * Set the netIpv4IpLocalPortRange property: Sysctl setting net.ipv4.ip_local_port_range. - * - * @param netIpv4IpLocalPortRange the netIpv4IpLocalPortRange value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withNetIpv4IpLocalPortRange(String netIpv4IpLocalPortRange) { - this.netIpv4IpLocalPortRange = netIpv4IpLocalPortRange; - return this; - } - - /** - * Get the netIpv4NeighDefaultGcThresh1 property: Sysctl setting net.ipv4.neigh.default.gc_thresh1. - * - * @return the netIpv4NeighDefaultGcThresh1 value. - */ - public Integer netIpv4NeighDefaultGcThresh1() { - return this.netIpv4NeighDefaultGcThresh1; - } - - /** - * Set the netIpv4NeighDefaultGcThresh1 property: Sysctl setting net.ipv4.neigh.default.gc_thresh1. - * - * @param netIpv4NeighDefaultGcThresh1 the netIpv4NeighDefaultGcThresh1 value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withNetIpv4NeighDefaultGcThresh1(Integer netIpv4NeighDefaultGcThresh1) { - this.netIpv4NeighDefaultGcThresh1 = netIpv4NeighDefaultGcThresh1; - return this; - } - - /** - * Get the netIpv4NeighDefaultGcThresh2 property: Sysctl setting net.ipv4.neigh.default.gc_thresh2. - * - * @return the netIpv4NeighDefaultGcThresh2 value. - */ - public Integer netIpv4NeighDefaultGcThresh2() { - return this.netIpv4NeighDefaultGcThresh2; - } - - /** - * Set the netIpv4NeighDefaultGcThresh2 property: Sysctl setting net.ipv4.neigh.default.gc_thresh2. - * - * @param netIpv4NeighDefaultGcThresh2 the netIpv4NeighDefaultGcThresh2 value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withNetIpv4NeighDefaultGcThresh2(Integer netIpv4NeighDefaultGcThresh2) { - this.netIpv4NeighDefaultGcThresh2 = netIpv4NeighDefaultGcThresh2; - return this; - } - - /** - * Get the netIpv4NeighDefaultGcThresh3 property: Sysctl setting net.ipv4.neigh.default.gc_thresh3. - * - * @return the netIpv4NeighDefaultGcThresh3 value. - */ - public Integer netIpv4NeighDefaultGcThresh3() { - return this.netIpv4NeighDefaultGcThresh3; - } - - /** - * Set the netIpv4NeighDefaultGcThresh3 property: Sysctl setting net.ipv4.neigh.default.gc_thresh3. - * - * @param netIpv4NeighDefaultGcThresh3 the netIpv4NeighDefaultGcThresh3 value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withNetIpv4NeighDefaultGcThresh3(Integer netIpv4NeighDefaultGcThresh3) { - this.netIpv4NeighDefaultGcThresh3 = netIpv4NeighDefaultGcThresh3; - return this; - } - - /** - * Get the netNetfilterNfConntrackMax property: Sysctl setting net.netfilter.nf_conntrack_max. - * - * @return the netNetfilterNfConntrackMax value. - */ - public Integer netNetfilterNfConntrackMax() { - return this.netNetfilterNfConntrackMax; - } - - /** - * Set the netNetfilterNfConntrackMax property: Sysctl setting net.netfilter.nf_conntrack_max. - * - * @param netNetfilterNfConntrackMax the netNetfilterNfConntrackMax value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withNetNetfilterNfConntrackMax(Integer netNetfilterNfConntrackMax) { - this.netNetfilterNfConntrackMax = netNetfilterNfConntrackMax; - return this; - } - - /** - * Get the netNetfilterNfConntrackBuckets property: Sysctl setting net.netfilter.nf_conntrack_buckets. - * - * @return the netNetfilterNfConntrackBuckets value. - */ - public Integer netNetfilterNfConntrackBuckets() { - return this.netNetfilterNfConntrackBuckets; - } - - /** - * Set the netNetfilterNfConntrackBuckets property: Sysctl setting net.netfilter.nf_conntrack_buckets. - * - * @param netNetfilterNfConntrackBuckets the netNetfilterNfConntrackBuckets value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withNetNetfilterNfConntrackBuckets(Integer netNetfilterNfConntrackBuckets) { - this.netNetfilterNfConntrackBuckets = netNetfilterNfConntrackBuckets; - return this; - } - - /** - * Get the fsInotifyMaxUserWatches property: Sysctl setting fs.inotify.max_user_watches. - * - * @return the fsInotifyMaxUserWatches value. - */ - public Integer fsInotifyMaxUserWatches() { - return this.fsInotifyMaxUserWatches; - } - - /** - * Set the fsInotifyMaxUserWatches property: Sysctl setting fs.inotify.max_user_watches. - * - * @param fsInotifyMaxUserWatches the fsInotifyMaxUserWatches value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withFsInotifyMaxUserWatches(Integer fsInotifyMaxUserWatches) { - this.fsInotifyMaxUserWatches = fsInotifyMaxUserWatches; - return this; - } - - /** - * Get the fsFileMax property: Sysctl setting fs.file-max. - * - * @return the fsFileMax value. - */ - public Integer fsFileMax() { - return this.fsFileMax; - } - - /** - * Set the fsFileMax property: Sysctl setting fs.file-max. - * - * @param fsFileMax the fsFileMax value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withFsFileMax(Integer fsFileMax) { - this.fsFileMax = fsFileMax; - return this; - } - - /** - * Get the fsAioMaxNr property: Sysctl setting fs.aio-max-nr. - * - * @return the fsAioMaxNr value. - */ - public Integer fsAioMaxNr() { - return this.fsAioMaxNr; - } - - /** - * Set the fsAioMaxNr property: Sysctl setting fs.aio-max-nr. - * - * @param fsAioMaxNr the fsAioMaxNr value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withFsAioMaxNr(Integer fsAioMaxNr) { - this.fsAioMaxNr = fsAioMaxNr; - return this; - } - - /** - * Get the fsNrOpen property: Sysctl setting fs.nr_open. - * - * @return the fsNrOpen value. - */ - public Integer fsNrOpen() { - return this.fsNrOpen; - } - - /** - * Set the fsNrOpen property: Sysctl setting fs.nr_open. - * - * @param fsNrOpen the fsNrOpen value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withFsNrOpen(Integer fsNrOpen) { - this.fsNrOpen = fsNrOpen; - return this; - } - - /** - * Get the kernelThreadsMax property: Sysctl setting kernel.threads-max. - * - * @return the kernelThreadsMax value. - */ - public Integer kernelThreadsMax() { - return this.kernelThreadsMax; - } - - /** - * Set the kernelThreadsMax property: Sysctl setting kernel.threads-max. - * - * @param kernelThreadsMax the kernelThreadsMax value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withKernelThreadsMax(Integer kernelThreadsMax) { - this.kernelThreadsMax = kernelThreadsMax; - return this; - } - - /** - * Get the vmMaxMapCount property: Sysctl setting vm.max_map_count. - * - * @return the vmMaxMapCount value. - */ - public Integer vmMaxMapCount() { - return this.vmMaxMapCount; - } - - /** - * Set the vmMaxMapCount property: Sysctl setting vm.max_map_count. - * - * @param vmMaxMapCount the vmMaxMapCount value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withVmMaxMapCount(Integer vmMaxMapCount) { - this.vmMaxMapCount = vmMaxMapCount; - return this; - } - - /** - * Get the vmSwappiness property: Sysctl setting vm.swappiness. - * - * @return the vmSwappiness value. - */ - public Integer vmSwappiness() { - return this.vmSwappiness; - } - - /** - * Set the vmSwappiness property: Sysctl setting vm.swappiness. - * - * @param vmSwappiness the vmSwappiness value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withVmSwappiness(Integer vmSwappiness) { - this.vmSwappiness = vmSwappiness; - return this; - } - - /** - * Get the vmVfsCachePressure property: Sysctl setting vm.vfs_cache_pressure. - * - * @return the vmVfsCachePressure value. - */ - public Integer vmVfsCachePressure() { - return this.vmVfsCachePressure; - } - - /** - * Set the vmVfsCachePressure property: Sysctl setting vm.vfs_cache_pressure. - * - * @param vmVfsCachePressure the vmVfsCachePressure value to set. - * @return the SysctlConfig object itself. - */ - public SysctlConfig withVmVfsCachePressure(Integer vmVfsCachePressure) { - this.vmVfsCachePressure = vmVfsCachePressure; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("netCoreSomaxconn", this.netCoreSomaxconn); - jsonWriter.writeNumberField("netCoreNetdevMaxBacklog", this.netCoreNetdevMaxBacklog); - jsonWriter.writeNumberField("netCoreRmemDefault", this.netCoreRmemDefault); - jsonWriter.writeNumberField("netCoreRmemMax", this.netCoreRmemMax); - jsonWriter.writeNumberField("netCoreWmemDefault", this.netCoreWmemDefault); - jsonWriter.writeNumberField("netCoreWmemMax", this.netCoreWmemMax); - jsonWriter.writeNumberField("netCoreOptmemMax", this.netCoreOptmemMax); - jsonWriter.writeNumberField("netIpv4TcpMaxSynBacklog", this.netIpv4TcpMaxSynBacklog); - jsonWriter.writeNumberField("netIpv4TcpMaxTwBuckets", this.netIpv4TcpMaxTwBuckets); - jsonWriter.writeNumberField("netIpv4TcpFinTimeout", this.netIpv4TcpFinTimeout); - jsonWriter.writeNumberField("netIpv4TcpKeepaliveTime", this.netIpv4TcpKeepaliveTime); - jsonWriter.writeNumberField("netIpv4TcpKeepaliveProbes", this.netIpv4TcpKeepaliveProbes); - jsonWriter.writeNumberField("netIpv4TcpkeepaliveIntvl", this.netIpv4TcpkeepaliveIntvl); - jsonWriter.writeBooleanField("netIpv4TcpTwReuse", this.netIpv4TcpTwReuse); - jsonWriter.writeStringField("netIpv4IpLocalPortRange", this.netIpv4IpLocalPortRange); - jsonWriter.writeNumberField("netIpv4NeighDefaultGcThresh1", this.netIpv4NeighDefaultGcThresh1); - jsonWriter.writeNumberField("netIpv4NeighDefaultGcThresh2", this.netIpv4NeighDefaultGcThresh2); - jsonWriter.writeNumberField("netIpv4NeighDefaultGcThresh3", this.netIpv4NeighDefaultGcThresh3); - jsonWriter.writeNumberField("netNetfilterNfConntrackMax", this.netNetfilterNfConntrackMax); - jsonWriter.writeNumberField("netNetfilterNfConntrackBuckets", this.netNetfilterNfConntrackBuckets); - jsonWriter.writeNumberField("fsInotifyMaxUserWatches", this.fsInotifyMaxUserWatches); - jsonWriter.writeNumberField("fsFileMax", this.fsFileMax); - jsonWriter.writeNumberField("fsAioMaxNr", this.fsAioMaxNr); - jsonWriter.writeNumberField("fsNrOpen", this.fsNrOpen); - jsonWriter.writeNumberField("kernelThreadsMax", this.kernelThreadsMax); - jsonWriter.writeNumberField("vmMaxMapCount", this.vmMaxMapCount); - jsonWriter.writeNumberField("vmSwappiness", this.vmSwappiness); - jsonWriter.writeNumberField("vmVfsCachePressure", this.vmVfsCachePressure); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SysctlConfig from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SysctlConfig 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 SysctlConfig. - */ - public static SysctlConfig fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SysctlConfig deserializedSysctlConfig = new SysctlConfig(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("netCoreSomaxconn".equals(fieldName)) { - deserializedSysctlConfig.netCoreSomaxconn = reader.getNullable(JsonReader::getInt); - } else if ("netCoreNetdevMaxBacklog".equals(fieldName)) { - deserializedSysctlConfig.netCoreNetdevMaxBacklog = reader.getNullable(JsonReader::getInt); - } else if ("netCoreRmemDefault".equals(fieldName)) { - deserializedSysctlConfig.netCoreRmemDefault = reader.getNullable(JsonReader::getInt); - } else if ("netCoreRmemMax".equals(fieldName)) { - deserializedSysctlConfig.netCoreRmemMax = reader.getNullable(JsonReader::getInt); - } else if ("netCoreWmemDefault".equals(fieldName)) { - deserializedSysctlConfig.netCoreWmemDefault = reader.getNullable(JsonReader::getInt); - } else if ("netCoreWmemMax".equals(fieldName)) { - deserializedSysctlConfig.netCoreWmemMax = reader.getNullable(JsonReader::getInt); - } else if ("netCoreOptmemMax".equals(fieldName)) { - deserializedSysctlConfig.netCoreOptmemMax = reader.getNullable(JsonReader::getInt); - } else if ("netIpv4TcpMaxSynBacklog".equals(fieldName)) { - deserializedSysctlConfig.netIpv4TcpMaxSynBacklog = reader.getNullable(JsonReader::getInt); - } else if ("netIpv4TcpMaxTwBuckets".equals(fieldName)) { - deserializedSysctlConfig.netIpv4TcpMaxTwBuckets = reader.getNullable(JsonReader::getInt); - } else if ("netIpv4TcpFinTimeout".equals(fieldName)) { - deserializedSysctlConfig.netIpv4TcpFinTimeout = reader.getNullable(JsonReader::getInt); - } else if ("netIpv4TcpKeepaliveTime".equals(fieldName)) { - deserializedSysctlConfig.netIpv4TcpKeepaliveTime = reader.getNullable(JsonReader::getInt); - } else if ("netIpv4TcpKeepaliveProbes".equals(fieldName)) { - deserializedSysctlConfig.netIpv4TcpKeepaliveProbes = reader.getNullable(JsonReader::getInt); - } else if ("netIpv4TcpkeepaliveIntvl".equals(fieldName)) { - deserializedSysctlConfig.netIpv4TcpkeepaliveIntvl = reader.getNullable(JsonReader::getInt); - } else if ("netIpv4TcpTwReuse".equals(fieldName)) { - deserializedSysctlConfig.netIpv4TcpTwReuse = reader.getNullable(JsonReader::getBoolean); - } else if ("netIpv4IpLocalPortRange".equals(fieldName)) { - deserializedSysctlConfig.netIpv4IpLocalPortRange = reader.getString(); - } else if ("netIpv4NeighDefaultGcThresh1".equals(fieldName)) { - deserializedSysctlConfig.netIpv4NeighDefaultGcThresh1 = reader.getNullable(JsonReader::getInt); - } else if ("netIpv4NeighDefaultGcThresh2".equals(fieldName)) { - deserializedSysctlConfig.netIpv4NeighDefaultGcThresh2 = reader.getNullable(JsonReader::getInt); - } else if ("netIpv4NeighDefaultGcThresh3".equals(fieldName)) { - deserializedSysctlConfig.netIpv4NeighDefaultGcThresh3 = reader.getNullable(JsonReader::getInt); - } else if ("netNetfilterNfConntrackMax".equals(fieldName)) { - deserializedSysctlConfig.netNetfilterNfConntrackMax = reader.getNullable(JsonReader::getInt); - } else if ("netNetfilterNfConntrackBuckets".equals(fieldName)) { - deserializedSysctlConfig.netNetfilterNfConntrackBuckets = reader.getNullable(JsonReader::getInt); - } else if ("fsInotifyMaxUserWatches".equals(fieldName)) { - deserializedSysctlConfig.fsInotifyMaxUserWatches = reader.getNullable(JsonReader::getInt); - } else if ("fsFileMax".equals(fieldName)) { - deserializedSysctlConfig.fsFileMax = reader.getNullable(JsonReader::getInt); - } else if ("fsAioMaxNr".equals(fieldName)) { - deserializedSysctlConfig.fsAioMaxNr = reader.getNullable(JsonReader::getInt); - } else if ("fsNrOpen".equals(fieldName)) { - deserializedSysctlConfig.fsNrOpen = reader.getNullable(JsonReader::getInt); - } else if ("kernelThreadsMax".equals(fieldName)) { - deserializedSysctlConfig.kernelThreadsMax = reader.getNullable(JsonReader::getInt); - } else if ("vmMaxMapCount".equals(fieldName)) { - deserializedSysctlConfig.vmMaxMapCount = reader.getNullable(JsonReader::getInt); - } else if ("vmSwappiness".equals(fieldName)) { - deserializedSysctlConfig.vmSwappiness = reader.getNullable(JsonReader::getInt); - } else if ("vmVfsCachePressure".equals(fieldName)) { - deserializedSysctlConfig.vmVfsCachePressure = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedSysctlConfig; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeInWeek.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeInWeek.java deleted file mode 100644 index f4a9a9081f29..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeInWeek.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Time in a week. - */ -@Fluent -public final class TimeInWeek implements JsonSerializable { - /* - * The day of the week. - */ - private WeekDay day; - - /* - * A list of hours in the day used to identify a time range. Each integer hour represents a time range beginning at - * 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 - * UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. - */ - private List hourSlots; - - /** - * Creates an instance of TimeInWeek class. - */ - public TimeInWeek() { - } - - /** - * Get the day property: The day of the week. - * - * @return the day value. - */ - public WeekDay day() { - return this.day; - } - - /** - * Set the day property: The day of the week. - * - * @param day the day value to set. - * @return the TimeInWeek object itself. - */ - public TimeInWeek withDay(WeekDay day) { - this.day = day; - return this; - } - - /** - * Get the hourSlots property: A list of hours in the day used to identify a time range. Each integer hour - * represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to - * 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. - * - * @return the hourSlots value. - */ - public List hourSlots() { - return this.hourSlots; - } - - /** - * Set the hourSlots property: A list of hours in the day used to identify a time range. Each integer hour - * represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to - * 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. - * - * @param hourSlots the hourSlots value to set. - * @return the TimeInWeek object itself. - */ - public TimeInWeek withHourSlots(List hourSlots) { - this.hourSlots = hourSlots; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("day", this.day == null ? null : this.day.toString()); - jsonWriter.writeArrayField("hourSlots", this.hourSlots, (writer, element) -> writer.writeInt(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TimeInWeek from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TimeInWeek 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 TimeInWeek. - */ - public static TimeInWeek fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TimeInWeek deserializedTimeInWeek = new TimeInWeek(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("day".equals(fieldName)) { - deserializedTimeInWeek.day = WeekDay.fromString(reader.getString()); - } else if ("hourSlots".equals(fieldName)) { - List hourSlots = reader.readArray(reader1 -> reader1.getInt()); - deserializedTimeInWeek.hourSlots = hourSlots; - } else { - reader.skipChildren(); - } - } - - return deserializedTimeInWeek; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeSpan.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeSpan.java deleted file mode 100644 index 3da892c49cd7..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeSpan.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * A time range. For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. - */ -@Fluent -public final class TimeSpan implements JsonSerializable { - /* - * The start of a time span - */ - private OffsetDateTime start; - - /* - * The end of a time span - */ - private OffsetDateTime end; - - /** - * Creates an instance of TimeSpan class. - */ - public TimeSpan() { - } - - /** - * Get the start property: The start of a time span. - * - * @return the start value. - */ - public OffsetDateTime start() { - return this.start; - } - - /** - * Set the start property: The start of a time span. - * - * @param start the start value to set. - * @return the TimeSpan object itself. - */ - public TimeSpan withStart(OffsetDateTime start) { - this.start = start; - return this; - } - - /** - * Get the end property: The end of a time span. - * - * @return the end value. - */ - public OffsetDateTime end() { - return this.end; - } - - /** - * Set the end property: The end of a time span. - * - * @param end the end value to set. - * @return the TimeSpan object itself. - */ - public TimeSpan withEnd(OffsetDateTime end) { - this.end = end; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("start", - this.start == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.start)); - jsonWriter.writeStringField("end", - this.end == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.end)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TimeSpan from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TimeSpan 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 TimeSpan. - */ - public static TimeSpan fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TimeSpan deserializedTimeSpan = new TimeSpan(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("start".equals(fieldName)) { - deserializedTimeSpan.start = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("end".equals(fieldName)) { - deserializedTimeSpan.end = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedTimeSpan; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingListResult.java deleted file mode 100644 index 8a129630f9bb..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingListResult.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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 com.azure.resourcemanager.containerservice.fluent.models.TrustedAccessRoleBindingInner; -import java.io.IOException; -import java.util.List; - -/** - * List of trusted access role bindings. - */ -@Fluent -public final class TrustedAccessRoleBindingListResult implements JsonSerializable { - /* - * Role binding list - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of TrustedAccessRoleBindingListResult class. - */ - public TrustedAccessRoleBindingListResult() { - } - - /** - * Get the value property: Role binding list. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Role binding list. - * - * @param value the value value to set. - * @return the TrustedAccessRoleBindingListResult object itself. - */ - public TrustedAccessRoleBindingListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TrustedAccessRoleBindingListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TrustedAccessRoleBindingListResult 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 TrustedAccessRoleBindingListResult. - */ - public static TrustedAccessRoleBindingListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TrustedAccessRoleBindingListResult deserializedTrustedAccessRoleBindingListResult - = new TrustedAccessRoleBindingListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> TrustedAccessRoleBindingInner.fromJson(reader1)); - deserializedTrustedAccessRoleBindingListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedTrustedAccessRoleBindingListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTrustedAccessRoleBindingListResult; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingProvisioningState.java deleted file mode 100644 index ca55418c59ed..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingProvisioningState.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The current provisioning state of trusted access role binding. - */ -public final class TrustedAccessRoleBindingProvisioningState - extends ExpandableStringEnum { - /** - * Static value Canceled for TrustedAccessRoleBindingProvisioningState. - */ - public static final TrustedAccessRoleBindingProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value Deleting for TrustedAccessRoleBindingProvisioningState. - */ - public static final TrustedAccessRoleBindingProvisioningState DELETING = fromString("Deleting"); - - /** - * Static value Failed for TrustedAccessRoleBindingProvisioningState. - */ - public static final TrustedAccessRoleBindingProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Succeeded for TrustedAccessRoleBindingProvisioningState. - */ - public static final TrustedAccessRoleBindingProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Updating for TrustedAccessRoleBindingProvisioningState. - */ - public static final TrustedAccessRoleBindingProvisioningState UPDATING = fromString("Updating"); - - /** - * Creates a new instance of TrustedAccessRoleBindingProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TrustedAccessRoleBindingProvisioningState() { - } - - /** - * Creates or finds a TrustedAccessRoleBindingProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding TrustedAccessRoleBindingProvisioningState. - */ - public static TrustedAccessRoleBindingProvisioningState fromString(String name) { - return fromString(name, TrustedAccessRoleBindingProvisioningState.class); - } - - /** - * Gets known TrustedAccessRoleBindingProvisioningState values. - * - * @return known TrustedAccessRoleBindingProvisioningState values. - */ - public static Collection values() { - return values(TrustedAccessRoleBindingProvisioningState.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleListResult.java deleted file mode 100644 index 44be94882320..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleListResult.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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.containerservice.fluent.models.TrustedAccessRoleInner; -import java.io.IOException; -import java.util.List; - -/** - * List of trusted access roles. - */ -@Immutable -public final class TrustedAccessRoleListResult implements JsonSerializable { - /* - * Role list - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of TrustedAccessRoleListResult class. - */ - public TrustedAccessRoleListResult() { - } - - /** - * Get the value property: Role list. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TrustedAccessRoleListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TrustedAccessRoleListResult 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 TrustedAccessRoleListResult. - */ - public static TrustedAccessRoleListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TrustedAccessRoleListResult deserializedTrustedAccessRoleListResult = new TrustedAccessRoleListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> TrustedAccessRoleInner.fromJson(reader1)); - deserializedTrustedAccessRoleListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedTrustedAccessRoleListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTrustedAccessRoleListResult; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleRule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleRule.java deleted file mode 100644 index dc33e53e3b71..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleRule.java +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; -import java.util.List; - -/** - * Rule for trusted access role. - */ -@Immutable -public final class TrustedAccessRoleRule implements JsonSerializable { - /* - * List of allowed verbs - */ - private List verbs; - - /* - * List of allowed apiGroups - */ - private List apiGroups; - - /* - * List of allowed resources - */ - private List resources; - - /* - * List of allowed names - */ - private List resourceNames; - - /* - * List of allowed nonResourceURLs - */ - private List nonResourceUrls; - - /** - * Creates an instance of TrustedAccessRoleRule class. - */ - public TrustedAccessRoleRule() { - } - - /** - * Get the verbs property: List of allowed verbs. - * - * @return the verbs value. - */ - public List verbs() { - return this.verbs; - } - - /** - * Get the apiGroups property: List of allowed apiGroups. - * - * @return the apiGroups value. - */ - public List apiGroups() { - return this.apiGroups; - } - - /** - * Get the resources property: List of allowed resources. - * - * @return the resources value. - */ - public List resources() { - return this.resources; - } - - /** - * Get the resourceNames property: List of allowed names. - * - * @return the resourceNames value. - */ - public List resourceNames() { - return this.resourceNames; - } - - /** - * Get the nonResourceUrls property: List of allowed nonResourceURLs. - * - * @return the nonResourceUrls value. - */ - public List nonResourceUrls() { - return this.nonResourceUrls; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TrustedAccessRoleRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TrustedAccessRoleRule 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 TrustedAccessRoleRule. - */ - public static TrustedAccessRoleRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TrustedAccessRoleRule deserializedTrustedAccessRoleRule = new TrustedAccessRoleRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("verbs".equals(fieldName)) { - List verbs = reader.readArray(reader1 -> reader1.getString()); - deserializedTrustedAccessRoleRule.verbs = verbs; - } else if ("apiGroups".equals(fieldName)) { - List apiGroups = reader.readArray(reader1 -> reader1.getString()); - deserializedTrustedAccessRoleRule.apiGroups = apiGroups; - } else if ("resources".equals(fieldName)) { - List resources = reader.readArray(reader1 -> reader1.getString()); - deserializedTrustedAccessRoleRule.resources = resources; - } else if ("resourceNames".equals(fieldName)) { - List resourceNames = reader.readArray(reader1 -> reader1.getString()); - deserializedTrustedAccessRoleRule.resourceNames = resourceNames; - } else if ("nonResourceURLs".equals(fieldName)) { - List nonResourceUrls = reader.readArray(reader1 -> reader1.getString()); - deserializedTrustedAccessRoleRule.nonResourceUrls = nonResourceUrls; - } else { - reader.skipChildren(); - } - } - - return deserializedTrustedAccessRoleRule; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Type.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Type.java deleted file mode 100644 index 04ff14100e65..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Type.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The week index. Specifies on which week of the month the dayOfWeek applies. - */ -public final class Type extends ExpandableStringEnum { - /** - * Static value First for Type. - */ - public static final Type FIRST = fromString("First"); - - /** - * Static value Second for Type. - */ - public static final Type SECOND = fromString("Second"); - - /** - * Static value Third for Type. - */ - public static final Type THIRD = fromString("Third"); - - /** - * Static value Fourth for Type. - */ - public static final Type FOURTH = fromString("Fourth"); - - /** - * Static value Last for Type. - */ - public static final Type LAST = fromString("Last"); - - /** - * Creates a new instance of Type value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Type() { - } - - /** - * Creates or finds a Type from its string representation. - * - * @param name a name to look for. - * @return the corresponding Type. - */ - public static Type fromString(String name) { - return fromString(name, Type.class); - } - - /** - * Gets known Type values. - * - * @return known Type values. - */ - public static Collection values() { - return values(Type.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UndrainableNodeBehavior.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UndrainableNodeBehavior.java deleted file mode 100644 index 979e48929968..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UndrainableNodeBehavior.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod - * Disruption Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the remaining per-node - * drain timeout or pod is still being in a running state, can also cause undrainable nodes. - */ -public final class UndrainableNodeBehavior extends ExpandableStringEnum { - /** - * Static value Cordon for UndrainableNodeBehavior. - */ - public static final UndrainableNodeBehavior CORDON = fromString("Cordon"); - - /** - * Static value Schedule for UndrainableNodeBehavior. - */ - public static final UndrainableNodeBehavior SCHEDULE = fromString("Schedule"); - - /** - * Creates a new instance of UndrainableNodeBehavior value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public UndrainableNodeBehavior() { - } - - /** - * Creates or finds a UndrainableNodeBehavior from its string representation. - * - * @param name a name to look for. - * @return the corresponding UndrainableNodeBehavior. - */ - public static UndrainableNodeBehavior fromString(String name) { - return fromString(name, UndrainableNodeBehavior.class); - } - - /** - * Gets known UndrainableNodeBehavior values. - * - * @return known UndrainableNodeBehavior values. - */ - public static Collection values() { - return values(UndrainableNodeBehavior.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeChannel.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeChannel.java deleted file mode 100644 index 5132dbf5f0d9..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeChannel.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The upgrade channel for auto upgrade. The default is 'none'. For more information see [setting the AKS cluster - * auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). - */ -public final class UpgradeChannel extends ExpandableStringEnum { - /** - * Static value rapid for UpgradeChannel. - */ - public static final UpgradeChannel RAPID = fromString("rapid"); - - /** - * Static value stable for UpgradeChannel. - */ - public static final UpgradeChannel STABLE = fromString("stable"); - - /** - * Static value patch for UpgradeChannel. - */ - public static final UpgradeChannel PATCH = fromString("patch"); - - /** - * Static value node-image for UpgradeChannel. - */ - public static final UpgradeChannel NODE_IMAGE = fromString("node-image"); - - /** - * Static value none for UpgradeChannel. - */ - public static final UpgradeChannel NONE = fromString("none"); - - /** - * Creates a new instance of UpgradeChannel value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public UpgradeChannel() { - } - - /** - * Creates or finds a UpgradeChannel from its string representation. - * - * @param name a name to look for. - * @return the corresponding UpgradeChannel. - */ - public static UpgradeChannel fromString(String name) { - return fromString(name, UpgradeChannel.class); - } - - /** - * Gets known UpgradeChannel values. - * - * @return known UpgradeChannel values. - */ - public static Collection values() { - return values(UpgradeChannel.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeOverrideSettings.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeOverrideSettings.java deleted file mode 100644 index 67d3dbaf8e85..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeOverrideSettings.java +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * Settings for overrides when upgrading a cluster. - */ -@Fluent -public final class UpgradeOverrideSettings implements JsonSerializable { - /* - * Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade - * protections such as checking for deprecated API usage. Enable this option only with caution. - */ - private Boolean forceUpgrade; - - /* - * Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the - * effectiveness won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is - * not set by default. It must be set for the overrides to take effect. - */ - private OffsetDateTime until; - - /** - * Creates an instance of UpgradeOverrideSettings class. - */ - public UpgradeOverrideSettings() { - } - - /** - * Get the forceUpgrade property: Whether to force upgrade the cluster. Note that this option instructs upgrade - * operation to bypass upgrade protections such as checking for deprecated API usage. Enable this option only with - * caution. - * - * @return the forceUpgrade value. - */ - public Boolean forceUpgrade() { - return this.forceUpgrade; - } - - /** - * Set the forceUpgrade property: Whether to force upgrade the cluster. Note that this option instructs upgrade - * operation to bypass upgrade protections such as checking for deprecated API usage. Enable this option only with - * caution. - * - * @param forceUpgrade the forceUpgrade value to set. - * @return the UpgradeOverrideSettings object itself. - */ - public UpgradeOverrideSettings withForceUpgrade(Boolean forceUpgrade) { - this.forceUpgrade = forceUpgrade; - return this; - } - - /** - * Get the until property: Until when the overrides are effective. Note that this only matches the start time of an - * upgrade, and the effectiveness won't change once an upgrade starts even if the `until` expires as upgrade - * proceeds. This field is not set by default. It must be set for the overrides to take effect. - * - * @return the until value. - */ - public OffsetDateTime until() { - return this.until; - } - - /** - * Set the until property: Until when the overrides are effective. Note that this only matches the start time of an - * upgrade, and the effectiveness won't change once an upgrade starts even if the `until` expires as upgrade - * proceeds. This field is not set by default. It must be set for the overrides to take effect. - * - * @param until the until value to set. - * @return the UpgradeOverrideSettings object itself. - */ - public UpgradeOverrideSettings withUntil(OffsetDateTime until) { - this.until = until; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("forceUpgrade", this.forceUpgrade); - jsonWriter.writeStringField("until", - this.until == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.until)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpgradeOverrideSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpgradeOverrideSettings 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 UpgradeOverrideSettings. - */ - public static UpgradeOverrideSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpgradeOverrideSettings deserializedUpgradeOverrideSettings = new UpgradeOverrideSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("forceUpgrade".equals(fieldName)) { - deserializedUpgradeOverrideSettings.forceUpgrade = reader.getNullable(JsonReader::getBoolean); - } else if ("until".equals(fieldName)) { - deserializedUpgradeOverrideSettings.until = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedUpgradeOverrideSettings; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UserAssignedIdentity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UserAssignedIdentity.java deleted file mode 100644 index 83dd93d2e7d5..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UserAssignedIdentity.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Details about a user assigned identity. - */ -@Fluent -public class UserAssignedIdentity implements JsonSerializable { - /* - * The resource ID of the user assigned identity. - */ - private String resourceId; - - /* - * The client ID of the user assigned identity. - */ - private String clientId; - - /* - * The object ID of the user assigned identity. - */ - private String objectId; - - /** - * Creates an instance of UserAssignedIdentity class. - */ - public UserAssignedIdentity() { - } - - /** - * Get the resourceId property: The resource ID of the user assigned identity. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId property: The resource ID of the user assigned identity. - * - * @param resourceId the resourceId value to set. - * @return the UserAssignedIdentity object itself. - */ - public UserAssignedIdentity withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the clientId property: The client ID of the user assigned identity. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId property: The client ID of the user assigned identity. - * - * @param clientId the clientId value to set. - * @return the UserAssignedIdentity object itself. - */ - public UserAssignedIdentity withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the objectId property: The object ID of the user assigned identity. - * - * @return the objectId value. - */ - public String objectId() { - return this.objectId; - } - - /** - * Set the objectId property: The object ID of the user assigned identity. - * - * @param objectId the objectId value to set. - * @return the UserAssignedIdentity object itself. - */ - public UserAssignedIdentity withObjectId(String objectId) { - this.objectId = objectId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("resourceId", this.resourceId); - jsonWriter.writeStringField("clientId", this.clientId); - jsonWriter.writeStringField("objectId", this.objectId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserAssignedIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserAssignedIdentity 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 UserAssignedIdentity. - */ - public static UserAssignedIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserAssignedIdentity deserializedUserAssignedIdentity = new UserAssignedIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceId".equals(fieldName)) { - deserializedUserAssignedIdentity.resourceId = reader.getString(); - } else if ("clientId".equals(fieldName)) { - deserializedUserAssignedIdentity.clientId = reader.getString(); - } else if ("objectId".equals(fieldName)) { - deserializedUserAssignedIdentity.objectId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUserAssignedIdentity; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachineNodes.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachineNodes.java deleted file mode 100644 index 45f1918e4829..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachineNodes.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Current status on a group of nodes of the same vm size. - */ -@Fluent -public final class VirtualMachineNodes implements JsonSerializable { - /* - * The VM size of the agents used to host this group of nodes. - */ - private String size; - - /* - * Number of nodes. - */ - private Integer count; - - /** - * Creates an instance of VirtualMachineNodes class. - */ - public VirtualMachineNodes() { - } - - /** - * Get the size property: The VM size of the agents used to host this group of nodes. - * - * @return the size value. - */ - public String size() { - return this.size; - } - - /** - * Set the size property: The VM size of the agents used to host this group of nodes. - * - * @param size the size value to set. - * @return the VirtualMachineNodes object itself. - */ - public VirtualMachineNodes withSize(String size) { - this.size = size; - return this; - } - - /** - * Get the count property: Number of nodes. - * - * @return the count value. - */ - public Integer count() { - return this.count; - } - - /** - * Set the count property: Number of nodes. - * - * @param count the count value to set. - * @return the VirtualMachineNodes object itself. - */ - public VirtualMachineNodes withCount(Integer count) { - this.count = count; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("size", this.size); - jsonWriter.writeNumberField("count", this.count); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachineNodes from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachineNodes 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 VirtualMachineNodes. - */ - public static VirtualMachineNodes fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachineNodes deserializedVirtualMachineNodes = new VirtualMachineNodes(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("size".equals(fieldName)) { - deserializedVirtualMachineNodes.size = reader.getString(); - } else if ("count".equals(fieldName)) { - deserializedVirtualMachineNodes.count = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachineNodes; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachinesProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachinesProfile.java deleted file mode 100644 index c4468e5d41ab..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachinesProfile.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Specifications on VirtualMachines agent pool. - */ -@Fluent -public final class VirtualMachinesProfile implements JsonSerializable { - /* - * Specifications on how to scale a VirtualMachines agent pool. - */ - private ScaleProfile scale; - - /** - * Creates an instance of VirtualMachinesProfile class. - */ - public VirtualMachinesProfile() { - } - - /** - * Get the scale property: Specifications on how to scale a VirtualMachines agent pool. - * - * @return the scale value. - */ - public ScaleProfile scale() { - return this.scale; - } - - /** - * Set the scale property: Specifications on how to scale a VirtualMachines agent pool. - * - * @param scale the scale value to set. - * @return the VirtualMachinesProfile object itself. - */ - public VirtualMachinesProfile withScale(ScaleProfile scale) { - this.scale = scale; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scale() != null) { - scale().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("scale", this.scale); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachinesProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachinesProfile 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 VirtualMachinesProfile. - */ - public static VirtualMachinesProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachinesProfile deserializedVirtualMachinesProfile = new VirtualMachinesProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("scale".equals(fieldName)) { - deserializedVirtualMachinesProfile.scale = ScaleProfile.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachinesProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeekDay.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeekDay.java deleted file mode 100644 index b70d6cc8b94c..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeekDay.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The weekday enum. - */ -public final class WeekDay extends ExpandableStringEnum { - /** - * Static value Sunday for WeekDay. - */ - public static final WeekDay SUNDAY = fromString("Sunday"); - - /** - * Static value Monday for WeekDay. - */ - public static final WeekDay MONDAY = fromString("Monday"); - - /** - * Static value Tuesday for WeekDay. - */ - public static final WeekDay TUESDAY = fromString("Tuesday"); - - /** - * Static value Wednesday for WeekDay. - */ - public static final WeekDay WEDNESDAY = fromString("Wednesday"); - - /** - * Static value Thursday for WeekDay. - */ - public static final WeekDay THURSDAY = fromString("Thursday"); - - /** - * Static value Friday for WeekDay. - */ - public static final WeekDay FRIDAY = fromString("Friday"); - - /** - * Static value Saturday for WeekDay. - */ - public static final WeekDay SATURDAY = fromString("Saturday"); - - /** - * Creates a new instance of WeekDay value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public WeekDay() { - } - - /** - * Creates or finds a WeekDay from its string representation. - * - * @param name a name to look for. - * @return the corresponding WeekDay. - */ - public static WeekDay fromString(String name) { - return fromString(name, WeekDay.class); - } - - /** - * Gets known WeekDay values. - * - * @return known WeekDay values. - */ - public static Collection values() { - return values(WeekDay.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeeklySchedule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeeklySchedule.java deleted file mode 100644 index 4ac454d7716d..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeeklySchedule.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. - */ -@Fluent -public final class WeeklySchedule implements JsonSerializable { - /* - * Specifies the number of weeks between each set of occurrences. - */ - private int intervalWeeks; - - /* - * Specifies on which day of the week the maintenance occurs. - */ - private WeekDay dayOfWeek; - - /** - * Creates an instance of WeeklySchedule class. - */ - public WeeklySchedule() { - } - - /** - * Get the intervalWeeks property: Specifies the number of weeks between each set of occurrences. - * - * @return the intervalWeeks value. - */ - public int intervalWeeks() { - return this.intervalWeeks; - } - - /** - * Set the intervalWeeks property: Specifies the number of weeks between each set of occurrences. - * - * @param intervalWeeks the intervalWeeks value to set. - * @return the WeeklySchedule object itself. - */ - public WeeklySchedule withIntervalWeeks(int intervalWeeks) { - this.intervalWeeks = intervalWeeks; - return this; - } - - /** - * Get the dayOfWeek property: Specifies on which day of the week the maintenance occurs. - * - * @return the dayOfWeek value. - */ - public WeekDay dayOfWeek() { - return this.dayOfWeek; - } - - /** - * Set the dayOfWeek property: Specifies on which day of the week the maintenance occurs. - * - * @param dayOfWeek the dayOfWeek value to set. - * @return the WeeklySchedule object itself. - */ - public WeeklySchedule withDayOfWeek(WeekDay dayOfWeek) { - this.dayOfWeek = dayOfWeek; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dayOfWeek() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property dayOfWeek in model WeeklySchedule")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(WeeklySchedule.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeIntField("intervalWeeks", this.intervalWeeks); - jsonWriter.writeStringField("dayOfWeek", this.dayOfWeek == null ? null : this.dayOfWeek.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WeeklySchedule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WeeklySchedule 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 WeeklySchedule. - */ - public static WeeklySchedule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WeeklySchedule deserializedWeeklySchedule = new WeeklySchedule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("intervalWeeks".equals(fieldName)) { - deserializedWeeklySchedule.intervalWeeks = reader.getInt(); - } else if ("dayOfWeek".equals(fieldName)) { - deserializedWeeklySchedule.dayOfWeek = WeekDay.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedWeeklySchedule; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WindowsGmsaProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WindowsGmsaProfile.java deleted file mode 100644 index f0d2dfb1cb07..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WindowsGmsaProfile.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.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; - -/** - * Windows gMSA Profile in the managed cluster. - */ -@Fluent -public final class WindowsGmsaProfile implements JsonSerializable { - /* - * Whether to enable Windows gMSA. Specifies whether to enable Windows gMSA in the managed cluster. - */ - private Boolean enabled; - - /* - * Specifies the DNS server for Windows gMSA.

Set it to empty if you have configured the DNS server in the - * vnet which is used to create the managed cluster. - */ - private String dnsServer; - - /* - * Specifies the root domain name for Windows gMSA.

Set it to empty if you have configured the DNS server - * in the vnet which is used to create the managed cluster. - */ - private String rootDomainName; - - /** - * Creates an instance of WindowsGmsaProfile class. - */ - public WindowsGmsaProfile() { - } - - /** - * Get the enabled property: Whether to enable Windows gMSA. Specifies whether to enable Windows gMSA in the managed - * cluster. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable Windows gMSA. Specifies whether to enable Windows gMSA in the managed - * cluster. - * - * @param enabled the enabled value to set. - * @return the WindowsGmsaProfile object itself. - */ - public WindowsGmsaProfile withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the dnsServer property: Specifies the DNS server for Windows gMSA. <br><br> Set it to empty if - * you have configured the DNS server in the vnet which is used to create the managed cluster. - * - * @return the dnsServer value. - */ - public String dnsServer() { - return this.dnsServer; - } - - /** - * Set the dnsServer property: Specifies the DNS server for Windows gMSA. <br><br> Set it to empty if - * you have configured the DNS server in the vnet which is used to create the managed cluster. - * - * @param dnsServer the dnsServer value to set. - * @return the WindowsGmsaProfile object itself. - */ - public WindowsGmsaProfile withDnsServer(String dnsServer) { - this.dnsServer = dnsServer; - return this; - } - - /** - * Get the rootDomainName property: Specifies the root domain name for Windows gMSA. <br><br> Set it to - * empty if you have configured the DNS server in the vnet which is used to create the managed cluster. - * - * @return the rootDomainName value. - */ - public String rootDomainName() { - return this.rootDomainName; - } - - /** - * Set the rootDomainName property: Specifies the root domain name for Windows gMSA. <br><br> Set it to - * empty if you have configured the DNS server in the vnet which is used to create the managed cluster. - * - * @param rootDomainName the rootDomainName value to set. - * @return the WindowsGmsaProfile object itself. - */ - public WindowsGmsaProfile withRootDomainName(String rootDomainName) { - this.rootDomainName = rootDomainName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeStringField("dnsServer", this.dnsServer); - jsonWriter.writeStringField("rootDomainName", this.rootDomainName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WindowsGmsaProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WindowsGmsaProfile 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 WindowsGmsaProfile. - */ - public static WindowsGmsaProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WindowsGmsaProfile deserializedWindowsGmsaProfile = new WindowsGmsaProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedWindowsGmsaProfile.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("dnsServer".equals(fieldName)) { - deserializedWindowsGmsaProfile.dnsServer = reader.getString(); - } else if ("rootDomainName".equals(fieldName)) { - deserializedWindowsGmsaProfile.rootDomainName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWindowsGmsaProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java deleted file mode 100644 index c87728fe2b08..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Determines the type of workload a node can run. - */ -public final class WorkloadRuntime extends ExpandableStringEnum { - /** - * Static value OCIContainer for WorkloadRuntime. - */ - public static final WorkloadRuntime OCICONTAINER = fromString("OCIContainer"); - - /** - * Static value WasmWasi for WorkloadRuntime. - */ - public static final WorkloadRuntime WASM_WASI = fromString("WasmWasi"); - - /** - * Static value KataVmIsolation for WorkloadRuntime. - */ - public static final WorkloadRuntime KATA_VM_ISOLATION = fromString("KataVmIsolation"); - - /** - * Creates a new instance of WorkloadRuntime value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public WorkloadRuntime() { - } - - /** - * Creates or finds a WorkloadRuntime from its string representation. - * - * @param name a name to look for. - * @return the corresponding WorkloadRuntime. - */ - public static WorkloadRuntime fromString(String name) { - return fromString(name, WorkloadRuntime.class); - } - - /** - * Gets known WorkloadRuntime values. - * - * @return known WorkloadRuntime values. - */ - public static Collection values() { - return values(WorkloadRuntime.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json index 7d7de0a58bda..831537db3d67 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.containerservice.implementation.AgentPoolsClientImpl$AgentPoolsService"],["com.azure.resourcemanager.containerservice.implementation.ContainerServicesClientImpl$ContainerServicesService"],["com.azure.resourcemanager.containerservice.implementation.MachinesClientImpl$MachinesService"],["com.azure.resourcemanager.containerservice.implementation.MaintenanceConfigurationsClientImpl$MaintenanceConfigurationsService"],["com.azure.resourcemanager.containerservice.implementation.ManagedClustersClientImpl$ManagedClustersService"],["com.azure.resourcemanager.containerservice.implementation.ManagedNamespacesClientImpl$ManagedNamespacesService"],["com.azure.resourcemanager.containerservice.implementation.OpenShiftManagedClustersClientImpl$OpenShiftManagedClustersService"],["com.azure.resourcemanager.containerservice.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.containerservice.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.containerservice.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.containerservice.implementation.ResolvePrivateLinkServiceIdsClientImpl$ResolvePrivateLinkServiceIdsService"],["com.azure.resourcemanager.containerservice.implementation.SnapshotsClientImpl$SnapshotsService"],["com.azure.resourcemanager.containerservice.implementation.TrustedAccessRoleBindingsClientImpl$TrustedAccessRoleBindingsService"],["com.azure.resourcemanager.containerservice.implementation.TrustedAccessRolesClientImpl$TrustedAccessRolesService"]] \ No newline at end of file +[["com.azure.resourcemanager.containerservice.implementation.ContainerServicesClientImpl$ContainerServicesService"],["com.azure.resourcemanager.containerservice.implementation.OpenShiftManagedClustersClientImpl$OpenShiftManagedClustersService"]] \ No newline at end of file diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ContainerServicesListOrchestratorsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ContainerServicesListOrchestratorsSamples.java new file mode 100644 index 000000000000..ebd8eb31a6b6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ContainerServicesListOrchestratorsSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ContainerServices ListOrchestrators. + */ +public final class ContainerServicesListOrchestratorsSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-08-01/examples/ + * ContainerServiceListOrchestrators.json + */ + /** + * Sample code: List Container Service Orchestrators. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + listContainerServiceOrchestrators(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getContainerServices() + .listOrchestratorsWithResponse("location1", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersCreateOrUpdateSamples.java new file mode 100644 index 000000000000..0e25c9c41c83 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersCreateOrUpdateSamples.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.fluent.models.OpenShiftManagedClusterInner; +import com.azure.resourcemanager.containerservice.models.NetworkProfile; +import com.azure.resourcemanager.containerservice.models.OSType; +import com.azure.resourcemanager.containerservice.models.OpenShiftAgentPoolProfileRole; +import com.azure.resourcemanager.containerservice.models.OpenShiftContainerServiceVMSize; +import com.azure.resourcemanager.containerservice.models.OpenShiftManagedClusterAadIdentityProvider; +import com.azure.resourcemanager.containerservice.models.OpenShiftManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservice.models.OpenShiftManagedClusterAuthProfile; +import com.azure.resourcemanager.containerservice.models.OpenShiftManagedClusterIdentityProvider; +import com.azure.resourcemanager.containerservice.models.OpenShiftManagedClusterMasterPoolProfile; +import com.azure.resourcemanager.containerservice.models.OpenShiftRouterProfile; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for OpenShiftManagedClusters CreateOrUpdate. + */ +public final class OpenShiftManagedClustersCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-04-30/examples/ + * OpenShiftManagedClustersCreate_Update.json + */ + /** + * Sample code: Create/Update OpenShift Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateOpenShiftManagedCluster( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getOpenShiftManagedClusters() + .createOrUpdate("rg1", "clustername1", + new OpenShiftManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withOpenShiftVersion("v3.11") + .withNetworkProfile(new NetworkProfile().withVnetCidr("10.0.0.0/8")) + .withRouterProfiles(Arrays.asList(new OpenShiftRouterProfile().withName("default"))) + .withMasterPoolProfile(new OpenShiftManagedClusterMasterPoolProfile().withName("master") + .withCount(3) + .withVmSize(OpenShiftContainerServiceVMSize.STANDARD_D4S_V3) + .withSubnetCidr("10.0.0.0/24") + .withOsType(OSType.LINUX)) + .withAgentPoolProfiles(Arrays.asList( + new OpenShiftManagedClusterAgentPoolProfile().withName("infra") + .withCount(2) + .withVmSize(OpenShiftContainerServiceVMSize.STANDARD_D4S_V3) + .withSubnetCidr("10.0.0.0/24") + .withOsType(OSType.LINUX) + .withRole(OpenShiftAgentPoolProfileRole.INFRA), + new OpenShiftManagedClusterAgentPoolProfile().withName("compute") + .withCount(4) + .withVmSize(OpenShiftContainerServiceVMSize.STANDARD_D4S_V3) + .withSubnetCidr("10.0.0.0/24") + .withOsType(OSType.LINUX) + .withRole(OpenShiftAgentPoolProfileRole.COMPUTE))) + .withAuthProfile(new OpenShiftManagedClusterAuthProfile().withIdentityProviders( + Arrays.asList(new OpenShiftManagedClusterIdentityProvider().withName("Azure AD") + .withProvider(new OpenShiftManagedClusterAadIdentityProvider().withClientId("clientId") + .withSecret("fakeTokenPlaceholder") + .withTenantId("tenantId") + .withCustomerAdminGroupId("customerAdminGroupId"))))), + 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/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersDeleteSamples.java new file mode 100644 index 000000000000..ac728dc906b6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersDeleteSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for OpenShiftManagedClusters Delete. + */ +public final class OpenShiftManagedClustersDeleteSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-04-30/examples/ + * OpenShiftManagedClustersDelete.json + */ + /** + * Sample code: Delete OpenShift Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + deleteOpenShiftManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getOpenShiftManagedClusters() + .delete("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersGetByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersGetByResourceGroupSamples.java new file mode 100644 index 000000000000..ce409cb90ac8 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersGetByResourceGroupSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for OpenShiftManagedClusters GetByResourceGroup. + */ +public final class OpenShiftManagedClustersGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-04-30/examples/ + * OpenShiftManagedClustersGet.json + */ + /** + * Sample code: Get OpenShift Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + getOpenShiftManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getOpenShiftManagedClusters() + .getByResourceGroupWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListByResourceGroupSamples.java new file mode 100644 index 000000000000..50f56c562cce --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListByResourceGroupSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for OpenShiftManagedClusters ListByResourceGroup. + */ +public final class OpenShiftManagedClustersListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-04-30/examples/ + * OpenShiftManagedClustersListByResourceGroup.json + */ + /** + * Sample code: Get Managed Clusters by Resource Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + getManagedClustersByResourceGroup(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getOpenShiftManagedClusters() + .listByResourceGroup("rg1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListSamples.java new file mode 100644 index 000000000000..de6e9b9aa1a1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for OpenShiftManagedClusters List. + */ +public final class OpenShiftManagedClustersListSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-04-30/examples/ + * OpenShiftManagedClustersList.json + */ + /** + * Sample code: List Managed Clusters. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listManagedClusters(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient().getOpenShiftManagedClusters().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersUpdateTagsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersUpdateTagsSamples.java new file mode 100644 index 000000000000..c956d88499a6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersUpdateTagsSamples.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.models.TagsObject; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for OpenShiftManagedClusters UpdateTags. + */ +public final class OpenShiftManagedClustersUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-04-30/examples/ + * OpenShiftManagedClustersUpdateTags.json + */ + /** + * Sample code: Update OpenShift Managed Cluster Tags. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + updateOpenShiftManagedClusterTags(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getOpenShiftManagedClusters() + .updateTags("rg1", "clustername1", new TagsObject().withTags(mapOf("archv3", "", "tier", "testing")), + 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; + } +} From 42f13d5f65d53ee0a7645e017056ff1cd731f61d Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 20 Mar 2026 12:27:30 +0800 Subject: [PATCH 02/19] regen openshift --- .../fluent/ContainerServicesClient.java | 83 ------- ...nt.java => OpenShiftManagementClient.java} | 18 +- ...estratorVersionProfileListResultInner.java | 169 ------------- .../OrchestratorVersionProfileProperties.java | 110 --------- .../fluent/models/package-info.java | 2 +- .../containerservice/fluent/package-info.java | 2 +- .../ContainerServicesClientImpl.java | 198 --------------- .../OpenShiftManagedClustersClientImpl.java | 60 ++--- ... => OpenShiftManagementClientBuilder.java} | 40 ++-- ...ava => OpenShiftManagementClientImpl.java} | 44 ++-- .../models/OrchestratorProfile.java | 158 ------------ .../models/OrchestratorVersionProfile.java | 225 ------------------ .../containerservice/models/package-info.java | 2 +- .../containerservice/package-info.java | 2 +- .../proxy-config.json | 2 +- ...tManagedClustersCreateOrUpdateSamples.java | 6 +- ...OpenShiftManagedClustersDeleteSamples.java | 4 +- ...agedClustersGetByResourceGroupSamples.java | 5 +- ...gedClustersListByResourceGroupSamples.java | 4 +- .../OpenShiftManagedClustersListSamples.java | 4 +- ...ShiftManagedClustersUpdateTagsSamples.java | 4 +- 21 files changed, 93 insertions(+), 1049 deletions(-) delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServicesClient.java rename sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/{ContainerServiceManagementClient.java => OpenShiftManagementClient.java} (81%) delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileListResultInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServicesClientImpl.java rename sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/{ContainerServiceManagementClientBuilder.java => OpenShiftManagementClientBuilder.java} (68%) rename sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/{ContainerServiceManagementClientImpl.java => OpenShiftManagementClientImpl.java} (78%) delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorVersionProfile.java diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServicesClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServicesClient.java deleted file mode 100644 index cd0a041536ae..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServicesClient.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerservice.fluent.models.OrchestratorVersionProfileListResultInner; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ContainerServicesClient. - */ -public interface ContainerServicesClient { - /** - * Gets a list of supported orchestrators in the specified subscription. - * - * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each - * orchestrator including version, available upgrades and whether that version or upgrades are in preview. - * - * @param location The name of a supported Azure region. - * @param resourceType resource type for which the list of orchestrators needs to be returned. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported orchestrators in the specified subscription along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> listOrchestratorsWithResponseAsync(String location, - String resourceType); - - /** - * Gets a list of supported orchestrators in the specified subscription. - * - * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each - * orchestrator including version, available upgrades and whether that version or upgrades are in preview. - * - * @param location The name of a supported Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported orchestrators in the specified subscription on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono listOrchestratorsAsync(String location); - - /** - * Gets a list of supported orchestrators in the specified subscription. - * - * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each - * orchestrator including version, available upgrades and whether that version or upgrades are in preview. - * - * @param location The name of a supported Azure region. - * @param resourceType resource type for which the list of orchestrators needs to be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported orchestrators in the specified subscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listOrchestratorsWithResponse(String location, - String resourceType, Context context); - - /** - * Gets a list of supported orchestrators in the specified subscription. - * - * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each - * orchestrator including version, available upgrades and whether that version or upgrades are in preview. - * - * @param location The name of a supported Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported orchestrators in the specified subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrchestratorVersionProfileListResultInner listOrchestrators(String location); -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OpenShiftManagementClient.java similarity index 81% rename from sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java rename to sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OpenShiftManagementClient.java index 28a39ed79ab1..fafd2dbcf12f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OpenShiftManagementClient.java @@ -8,9 +8,9 @@ import java.time.Duration; /** - * The interface for ContainerServiceManagementClient class. + * The interface for OpenShiftManagementClient class. */ -public interface ContainerServiceManagementClient { +public interface OpenShiftManagementClient { /** * Gets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms * part of the URI for every service call. @@ -26,6 +26,13 @@ public interface ContainerServiceManagementClient { */ String getEndpoint(); + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + String getApiVersion(); + /** * Gets The HTTP pipeline to send requests through. * @@ -46,11 +53,4 @@ public interface ContainerServiceManagementClient { * @return the OpenShiftManagedClustersClient object. */ OpenShiftManagedClustersClient getOpenShiftManagedClusters(); - - /** - * Gets the ContainerServicesClient object to access its operations. - * - * @return the ContainerServicesClient object. - */ - ContainerServicesClient getContainerServices(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileListResultInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileListResultInner.java deleted file mode 100644 index be0e3f4d1d55..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileListResultInner.java +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.OrchestratorVersionProfile; -import java.io.IOException; -import java.util.List; - -/** - * The list of versions for supported orchestrators. - */ -@Fluent -public final class OrchestratorVersionProfileListResultInner - implements JsonSerializable { - /* - * Id of the orchestrator version profile list result. - */ - private String id; - - /* - * Name of the orchestrator version profile list result. - */ - private String name; - - /* - * Type of the orchestrator version profile list result. - */ - private String type; - - /* - * The properties of an orchestrator version profile. - */ - private OrchestratorVersionProfileProperties innerProperties = new OrchestratorVersionProfileProperties(); - - /** - * Creates an instance of OrchestratorVersionProfileListResultInner class. - */ - public OrchestratorVersionProfileListResultInner() { - } - - /** - * Get the id property: Id of the orchestrator version profile list result. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: Name of the orchestrator version profile list result. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the type property: Type of the orchestrator version profile list result. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the innerProperties property: The properties of an orchestrator version profile. - * - * @return the innerProperties value. - */ - private OrchestratorVersionProfileProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the orchestrators property: List of orchestrator version profiles. - * - * @return the orchestrators value. - */ - public List orchestrators() { - return this.innerProperties() == null ? null : this.innerProperties().orchestrators(); - } - - /** - * Set the orchestrators property: List of orchestrator version profiles. - * - * @param orchestrators the orchestrators value to set. - * @return the OrchestratorVersionProfileListResultInner object itself. - */ - public OrchestratorVersionProfileListResultInner withOrchestrators(List orchestrators) { - if (this.innerProperties() == null) { - this.innerProperties = new OrchestratorVersionProfileProperties(); - } - this.innerProperties().withOrchestrators(orchestrators); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model OrchestratorVersionProfileListResultInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OrchestratorVersionProfileListResultInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrchestratorVersionProfileListResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrchestratorVersionProfileListResultInner 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 OrchestratorVersionProfileListResultInner. - */ - public static OrchestratorVersionProfileListResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrchestratorVersionProfileListResultInner deserializedOrchestratorVersionProfileListResultInner - = new OrchestratorVersionProfileListResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedOrchestratorVersionProfileListResultInner.innerProperties - = OrchestratorVersionProfileProperties.fromJson(reader); - } else if ("id".equals(fieldName)) { - deserializedOrchestratorVersionProfileListResultInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedOrchestratorVersionProfileListResultInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedOrchestratorVersionProfileListResultInner.type = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOrchestratorVersionProfileListResultInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileProperties.java deleted file mode 100644 index a2aaadaada98..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileProperties.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.OrchestratorVersionProfile; -import java.io.IOException; -import java.util.List; - -/** - * The properties of an orchestrator version profile. - */ -@Fluent -public final class OrchestratorVersionProfileProperties - implements JsonSerializable { - /* - * List of orchestrator version profiles. - */ - private List orchestrators; - - /** - * Creates an instance of OrchestratorVersionProfileProperties class. - */ - public OrchestratorVersionProfileProperties() { - } - - /** - * Get the orchestrators property: List of orchestrator version profiles. - * - * @return the orchestrators value. - */ - public List orchestrators() { - return this.orchestrators; - } - - /** - * Set the orchestrators property: List of orchestrator version profiles. - * - * @param orchestrators the orchestrators value to set. - * @return the OrchestratorVersionProfileProperties object itself. - */ - public OrchestratorVersionProfileProperties withOrchestrators(List orchestrators) { - this.orchestrators = orchestrators; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (orchestrators() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property orchestrators in model OrchestratorVersionProfileProperties")); - } else { - orchestrators().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OrchestratorVersionProfileProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("orchestrators", this.orchestrators, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrchestratorVersionProfileProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrchestratorVersionProfileProperties 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 OrchestratorVersionProfileProperties. - */ - public static OrchestratorVersionProfileProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrchestratorVersionProfileProperties deserializedOrchestratorVersionProfileProperties - = new OrchestratorVersionProfileProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("orchestrators".equals(fieldName)) { - List orchestrators - = reader.readArray(reader1 -> OrchestratorVersionProfile.fromJson(reader1)); - deserializedOrchestratorVersionProfileProperties.orchestrators = orchestrators; - } else { - reader.skipChildren(); - } - } - - return deserializedOrchestratorVersionProfileProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/package-info.java index 0e534a509796..58044d68564e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/package-info.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the inner data models for ContainerServiceManagementClient. + * Package containing the inner data models for OpenShiftManagementClient. * Container Service Client. */ package com.azure.resourcemanager.containerservice.fluent.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/package-info.java index 168c6b8d8282..99f8282f9211 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/package-info.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the service clients for ContainerServiceManagementClient. + * Package containing the service clients for OpenShiftManagementClient. * Container Service Client. */ package com.azure.resourcemanager.containerservice.fluent; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServicesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServicesClientImpl.java deleted file mode 100644 index 5ee8eca8875e..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServicesClientImpl.java +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.containerservice.fluent.ContainerServicesClient; -import com.azure.resourcemanager.containerservice.fluent.models.OrchestratorVersionProfileListResultInner; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ContainerServicesClient. - */ -public final class ContainerServicesClientImpl implements ContainerServicesClient { - /** - * The proxy service used to perform REST calls. - */ - private final ContainerServicesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerServiceManagementClientImpl client; - - /** - * Initializes an instance of ContainerServicesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ContainerServicesClientImpl(ContainerServiceManagementClientImpl client) { - this.service - = RestProxy.create(ContainerServicesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerServiceManagementClientContainerServices to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerServiceManagementClientContainerServices") - public interface ContainerServicesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listOrchestrators(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @QueryParam("resource-type") String resourceType, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of supported orchestrators in the specified subscription. - * - * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each - * orchestrator including version, available upgrades and whether that version or upgrades are in preview. - * - * @param location The name of a supported Azure region. - * @param resourceType resource type for which the list of orchestrators needs to be returned. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported orchestrators in the specified subscription along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listOrchestratorsWithResponseAsync(String location, - String resourceType) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String apiVersion = "2019-08-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listOrchestrators(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), location, resourceType, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of supported orchestrators in the specified subscription. - * - * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each - * orchestrator including version, available upgrades and whether that version or upgrades are in preview. - * - * @param location The name of a supported Azure region. - * @param resourceType resource type for which the list of orchestrators needs to be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported orchestrators in the specified subscription along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listOrchestratorsWithResponseAsync(String location, String resourceType, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String apiVersion = "2019-08-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listOrchestrators(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - location, resourceType, accept, context); - } - - /** - * Gets a list of supported orchestrators in the specified subscription. - * - * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each - * orchestrator including version, available upgrades and whether that version or upgrades are in preview. - * - * @param location The name of a supported Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported orchestrators in the specified subscription on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listOrchestratorsAsync(String location) { - final String resourceType = null; - return listOrchestratorsWithResponseAsync(location, resourceType) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a list of supported orchestrators in the specified subscription. - * - * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each - * orchestrator including version, available upgrades and whether that version or upgrades are in preview. - * - * @param location The name of a supported Azure region. - * @param resourceType resource type for which the list of orchestrators needs to be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported orchestrators in the specified subscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listOrchestratorsWithResponse(String location, - String resourceType, Context context) { - return listOrchestratorsWithResponseAsync(location, resourceType, context).block(); - } - - /** - * Gets a list of supported orchestrators in the specified subscription. - * - * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each - * orchestrator including version, available upgrades and whether that version or upgrades are in preview. - * - * @param location The name of a supported Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported orchestrators in the specified subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrchestratorVersionProfileListResultInner listOrchestrators(String location) { - final String resourceType = null; - return listOrchestratorsWithResponse(location, resourceType, Context.NONE).getValue(); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagedClustersClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagedClustersClientImpl.java index 3e84c4b799cb..fe4b62ddd08e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagedClustersClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagedClustersClientImpl.java @@ -56,25 +56,25 @@ public final class OpenShiftManagedClustersClientImpl implements InnerSupportsGe /** * The service client containing this operation class. */ - private final ContainerServiceManagementClientImpl client; + private final OpenShiftManagementClientImpl client; /** * Initializes an instance of OpenShiftManagedClustersClientImpl. * * @param client the instance of the service client containing this operation class. */ - OpenShiftManagedClustersClientImpl(ContainerServiceManagementClientImpl client) { + OpenShiftManagedClustersClientImpl(OpenShiftManagementClientImpl client) { this.service = RestProxy.create(OpenShiftManagedClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ContainerServiceManagementClientOpenShiftManagedClusters to be used - * by the proxy service to perform REST calls. + * The interface defining all the services for OpenShiftManagementClientOpenShiftManagedClusters to be used by the + * proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "ContainerServiceManagementClientOpenShiftManagedClusters") + @ServiceInterface(name = "OpenShiftManagementClientOpenShiftManagedClusters") public interface OpenShiftManagedClustersService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/openShiftManagedClusters") @@ -169,11 +169,10 @@ private Mono> listSinglePageAsync() return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2019-04-30"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -202,10 +201,11 @@ private Mono> listSinglePageAsync(Co return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2019-04-30"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -307,10 +307,9 @@ public PagedIterable list(Context context) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2019-04-30"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) @@ -346,12 +345,11 @@ public PagedIterable list(Context context) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2019-04-30"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, accept, context) + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -464,10 +462,9 @@ public Mono> getByResourceGroupWithRespon if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2019-04-30"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -504,11 +501,10 @@ private Mono> getByResourceGroupWithRespo if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2019-04-30"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); } /** @@ -603,10 +599,9 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2019-04-30"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -648,11 +643,10 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2019-04-30"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, parameters, accept, context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context); } /** @@ -858,10 +852,9 @@ public Mono>> updateTagsWithResponseAsync(String resou } else { parameters.validate(); } - final String apiVersion = "2019-04-30"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.updateTags(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -903,11 +896,10 @@ private Mono>> updateTagsWithResponseAsync(String reso } else { parameters.validate(); } - final String apiVersion = "2019-04-30"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.updateTags(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, parameters, accept, context); + return service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context); } /** @@ -1106,10 +1098,9 @@ public Mono>> deleteWithResponseAsync(String resourceG if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2019-04-30"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1145,11 +1136,10 @@ private Mono>> deleteWithResponseAsync(String resource if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2019-04-30"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context); } /** diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientBuilder.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagementClientBuilder.java similarity index 68% rename from sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientBuilder.java rename to sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagementClientBuilder.java index 9ebc0945493a..94b7996da97f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientBuilder.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagementClientBuilder.java @@ -15,10 +15,10 @@ import java.time.Duration; /** - * A builder for creating a new instance of the ContainerServiceManagementClientImpl type. + * A builder for creating a new instance of the OpenShiftManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = { ContainerServiceManagementClientImpl.class }) -public final class ContainerServiceManagementClientBuilder { +@ServiceClientBuilder(serviceClients = { OpenShiftManagementClientImpl.class }) +public final class OpenShiftManagementClientBuilder { /* * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of * the URI for every service call. @@ -30,9 +30,9 @@ public final class ContainerServiceManagementClientBuilder { * part of the URI for every service call. * * @param subscriptionId the subscriptionId value. - * @return the ContainerServiceManagementClientBuilder. + * @return the OpenShiftManagementClientBuilder. */ - public ContainerServiceManagementClientBuilder subscriptionId(String subscriptionId) { + public OpenShiftManagementClientBuilder subscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; return this; } @@ -46,9 +46,9 @@ public ContainerServiceManagementClientBuilder subscriptionId(String subscriptio * Sets server parameter. * * @param endpoint the endpoint value. - * @return the ContainerServiceManagementClientBuilder. + * @return the OpenShiftManagementClientBuilder. */ - public ContainerServiceManagementClientBuilder endpoint(String endpoint) { + public OpenShiftManagementClientBuilder endpoint(String endpoint) { this.endpoint = endpoint; return this; } @@ -62,9 +62,9 @@ public ContainerServiceManagementClientBuilder endpoint(String endpoint) { * Sets The environment to connect to. * * @param environment the environment value. - * @return the ContainerServiceManagementClientBuilder. + * @return the OpenShiftManagementClientBuilder. */ - public ContainerServiceManagementClientBuilder environment(AzureEnvironment environment) { + public OpenShiftManagementClientBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -78,9 +78,9 @@ public ContainerServiceManagementClientBuilder environment(AzureEnvironment envi * Sets The HTTP pipeline to send requests through. * * @param pipeline the pipeline value. - * @return the ContainerServiceManagementClientBuilder. + * @return the OpenShiftManagementClientBuilder. */ - public ContainerServiceManagementClientBuilder pipeline(HttpPipeline pipeline) { + public OpenShiftManagementClientBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -94,9 +94,9 @@ public ContainerServiceManagementClientBuilder pipeline(HttpPipeline pipeline) { * Sets The default poll interval for long-running operation. * * @param defaultPollInterval the defaultPollInterval value. - * @return the ContainerServiceManagementClientBuilder. + * @return the OpenShiftManagementClientBuilder. */ - public ContainerServiceManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { + public OpenShiftManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -110,19 +110,19 @@ public ContainerServiceManagementClientBuilder defaultPollInterval(Duration defa * Sets The serializer to serialize an object into a string. * * @param serializerAdapter the serializerAdapter value. - * @return the ContainerServiceManagementClientBuilder. + * @return the OpenShiftManagementClientBuilder. */ - public ContainerServiceManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public OpenShiftManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of ContainerServiceManagementClientImpl with the provided parameters. + * Builds an instance of OpenShiftManagementClientImpl with the provided parameters. * - * @return an instance of ContainerServiceManagementClientImpl. + * @return an instance of OpenShiftManagementClientImpl. */ - public ContainerServiceManagementClientImpl buildClient() { + public OpenShiftManagementClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; HttpPipeline localPipeline = (pipeline != null) @@ -133,8 +133,8 @@ public ContainerServiceManagementClientImpl buildClient() { SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); - ContainerServiceManagementClientImpl client = new ContainerServiceManagementClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + OpenShiftManagementClientImpl client = new OpenShiftManagementClientImpl(localPipeline, localSerializerAdapter, + localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagementClientImpl.java similarity index 78% rename from sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java rename to sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagementClientImpl.java index c88310b70473..449675a09b29 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagementClientImpl.java @@ -8,18 +8,16 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.containerservice.fluent.ContainerServiceManagementClient; -import com.azure.resourcemanager.containerservice.fluent.ContainerServicesClient; import com.azure.resourcemanager.containerservice.fluent.OpenShiftManagedClustersClient; +import com.azure.resourcemanager.containerservice.fluent.OpenShiftManagementClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; /** - * Initializes a new instance of the ContainerServiceManagementClientImpl type. + * Initializes a new instance of the OpenShiftManagementClientImpl type. */ -@ServiceClient(builder = ContainerServiceManagementClientBuilder.class) -public final class ContainerServiceManagementClientImpl extends AzureServiceClient - implements ContainerServiceManagementClient { +@ServiceClient(builder = OpenShiftManagementClientBuilder.class) +public final class OpenShiftManagementClientImpl extends AzureServiceClient implements OpenShiftManagementClient { /** * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of * the URI for every service call. @@ -50,6 +48,20 @@ public String getEndpoint() { return this.endpoint; } + /** + * Api Version. + */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + /** * The HTTP pipeline to send requests through. */ @@ -107,21 +119,7 @@ public OpenShiftManagedClustersClient getOpenShiftManagedClusters() { } /** - * The ContainerServicesClient object to access its operations. - */ - private final ContainerServicesClient containerServices; - - /** - * Gets the ContainerServicesClient object to access its operations. - * - * @return the ContainerServicesClient object. - */ - public ContainerServicesClient getContainerServices() { - return this.containerServices; - } - - /** - * Initializes an instance of ContainerServiceManagementClient client. + * Initializes an instance of OpenShiftManagementClient client. * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. @@ -131,7 +129,7 @@ public ContainerServicesClient getContainerServices() { * subscription ID forms part of the URI for every service call. * @param endpoint server parameter. */ - ContainerServiceManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + OpenShiftManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { super(httpPipeline, serializerAdapter, environment); this.httpPipeline = httpPipeline; @@ -139,7 +137,7 @@ public ContainerServicesClient getContainerServices() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; + this.apiVersion = "2019-04-30"; this.openShiftManagedClusters = new OpenShiftManagedClustersClientImpl(this); - this.containerServices = new ContainerServicesClientImpl(this); } } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorProfile.java deleted file mode 100644 index 4bf91b8b8b85..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorProfile.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -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 orchestrator. - */ -@Fluent -public final class OrchestratorProfile implements JsonSerializable { - /* - * Orchestrator type. - */ - private String orchestratorType; - - /* - * Orchestrator version (major, minor, patch). - */ - private String orchestratorVersion; - - /* - * Whether Kubernetes version is currently in preview. - */ - private Boolean isPreview; - - /** - * Creates an instance of OrchestratorProfile class. - */ - public OrchestratorProfile() { - } - - /** - * Get the orchestratorType property: Orchestrator type. - * - * @return the orchestratorType value. - */ - public String orchestratorType() { - return this.orchestratorType; - } - - /** - * Set the orchestratorType property: Orchestrator type. - * - * @param orchestratorType the orchestratorType value to set. - * @return the OrchestratorProfile object itself. - */ - public OrchestratorProfile withOrchestratorType(String orchestratorType) { - this.orchestratorType = orchestratorType; - return this; - } - - /** - * Get the orchestratorVersion property: Orchestrator version (major, minor, patch). - * - * @return the orchestratorVersion value. - */ - public String orchestratorVersion() { - return this.orchestratorVersion; - } - - /** - * Set the orchestratorVersion property: Orchestrator version (major, minor, patch). - * - * @param orchestratorVersion the orchestratorVersion value to set. - * @return the OrchestratorProfile object itself. - */ - public OrchestratorProfile withOrchestratorVersion(String orchestratorVersion) { - this.orchestratorVersion = orchestratorVersion; - return this; - } - - /** - * Get the isPreview property: Whether Kubernetes version is currently in preview. - * - * @return the isPreview value. - */ - public Boolean isPreview() { - return this.isPreview; - } - - /** - * Set the isPreview property: Whether Kubernetes version is currently in preview. - * - * @param isPreview the isPreview value to set. - * @return the OrchestratorProfile object itself. - */ - public OrchestratorProfile withIsPreview(Boolean isPreview) { - this.isPreview = isPreview; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (orchestratorVersion() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property orchestratorVersion in model OrchestratorProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OrchestratorProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("orchestratorVersion", this.orchestratorVersion); - jsonWriter.writeStringField("orchestratorType", this.orchestratorType); - jsonWriter.writeBooleanField("isPreview", this.isPreview); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrchestratorProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrchestratorProfile 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 OrchestratorProfile. - */ - public static OrchestratorProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrchestratorProfile deserializedOrchestratorProfile = new OrchestratorProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("orchestratorVersion".equals(fieldName)) { - deserializedOrchestratorProfile.orchestratorVersion = reader.getString(); - } else if ("orchestratorType".equals(fieldName)) { - deserializedOrchestratorProfile.orchestratorType = reader.getString(); - } else if ("isPreview".equals(fieldName)) { - deserializedOrchestratorProfile.isPreview = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedOrchestratorProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorVersionProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorVersionProfile.java deleted file mode 100644 index 959264dbc526..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorVersionProfile.java +++ /dev/null @@ -1,225 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -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 profile of an orchestrator and its available versions. - */ -@Fluent -public final class OrchestratorVersionProfile implements JsonSerializable { - /* - * Orchestrator type. - */ - private String orchestratorType; - - /* - * Orchestrator version (major, minor, patch). - */ - private String orchestratorVersion; - - /* - * Installed by default if version is not specified. - */ - private Boolean defaultProperty; - - /* - * Whether Kubernetes version is currently in preview. - */ - private Boolean isPreview; - - /* - * The list of available upgrade versions. - */ - private List upgrades; - - /** - * Creates an instance of OrchestratorVersionProfile class. - */ - public OrchestratorVersionProfile() { - } - - /** - * Get the orchestratorType property: Orchestrator type. - * - * @return the orchestratorType value. - */ - public String orchestratorType() { - return this.orchestratorType; - } - - /** - * Set the orchestratorType property: Orchestrator type. - * - * @param orchestratorType the orchestratorType value to set. - * @return the OrchestratorVersionProfile object itself. - */ - public OrchestratorVersionProfile withOrchestratorType(String orchestratorType) { - this.orchestratorType = orchestratorType; - return this; - } - - /** - * Get the orchestratorVersion property: Orchestrator version (major, minor, patch). - * - * @return the orchestratorVersion value. - */ - public String orchestratorVersion() { - return this.orchestratorVersion; - } - - /** - * Set the orchestratorVersion property: Orchestrator version (major, minor, patch). - * - * @param orchestratorVersion the orchestratorVersion value to set. - * @return the OrchestratorVersionProfile object itself. - */ - public OrchestratorVersionProfile withOrchestratorVersion(String orchestratorVersion) { - this.orchestratorVersion = orchestratorVersion; - return this; - } - - /** - * Get the defaultProperty property: Installed by default if version is not specified. - * - * @return the defaultProperty value. - */ - public Boolean defaultProperty() { - return this.defaultProperty; - } - - /** - * Set the defaultProperty property: Installed by default if version is not specified. - * - * @param defaultProperty the defaultProperty value to set. - * @return the OrchestratorVersionProfile object itself. - */ - public OrchestratorVersionProfile withDefaultProperty(Boolean defaultProperty) { - this.defaultProperty = defaultProperty; - return this; - } - - /** - * Get the isPreview property: Whether Kubernetes version is currently in preview. - * - * @return the isPreview value. - */ - public Boolean isPreview() { - return this.isPreview; - } - - /** - * Set the isPreview property: Whether Kubernetes version is currently in preview. - * - * @param isPreview the isPreview value to set. - * @return the OrchestratorVersionProfile object itself. - */ - public OrchestratorVersionProfile withIsPreview(Boolean isPreview) { - this.isPreview = isPreview; - return this; - } - - /** - * Get the upgrades property: The list of available upgrade versions. - * - * @return the upgrades value. - */ - public List upgrades() { - return this.upgrades; - } - - /** - * Set the upgrades property: The list of available upgrade versions. - * - * @param upgrades the upgrades value to set. - * @return the OrchestratorVersionProfile object itself. - */ - public OrchestratorVersionProfile withUpgrades(List upgrades) { - this.upgrades = upgrades; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (orchestratorType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property orchestratorType in model OrchestratorVersionProfile")); - } - if (orchestratorVersion() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property orchestratorVersion in model OrchestratorVersionProfile")); - } - if (upgrades() != null) { - upgrades().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OrchestratorVersionProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("orchestratorType", this.orchestratorType); - jsonWriter.writeStringField("orchestratorVersion", this.orchestratorVersion); - jsonWriter.writeBooleanField("default", this.defaultProperty); - jsonWriter.writeBooleanField("isPreview", this.isPreview); - jsonWriter.writeArrayField("upgrades", this.upgrades, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrchestratorVersionProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrchestratorVersionProfile 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 OrchestratorVersionProfile. - */ - public static OrchestratorVersionProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrchestratorVersionProfile deserializedOrchestratorVersionProfile = new OrchestratorVersionProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("orchestratorType".equals(fieldName)) { - deserializedOrchestratorVersionProfile.orchestratorType = reader.getString(); - } else if ("orchestratorVersion".equals(fieldName)) { - deserializedOrchestratorVersionProfile.orchestratorVersion = reader.getString(); - } else if ("default".equals(fieldName)) { - deserializedOrchestratorVersionProfile.defaultProperty = reader.getNullable(JsonReader::getBoolean); - } else if ("isPreview".equals(fieldName)) { - deserializedOrchestratorVersionProfile.isPreview = reader.getNullable(JsonReader::getBoolean); - } else if ("upgrades".equals(fieldName)) { - List upgrades - = reader.readArray(reader1 -> OrchestratorProfile.fromJson(reader1)); - deserializedOrchestratorVersionProfile.upgrades = upgrades; - } else { - reader.skipChildren(); - } - } - - return deserializedOrchestratorVersionProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java index c6aca495bc2a..2eb4e5cb1094 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for ContainerServiceManagementClient. + * Package containing the data models for OpenShiftManagementClient. * Container Service Client. */ package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/package-info.java index 430f80b01e1c..7a966b63347b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/package-info.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the classes for ContainerServiceManagementClient. + * Package containing the classes for OpenShiftManagementClient. * Container Service Client. */ package com.azure.resourcemanager.containerservice; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json index 831537db3d67..530ad8f322d0 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.containerservice.implementation.ContainerServicesClientImpl$ContainerServicesService"],["com.azure.resourcemanager.containerservice.implementation.OpenShiftManagedClustersClientImpl$OpenShiftManagedClustersService"]] \ No newline at end of file +[["com.azure.resourcemanager.containerservice.implementation.OpenShiftManagedClustersClientImpl$OpenShiftManagedClustersService"]] \ No newline at end of file diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersCreateOrUpdateSamples.java index 0e25c9c41c83..4f104e9e4853 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersCreateOrUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersCreateOrUpdateSamples.java @@ -31,10 +31,10 @@ public final class OpenShiftManagedClustersCreateOrUpdateSamples { /** * Sample code: Create/Update OpenShift Managed Cluster. * - * @param manager Entry point to ContainerServiceManager. + * @param manager Entry point to OpenShiftManager. */ - public static void createUpdateOpenShiftManagedCluster( - com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + public static void + createUpdateOpenShiftManagedCluster(com.azure.resourcemanager.containerservice.OpenShiftManager manager) { manager.serviceClient() .getOpenShiftManagedClusters() .createOrUpdate("rg1", "clustername1", diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersDeleteSamples.java index ac728dc906b6..47260f9928d1 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersDeleteSamples.java @@ -16,10 +16,10 @@ public final class OpenShiftManagedClustersDeleteSamples { /** * Sample code: Delete OpenShift Managed Cluster. * - * @param manager Entry point to ContainerServiceManager. + * @param manager Entry point to OpenShiftManager. */ public static void - deleteOpenShiftManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + deleteOpenShiftManagedCluster(com.azure.resourcemanager.containerservice.OpenShiftManager manager) { manager.serviceClient() .getOpenShiftManagedClusters() .delete("rg1", "clustername1", com.azure.core.util.Context.NONE); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersGetByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersGetByResourceGroupSamples.java index ce409cb90ac8..337630e3da3b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersGetByResourceGroupSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersGetByResourceGroupSamples.java @@ -16,10 +16,9 @@ public final class OpenShiftManagedClustersGetByResourceGroupSamples { /** * Sample code: Get OpenShift Managed Cluster. * - * @param manager Entry point to ContainerServiceManager. + * @param manager Entry point to OpenShiftManager. */ - public static void - getOpenShiftManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + public static void getOpenShiftManagedCluster(com.azure.resourcemanager.containerservice.OpenShiftManager manager) { manager.serviceClient() .getOpenShiftManagedClusters() .getByResourceGroupWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListByResourceGroupSamples.java index 50f56c562cce..1c47fca2751a 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListByResourceGroupSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListByResourceGroupSamples.java @@ -16,10 +16,10 @@ public final class OpenShiftManagedClustersListByResourceGroupSamples { /** * Sample code: Get Managed Clusters by Resource Group. * - * @param manager Entry point to ContainerServiceManager. + * @param manager Entry point to OpenShiftManager. */ public static void - getManagedClustersByResourceGroup(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + getManagedClustersByResourceGroup(com.azure.resourcemanager.containerservice.OpenShiftManager manager) { manager.serviceClient() .getOpenShiftManagedClusters() .listByResourceGroup("rg1", com.azure.core.util.Context.NONE); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListSamples.java index de6e9b9aa1a1..36b0efb32603 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListSamples.java @@ -16,9 +16,9 @@ public final class OpenShiftManagedClustersListSamples { /** * Sample code: List Managed Clusters. * - * @param manager Entry point to ContainerServiceManager. + * @param manager Entry point to OpenShiftManager. */ - public static void listManagedClusters(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + public static void listManagedClusters(com.azure.resourcemanager.containerservice.OpenShiftManager manager) { manager.serviceClient().getOpenShiftManagedClusters().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersUpdateTagsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersUpdateTagsSamples.java index c956d88499a6..5064b5a83ab4 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersUpdateTagsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersUpdateTagsSamples.java @@ -20,10 +20,10 @@ public final class OpenShiftManagedClustersUpdateTagsSamples { /** * Sample code: Update OpenShift Managed Cluster Tags. * - * @param manager Entry point to ContainerServiceManager. + * @param manager Entry point to OpenShiftManager. */ public static void - updateOpenShiftManagedClusterTags(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + updateOpenShiftManagedClusterTags(com.azure.resourcemanager.containerservice.OpenShiftManager manager) { manager.serviceClient() .getOpenShiftManagedClusters() .updateTags("rg1", "clustername1", new TagsObject().withTags(mapOf("archv3", "", "tier", "testing")), From b416590cde52cf14c744c07c1e094469420bc927 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 20 Mar 2026 12:32:48 +0800 Subject: [PATCH 03/19] regen location --- .../fluent/ContainerServicesClient.java | 83 +++++++ .../fluent/OrchestratorManagementClient.java | 56 +++++ ...estratorVersionProfileListResultInner.java | 169 +++++++++++++ .../OrchestratorVersionProfileProperties.java | 110 +++++++++ .../fluent/models/package-info.java | 4 +- .../containerservice/fluent/package-info.java | 4 +- .../ContainerServicesClientImpl.java | 196 +++++++++++++++ .../OrchestratorManagementClientBuilder.java | 140 +++++++++++ .../OrchestratorManagementClientImpl.java | 143 +++++++++++ .../models/OrchestratorProfile.java | 158 ++++++++++++ .../models/OrchestratorVersionProfile.java | 225 ++++++++++++++++++ .../containerservice/models/package-info.java | 4 +- .../containerservice/package-info.java | 4 +- .../proxy-config.json | 2 +- ...ainerServicesListOrchestratorsSamples.java | 4 +- 15 files changed, 1291 insertions(+), 11 deletions(-) create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServicesClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OrchestratorManagementClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileListResultInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServicesClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OrchestratorManagementClientBuilder.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OrchestratorManagementClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorVersionProfile.java diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServicesClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServicesClient.java new file mode 100644 index 000000000000..cd0a041536ae --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServicesClient.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.fluent.models.OrchestratorVersionProfileListResultInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ContainerServicesClient. + */ +public interface ContainerServicesClient { + /** + * Gets a list of supported orchestrators in the specified subscription. + * + * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each + * orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @param resourceType resource type for which the list of orchestrators needs to be returned. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported orchestrators in the specified subscription along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> listOrchestratorsWithResponseAsync(String location, + String resourceType); + + /** + * Gets a list of supported orchestrators in the specified subscription. + * + * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each + * orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported orchestrators in the specified subscription on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono listOrchestratorsAsync(String location); + + /** + * Gets a list of supported orchestrators in the specified subscription. + * + * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each + * orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @param resourceType resource type for which the list of orchestrators needs to be returned. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported orchestrators in the specified subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listOrchestratorsWithResponse(String location, + String resourceType, Context context); + + /** + * Gets a list of supported orchestrators in the specified subscription. + * + * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each + * orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported orchestrators in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OrchestratorVersionProfileListResultInner listOrchestrators(String location); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OrchestratorManagementClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OrchestratorManagementClient.java new file mode 100644 index 000000000000..f9eff94cbf05 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OrchestratorManagementClient.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.http.HttpPipeline; +import java.time.Duration; + +/** + * The interface for OrchestratorManagementClient class. + */ +public interface OrchestratorManagementClient { + /** + * Gets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms + * part of the URI for every service call. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + String getEndpoint(); + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + String getApiVersion(); + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + HttpPipeline getHttpPipeline(); + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + Duration getDefaultPollInterval(); + + /** + * Gets the ContainerServicesClient object to access its operations. + * + * @return the ContainerServicesClient object. + */ + ContainerServicesClient getContainerServices(); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileListResultInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileListResultInner.java new file mode 100644 index 000000000000..be0e3f4d1d55 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileListResultInner.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.OrchestratorVersionProfile; +import java.io.IOException; +import java.util.List; + +/** + * The list of versions for supported orchestrators. + */ +@Fluent +public final class OrchestratorVersionProfileListResultInner + implements JsonSerializable { + /* + * Id of the orchestrator version profile list result. + */ + private String id; + + /* + * Name of the orchestrator version profile list result. + */ + private String name; + + /* + * Type of the orchestrator version profile list result. + */ + private String type; + + /* + * The properties of an orchestrator version profile. + */ + private OrchestratorVersionProfileProperties innerProperties = new OrchestratorVersionProfileProperties(); + + /** + * Creates an instance of OrchestratorVersionProfileListResultInner class. + */ + public OrchestratorVersionProfileListResultInner() { + } + + /** + * Get the id property: Id of the orchestrator version profile list result. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the orchestrator version profile list result. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the type property: Type of the orchestrator version profile list result. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the innerProperties property: The properties of an orchestrator version profile. + * + * @return the innerProperties value. + */ + private OrchestratorVersionProfileProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the orchestrators property: List of orchestrator version profiles. + * + * @return the orchestrators value. + */ + public List orchestrators() { + return this.innerProperties() == null ? null : this.innerProperties().orchestrators(); + } + + /** + * Set the orchestrators property: List of orchestrator version profiles. + * + * @param orchestrators the orchestrators value to set. + * @return the OrchestratorVersionProfileListResultInner object itself. + */ + public OrchestratorVersionProfileListResultInner withOrchestrators(List orchestrators) { + if (this.innerProperties() == null) { + this.innerProperties = new OrchestratorVersionProfileProperties(); + } + this.innerProperties().withOrchestrators(orchestrators); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model OrchestratorVersionProfileListResultInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OrchestratorVersionProfileListResultInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OrchestratorVersionProfileListResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OrchestratorVersionProfileListResultInner 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 OrchestratorVersionProfileListResultInner. + */ + public static OrchestratorVersionProfileListResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OrchestratorVersionProfileListResultInner deserializedOrchestratorVersionProfileListResultInner + = new OrchestratorVersionProfileListResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedOrchestratorVersionProfileListResultInner.innerProperties + = OrchestratorVersionProfileProperties.fromJson(reader); + } else if ("id".equals(fieldName)) { + deserializedOrchestratorVersionProfileListResultInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedOrchestratorVersionProfileListResultInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedOrchestratorVersionProfileListResultInner.type = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOrchestratorVersionProfileListResultInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileProperties.java new file mode 100644 index 000000000000..a2aaadaada98 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileProperties.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.OrchestratorVersionProfile; +import java.io.IOException; +import java.util.List; + +/** + * The properties of an orchestrator version profile. + */ +@Fluent +public final class OrchestratorVersionProfileProperties + implements JsonSerializable { + /* + * List of orchestrator version profiles. + */ + private List orchestrators; + + /** + * Creates an instance of OrchestratorVersionProfileProperties class. + */ + public OrchestratorVersionProfileProperties() { + } + + /** + * Get the orchestrators property: List of orchestrator version profiles. + * + * @return the orchestrators value. + */ + public List orchestrators() { + return this.orchestrators; + } + + /** + * Set the orchestrators property: List of orchestrator version profiles. + * + * @param orchestrators the orchestrators value to set. + * @return the OrchestratorVersionProfileProperties object itself. + */ + public OrchestratorVersionProfileProperties withOrchestrators(List orchestrators) { + this.orchestrators = orchestrators; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (orchestrators() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property orchestrators in model OrchestratorVersionProfileProperties")); + } else { + orchestrators().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OrchestratorVersionProfileProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("orchestrators", this.orchestrators, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OrchestratorVersionProfileProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OrchestratorVersionProfileProperties 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 OrchestratorVersionProfileProperties. + */ + public static OrchestratorVersionProfileProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OrchestratorVersionProfileProperties deserializedOrchestratorVersionProfileProperties + = new OrchestratorVersionProfileProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("orchestrators".equals(fieldName)) { + List orchestrators + = reader.readArray(reader1 -> OrchestratorVersionProfile.fromJson(reader1)); + deserializedOrchestratorVersionProfileProperties.orchestrators = orchestrators; + } else { + reader.skipChildren(); + } + } + + return deserializedOrchestratorVersionProfileProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/package-info.java index 58044d68564e..edefd2e56149 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/package-info.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the inner data models for OpenShiftManagementClient. - * Container Service Client. + * Package containing the inner data models for OrchestratorManagementClient. + * Orchestrator Client. */ package com.azure.resourcemanager.containerservice.fluent.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/package-info.java index 99f8282f9211..417df1291a5b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/package-info.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the service clients for OpenShiftManagementClient. - * Container Service Client. + * Package containing the service clients for OrchestratorManagementClient. + * Orchestrator Client. */ package com.azure.resourcemanager.containerservice.fluent; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServicesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServicesClientImpl.java new file mode 100644 index 000000000000..a2610077824f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServicesClientImpl.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservice.fluent.ContainerServicesClient; +import com.azure.resourcemanager.containerservice.fluent.models.OrchestratorVersionProfileListResultInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ContainerServicesClient. + */ +public final class ContainerServicesClientImpl implements ContainerServicesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ContainerServicesService service; + + /** + * The service client containing this operation class. + */ + private final OrchestratorManagementClientImpl client; + + /** + * Initializes an instance of ContainerServicesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ContainerServicesClientImpl(OrchestratorManagementClientImpl client) { + this.service + = RestProxy.create(ContainerServicesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OrchestratorManagementClientContainerServices to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "OrchestratorManagementClientContainerServices") + public interface ContainerServicesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listOrchestrators(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @QueryParam("resource-type") String resourceType, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a list of supported orchestrators in the specified subscription. + * + * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each + * orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @param resourceType resource type for which the list of orchestrators needs to be returned. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported orchestrators in the specified subscription along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listOrchestratorsWithResponseAsync(String location, + String resourceType) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listOrchestrators(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, resourceType, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported orchestrators in the specified subscription. + * + * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each + * orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @param resourceType resource type for which the list of orchestrators needs to be returned. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported orchestrators in the specified subscription along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listOrchestratorsWithResponseAsync(String location, String resourceType, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listOrchestrators(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, resourceType, accept, context); + } + + /** + * Gets a list of supported orchestrators in the specified subscription. + * + * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each + * orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported orchestrators in the specified subscription on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listOrchestratorsAsync(String location) { + final String resourceType = null; + return listOrchestratorsWithResponseAsync(location, resourceType) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a list of supported orchestrators in the specified subscription. + * + * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each + * orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @param resourceType resource type for which the list of orchestrators needs to be returned. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported orchestrators in the specified subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listOrchestratorsWithResponse(String location, + String resourceType, Context context) { + return listOrchestratorsWithResponseAsync(location, resourceType, context).block(); + } + + /** + * Gets a list of supported orchestrators in the specified subscription. + * + * Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each + * orchestrator including version, available upgrades and whether that version or upgrades are in preview. + * + * @param location The name of a supported Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported orchestrators in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OrchestratorVersionProfileListResultInner listOrchestrators(String location) { + final String resourceType = null; + return listOrchestratorsWithResponse(location, resourceType, Context.NONE).getValue(); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OrchestratorManagementClientBuilder.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OrchestratorManagementClientBuilder.java new file mode 100644 index 000000000000..0efa0f0a8761 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OrchestratorManagementClientBuilder.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerAdapter; +import java.time.Duration; + +/** + * A builder for creating a new instance of the OrchestratorManagementClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { OrchestratorManagementClientImpl.class }) +public final class OrchestratorManagementClientBuilder { + /* + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of + * the URI for every service call. + */ + private String subscriptionId; + + /** + * Sets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms + * part of the URI for every service call. + * + * @param subscriptionId the subscriptionId value. + * @return the OrchestratorManagementClientBuilder. + */ + public OrchestratorManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /* + * server parameter + */ + private String endpoint; + + /** + * Sets server parameter. + * + * @param endpoint the endpoint value. + * @return the OrchestratorManagementClientBuilder. + */ + public OrchestratorManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The environment to connect to + */ + private AzureEnvironment environment; + + /** + * Sets The environment to connect to. + * + * @param environment the environment value. + * @return the OrchestratorManagementClientBuilder. + */ + public OrchestratorManagementClientBuilder environment(AzureEnvironment environment) { + this.environment = environment; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the OrchestratorManagementClientBuilder. + */ + public OrchestratorManagementClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The default poll interval for long-running operation + */ + private Duration defaultPollInterval; + + /** + * Sets The default poll interval for long-running operation. + * + * @param defaultPollInterval the defaultPollInterval value. + * @return the OrchestratorManagementClientBuilder. + */ + public OrchestratorManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the OrchestratorManagementClientBuilder. + */ + public OrchestratorManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /** + * Builds an instance of OrchestratorManagementClientImpl with the provided parameters. + * + * @return an instance of OrchestratorManagementClientImpl. + */ + public OrchestratorManagementClientImpl buildClient() { + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + OrchestratorManagementClientImpl client = new OrchestratorManagementClientImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + return client; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OrchestratorManagementClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OrchestratorManagementClientImpl.java new file mode 100644 index 000000000000..34b53913877b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OrchestratorManagementClientImpl.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.resourcemanager.containerservice.fluent.ContainerServicesClient; +import com.azure.resourcemanager.containerservice.fluent.OrchestratorManagementClient; +import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; +import java.time.Duration; + +/** + * Initializes a new instance of the OrchestratorManagementClientImpl type. + */ +@ServiceClient(builder = OrchestratorManagementClientBuilder.class) +public final class OrchestratorManagementClientImpl extends AzureServiceClient implements OrchestratorManagementClient { + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of + * the URI for every service call. + */ + private final String subscriptionId; + + /** + * Gets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms + * part of the URI for every service call. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** + * server parameter. + */ + private final String endpoint; + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Api Version. + */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The default poll interval for long-running operation. + */ + private final Duration defaultPollInterval; + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + public Duration getDefaultPollInterval() { + return this.defaultPollInterval; + } + + /** + * The ContainerServicesClient object to access its operations. + */ + private final ContainerServicesClient containerServices; + + /** + * Gets the ContainerServicesClient object to access its operations. + * + * @return the ContainerServicesClient object. + */ + public ContainerServicesClient getContainerServices() { + return this.containerServices; + } + + /** + * Initializes an instance of OrchestratorManagementClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param defaultPollInterval The default poll interval for long-running operation. + * @param environment The Azure environment. + * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure subscription. The + * subscription ID forms part of the URI for every service call. + * @param endpoint server parameter. + */ + OrchestratorManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + super(httpPipeline, serializerAdapter, environment); + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.defaultPollInterval = defaultPollInterval; + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = "2019-08-01"; + this.containerServices = new ContainerServicesClientImpl(this); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorProfile.java new file mode 100644 index 000000000000..4bf91b8b8b85 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorProfile.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +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 orchestrator. + */ +@Fluent +public final class OrchestratorProfile implements JsonSerializable { + /* + * Orchestrator type. + */ + private String orchestratorType; + + /* + * Orchestrator version (major, minor, patch). + */ + private String orchestratorVersion; + + /* + * Whether Kubernetes version is currently in preview. + */ + private Boolean isPreview; + + /** + * Creates an instance of OrchestratorProfile class. + */ + public OrchestratorProfile() { + } + + /** + * Get the orchestratorType property: Orchestrator type. + * + * @return the orchestratorType value. + */ + public String orchestratorType() { + return this.orchestratorType; + } + + /** + * Set the orchestratorType property: Orchestrator type. + * + * @param orchestratorType the orchestratorType value to set. + * @return the OrchestratorProfile object itself. + */ + public OrchestratorProfile withOrchestratorType(String orchestratorType) { + this.orchestratorType = orchestratorType; + return this; + } + + /** + * Get the orchestratorVersion property: Orchestrator version (major, minor, patch). + * + * @return the orchestratorVersion value. + */ + public String orchestratorVersion() { + return this.orchestratorVersion; + } + + /** + * Set the orchestratorVersion property: Orchestrator version (major, minor, patch). + * + * @param orchestratorVersion the orchestratorVersion value to set. + * @return the OrchestratorProfile object itself. + */ + public OrchestratorProfile withOrchestratorVersion(String orchestratorVersion) { + this.orchestratorVersion = orchestratorVersion; + return this; + } + + /** + * Get the isPreview property: Whether Kubernetes version is currently in preview. + * + * @return the isPreview value. + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Set the isPreview property: Whether Kubernetes version is currently in preview. + * + * @param isPreview the isPreview value to set. + * @return the OrchestratorProfile object itself. + */ + public OrchestratorProfile withIsPreview(Boolean isPreview) { + this.isPreview = isPreview; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (orchestratorVersion() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property orchestratorVersion in model OrchestratorProfile")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OrchestratorProfile.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("orchestratorVersion", this.orchestratorVersion); + jsonWriter.writeStringField("orchestratorType", this.orchestratorType); + jsonWriter.writeBooleanField("isPreview", this.isPreview); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OrchestratorProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OrchestratorProfile 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 OrchestratorProfile. + */ + public static OrchestratorProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OrchestratorProfile deserializedOrchestratorProfile = new OrchestratorProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("orchestratorVersion".equals(fieldName)) { + deserializedOrchestratorProfile.orchestratorVersion = reader.getString(); + } else if ("orchestratorType".equals(fieldName)) { + deserializedOrchestratorProfile.orchestratorType = reader.getString(); + } else if ("isPreview".equals(fieldName)) { + deserializedOrchestratorProfile.isPreview = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedOrchestratorProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorVersionProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorVersionProfile.java new file mode 100644 index 000000000000..959264dbc526 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorVersionProfile.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +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 profile of an orchestrator and its available versions. + */ +@Fluent +public final class OrchestratorVersionProfile implements JsonSerializable { + /* + * Orchestrator type. + */ + private String orchestratorType; + + /* + * Orchestrator version (major, minor, patch). + */ + private String orchestratorVersion; + + /* + * Installed by default if version is not specified. + */ + private Boolean defaultProperty; + + /* + * Whether Kubernetes version is currently in preview. + */ + private Boolean isPreview; + + /* + * The list of available upgrade versions. + */ + private List upgrades; + + /** + * Creates an instance of OrchestratorVersionProfile class. + */ + public OrchestratorVersionProfile() { + } + + /** + * Get the orchestratorType property: Orchestrator type. + * + * @return the orchestratorType value. + */ + public String orchestratorType() { + return this.orchestratorType; + } + + /** + * Set the orchestratorType property: Orchestrator type. + * + * @param orchestratorType the orchestratorType value to set. + * @return the OrchestratorVersionProfile object itself. + */ + public OrchestratorVersionProfile withOrchestratorType(String orchestratorType) { + this.orchestratorType = orchestratorType; + return this; + } + + /** + * Get the orchestratorVersion property: Orchestrator version (major, minor, patch). + * + * @return the orchestratorVersion value. + */ + public String orchestratorVersion() { + return this.orchestratorVersion; + } + + /** + * Set the orchestratorVersion property: Orchestrator version (major, minor, patch). + * + * @param orchestratorVersion the orchestratorVersion value to set. + * @return the OrchestratorVersionProfile object itself. + */ + public OrchestratorVersionProfile withOrchestratorVersion(String orchestratorVersion) { + this.orchestratorVersion = orchestratorVersion; + return this; + } + + /** + * Get the defaultProperty property: Installed by default if version is not specified. + * + * @return the defaultProperty value. + */ + public Boolean defaultProperty() { + return this.defaultProperty; + } + + /** + * Set the defaultProperty property: Installed by default if version is not specified. + * + * @param defaultProperty the defaultProperty value to set. + * @return the OrchestratorVersionProfile object itself. + */ + public OrchestratorVersionProfile withDefaultProperty(Boolean defaultProperty) { + this.defaultProperty = defaultProperty; + return this; + } + + /** + * Get the isPreview property: Whether Kubernetes version is currently in preview. + * + * @return the isPreview value. + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Set the isPreview property: Whether Kubernetes version is currently in preview. + * + * @param isPreview the isPreview value to set. + * @return the OrchestratorVersionProfile object itself. + */ + public OrchestratorVersionProfile withIsPreview(Boolean isPreview) { + this.isPreview = isPreview; + return this; + } + + /** + * Get the upgrades property: The list of available upgrade versions. + * + * @return the upgrades value. + */ + public List upgrades() { + return this.upgrades; + } + + /** + * Set the upgrades property: The list of available upgrade versions. + * + * @param upgrades the upgrades value to set. + * @return the OrchestratorVersionProfile object itself. + */ + public OrchestratorVersionProfile withUpgrades(List upgrades) { + this.upgrades = upgrades; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (orchestratorType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property orchestratorType in model OrchestratorVersionProfile")); + } + if (orchestratorVersion() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property orchestratorVersion in model OrchestratorVersionProfile")); + } + if (upgrades() != null) { + upgrades().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OrchestratorVersionProfile.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("orchestratorType", this.orchestratorType); + jsonWriter.writeStringField("orchestratorVersion", this.orchestratorVersion); + jsonWriter.writeBooleanField("default", this.defaultProperty); + jsonWriter.writeBooleanField("isPreview", this.isPreview); + jsonWriter.writeArrayField("upgrades", this.upgrades, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OrchestratorVersionProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OrchestratorVersionProfile 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 OrchestratorVersionProfile. + */ + public static OrchestratorVersionProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OrchestratorVersionProfile deserializedOrchestratorVersionProfile = new OrchestratorVersionProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("orchestratorType".equals(fieldName)) { + deserializedOrchestratorVersionProfile.orchestratorType = reader.getString(); + } else if ("orchestratorVersion".equals(fieldName)) { + deserializedOrchestratorVersionProfile.orchestratorVersion = reader.getString(); + } else if ("default".equals(fieldName)) { + deserializedOrchestratorVersionProfile.defaultProperty = reader.getNullable(JsonReader::getBoolean); + } else if ("isPreview".equals(fieldName)) { + deserializedOrchestratorVersionProfile.isPreview = reader.getNullable(JsonReader::getBoolean); + } else if ("upgrades".equals(fieldName)) { + List upgrades + = reader.readArray(reader1 -> OrchestratorProfile.fromJson(reader1)); + deserializedOrchestratorVersionProfile.upgrades = upgrades; + } else { + reader.skipChildren(); + } + } + + return deserializedOrchestratorVersionProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java index 2eb4e5cb1094..f5237ea7b9f1 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for OpenShiftManagementClient. - * Container Service Client. + * Package containing the data models for OrchestratorManagementClient. + * Orchestrator Client. */ package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/package-info.java index 7a966b63347b..bf6ecbfdd1c7 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/package-info.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the classes for OpenShiftManagementClient. - * Container Service Client. + * Package containing the classes for OrchestratorManagementClient. + * Orchestrator Client. */ package com.azure.resourcemanager.containerservice; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json index 530ad8f322d0..61cf8f85fd5c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.containerservice.implementation.OpenShiftManagedClustersClientImpl$OpenShiftManagedClustersService"]] \ No newline at end of file +[["com.azure.resourcemanager.containerservice.implementation.ContainerServicesClientImpl$ContainerServicesService"]] \ No newline at end of file diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ContainerServicesListOrchestratorsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ContainerServicesListOrchestratorsSamples.java index ebd8eb31a6b6..1b4c5a82aa48 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ContainerServicesListOrchestratorsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ContainerServicesListOrchestratorsSamples.java @@ -16,10 +16,10 @@ public final class ContainerServicesListOrchestratorsSamples { /** * Sample code: List Container Service Orchestrators. * - * @param manager Entry point to ContainerServiceManager. + * @param manager Entry point to OrchestratorManager. */ public static void - listContainerServiceOrchestrators(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + listContainerServiceOrchestrators(com.azure.resourcemanager.containerservice.OrchestratorManager manager) { manager.serviceClient() .getContainerServices() .listOrchestratorsWithResponse("location1", null, com.azure.core.util.Context.NONE); From 606fac7e7f18ff0741dcce339b0fb0b437f98d11 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 20 Mar 2026 12:32:53 +0800 Subject: [PATCH 04/19] delete sample --- ...ainerServicesListOrchestratorsSamples.java | 27 ------ ...tManagedClustersCreateOrUpdateSamples.java | 84 ------------------- ...OpenShiftManagedClustersDeleteSamples.java | 27 ------ ...agedClustersGetByResourceGroupSamples.java | 26 ------ ...gedClustersListByResourceGroupSamples.java | 27 ------ .../OpenShiftManagedClustersListSamples.java | 24 ------ ...ShiftManagedClustersUpdateTagsSamples.java | 44 ---------- 7 files changed, 259 deletions(-) delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ContainerServicesListOrchestratorsSamples.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersCreateOrUpdateSamples.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersDeleteSamples.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersGetByResourceGroupSamples.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListByResourceGroupSamples.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListSamples.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersUpdateTagsSamples.java diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ContainerServicesListOrchestratorsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ContainerServicesListOrchestratorsSamples.java deleted file mode 100644 index 1b4c5a82aa48..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ContainerServicesListOrchestratorsSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.generated; - -/** - * Samples for ContainerServices ListOrchestrators. - */ -public final class ContainerServicesListOrchestratorsSamples { - /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-08-01/examples/ - * ContainerServiceListOrchestrators.json - */ - /** - * Sample code: List Container Service Orchestrators. - * - * @param manager Entry point to OrchestratorManager. - */ - public static void - listContainerServiceOrchestrators(com.azure.resourcemanager.containerservice.OrchestratorManager manager) { - manager.serviceClient() - .getContainerServices() - .listOrchestratorsWithResponse("location1", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersCreateOrUpdateSamples.java deleted file mode 100644 index 4f104e9e4853..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersCreateOrUpdateSamples.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.generated; - -import com.azure.resourcemanager.containerservice.fluent.models.OpenShiftManagedClusterInner; -import com.azure.resourcemanager.containerservice.models.NetworkProfile; -import com.azure.resourcemanager.containerservice.models.OSType; -import com.azure.resourcemanager.containerservice.models.OpenShiftAgentPoolProfileRole; -import com.azure.resourcemanager.containerservice.models.OpenShiftContainerServiceVMSize; -import com.azure.resourcemanager.containerservice.models.OpenShiftManagedClusterAadIdentityProvider; -import com.azure.resourcemanager.containerservice.models.OpenShiftManagedClusterAgentPoolProfile; -import com.azure.resourcemanager.containerservice.models.OpenShiftManagedClusterAuthProfile; -import com.azure.resourcemanager.containerservice.models.OpenShiftManagedClusterIdentityProvider; -import com.azure.resourcemanager.containerservice.models.OpenShiftManagedClusterMasterPoolProfile; -import com.azure.resourcemanager.containerservice.models.OpenShiftRouterProfile; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for OpenShiftManagedClusters CreateOrUpdate. - */ -public final class OpenShiftManagedClustersCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-04-30/examples/ - * OpenShiftManagedClustersCreate_Update.json - */ - /** - * Sample code: Create/Update OpenShift Managed Cluster. - * - * @param manager Entry point to OpenShiftManager. - */ - public static void - createUpdateOpenShiftManagedCluster(com.azure.resourcemanager.containerservice.OpenShiftManager manager) { - manager.serviceClient() - .getOpenShiftManagedClusters() - .createOrUpdate("rg1", "clustername1", - new OpenShiftManagedClusterInner().withLocation("location1") - .withTags(mapOf("archv2", "", "tier", "production")) - .withOpenShiftVersion("v3.11") - .withNetworkProfile(new NetworkProfile().withVnetCidr("10.0.0.0/8")) - .withRouterProfiles(Arrays.asList(new OpenShiftRouterProfile().withName("default"))) - .withMasterPoolProfile(new OpenShiftManagedClusterMasterPoolProfile().withName("master") - .withCount(3) - .withVmSize(OpenShiftContainerServiceVMSize.STANDARD_D4S_V3) - .withSubnetCidr("10.0.0.0/24") - .withOsType(OSType.LINUX)) - .withAgentPoolProfiles(Arrays.asList( - new OpenShiftManagedClusterAgentPoolProfile().withName("infra") - .withCount(2) - .withVmSize(OpenShiftContainerServiceVMSize.STANDARD_D4S_V3) - .withSubnetCidr("10.0.0.0/24") - .withOsType(OSType.LINUX) - .withRole(OpenShiftAgentPoolProfileRole.INFRA), - new OpenShiftManagedClusterAgentPoolProfile().withName("compute") - .withCount(4) - .withVmSize(OpenShiftContainerServiceVMSize.STANDARD_D4S_V3) - .withSubnetCidr("10.0.0.0/24") - .withOsType(OSType.LINUX) - .withRole(OpenShiftAgentPoolProfileRole.COMPUTE))) - .withAuthProfile(new OpenShiftManagedClusterAuthProfile().withIdentityProviders( - Arrays.asList(new OpenShiftManagedClusterIdentityProvider().withName("Azure AD") - .withProvider(new OpenShiftManagedClusterAadIdentityProvider().withClientId("clientId") - .withSecret("fakeTokenPlaceholder") - .withTenantId("tenantId") - .withCustomerAdminGroupId("customerAdminGroupId"))))), - 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/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersDeleteSamples.java deleted file mode 100644 index 47260f9928d1..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersDeleteSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.generated; - -/** - * Samples for OpenShiftManagedClusters Delete. - */ -public final class OpenShiftManagedClustersDeleteSamples { - /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-04-30/examples/ - * OpenShiftManagedClustersDelete.json - */ - /** - * Sample code: Delete OpenShift Managed Cluster. - * - * @param manager Entry point to OpenShiftManager. - */ - public static void - deleteOpenShiftManagedCluster(com.azure.resourcemanager.containerservice.OpenShiftManager manager) { - manager.serviceClient() - .getOpenShiftManagedClusters() - .delete("rg1", "clustername1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersGetByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersGetByResourceGroupSamples.java deleted file mode 100644 index 337630e3da3b..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersGetByResourceGroupSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.generated; - -/** - * Samples for OpenShiftManagedClusters GetByResourceGroup. - */ -public final class OpenShiftManagedClustersGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-04-30/examples/ - * OpenShiftManagedClustersGet.json - */ - /** - * Sample code: Get OpenShift Managed Cluster. - * - * @param manager Entry point to OpenShiftManager. - */ - public static void getOpenShiftManagedCluster(com.azure.resourcemanager.containerservice.OpenShiftManager manager) { - manager.serviceClient() - .getOpenShiftManagedClusters() - .getByResourceGroupWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListByResourceGroupSamples.java deleted file mode 100644 index 1c47fca2751a..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListByResourceGroupSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.generated; - -/** - * Samples for OpenShiftManagedClusters ListByResourceGroup. - */ -public final class OpenShiftManagedClustersListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-04-30/examples/ - * OpenShiftManagedClustersListByResourceGroup.json - */ - /** - * Sample code: Get Managed Clusters by Resource Group. - * - * @param manager Entry point to OpenShiftManager. - */ - public static void - getManagedClustersByResourceGroup(com.azure.resourcemanager.containerservice.OpenShiftManager manager) { - manager.serviceClient() - .getOpenShiftManagedClusters() - .listByResourceGroup("rg1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListSamples.java deleted file mode 100644 index 36b0efb32603..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersListSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.generated; - -/** - * Samples for OpenShiftManagedClusters List. - */ -public final class OpenShiftManagedClustersListSamples { - /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-04-30/examples/ - * OpenShiftManagedClustersList.json - */ - /** - * Sample code: List Managed Clusters. - * - * @param manager Entry point to OpenShiftManager. - */ - public static void listManagedClusters(com.azure.resourcemanager.containerservice.OpenShiftManager manager) { - manager.serviceClient().getOpenShiftManagedClusters().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersUpdateTagsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersUpdateTagsSamples.java deleted file mode 100644 index 5064b5a83ab4..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OpenShiftManagedClustersUpdateTagsSamples.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.generated; - -import com.azure.resourcemanager.containerservice.models.TagsObject; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for OpenShiftManagedClusters UpdateTags. - */ -public final class OpenShiftManagedClustersUpdateTagsSamples { - /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-04-30/examples/ - * OpenShiftManagedClustersUpdateTags.json - */ - /** - * Sample code: Update OpenShift Managed Cluster Tags. - * - * @param manager Entry point to OpenShiftManager. - */ - public static void - updateOpenShiftManagedClusterTags(com.azure.resourcemanager.containerservice.OpenShiftManager manager) { - manager.serviceClient() - .getOpenShiftManagedClusters() - .updateTags("rg1", "clustername1", new TagsObject().withTags(mapOf("archv3", "", "tier", "testing")), - 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; - } -} From 2ac599b6bd9db0b9c2e5231685b4913a42ef5dd8 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 20 Mar 2026 12:33:21 +0800 Subject: [PATCH 05/19] update file comment --- .../containerservice/fluent/ContainerServicesClient.java | 2 +- .../containerservice/fluent/OpenShiftManagedClustersClient.java | 2 +- .../containerservice/fluent/OpenShiftManagementClient.java | 2 +- .../containerservice/fluent/OrchestratorManagementClient.java | 2 +- .../fluent/models/OpenShiftManagedClusterInner.java | 2 +- .../fluent/models/OpenShiftManagedClusterProperties.java | 2 +- .../models/OrchestratorVersionProfileListResultInner.java | 2 +- .../fluent/models/OrchestratorVersionProfileProperties.java | 2 +- .../containerservice/fluent/models/package-info.java | 2 +- .../resourcemanager/containerservice/fluent/package-info.java | 2 +- .../implementation/ContainerServicesClientImpl.java | 2 +- .../implementation/OpenShiftManagedClustersClientImpl.java | 2 +- .../implementation/OpenShiftManagementClientBuilder.java | 2 +- .../implementation/OpenShiftManagementClientImpl.java | 2 +- .../implementation/OrchestratorManagementClientBuilder.java | 2 +- .../implementation/OrchestratorManagementClientImpl.java | 2 +- .../resourcemanager/containerservice/models/NetworkProfile.java | 2 +- .../azure/resourcemanager/containerservice/models/OSType.java | 2 +- .../containerservice/models/OpenShiftAgentPoolProfileRole.java | 2 +- .../models/OpenShiftContainerServiceVMSize.java | 2 +- .../models/OpenShiftManagedClusterAadIdentityProvider.java | 2 +- .../models/OpenShiftManagedClusterAgentPoolProfile.java | 2 +- .../models/OpenShiftManagedClusterAuthProfile.java | 2 +- .../models/OpenShiftManagedClusterBaseIdentityProvider.java | 2 +- .../models/OpenShiftManagedClusterIdentityProvider.java | 2 +- .../models/OpenShiftManagedClusterListResult.java | 2 +- .../models/OpenShiftManagedClusterMasterPoolProfile.java | 2 +- .../containerservice/models/OpenShiftRouterProfile.java | 2 +- .../containerservice/models/OrchestratorProfile.java | 2 +- .../containerservice/models/OrchestratorVersionProfile.java | 2 +- .../resourcemanager/containerservice/models/PurchasePlan.java | 2 +- .../resourcemanager/containerservice/models/TagsObject.java | 2 +- .../resourcemanager/containerservice/models/package-info.java | 2 +- .../azure/resourcemanager/containerservice/package-info.java | 2 +- 34 files changed, 34 insertions(+), 34 deletions(-) diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServicesClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServicesClient.java index cd0a041536ae..ff9cc6fc99d5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServicesClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServicesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.fluent; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OpenShiftManagedClustersClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OpenShiftManagedClustersClient.java index a913f351fa0a..8a9681f6eef3 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OpenShiftManagedClustersClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OpenShiftManagedClustersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.fluent; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OpenShiftManagementClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OpenShiftManagementClient.java index fafd2dbcf12f..9043ec236e3e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OpenShiftManagementClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OpenShiftManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.fluent; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OrchestratorManagementClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OrchestratorManagementClient.java index f9eff94cbf05..be6ed9febed5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OrchestratorManagementClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OrchestratorManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.fluent; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OpenShiftManagedClusterInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OpenShiftManagedClusterInner.java index 8b25b06f6512..b5ab2b0ffb38 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OpenShiftManagedClusterInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OpenShiftManagedClusterInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.fluent.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OpenShiftManagedClusterProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OpenShiftManagedClusterProperties.java index 48e696a6bcb9..bcefbf31f1ed 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OpenShiftManagedClusterProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OpenShiftManagedClusterProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.fluent.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileListResultInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileListResultInner.java index be0e3f4d1d55..aa68bcee2165 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileListResultInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileListResultInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.fluent.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileProperties.java index a2aaadaada98..2834bec53952 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.fluent.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/package-info.java index edefd2e56149..7c29cfce72f3 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/package-info.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/package-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code /** * Package containing the inner data models for OrchestratorManagementClient. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/package-info.java index 417df1291a5b..8ca3630db960 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/package-info.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/package-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code /** * Package containing the service clients for OrchestratorManagementClient. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServicesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServicesClientImpl.java index a2610077824f..d81e6aa3e81c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServicesClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServicesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.implementation; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagedClustersClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagedClustersClientImpl.java index fe4b62ddd08e..16afb57a889a 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagedClustersClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagedClustersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.implementation; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagementClientBuilder.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagementClientBuilder.java index 94b7996da97f..419ce45861c7 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagementClientBuilder.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.implementation; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagementClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagementClientImpl.java index 449675a09b29..2786ae5ee24f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagementClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.implementation; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OrchestratorManagementClientBuilder.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OrchestratorManagementClientBuilder.java index 0efa0f0a8761..a5d3829864ef 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OrchestratorManagementClientBuilder.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OrchestratorManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.implementation; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OrchestratorManagementClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OrchestratorManagementClientImpl.java index 34b53913877b..836b7fb93001 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OrchestratorManagementClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OrchestratorManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.implementation; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkProfile.java index d96102a4edea..f7f1e4afc3ef 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSType.java index f8e88f787ad5..2a466b6172c1 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSType.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftAgentPoolProfileRole.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftAgentPoolProfileRole.java index 1eca15636287..7631dd6b6a61 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftAgentPoolProfileRole.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftAgentPoolProfileRole.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftContainerServiceVMSize.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftContainerServiceVMSize.java index 3744a4c10abc..d9acd8c41e3c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftContainerServiceVMSize.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftContainerServiceVMSize.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterAadIdentityProvider.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterAadIdentityProvider.java index 056d64c06cf9..224faa9d20f1 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterAadIdentityProvider.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterAadIdentityProvider.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterAgentPoolProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterAgentPoolProfile.java index 2b12fb8af6c9..d601818854b2 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterAgentPoolProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterAgentPoolProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterAuthProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterAuthProfile.java index 681180e7c524..4b3ff2e9211d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterAuthProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterAuthProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterBaseIdentityProvider.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterBaseIdentityProvider.java index a6ef84a2f825..b68a71270ecd 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterBaseIdentityProvider.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterBaseIdentityProvider.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterIdentityProvider.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterIdentityProvider.java index 16847368af0a..3b97cbba4223 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterIdentityProvider.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterIdentityProvider.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterListResult.java index 558e30408845..d8fe9799d9cf 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterListResult.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterListResult.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterMasterPoolProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterMasterPoolProfile.java index 2573a6ebaf8e..9de4158eeb95 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterMasterPoolProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftManagedClusterMasterPoolProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftRouterProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftRouterProfile.java index 4474e974f905..3cc9e580d8e0 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftRouterProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OpenShiftRouterProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorProfile.java index 4bf91b8b8b85..1f0af0afd176 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorVersionProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorVersionProfile.java index 959264dbc526..9b34df36d68f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorVersionProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OrchestratorVersionProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PurchasePlan.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PurchasePlan.java index 46396e323584..08443b04d055 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PurchasePlan.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PurchasePlan.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TagsObject.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TagsObject.java index 02794c06addb..4419154bea52 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TagsObject.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TagsObject.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java index f5237ea7b9f1..da3663f3ba9a 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code /** * Package containing the data models for OrchestratorManagementClient. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/package-info.java index bf6ecbfdd1c7..5d4586f6ebd5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/package-info.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/package-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Deprecated generated code /** * Package containing the classes for OrchestratorManagementClient. From 5f3cffca991f7d40540100ca6259de577f0e887d Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 20 Mar 2026 12:40:38 +0800 Subject: [PATCH 06/19] regen aks --- .../fluent/AgentPoolsClient.java | 937 +++ .../ContainerServiceManagementClient.java | 132 + .../fluent/MachinesClient.java | 128 + .../MaintenanceConfigurationsClient.java | 260 + .../fluent/ManagedClustersClient.java | 2230 +++++++ .../fluent/ManagedNamespacesClient.java | 478 ++ .../fluent/OperationsClient.java | 49 + .../PrivateEndpointConnectionsClient.java | 323 + .../fluent/PrivateLinkResourcesClient.java | 80 + .../ResolvePrivateLinkServiceIdsClient.java | 78 + .../fluent/SnapshotsClient.java | 317 + .../TrustedAccessRoleBindingsClient.java | 347 ++ .../fluent/TrustedAccessRolesClient.java | 54 + .../fluent/models/AccessProfile.java | 94 + .../AgentPoolAvailableVersionsInner.java | 169 + .../AgentPoolAvailableVersionsProperties.java | 105 + .../fluent/models/AgentPoolInner.java | 1506 +++++ .../models/AgentPoolUpgradeProfileInner.java | 257 + .../AgentPoolUpgradeProfileProperties.java | 201 + .../models/CommandResultProperties.java | 165 + .../fluent/models/CredentialResultsInner.java | 88 + .../KubernetesVersionListResultInner.java | 100 + .../fluent/models/MachineInner.java | 185 + .../models/MaintenanceConfigurationInner.java | 233 + .../MaintenanceConfigurationProperties.java | 170 + .../ManagedClusterAccessProfileInner.java | 206 + ...agedClusterAgentPoolProfileProperties.java | 1896 ++++++ .../fluent/models/ManagedClusterInner.java | 1338 ++++ .../models/ManagedClusterProperties.java | 1465 +++++ .../ManagedClusterUpgradeProfileInner.java | 213 + ...anagedClusterUpgradeProfileProperties.java | 149 + .../fluent/models/ManagedNamespaceInner.java | 214 + .../models/MeshRevisionProfileInner.java | 166 + .../models/MeshUpgradeProfileInner.java | 166 + .../fluent/models/OperationValueDisplay.java | 129 + .../fluent/models/OperationValueInner.java | 153 + .../OutboundEnvironmentEndpointInner.java | 131 + .../PrivateEndpointConnectionInner.java | 217 + ...vateEndpointConnectionListResultInner.java | 101 + .../PrivateEndpointConnectionProperties.java | 161 + .../models/PrivateLinkResourceInner.java | 227 + .../PrivateLinkResourcesListResultInner.java | 101 + .../fluent/models/RunCommandResultInner.java | 156 + .../fluent/models/SnapshotInner.java | 288 + .../fluent/models/SnapshotProperties.java | 229 + .../models/TrustedAccessRoleBindingInner.java | 222 + .../TrustedAccessRoleBindingProperties.java | 159 + .../fluent/models/TrustedAccessRoleInner.java | 122 + .../fluent/models/package-info.java | 6 +- .../containerservice/fluent/package-info.java | 6 +- .../implementation/AgentPoolsClientImpl.java | 2170 +++++++ ...ntainerServiceManagementClientBuilder.java | 138 + .../ContainerServiceManagementClientImpl.java | 317 + .../implementation/MachinesClientImpl.java | 442 ++ .../MaintenanceConfigurationsClientImpl.java | 747 +++ .../ManagedClustersClientImpl.java | 5442 +++++++++++++++++ .../ManagedNamespacesClientImpl.java | 1258 ++++ .../implementation/OperationsClientImpl.java | 227 + .../PrivateEndpointConnectionsClientImpl.java | 761 +++ .../PrivateLinkResourcesClientImpl.java | 196 + ...esolvePrivateLinkServiceIdsClientImpl.java | 208 + .../implementation/SnapshotsClientImpl.java | 989 +++ .../TrustedAccessRoleBindingsClientImpl.java | 952 +++ .../TrustedAccessRolesClientImpl.java | 254 + .../models/AbsoluteMonthlySchedule.java | 122 + .../models/AdoptionPolicy.java | 56 + .../models/AdvancedNetworkPolicies.java | 59 + .../models/AdvancedNetworking.java | 164 + .../AdvancedNetworkingObservability.java | 96 + .../models/AdvancedNetworkingSecurity.java | 135 + ...rsionsPropertiesAgentPoolVersionsItem.java | 156 + .../AgentPoolDeleteMachinesParameter.java | 105 + .../models/AgentPoolGatewayProfile.java | 105 + .../models/AgentPoolListResult.java | 134 + .../models/AgentPoolMode.java | 58 + .../models/AgentPoolNetworkProfile.java | 166 + .../models/AgentPoolSecurityProfile.java | 159 + .../models/AgentPoolSshAccess.java | 51 + .../models/AgentPoolStatus.java | 84 + .../models/AgentPoolType.java | 56 + ...lUpgradeProfilePropertiesUpgradesItem.java | 124 + .../models/AgentPoolUpgradeSettings.java | 251 + .../models/AgentPoolWindowsProfile.java | 98 + .../models/ArtifactSource.java | 51 + .../models/AzureKeyVaultKms.java | 197 + .../models/BackendPoolType.java | 51 + .../models/ClusterUpgradeSettings.java | 96 + .../containerservice/models/Code.java | 51 + .../models/CompatibleVersions.java | 123 + .../models/ConnectionStatus.java | 61 + .../models/ContainerServiceLinuxProfile.java | 137 + .../ContainerServiceNetworkProfile.java | 615 ++ .../ContainerServiceSshConfiguration.java | 110 + .../models/ContainerServiceSshPublicKey.java | 105 + .../containerservice/models/CreationData.java | 95 + .../models/CredentialResult.java | 98 + .../models/DailySchedule.java | 94 + .../containerservice/models/DateSpan.java | 136 + .../models/DelegatedResource.java | 180 + .../containerservice/models/DeletePolicy.java | 51 + .../models/EndpointDependency.java | 128 + .../models/EndpointDetail.java | 177 + .../containerservice/models/Expander.java | 63 + .../models/ExtendedLocation.java | 121 + .../models/ExtendedLocationTypes.java | 46 + .../containerservice/models/Format.java | 51 + .../containerservice/models/GpuDriver.java | 51 + .../models/GpuInstanceProfile.java | 66 + .../containerservice/models/GpuProfile.java | 93 + .../containerservice/models/IpFamily.java | 51 + .../containerservice/models/IpTag.java | 121 + .../models/IstioCertificateAuthority.java | 97 + .../models/IstioComponents.java | 134 + .../models/IstioEgressGateway.java | 194 + .../models/IstioIngressGateway.java | 130 + .../models/IstioIngressGatewayMode.java | 51 + .../IstioPluginCertificateAuthority.java | 206 + .../models/IstioServiceMesh.java | 166 + .../models/KeyVaultNetworkAccessTypes.java | 53 + .../models/KubeletConfig.java | 409 ++ .../models/KubeletDiskType.java | 51 + .../models/KubernetesPatchVersion.java | 95 + .../models/KubernetesSupportPlan.java | 51 + .../models/KubernetesVersion.java | 218 + .../models/KubernetesVersionCapabilities.java | 98 + .../containerservice/models/LicenseType.java | 52 + .../models/LinuxOSConfig.java | 196 + .../models/LoadBalancerSku.java | 53 + .../models/LocalDnsForwardDestination.java | 51 + .../models/LocalDnsForwardPolicy.java | 57 + .../containerservice/models/LocalDnsMode.java | 56 + .../models/LocalDnsOverride.java | 305 + .../models/LocalDnsProfile.java | 192 + .../models/LocalDnsProtocol.java | 51 + .../models/LocalDnsQueryLogging.java | 51 + .../models/LocalDnsServeStale.java | 56 + .../models/LocalDnsState.java | 51 + .../models/MachineIpAddress.java | 97 + .../models/MachineListResult.java | 134 + .../models/MachineNetworkProperties.java | 87 + .../models/MachineProperties.java | 100 + .../MaintenanceConfigurationListResult.java | 137 + .../models/MaintenanceWindow.java | 273 + ...agedClusterAIToolchainOperatorProfile.java | 100 + .../models/ManagedClusterAadProfile.java | 274 + .../models/ManagedClusterAddonProfile.java | 144 + .../ManagedClusterAddonProfileIdentity.java | 102 + .../ManagedClusterAgentPoolProfile.java | 861 +++ .../ManagedClusterApiServerAccessProfile.java | 299 + .../ManagedClusterAutoUpgradeProfile.java | 133 + .../ManagedClusterAzureMonitorProfile.java | 104 + ...erAzureMonitorProfileKubeStateMetrics.java | 140 + ...agedClusterAzureMonitorProfileMetrics.java | 140 + .../ManagedClusterBootstrapProfile.java | 127 + .../models/ManagedClusterCostAnalysis.java | 101 + .../models/ManagedClusterHttpProxyConfig.java | 180 + .../models/ManagedClusterIdentity.java | 221 + .../models/ManagedClusterIngressProfile.java | 102 + .../ManagedClusterIngressProfileNginx.java | 99 + ...gedClusterIngressProfileWebAppRouting.java | 196 + .../models/ManagedClusterListResult.java | 135 + .../ManagedClusterLoadBalancerProfile.java | 312 + ...LoadBalancerProfileManagedOutboundIPs.java | 134 + ...ClusterLoadBalancerProfileOutboundIPs.java | 101 + ...LoadBalancerProfileOutboundIpPrefixes.java | 104 + ...anagedClusterManagedOutboundIpProfile.java | 98 + .../models/ManagedClusterMetricsProfile.java | 96 + .../ManagedClusterNatGatewayProfile.java | 155 + ...ManagedClusterNodeProvisioningProfile.java | 141 + ...anagedClusterNodeResourceGroupProfile.java | 100 + .../ManagedClusterOidcIssuerProfile.java | 110 + .../models/ManagedClusterPodIdentity.java | 234 + .../ManagedClusterPodIdentityException.java | 174 + .../ManagedClusterPodIdentityProfile.java | 209 + ...edClusterPodIdentityProvisioningError.java | 99 + ...usterPodIdentityProvisioningErrorBody.java | 190 + ...gedClusterPodIdentityProvisioningInfo.java | 99 + ...edClusterPodIdentityProvisioningState.java | 72 + .../ManagedClusterPoolUpgradeProfile.java | 198 + ...ClusterPoolUpgradeProfileUpgradesItem.java | 124 + ...gedClusterPropertiesAutoScalerProfile.java | 735 +++ .../models/ManagedClusterSecurityProfile.java | 239 + ...ManagedClusterSecurityProfileDefender.java | 138 + ...rityProfileDefenderSecurityMonitoring.java | 97 + ...gedClusterSecurityProfileImageCleaner.java | 126 + ...lusterSecurityProfileWorkloadIdentity.java | 96 + ...ManagedClusterServicePrincipalProfile.java | 132 + .../models/ManagedClusterSku.java | 124 + .../models/ManagedClusterSkuName.java | 51 + .../models/ManagedClusterSkuTier.java | 57 + ...agedClusterStaticEgressGatewayProfile.java | 98 + .../models/ManagedClusterStatus.java | 84 + .../models/ManagedClusterStorageProfile.java | 194 + ...gedClusterStorageProfileBlobCsiDriver.java | 96 + ...gedClusterStorageProfileDiskCsiDriver.java | 96 + ...gedClusterStorageProfileFileCsiDriver.java | 96 + ...usterStorageProfileSnapshotController.java | 96 + .../models/ManagedClusterWindowsProfile.java | 252 + ...nagedClusterWorkloadAutoScalerProfile.java | 134 + ...dClusterWorkloadAutoScalerProfileKeda.java | 96 + ...utoScalerProfileVerticalPodAutoscaler.java | 99 + ...anagedClustersGetCommandResultHeaders.java | 58 + ...nagedClustersGetCommandResultResponse.java | 40 + .../models/ManagedNamespaceListResult.java | 136 + ...ceIdentityUserAssignedIdentitiesValue.java | 99 + .../models/ManualScaleProfile.java | 124 + .../containerservice/models/MeshRevision.java | 159 + .../models/MeshRevisionProfileList.java | 135 + .../models/MeshRevisionProfileProperties.java | 99 + .../models/MeshUpgradeProfileList.java | 135 + .../models/MeshUpgradeProfileProperties.java | 108 + .../models/NamespaceProperties.java | 299 + .../models/NamespaceProvisioningState.java | 71 + .../models/NetworkDataplane.java | 51 + .../containerservice/models/NetworkMode.java | 52 + .../models/NetworkPlugin.java | 56 + .../models/NetworkPluginMode.java | 46 + .../models/NetworkPolicies.java | 121 + .../models/NetworkPolicy.java | 61 + .../models/NginxIngressControllerType.java | 61 + .../models/NodeOSUpgradeChannel.java | 61 + .../NodeProvisioningDefaultNodePools.java | 55 + .../models/NodeProvisioningMode.java | 51 + .../containerservice/models/OSDiskType.java | 54 + .../containerservice/models/OSSku.java | 82 + .../containerservice/models/OSType.java | 4 +- .../models/OperationListResult.java | 135 + ...OutboundEnvironmentEndpointCollection.java | 138 + .../containerservice/models/OutboundType.java | 67 + .../models/PodIpAllocationMode.java | 52 + .../containerservice/models/PolicyRule.java | 56 + .../containerservice/models/PortRange.java | 155 + .../containerservice/models/PowerState.java | 93 + .../models/PrivateEndpoint.java | 93 + ...teEndpointConnectionProvisioningState.java | 67 + .../PrivateLinkServiceConnectionState.java | 123 + .../containerservice/models/Protocol.java | 51 + .../models/PublicNetworkAccess.java | 51 + .../models/RelativeMonthlySchedule.java | 163 + .../models/ResourceIdentityType.java | 57 + .../models/ResourceQuota.java | 205 + .../models/ResourceReference.java | 93 + .../models/RestrictionLevel.java | 51 + .../models/RunCommandRequest.java | 157 + .../models/ScaleDownMode.java | 52 + .../containerservice/models/ScaleProfile.java | 98 + .../models/ScaleSetEvictionPolicy.java | 53 + .../models/ScaleSetPriority.java | 51 + .../containerservice/models/Schedule.java | 194 + .../models/ServiceMeshMode.java | 51 + .../models/ServiceMeshProfile.java | 132 + .../models/SnapshotListResult.java | 134 + .../containerservice/models/SnapshotType.java | 46 + .../containerservice/models/SysctlConfig.java | 849 +++ .../containerservice/models/TagsObject.java | 2 +- .../containerservice/models/TimeInWeek.java | 129 + .../containerservice/models/TimeSpan.java | 128 + .../TrustedAccessRoleBindingListResult.java | 137 + ...tedAccessRoleBindingProvisioningState.java | 67 + .../models/TrustedAccessRoleListResult.java | 136 + .../models/TrustedAccessRoleRule.java | 151 + .../containerservice/models/Type.java | 66 + .../models/UndrainableNodeBehavior.java | 53 + .../models/UpgradeChannel.java | 67 + .../models/UpgradeOverrideSettings.java | 137 + .../models/UserAssignedIdentity.java | 149 + .../models/VirtualMachineNodes.java | 121 + .../models/VirtualMachinesProfile.java | 96 + .../containerservice/models/WeekDay.java | 76 + .../models/WeeklySchedule.java | 129 + .../models/WindowsGmsaProfile.java | 157 + .../models/WorkloadRuntime.java | 56 + .../containerservice/models/package-info.java | 6 +- .../containerservice/package-info.java | 6 +- .../proxy-config.json | 2 +- ...AgentPoolsAbortLatestOperationSamples.java | 27 + .../AgentPoolsCreateOrUpdateSamples.java | 589 ++ .../AgentPoolsDeleteMachinesSamples.java | 33 + .../generated/AgentPoolsDeleteSamples.java | 26 + ...sGetAvailableAgentPoolVersionsSamples.java | 27 + .../generated/AgentPoolsGetSamples.java | 26 + .../AgentPoolsGetUpgradeProfileSamples.java | 27 + .../generated/AgentPoolsListSamples.java | 25 + ...ntPoolsUpgradeNodeImageVersionSamples.java | 27 + .../generated/MachinesGetSamples.java | 28 + .../generated/MachinesListSamples.java | 27 + ...ceConfigurationsCreateOrUpdateSamples.java | 50 + ...aintenanceConfigurationsDeleteSamples.java | 28 + .../MaintenanceConfigurationsGetSamples.java | 28 + ...igurationsListByManagedClusterSamples.java | 27 + ...edClustersAbortLatestOperationSamples.java | 27 + .../ManagedClustersCreateOrUpdateSamples.java | 1494 +++++ .../ManagedClustersDeleteSamples.java | 27 + ...anagedClustersGetAccessProfileSamples.java | 26 + ...agedClustersGetByResourceGroupSamples.java | 26 + ...anagedClustersGetCommandResultSamples.java | 45 + ...ClustersGetMeshRevisionProfileSamples.java | 27 + ...dClustersGetMeshUpgradeProfileSamples.java | 27 + ...nagedClustersGetUpgradeProfileSamples.java | 27 + ...gedClustersListByResourceGroupSamples.java | 25 + ...ersListClusterAdminCredentialsSamples.java | 26 + ...usterMonitoringUserCredentialsSamples.java | 27 + ...tersListClusterUserCredentialsSamples.java | 27 + ...ClustersListKubernetesVersionsSamples.java | 27 + ...ustersListMeshRevisionProfilesSamples.java | 27 + ...lustersListMeshUpgradeProfilesSamples.java | 27 + ...ndNetworkDependenciesEndpointsSamples.java | 27 + .../generated/ManagedClustersListSamples.java | 24 + ...ManagedClustersResetAadProfileSamples.java | 33 + ...rsResetServicePrincipalProfileSamples.java | 31 + ...stersRotateClusterCertificatesSamples.java | 27 + ...otateServiceAccountSigningKeysSamples.java | 27 + .../ManagedClustersRunCommandSamples.java | 32 + .../ManagedClustersStartSamples.java | 24 + .../generated/ManagedClustersStopSamples.java | 24 + .../ManagedClustersUpdateTagsSamples.java | 44 + ...anagedNamespacesCreateOrUpdateSamples.java | 62 + .../ManagedNamespacesDeleteSamples.java | 27 + .../ManagedNamespacesGetSamples.java | 26 + ...NamespacesListByManagedClusterSamples.java | 27 + ...anagedNamespacesListCredentialSamples.java | 27 + .../ManagedNamespacesUpdateSamples.java | 45 + .../generated/OperationsListSamples.java | 25 + ...ivateEndpointConnectionsDeleteSamples.java | 27 + .../PrivateEndpointConnectionsGetSamples.java | 27 + ...PrivateEndpointConnectionsListSamples.java | 27 + ...ivateEndpointConnectionsUpdateSamples.java | 34 + .../PrivateLinkResourcesListSamples.java | 27 + ...esolvePrivateLinkServiceIdPostSamples.java | 30 + .../SnapshotsCreateOrUpdateSamples.java | 48 + .../generated/SnapshotsDeleteSamples.java | 24 + .../SnapshotsGetByResourceGroupSamples.java | 26 + .../SnapshotsListByResourceGroupSamples.java | 25 + .../generated/SnapshotsListSamples.java | 24 + .../generated/SnapshotsUpdateTagsSamples.java | 44 + ...cessRoleBindingsCreateOrUpdateSamples.java | 34 + ...rustedAccessRoleBindingsDeleteSamples.java | 27 + .../TrustedAccessRoleBindingsGetSamples.java | 27 + .../TrustedAccessRoleBindingsListSamples.java | 27 + .../TrustedAccessRolesListSamples.java | 25 + 340 files changed, 61184 insertions(+), 16 deletions(-) create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceConfigurationsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedNamespacesClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateEndpointConnectionsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateLinkResourcesClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ResolvePrivateLinkServiceIdsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/SnapshotsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRoleBindingsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRolesClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AccessProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CommandResultProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CredentialResultsInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/KubernetesVersionListResultInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAccessProfileInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedNamespaceInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshRevisionProfileInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshUpgradeProfileInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueDisplay.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OutboundEnvironmentEndpointInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionListResultInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourceInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourcesListResultInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/RunCommandResultInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientBuilder.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AbsoluteMonthlySchedule.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdoptionPolicy.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkPolicies.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingObservability.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolDeleteMachinesParameter.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolGatewayProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolStatus.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolWindowsProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ArtifactSource.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AzureKeyVaultKms.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BackendPoolType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterUpgradeSettings.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Code.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CompatibleVersions.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ConnectionStatus.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceLinuxProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshConfiguration.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshPublicKey.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CreationData.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CredentialResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DailySchedule.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DateSpan.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DelegatedResource.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DeletePolicy.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDependency.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDetail.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Expander.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocation.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocationTypes.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Format.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuDriver.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuInstanceProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpTag.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioCertificateAuthority.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioEgressGateway.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGateway.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGatewayMode.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioPluginCertificateAuthority.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioServiceMesh.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KeyVaultNetworkAccessTypes.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletDiskType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesPatchVersion.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesSupportPlan.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersion.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersionCapabilities.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LicenseType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LinuxOSConfig.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerSku.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardDestination.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardPolicy.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsMode.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsOverride.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProtocol.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsQueryLogging.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsServeStale.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsState.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineIpAddress.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceConfigurationListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceWindow.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAIToolchainOperatorProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAadProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfileIdentity.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterBootstrapProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterCostAnalysis.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIdentity.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileNginx.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIPs.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterManagedOutboundIpProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterMetricsProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNatGatewayProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeProvisioningProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterOidcIssuerProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentity.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityException.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningError.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningErrorBody.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningInfo.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningState.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageCleaner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileWorkloadIdentity.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterServicePrincipalProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSku.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuName.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuTier.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStaticEgressGatewayProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStatus.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileBlobCsiDriver.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileFileCsiDriver.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileSnapshotController.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWindowsProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileKeda.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultHeaders.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultResponse.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedNamespaceListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedServiceIdentityUserAssignedIdentitiesValue.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManualScaleProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevision.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileList.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileList.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProvisioningState.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkDataplane.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkMode.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPlugin.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPluginMode.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicies.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicy.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NginxIngressControllerType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningDefaultNodePools.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningMode.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSDiskType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OperationListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundEnvironmentEndpointCollection.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodIpAllocationMode.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PolicyRule.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PortRange.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PowerState.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpoint.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpointConnectionProvisioningState.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateLinkServiceConnectionState.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Protocol.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceIdentityType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceQuota.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceReference.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RunCommandRequest.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleDownMode.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetEvictionPolicy.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetPriority.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Schedule.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshMode.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SysctlConfig.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeInWeek.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeSpan.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingProvisioningState.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleRule.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Type.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UndrainableNodeBehavior.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeChannel.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeOverrideSettings.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UserAssignedIdentity.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachineNodes.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachinesProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeekDay.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeeklySchedule.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WindowsGmsaProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsAbortLatestOperationSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCreateOrUpdateSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteMachinesSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetAvailableAgentPoolVersionsSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetUpgradeProfileSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpgradeNodeImageVersionSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesGetSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesListSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsCreateOrUpdateSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsDeleteSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsGetSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsListByManagedClusterSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersAbortLatestOperationSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersCreateOrUpdateSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetAccessProfileSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetByResourceGroupSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetCommandResultSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshRevisionProfileSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshUpgradeProfileSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetUpgradeProfileSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListByResourceGroupSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterAdminCredentialsSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterMonitoringUserCredentialsSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterUserCredentialsSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListKubernetesVersionsSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshRevisionProfilesSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshUpgradeProfilesSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListOutboundNetworkDependenciesEndpointsSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAadProfileSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetServicePrincipalProfileSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateClusterCertificatesSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateServiceAccountSigningKeysSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRunCommandSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStartSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStopSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersUpdateTagsSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesCreateOrUpdateSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesDeleteSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesGetSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListByManagedClusterSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListCredentialSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesUpdateSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationsListSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsDeleteSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsGetSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsListSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsUpdateSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateLinkResourcesListSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPostSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsCreateOrUpdateSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsDeleteSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsGetByResourceGroupSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListByResourceGroupSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsUpdateTagsSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsCreateOrUpdateSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsDeleteSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsGetSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsListSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRolesListSamples.java diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java new file mode 100644 index 000000000000..b68f807cc677 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java @@ -0,0 +1,937 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolAvailableVersionsInner; +import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner; +import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolUpgradeProfileInner; +import com.azure.resourcemanager.containerservice.models.AgentPoolDeleteMachinesParameter; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in AgentPoolsClient. + */ +public interface AgentPoolsClient { + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String resourceName); + + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName, Context context); + + /** + * Gets the specified managed cluster agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 specified managed cluster agent pool along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName); + + /** + * Gets the specified managed cluster agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 specified managed cluster agent pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Gets the specified managed cluster agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 specified managed cluster agent pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, String agentPoolName, + Context context); + + /** + * Gets the specified managed cluster agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 specified managed cluster agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AgentPoolInner get(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @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 agent Pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName, AgentPoolInner parameters, String ifMatch, String ifNoneMatch); + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, AgentPoolInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, AgentPoolInner parameters, String ifMatch, String ifNoneMatch); + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, AgentPoolInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, AgentPoolInner parameters); + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AgentPoolInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String agentPoolName, AgentPoolInner parameters); + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AgentPoolInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String agentPoolName, AgentPoolInner parameters, String ifMatch, String ifNoneMatch, + Context context); + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @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 agent Pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolInner parameters, String ifMatch, String ifNoneMatch); + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @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 agent Pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolInner parameters); + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @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 agent Pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AgentPoolInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolInner parameters); + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @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 agent Pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AgentPoolInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolInner parameters, String ifMatch, String ifNoneMatch, Context context); + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName, Boolean ignorePodDisruptionBudget, String ifMatch); + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String agentPoolName, Boolean ignorePodDisruptionBudget, String ifMatch); + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String agentPoolName); + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, String agentPoolName, + Boolean ignorePodDisruptionBudget, String ifMatch, Context context); + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String resourceName, String agentPoolName, + Boolean ignorePodDisruptionBudget, String ifMatch); + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param ifMatch The request should only proceed if an entity matches this string. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String agentPoolName, Boolean ignorePodDisruptionBudget, + String ifMatch, Context context); + + /** + * Aborts last operation running on agent pool. + * + * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and + * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> abortLatestOperationWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName); + + /** + * Aborts last operation running on agent pool. + * + * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and + * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginAbortLatestOperationAsync(String resourceGroupName, String resourceName, + String agentPoolName); + + /** + * Aborts last operation running on agent pool. + * + * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and + * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, + String agentPoolName); + + /** + * Aborts last operation running on agent pool. + * + * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and + * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, + String agentPoolName, Context context); + + /** + * Aborts last operation running on agent pool. + * + * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and + * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono abortLatestOperationAsync(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Aborts last operation running on agent pool. + * + * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and + * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void abortLatestOperation(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Aborts last operation running on agent pool. + * + * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and + * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void abortLatestOperation(String resourceGroupName, String resourceName, String agentPoolName, Context context); + + /** + * Deletes specific machines in an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machines A list of machines from the agent pool to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteMachinesWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName, AgentPoolDeleteMachinesParameter machines); + + /** + * Deletes specific machines in an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machines A list of machines from the agent pool to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteMachinesAsync(String resourceGroupName, String resourceName, + String agentPoolName, AgentPoolDeleteMachinesParameter machines); + + /** + * Deletes specific machines in an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machines A list of machines from the agent pool to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteMachines(String resourceGroupName, String resourceName, + String agentPoolName, AgentPoolDeleteMachinesParameter machines); + + /** + * Deletes specific machines in an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machines A list of machines from the agent pool to be deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteMachines(String resourceGroupName, String resourceName, + String agentPoolName, AgentPoolDeleteMachinesParameter machines, Context context); + + /** + * Deletes specific machines in an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machines A list of machines from the agent pool to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteMachinesAsync(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolDeleteMachinesParameter machines); + + /** + * Deletes specific machines in an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machines A list of machines from the agent pool to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteMachines(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolDeleteMachinesParameter machines); + + /** + * Deletes specific machines in an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machines A list of machines from the agent pool to be deleted. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteMachines(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolDeleteMachinesParameter machines, Context context); + + /** + * Upgrades the node image version of an agent pool to the latest. + * + * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> upgradeNodeImageVersionWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName); + + /** + * Upgrades the node image version of an agent pool to the latest. + * + * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, AgentPoolInner> beginUpgradeNodeImageVersionAsync(String resourceGroupName, + String resourceName, String agentPoolName); + + /** + * Upgrades the node image version of an agent pool to the latest. + * + * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AgentPoolInner> beginUpgradeNodeImageVersion(String resourceGroupName, + String resourceName, String agentPoolName); + + /** + * Upgrades the node image version of an agent pool to the latest. + * + * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AgentPoolInner> beginUpgradeNodeImageVersion(String resourceGroupName, + String resourceName, String agentPoolName, Context context); + + /** + * Upgrades the node image version of an agent pool to the latest. + * + * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono upgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, + String agentPoolName); + + /** + * Upgrades the node image version of an agent pool to the latest. + * + * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AgentPoolInner upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Upgrades the node image version of an agent pool to the latest. + * + * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AgentPoolInner upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName, + Context context); + + /** + * Gets the upgrade profile for an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 upgrade profile for an agent pool along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getUpgradeProfileWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName); + + /** + * Gets the upgrade profile for an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 upgrade profile for an agent pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getUpgradeProfileAsync(String resourceGroupName, String resourceName, + String agentPoolName); + + /** + * Gets the upgrade profile for an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 upgrade profile for an agent pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getUpgradeProfileWithResponse(String resourceGroupName, String resourceName, + String agentPoolName, Context context); + + /** + * Gets the upgrade profile for an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 upgrade profile for an agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AgentPoolUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of available versions for an agent pool along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> + getAvailableAgentPoolVersionsWithResponseAsync(String resourceGroupName, String resourceName); + + /** + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of available versions for an agent pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAvailableAgentPoolVersionsAsync(String resourceGroupName, + String resourceName); + + /** + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of available versions for an agent pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAvailableAgentPoolVersionsWithResponse(String resourceGroupName, + String resourceName, Context context); + + /** + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of available versions for an agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AgentPoolAvailableVersionsInner getAvailableAgentPoolVersions(String resourceGroupName, String resourceName); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java new file mode 100644 index 000000000000..8da1d29d10d0 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.http.HttpPipeline; +import java.time.Duration; + +/** + * The interface for ContainerServiceManagementClient class. + */ +public interface ContainerServiceManagementClient { + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + String getEndpoint(); + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + String getApiVersion(); + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + HttpPipeline getHttpPipeline(); + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + Duration getDefaultPollInterval(); + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + + /** + * Gets the ManagedClustersClient object to access its operations. + * + * @return the ManagedClustersClient object. + */ + ManagedClustersClient getManagedClusters(); + + /** + * Gets the TrustedAccessRolesClient object to access its operations. + * + * @return the TrustedAccessRolesClient object. + */ + TrustedAccessRolesClient getTrustedAccessRoles(); + + /** + * Gets the SnapshotsClient object to access its operations. + * + * @return the SnapshotsClient object. + */ + SnapshotsClient getSnapshots(); + + /** + * Gets the AgentPoolsClient object to access its operations. + * + * @return the AgentPoolsClient object. + */ + AgentPoolsClient getAgentPools(); + + /** + * Gets the MachinesClient object to access its operations. + * + * @return the MachinesClient object. + */ + MachinesClient getMachines(); + + /** + * Gets the MaintenanceConfigurationsClient object to access its operations. + * + * @return the MaintenanceConfigurationsClient object. + */ + MaintenanceConfigurationsClient getMaintenanceConfigurations(); + + /** + * Gets the ManagedNamespacesClient object to access its operations. + * + * @return the ManagedNamespacesClient object. + */ + ManagedNamespacesClient getManagedNamespaces(); + + /** + * Gets the PrivateEndpointConnectionsClient object to access its operations. + * + * @return the PrivateEndpointConnectionsClient object. + */ + PrivateEndpointConnectionsClient getPrivateEndpointConnections(); + + /** + * Gets the PrivateLinkResourcesClient object to access its operations. + * + * @return the PrivateLinkResourcesClient object. + */ + PrivateLinkResourcesClient getPrivateLinkResources(); + + /** + * Gets the ResolvePrivateLinkServiceIdsClient object to access its operations. + * + * @return the ResolvePrivateLinkServiceIdsClient object. + */ + ResolvePrivateLinkServiceIdsClient getResolvePrivateLinkServiceIds(); + + /** + * Gets the TrustedAccessRoleBindingsClient object to access its operations. + * + * @return the TrustedAccessRoleBindingsClient object. + */ + TrustedAccessRoleBindingsClient getTrustedAccessRoleBindings(); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java new file mode 100644 index 000000000000..1d77adf6fede --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.fluent.models.MachineInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in MachinesClient. + */ +public interface MachinesClient { + /** + * Gets a list of machines in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of machines in the specified agent pool as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Gets a list of machines in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of machines in the specified agent pool as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Gets a list of machines in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of machines in the specified agent pool as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName, String agentPoolName, + Context context); + + /** + * Get a specific machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a specific machine in the specified agent pool along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName, String machineName); + + /** + * Get a specific machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a specific machine in the specified agent pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String resourceName, String agentPoolName, + String machineName); + + /** + * Get a specific machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a specific machine in the specified agent pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, Context context); + + /** + * Get a specific machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a specific machine in the specified agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MachineInner get(String resourceGroupName, String resourceName, String agentPoolName, String machineName); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceConfigurationsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceConfigurationsClient.java new file mode 100644 index 000000000000..a044c35f527c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceConfigurationsClient.java @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.fluent.models.MaintenanceConfigurationInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in MaintenanceConfigurationsClient. + */ +public interface MaintenanceConfigurationsClient { + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName); + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName); + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context); + + /** + * Gets the specified maintenance configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @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 specified maintenance configuration of a managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String configName); + + /** + * Gets the specified maintenance configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @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 specified maintenance configuration of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String resourceName, String configName); + + /** + * Gets the specified maintenance configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @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 specified maintenance configuration of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, + String configName, Context context); + + /** + * Gets the specified maintenance configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @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 specified maintenance configuration of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceConfigurationInner get(String resourceGroupName, String resourceName, String configName); + + /** + * Creates or updates a maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @param parameters The maintenance configuration to create or update. + * @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 planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster + * along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String configName, MaintenanceConfigurationInner parameters); + + /** + * Creates or updates a maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @param parameters The maintenance configuration to create or update. + * @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 planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String configName, MaintenanceConfigurationInner parameters); + + /** + * Creates or updates a maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @param parameters The maintenance configuration to create or update. + * @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 planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster + * along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, + String configName, MaintenanceConfigurationInner parameters, Context context); + + /** + * Creates or updates a maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @param parameters The maintenance configuration to create or update. + * @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 planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceConfigurationInner createOrUpdate(String resourceGroupName, String resourceName, String configName, + MaintenanceConfigurationInner parameters); + + /** + * Deletes a maintenance configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, String configName); + + /** + * Deletes a maintenance configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String resourceName, String configName); + + /** + * Deletes a maintenance configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String resourceName, String configName, + Context context); + + /** + * Deletes a maintenance configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String configName); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java new file mode 100644 index 000000000000..09fb08492f5b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java @@ -0,0 +1,2230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.models.CredentialResultsInner; +import com.azure.resourcemanager.containerservice.fluent.models.KubernetesVersionListResultInner; +import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterAccessProfileInner; +import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterInner; +import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterUpgradeProfileInner; +import com.azure.resourcemanager.containerservice.fluent.models.MeshRevisionProfileInner; +import com.azure.resourcemanager.containerservice.fluent.models.MeshUpgradeProfileInner; +import com.azure.resourcemanager.containerservice.fluent.models.OutboundEnvironmentEndpointInner; +import com.azure.resourcemanager.containerservice.fluent.models.RunCommandResultInner; +import com.azure.resourcemanager.containerservice.models.Format; +import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClustersGetCommandResultResponse; +import com.azure.resourcemanager.containerservice.models.RunCommandRequest; +import com.azure.resourcemanager.containerservice.models.TagsObject; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ManagedClustersClient. + */ +public interface ManagedClustersClient extends InnerSupportsGet, + InnerSupportsListing, InnerSupportsDelete { + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. + * @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 hold values properties, which is array of KubernetesVersion along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> listKubernetesVersionsWithResponseAsync(String location); + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. + * @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 hold values properties, which is array of KubernetesVersion on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono listKubernetesVersionsAsync(String location); + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. + * @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 hold values properties, which is array of KubernetesVersion along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listKubernetesVersionsWithResponse(String location, Context context); + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. + * @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 hold values properties, which is array of KubernetesVersion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KubernetesVersionListResultInner listKubernetesVersions(String location); + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listMeshRevisionProfilesAsync(String location); + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMeshRevisionProfiles(String location); + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMeshRevisionProfiles(String location, Context context); + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @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 mesh revision profile for a mesh along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getMeshRevisionProfileWithResponseAsync(String location, String mode); + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @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 mesh revision profile for a mesh on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getMeshRevisionProfileAsync(String location, String mode); + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @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 mesh revision profile for a mesh along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getMeshRevisionProfileWithResponse(String location, String mode, + Context context); + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @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 mesh revision profile for a mesh. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MeshRevisionProfileInner getMeshRevisionProfile(String location, String mode); + + /** + * Gets a list of managed clusters in the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed clusters in the specified subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(); + + /** + * Gets a list of managed clusters in the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed clusters in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets a list of managed clusters in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed clusters in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Lists managed clusters in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedCluster list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync(String resourceGroupName); + + /** + * Lists managed clusters in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedCluster list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists managed clusters in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedCluster list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceName); + + /** + * Gets a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getByResourceGroupAsync(String resourceGroupName, String resourceName); + + /** + * Gets a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context); + + /** + * Gets a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterInner getByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @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 managed cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + ManagedClusterInner parameters, String ifMatch, String ifNoneMatch); + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, ManagedClusterInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, ManagedClusterInner parameters, String ifMatch, String ifNoneMatch); + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, ManagedClusterInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, ManagedClusterInner parameters); + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ManagedClusterInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, ManagedClusterInner parameters); + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ManagedClusterInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, ManagedClusterInner parameters, String ifMatch, String ifNoneMatch, Context context); + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @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 managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + ManagedClusterInner parameters, String ifMatch, String ifNoneMatch); + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @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 managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + ManagedClusterInner parameters); + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterInner createOrUpdate(String resourceGroupName, String resourceName, ManagedClusterInner parameters); + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterInner createOrUpdate(String resourceGroupName, String resourceName, ManagedClusterInner parameters, + String ifMatch, String ifNoneMatch, Context context); + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param ifMatch The request should only proceed if an entity matches this string. + * @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 managed cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> updateTagsWithResponseAsync(String resourceGroupName, String resourceName, + TagsObject parameters, String ifMatch); + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, ManagedClusterInner> beginUpdateTagsAsync(String resourceGroupName, + String resourceName, TagsObject parameters, String ifMatch); + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, ManagedClusterInner> beginUpdateTagsAsync(String resourceGroupName, + String resourceName, TagsObject parameters); + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ManagedClusterInner> beginUpdateTags(String resourceGroupName, + String resourceName, TagsObject parameters); + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ManagedClusterInner> beginUpdateTags(String resourceGroupName, + String resourceName, TagsObject parameters, String ifMatch, Context context); + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param ifMatch The request should only proceed if an entity matches this string. + * @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 managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateTagsAsync(String resourceGroupName, String resourceName, TagsObject parameters, + String ifMatch); + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags 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 managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateTagsAsync(String resourceGroupName, String resourceName, TagsObject parameters); + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags 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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters); + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param ifMatch The request should only proceed if an entity matches this string. + * @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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters, String ifMatch, + Context context); + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String ifMatch); + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, String ifMatch); + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName); + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName); + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, String ifMatch, + Context context); + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String resourceName, String ifMatch); + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String resourceName); + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName); + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String ifMatch, Context context); + + /** + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> abortLatestOperationWithResponseAsync(String resourceGroupName, + String resourceName); + + /** + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginAbortLatestOperationAsync(String resourceGroupName, String resourceName); + + /** + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName); + + /** + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, + Context context); + + /** + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono abortLatestOperationAsync(String resourceGroupName, String resourceName); + + /** + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void abortLatestOperation(String resourceGroupName, String resourceName); + + /** + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void abortLatestOperation(String resourceGroupName, String resourceName, Context context); + + /** + * Gets an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed cluster Access Profile along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getAccessProfileWithResponseAsync(String resourceGroupName, + String resourceName, String roleName); + + /** + * Gets an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed cluster Access Profile on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAccessProfileAsync(String resourceGroupName, String resourceName, + String roleName); + + /** + * Gets an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed cluster Access Profile along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAccessProfileWithResponse(String resourceGroupName, + String resourceName, String roleName, Context context); + + /** + * Gets an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed cluster Access Profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterAccessProfileInner getAccessProfile(String resourceGroupName, String resourceName, String roleName); + + /** + * Gets the results of a command which has been run on the Managed Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. + * @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 results of a command which has been run on the Managed Cluster on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getCommandResultWithResponseAsync(String resourceGroupName, + String resourceName, String commandId); + + /** + * Gets the results of a command which has been run on the Managed Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. + * @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 results of a command which has been run on the Managed Cluster on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getCommandResultAsync(String resourceGroupName, String resourceName, String commandId); + + /** + * Gets the results of a command which has been run on the Managed Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. + * @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 results of a command which has been run on the Managed Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClustersGetCommandResultResponse getCommandResultWithResponse(String resourceGroupName, String resourceName, + String commandId, Context context); + + /** + * Gets the results of a command which has been run on the Managed Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. + * @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 results of a command which has been run on the Managed Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RunCommandResultInner getCommandResult(String resourceGroupName, String resourceName, String commandId); + + /** + * Lists the admin credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> listClusterAdminCredentialsWithResponseAsync(String resourceGroupName, + String resourceName, String serverFqdn); + + /** + * Lists the admin credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono listClusterAdminCredentialsAsync(String resourceGroupName, String resourceName); + + /** + * Lists the admin credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @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 list credential result response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listClusterAdminCredentialsWithResponse(String resourceGroupName, + String resourceName, String serverFqdn, Context context); + + /** + * Lists the admin credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CredentialResultsInner listClusterAdminCredentials(String resourceGroupName, String resourceName); + + /** + * Lists the cluster monitoring user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> listClusterMonitoringUserCredentialsWithResponseAsync( + String resourceGroupName, String resourceName, String serverFqdn); + + /** + * Lists the cluster monitoring user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono listClusterMonitoringUserCredentialsAsync(String resourceGroupName, + String resourceName); + + /** + * Lists the cluster monitoring user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @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 list credential result response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listClusterMonitoringUserCredentialsWithResponse(String resourceGroupName, + String resourceName, String serverFqdn, Context context); + + /** + * Lists the cluster monitoring user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CredentialResultsInner listClusterMonitoringUserCredentials(String resourceGroupName, String resourceName); + + /** + * Lists the user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return + * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary + * in the path. + * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> listClusterUserCredentialsWithResponseAsync(String resourceGroupName, + String resourceName, String serverFqdn, Format format); + + /** + * Lists the user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono listClusterUserCredentialsAsync(String resourceGroupName, String resourceName); + + /** + * Lists the user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return + * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary + * in the path. + * @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 list credential result response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listClusterUserCredentialsWithResponse(String resourceGroupName, + String resourceName, String serverFqdn, Format format, Context context); + + /** + * Lists the user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CredentialResultsInner listClusterUserCredentials(String resourceGroupName, String resourceName); + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listMeshUpgradeProfilesAsync(String resourceGroupName, String resourceName); + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMeshUpgradeProfiles(String resourceGroupName, String resourceName); + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMeshUpgradeProfiles(String resourceGroupName, String resourceName, + Context context); + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @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 available upgrades for a service mesh in a cluster along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getMeshUpgradeProfileWithResponseAsync(String resourceGroupName, + String resourceName, String mode); + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @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 available upgrades for a service mesh in a cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getMeshUpgradeProfileAsync(String resourceGroupName, String resourceName, + String mode); + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @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 available upgrades for a service mesh in a cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getMeshUpgradeProfileWithResponse(String resourceGroupName, String resourceName, + String mode, Context context); + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @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 available upgrades for a service mesh in a cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MeshUpgradeProfileInner getMeshUpgradeProfile(String resourceGroupName, String resourceName, String mode); + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, + String resourceName); + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, + String resourceName); + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, + String resourceName, Context context); + + /** + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> resetAadProfileWithResponseAsync(String resourceGroupName, String resourceName, + ManagedClusterAadProfile parameters); + + /** + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginResetAadProfileAsync(String resourceGroupName, String resourceName, + ManagedClusterAadProfile parameters); + + /** + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginResetAadProfile(String resourceGroupName, String resourceName, + ManagedClusterAadProfile parameters); + + /** + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginResetAadProfile(String resourceGroupName, String resourceName, + ManagedClusterAadProfile parameters, Context context); + + /** + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono resetAadProfileAsync(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters); + + /** + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void resetAadProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters); + + /** + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void resetAadProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, + Context context); + + /** + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> resetServicePrincipalProfileWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterServicePrincipalProfile parameters); + + /** + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginResetServicePrincipalProfileAsync(String resourceGroupName, + String resourceName, ManagedClusterServicePrincipalProfile parameters); + + /** + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginResetServicePrincipalProfile(String resourceGroupName, String resourceName, + ManagedClusterServicePrincipalProfile parameters); + + /** + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginResetServicePrincipalProfile(String resourceGroupName, String resourceName, + ManagedClusterServicePrincipalProfile parameters, Context context); + + /** + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono resetServicePrincipalProfileAsync(String resourceGroupName, String resourceName, + ManagedClusterServicePrincipalProfile parameters); + + /** + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void resetServicePrincipalProfile(String resourceGroupName, String resourceName, + ManagedClusterServicePrincipalProfile parameters); + + /** + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void resetServicePrincipalProfile(String resourceGroupName, String resourceName, + ManagedClusterServicePrincipalProfile parameters, Context context); + + /** + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, + String resourceName); + + /** + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, + String resourceName); + + /** + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRotateClusterCertificates(String resourceGroupName, String resourceName); + + /** + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRotateClusterCertificates(String resourceGroupName, String resourceName, + Context context); + + /** + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono rotateClusterCertificatesAsync(String resourceGroupName, String resourceName); + + /** + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void rotateClusterCertificates(String resourceGroupName, String resourceName); + + /** + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void rotateClusterCertificates(String resourceGroupName, String resourceName, Context context); + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> rotateServiceAccountSigningKeysWithResponseAsync(String resourceGroupName, + String resourceName); + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginRotateServiceAccountSigningKeysAsync(String resourceGroupName, + String resourceName); + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRotateServiceAccountSigningKeys(String resourceGroupName, + String resourceName); + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRotateServiceAccountSigningKeys(String resourceGroupName, + String resourceName, Context context); + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono rotateServiceAccountSigningKeysAsync(String resourceGroupName, String resourceName); + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName); + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName, Context context); + + /** + * Submits a command to run against the Managed Cluster. + * + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return run command result along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> runCommandWithResponseAsync(String resourceGroupName, String resourceName, + RunCommandRequest requestPayload); + + /** + * Submits a command to run against the Managed Cluster. + * + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of run command result. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, RunCommandResultInner> beginRunCommandAsync(String resourceGroupName, + String resourceName, RunCommandRequest requestPayload); + + /** + * Submits a command to run against the Managed Cluster. + * + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of run command result. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RunCommandResultInner> beginRunCommand(String resourceGroupName, + String resourceName, RunCommandRequest requestPayload); + + /** + * Submits a command to run against the Managed Cluster. + * + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of run command result. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RunCommandResultInner> beginRunCommand(String resourceGroupName, + String resourceName, RunCommandRequest requestPayload, Context context); + + /** + * Submits a command to run against the Managed Cluster. + * + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return run command result on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono runCommandAsync(String resourceGroupName, String resourceName, + RunCommandRequest requestPayload); + + /** + * Submits a command to run against the Managed Cluster. + * + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return run command result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RunCommandResultInner runCommand(String resourceGroupName, String resourceName, RunCommandRequest requestPayload); + + /** + * Submits a command to run against the Managed Cluster. + * + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return run command result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RunCommandResultInner runCommand(String resourceGroupName, String resourceName, RunCommandRequest requestPayload, + Context context); + + /** + * Starts a previously stopped Managed Cluster + * + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> startWithResponseAsync(String resourceGroupName, String resourceName); + + /** + * Starts a previously stopped Managed Cluster + * + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginStartAsync(String resourceGroupName, String resourceName); + + /** + * Starts a previously stopped Managed Cluster + * + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginStart(String resourceGroupName, String resourceName); + + /** + * Starts a previously stopped Managed Cluster + * + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginStart(String resourceGroupName, String resourceName, Context context); + + /** + * Starts a previously stopped Managed Cluster + * + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono startAsync(String resourceGroupName, String resourceName); + + /** + * Starts a previously stopped Managed Cluster + * + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void start(String resourceGroupName, String resourceName); + + /** + * Starts a previously stopped Managed Cluster + * + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void start(String resourceGroupName, String resourceName, Context context); + + /** + * Stops a Managed Cluster + * + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> stopWithResponseAsync(String resourceGroupName, String resourceName); + + /** + * Stops a Managed Cluster + * + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginStopAsync(String resourceGroupName, String resourceName); + + /** + * Stops a Managed Cluster + * + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginStop(String resourceGroupName, String resourceName); + + /** + * Stops a Managed Cluster + * + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginStop(String resourceGroupName, String resourceName, Context context); + + /** + * Stops a Managed Cluster + * + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono stopAsync(String resourceGroupName, String resourceName); + + /** + * Stops a Managed Cluster + * + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void stop(String resourceGroupName, String resourceName); + + /** + * Stops a Managed Cluster + * + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void stop(String resourceGroupName, String resourceName, Context context); + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getUpgradeProfileWithResponseAsync(String resourceGroupName, + String resourceName); + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getUpgradeProfileAsync(String resourceGroupName, String resourceName); + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getUpgradeProfileWithResponse(String resourceGroupName, + String resourceName, Context context); + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedNamespacesClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedNamespacesClient.java new file mode 100644 index 000000000000..d106499db36c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedNamespacesClient.java @@ -0,0 +1,478 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.models.CredentialResultsInner; +import com.azure.resourcemanager.containerservice.fluent.models.ManagedNamespaceInner; +import com.azure.resourcemanager.containerservice.models.TagsObject; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ManagedNamespacesClient. + */ +public interface ManagedNamespacesClient { + /** + * Gets a list of managed namespaces in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed namespaces in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName); + + /** + * Gets a list of managed namespaces in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed namespaces in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName); + + /** + * Gets a list of managed namespaces in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed namespaces in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context); + + /** + * Gets the specified namespace of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @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 specified namespace of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String managedNamespaceName); + + /** + * Gets the specified namespace of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @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 specified namespace of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String resourceName, String managedNamespaceName); + + /** + * Gets the specified namespace of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @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 specified namespace of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, + String managedNamespaceName, Context context); + + /** + * Gets the specified namespace of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @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 specified namespace of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedNamespaceInner get(String resourceGroupName, String resourceName, String managedNamespaceName); + + /** + * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like + * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters The namespace to create or update. + * @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 namespace managed by ARM along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + String managedNamespaceName, ManagedNamespaceInner parameters); + + /** + * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like + * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters The namespace to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of namespace managed by ARM. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, ManagedNamespaceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String managedNamespaceName, ManagedNamespaceInner parameters); + + /** + * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like + * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters The namespace to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of namespace managed by ARM. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ManagedNamespaceInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String managedNamespaceName, ManagedNamespaceInner parameters); + + /** + * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like + * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters The namespace to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of namespace managed by ARM. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ManagedNamespaceInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String managedNamespaceName, ManagedNamespaceInner parameters, Context context); + + /** + * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like + * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters The namespace to create or update. + * @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 namespace managed by ARM on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String managedNamespaceName, ManagedNamespaceInner parameters); + + /** + * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like + * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters The namespace to create or update. + * @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 namespace managed by ARM. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedNamespaceInner createOrUpdate(String resourceGroupName, String resourceName, String managedNamespaceName, + ManagedNamespaceInner parameters); + + /** + * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like + * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters The namespace to create or update. + * @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 namespace managed by ARM. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedNamespaceInner createOrUpdate(String resourceGroupName, String resourceName, String managedNamespaceName, + ManagedNamespaceInner parameters, Context context); + + /** + * Updates tags on a managed namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters Parameters supplied to the patch namespace operation, we only support patch tags for now. + * @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 namespace managed by ARM along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> updateWithResponseAsync(String resourceGroupName, String resourceName, + String managedNamespaceName, TagsObject parameters); + + /** + * Updates tags on a managed namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters Parameters supplied to the patch namespace operation, we only support patch tags for now. + * @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 namespace managed by ARM on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String resourceName, String managedNamespaceName, + TagsObject parameters); + + /** + * Updates tags on a managed namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters Parameters supplied to the patch namespace operation, we only support patch tags for now. + * @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 namespace managed by ARM along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String resourceName, + String managedNamespaceName, TagsObject parameters, Context context); + + /** + * Updates tags on a managed namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters Parameters supplied to the patch namespace operation, we only support patch tags for now. + * @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 namespace managed by ARM. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedNamespaceInner update(String resourceGroupName, String resourceName, String managedNamespaceName, + TagsObject parameters); + + /** + * Deletes a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String managedNamespaceName); + + /** + * Deletes a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String managedNamespaceName); + + /** + * Deletes a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String managedNamespaceName); + + /** + * Deletes a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String managedNamespaceName, Context context); + + /** + * Deletes a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String resourceName, String managedNamespaceName); + + /** + * Deletes a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String managedNamespaceName); + + /** + * Deletes a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String managedNamespaceName, Context context); + + /** + * Lists the credentials of a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> listCredentialWithResponseAsync(String resourceGroupName, + String resourceName, String managedNamespaceName); + + /** + * Lists the credentials of a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @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 list credential result response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono listCredentialAsync(String resourceGroupName, String resourceName, + String managedNamespaceName); + + /** + * Lists the credentials of a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @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 list credential result response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listCredentialWithResponse(String resourceGroupName, String resourceName, + String managedNamespaceName, Context context); + + /** + * Lists the credentials of a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @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 list credential result response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CredentialResultsInner listCredential(String resourceGroupName, String resourceName, String managedNamespaceName); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationsClient.java new file mode 100644 index 000000000000..c21d92a200b7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationsClient.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.fluent.models.OperationValueInner; + +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ +public interface OperationsClient { + /** + * Gets a list of operations. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(); + + /** + * Gets a list of operations. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets a list of operations. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateEndpointConnectionsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateEndpointConnectionsClient.java new file mode 100644 index 000000000000..3d1685d6874a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateEndpointConnectionsClient.java @@ -0,0 +1,323 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerservice.fluent.models.PrivateEndpointConnectionListResultInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. + */ +public interface PrivateEndpointConnectionsClient { + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> listWithResponseAsync(String resourceGroupName, + String resourceName); + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono listAsync(String resourceGroupName, String resourceName); + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listWithResponse(String resourceGroupName, String resourceName, + Context context); + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionListResultInner list(String resourceGroupName, String resourceName); + + /** + * Gets the specified private endpoint connection. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String privateEndpointConnectionName); + + /** + * Gets the specified private endpoint connection. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String resourceName, + String privateEndpointConnectionName); + + /** + * Gets the specified private endpoint connection. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, Context context); + + /** + * Gets the specified private endpoint connection. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner get(String resourceGroupName, String resourceName, + String privateEndpointConnectionName); + + /** + * Updates a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters The updated private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> updateWithResponseAsync(String resourceGroupName, + String resourceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); + + /** + * Updates a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters The updated private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); + + /** + * Updates a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters The updated private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context); + + /** + * Updates a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters The updated private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner update(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, Context context); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateLinkResourcesClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateLinkResourcesClient.java new file mode 100644 index 000000000000..cd2367dd8beb --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateLinkResourcesClient.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.fluent.models.PrivateLinkResourcesListResultInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. + */ +public interface PrivateLinkResourcesClient { + /** + * Gets a list of private link resources in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> listWithResponseAsync(String resourceGroupName, + String resourceName); + + /** + * Gets a list of private link resources in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono listAsync(String resourceGroupName, String resourceName); + + /** + * Gets a list of private link resources in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listWithResponse(String resourceGroupName, String resourceName, + Context context); + + /** + * Gets a list of private link resources in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateLinkResourcesListResultInner list(String resourceGroupName, String resourceName); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ResolvePrivateLinkServiceIdsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ResolvePrivateLinkServiceIdsClient.java new file mode 100644 index 000000000000..f1255c9f7aa5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ResolvePrivateLinkServiceIdsClient.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.fluent.models.PrivateLinkResourceInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ResolvePrivateLinkServiceIdsClient. + */ +public interface ResolvePrivateLinkServiceIdsClient { + /** + * Gets the private link service ID for the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters required in order to resolve a private link service ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link service ID for the specified managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> postWithResponseAsync(String resourceGroupName, String resourceName, + PrivateLinkResourceInner parameters); + + /** + * Gets the private link service ID for the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters required in order to resolve a private link service ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link service ID for the specified managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono postAsync(String resourceGroupName, String resourceName, + PrivateLinkResourceInner parameters); + + /** + * Gets the private link service ID for the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters required in order to resolve a private link service ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link service ID for the specified managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response postWithResponse(String resourceGroupName, String resourceName, + PrivateLinkResourceInner parameters, Context context); + + /** + * Gets the private link service ID for the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters required in order to resolve a private link service ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link service ID for the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateLinkResourceInner post(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/SnapshotsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/SnapshotsClient.java new file mode 100644 index 000000000000..c7a95a642be0 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/SnapshotsClient.java @@ -0,0 +1,317 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.fluent.models.SnapshotInner; +import com.azure.resourcemanager.containerservice.models.TagsObject; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SnapshotsClient. + */ +public interface SnapshotsClient + extends InnerSupportsGet, InnerSupportsListing, InnerSupportsDelete { + /** + * Gets a list of snapshots in the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(); + + /** + * Gets a list of snapshots in the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets a list of snapshots in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Lists snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync(String resourceGroupName); + + /** + * Lists snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String resourceName); + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getByResourceGroupAsync(String resourceGroupName, String resourceName); + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context); + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SnapshotInner getByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Creates or updates a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + SnapshotInner parameters); + + /** + * Creates or updates a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a node pool snapshot resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String resourceName, SnapshotInner parameters); + + /** + * Creates or updates a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a node pool snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, + SnapshotInner parameters, Context context); + + /** + * Creates or updates a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a node pool snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SnapshotInner createOrUpdate(String resourceGroupName, String resourceName, SnapshotInner parameters); + + /** + * Updates tags on a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> updateTagsWithResponseAsync(String resourceGroupName, String resourceName, + TagsObject parameters); + + /** + * Updates tags on a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a node pool snapshot resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateTagsAsync(String resourceGroupName, String resourceName, TagsObject parameters); + + /** + * Updates tags on a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a node pool snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateTagsWithResponse(String resourceGroupName, String resourceName, TagsObject parameters, + Context context); + + /** + * Updates tags on a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a node pool snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SnapshotInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters); + + /** + * Deletes a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName); + + /** + * Deletes a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String resourceName); + + /** + * Deletes a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); + + /** + * Deletes a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRoleBindingsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRoleBindingsClient.java new file mode 100644 index 000000000000..c2c56fecfb09 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRoleBindingsClient.java @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.models.TrustedAccessRoleBindingInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in TrustedAccessRoleBindingsClient. + */ +public interface TrustedAccessRoleBindingsClient { + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a TrustedAccessRoleBinding list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String resourceName); + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a TrustedAccessRoleBinding list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a TrustedAccessRoleBinding list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName, Context context); + + /** + * Get a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a trusted access role binding along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName); + + /** + * Get a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a trusted access role binding on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName); + + /** + * Get a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a trusted access role binding along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName, Context context); + + /** + * Get a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a trusted access role binding. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TrustedAccessRoleBindingInner get(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName); + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @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 defines binding between a resource and role along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName, TrustedAccessRoleBindingInner trustedAccessRoleBinding); + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of defines binding between a resource and role. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, TrustedAccessRoleBindingInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding); + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines binding between a resource and role. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, TrustedAccessRoleBindingInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding); + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines binding between a resource and role. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, TrustedAccessRoleBindingInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding, Context context); + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @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 defines binding between a resource and role on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName, TrustedAccessRoleBindingInner trustedAccessRoleBinding); + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @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 defines binding between a resource and role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TrustedAccessRoleBindingInner createOrUpdate(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName, TrustedAccessRoleBindingInner trustedAccessRoleBinding); + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @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 defines binding between a resource and role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TrustedAccessRoleBindingInner createOrUpdate(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName, TrustedAccessRoleBindingInner trustedAccessRoleBinding, Context context); + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName); + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName); + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName); + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName, Context context); + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName); + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName); + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRolesClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRolesClient.java new file mode 100644 index 000000000000..f9cac9a8f19e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRolesClient.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.fluent.models.TrustedAccessRoleInner; + +/** + * An instance of this class provides access to all the operations defined in TrustedAccessRolesClient. + */ +public interface TrustedAccessRolesClient { + /** + * List supported trusted access roles. + * + * @param location The name of the Azure region. + * @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 list of trusted access roles as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String location); + + /** + * List supported trusted access roles. + * + * @param location The name of the Azure region. + * @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 list of trusted access roles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location); + + /** + * List supported trusted access roles. + * + * @param location The name of the Azure region. + * @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 list of trusted access roles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location, Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AccessProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AccessProfile.java new file mode 100644 index 000000000000..fc9e1725879c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AccessProfile.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Profile for enabling a user to access a managed cluster. + */ +@Fluent +public final class AccessProfile implements JsonSerializable { + /* + * Base64-encoded Kubernetes configuration file. + */ + private byte[] kubeConfig; + + /** + * Creates an instance of AccessProfile class. + */ + public AccessProfile() { + } + + /** + * Get the kubeConfig property: Base64-encoded Kubernetes configuration file. + * + * @return the kubeConfig value. + */ + public byte[] kubeConfig() { + return CoreUtils.clone(this.kubeConfig); + } + + /** + * Set the kubeConfig property: Base64-encoded Kubernetes configuration file. + * + * @param kubeConfig the kubeConfig value to set. + * @return the AccessProfile object itself. + */ + public AccessProfile withKubeConfig(byte[] kubeConfig) { + this.kubeConfig = CoreUtils.clone(kubeConfig); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBinaryField("kubeConfig", this.kubeConfig); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccessProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessProfile 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 AccessProfile. + */ + public static AccessProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessProfile deserializedAccessProfile = new AccessProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kubeConfig".equals(fieldName)) { + deserializedAccessProfile.kubeConfig = reader.getBinary(); + } else { + reader.skipChildren(); + } + } + + return deserializedAccessProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsInner.java new file mode 100644 index 000000000000..e84d83ef38ee --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsInner.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem; +import java.io.IOException; +import java.util.List; + +/** + * The list of available versions for an agent pool. + */ +@Fluent +public final class AgentPoolAvailableVersionsInner implements JsonSerializable { + /* + * The ID of the agent pool version list. + */ + private String id; + + /* + * The name of the agent pool version list. + */ + private String name; + + /* + * Type of the agent pool version list. + */ + private String type; + + /* + * Properties of agent pool available versions. + */ + private AgentPoolAvailableVersionsProperties innerProperties = new AgentPoolAvailableVersionsProperties(); + + /** + * Creates an instance of AgentPoolAvailableVersionsInner class. + */ + public AgentPoolAvailableVersionsInner() { + } + + /** + * Get the id property: The ID of the agent pool version list. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the agent pool version list. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the type property: Type of the agent pool version list. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the innerProperties property: Properties of agent pool available versions. + * + * @return the innerProperties value. + */ + private AgentPoolAvailableVersionsProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the agentPoolVersions property: List of versions available for agent pool. + * + * @return the agentPoolVersions value. + */ + public List agentPoolVersions() { + return this.innerProperties() == null ? null : this.innerProperties().agentPoolVersions(); + } + + /** + * Set the agentPoolVersions property: List of versions available for agent pool. + * + * @param agentPoolVersions the agentPoolVersions value to set. + * @return the AgentPoolAvailableVersionsInner object itself. + */ + public AgentPoolAvailableVersionsInner + withAgentPoolVersions(List agentPoolVersions) { + if (this.innerProperties() == null) { + this.innerProperties = new AgentPoolAvailableVersionsProperties(); + } + this.innerProperties().withAgentPoolVersions(agentPoolVersions); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model AgentPoolAvailableVersionsInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AgentPoolAvailableVersionsInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolAvailableVersionsInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolAvailableVersionsInner 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 AgentPoolAvailableVersionsInner. + */ + public static AgentPoolAvailableVersionsInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolAvailableVersionsInner deserializedAgentPoolAvailableVersionsInner + = new AgentPoolAvailableVersionsInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedAgentPoolAvailableVersionsInner.innerProperties + = AgentPoolAvailableVersionsProperties.fromJson(reader); + } else if ("id".equals(fieldName)) { + deserializedAgentPoolAvailableVersionsInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedAgentPoolAvailableVersionsInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedAgentPoolAvailableVersionsInner.type = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolAvailableVersionsInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsProperties.java new file mode 100644 index 000000000000..fd96a07e23cd --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsProperties.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.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 com.azure.resourcemanager.containerservice.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem; +import java.io.IOException; +import java.util.List; + +/** + * The list of available agent pool versions. + */ +@Fluent +public final class AgentPoolAvailableVersionsProperties + implements JsonSerializable { + /* + * List of versions available for agent pool. + */ + private List agentPoolVersions; + + /** + * Creates an instance of AgentPoolAvailableVersionsProperties class. + */ + public AgentPoolAvailableVersionsProperties() { + } + + /** + * Get the agentPoolVersions property: List of versions available for agent pool. + * + * @return the agentPoolVersions value. + */ + public List agentPoolVersions() { + return this.agentPoolVersions; + } + + /** + * Set the agentPoolVersions property: List of versions available for agent pool. + * + * @param agentPoolVersions the agentPoolVersions value to set. + * @return the AgentPoolAvailableVersionsProperties object itself. + */ + public AgentPoolAvailableVersionsProperties + withAgentPoolVersions(List agentPoolVersions) { + this.agentPoolVersions = agentPoolVersions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (agentPoolVersions() != null) { + agentPoolVersions().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("agentPoolVersions", this.agentPoolVersions, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolAvailableVersionsProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolAvailableVersionsProperties 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 AgentPoolAvailableVersionsProperties. + */ + public static AgentPoolAvailableVersionsProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolAvailableVersionsProperties deserializedAgentPoolAvailableVersionsProperties + = new AgentPoolAvailableVersionsProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("agentPoolVersions".equals(fieldName)) { + List agentPoolVersions + = reader.readArray( + reader1 -> AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.fromJson(reader1)); + deserializedAgentPoolAvailableVersionsProperties.agentPoolVersions = agentPoolVersions; + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolAvailableVersionsProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java new file mode 100644 index 000000000000..7eb71fc9a547 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java @@ -0,0 +1,1506 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.AgentPoolGatewayProfile; +import com.azure.resourcemanager.containerservice.models.AgentPoolMode; +import com.azure.resourcemanager.containerservice.models.AgentPoolNetworkProfile; +import com.azure.resourcemanager.containerservice.models.AgentPoolSecurityProfile; +import com.azure.resourcemanager.containerservice.models.AgentPoolStatus; +import com.azure.resourcemanager.containerservice.models.AgentPoolType; +import com.azure.resourcemanager.containerservice.models.AgentPoolUpgradeSettings; +import com.azure.resourcemanager.containerservice.models.AgentPoolWindowsProfile; +import com.azure.resourcemanager.containerservice.models.CreationData; +import com.azure.resourcemanager.containerservice.models.GpuInstanceProfile; +import com.azure.resourcemanager.containerservice.models.GpuProfile; +import com.azure.resourcemanager.containerservice.models.KubeletConfig; +import com.azure.resourcemanager.containerservice.models.KubeletDiskType; +import com.azure.resourcemanager.containerservice.models.LinuxOSConfig; +import com.azure.resourcemanager.containerservice.models.LocalDnsProfile; +import com.azure.resourcemanager.containerservice.models.OSDiskType; +import com.azure.resourcemanager.containerservice.models.OSSku; +import com.azure.resourcemanager.containerservice.models.OSType; +import com.azure.resourcemanager.containerservice.models.PodIpAllocationMode; +import com.azure.resourcemanager.containerservice.models.PowerState; +import com.azure.resourcemanager.containerservice.models.ScaleDownMode; +import com.azure.resourcemanager.containerservice.models.ScaleSetEvictionPolicy; +import com.azure.resourcemanager.containerservice.models.ScaleSetPriority; +import com.azure.resourcemanager.containerservice.models.VirtualMachineNodes; +import com.azure.resourcemanager.containerservice.models.VirtualMachinesProfile; +import com.azure.resourcemanager.containerservice.models.WorkloadRuntime; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Agent Pool. + */ +@Fluent +public final class AgentPoolInner extends ProxyResource { + /* + * Properties of an agent pool. + */ + private ManagedClusterAgentPoolProfileProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of AgentPoolInner class. + */ + public AgentPoolInner() { + } + + /** + * Get the innerProperties property: Properties of an agent pool. + * + * @return the innerProperties value. + */ + private ManagedClusterAgentPoolProfileProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the etag property: Unique read-only string used to implement optimistic concurrency. The eTag value will + * change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a + * subsequent request to enable optimistic concurrency per the normal eTag convention. + * + * @return the etag value. + */ + public String etag() { + return this.innerProperties() == null ? null : this.innerProperties().etag(); + } + + /** + * Get the count property: Number of agents (VMs) to host docker containers. Allowed values must be in the range of + * 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default + * value is 1. + * + * @return the count value. + */ + public Integer count() { + return this.innerProperties() == null ? null : this.innerProperties().count(); + } + + /** + * Set the count property: Number of agents (VMs) to host docker containers. Allowed values must be in the range of + * 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default + * value is 1. + * + * @param count the count value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withCount(Integer count) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withCount(count); + return this; + } + + /** + * Get the vmSize property: The size of the agent pool VMs. VM size availability varies by region. If a node + * contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on + * restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + * + * @return the vmSize value. + */ + public String vmSize() { + return this.innerProperties() == null ? null : this.innerProperties().vmSize(); + } + + /** + * Set the vmSize property: The size of the agent pool VMs. VM size availability varies by region. If a node + * contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on + * restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + * + * @param vmSize the vmSize value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withVmSize(String vmSize) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withVmSize(vmSize); + return this; + } + + /** + * Get the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the + * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + * + * @return the osDiskSizeGB value. + */ + public Integer osDiskSizeGB() { + return this.innerProperties() == null ? null : this.innerProperties().osDiskSizeGB(); + } + + /** + * Set the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the + * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + * + * @param osDiskSizeGB the osDiskSizeGB value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withOsDiskSizeGB(Integer osDiskSizeGB) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withOsDiskSizeGB(osDiskSizeGB); + return this; + } + + /** + * Get the osDiskType property: The OS disk type to be used for machines in the agent pool. The default is + * 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, + * defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + * + * @return the osDiskType value. + */ + public OSDiskType osDiskType() { + return this.innerProperties() == null ? null : this.innerProperties().osDiskType(); + } + + /** + * Set the osDiskType property: The OS disk type to be used for machines in the agent pool. The default is + * 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, + * defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + * + * @param osDiskType the osDiskType value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withOsDiskType(OSDiskType osDiskType) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withOsDiskType(osDiskType); + return this; + } + + /** + * Get the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and + * Kubelet ephemeral storage. + * + * @return the kubeletDiskType value. + */ + public KubeletDiskType kubeletDiskType() { + return this.innerProperties() == null ? null : this.innerProperties().kubeletDiskType(); + } + + /** + * Set the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and + * Kubelet ephemeral storage. + * + * @param kubeletDiskType the kubeletDiskType value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withKubeletDiskType(KubeletDiskType kubeletDiskType) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withKubeletDiskType(kubeletDiskType); + return this; + } + + /** + * Get the workloadRuntime property: Determines the type of workload a node can run. + * + * @return the workloadRuntime value. + */ + public WorkloadRuntime workloadRuntime() { + return this.innerProperties() == null ? null : this.innerProperties().workloadRuntime(); + } + + /** + * Set the workloadRuntime property: Determines the type of workload a node can run. + * + * @param workloadRuntime the workloadRuntime value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withWorkloadRuntime(WorkloadRuntime workloadRuntime) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withWorkloadRuntime(workloadRuntime); + return this; + } + + /** + * Get the messageOfTheDay property: Message of the day for Linux nodes, base64-encoded. A base64-encoded string + * which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux + * nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not + * be executed as a script). + * + * @return the messageOfTheDay value. + */ + public String messageOfTheDay() { + return this.innerProperties() == null ? null : this.innerProperties().messageOfTheDay(); + } + + /** + * Set the messageOfTheDay property: Message of the day for Linux nodes, base64-encoded. A base64-encoded string + * which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux + * nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not + * be executed as a script). + * + * @param messageOfTheDay the messageOfTheDay value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withMessageOfTheDay(String messageOfTheDay) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withMessageOfTheDay(messageOfTheDay); + return this; + } + + /** + * Get the vnetSubnetId property: The ID of the subnet which agent pool nodes and optionally pods will join on + * startup. If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, + * this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @return the vnetSubnetId value. + */ + public String vnetSubnetId() { + return this.innerProperties() == null ? null : this.innerProperties().vnetSubnetId(); + } + + /** + * Set the vnetSubnetId property: The ID of the subnet which agent pool nodes and optionally pods will join on + * startup. If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, + * this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @param vnetSubnetId the vnetSubnetId value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withVnetSubnetId(String vnetSubnetId) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withVnetSubnetId(vnetSubnetId); + return this; + } + + /** + * Get the podSubnetId property: The ID of the subnet which pods will join when launched. If omitted, pod IPs are + * statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @return the podSubnetId value. + */ + public String podSubnetId() { + return this.innerProperties() == null ? null : this.innerProperties().podSubnetId(); + } + + /** + * Set the podSubnetId property: The ID of the subnet which pods will join when launched. If omitted, pod IPs are + * statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @param podSubnetId the podSubnetId value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withPodSubnetId(String podSubnetId) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withPodSubnetId(podSubnetId); + return this; + } + + /** + * Get the podIpAllocationMode property: Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. + * Must be used with podSubnetId. The default is 'DynamicIndividual'. + * + * @return the podIpAllocationMode value. + */ + public PodIpAllocationMode podIpAllocationMode() { + return this.innerProperties() == null ? null : this.innerProperties().podIpAllocationMode(); + } + + /** + * Set the podIpAllocationMode property: Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. + * Must be used with podSubnetId. The default is 'DynamicIndividual'. + * + * @param podIpAllocationMode the podIpAllocationMode value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withPodIpAllocationMode(PodIpAllocationMode podIpAllocationMode) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withPodIpAllocationMode(podIpAllocationMode); + return this; + } + + /** + * Get the maxPods property: The maximum number of pods that can run on a node. + * + * @return the maxPods value. + */ + public Integer maxPods() { + return this.innerProperties() == null ? null : this.innerProperties().maxPods(); + } + + /** + * Set the maxPods property: The maximum number of pods that can run on a node. + * + * @param maxPods the maxPods value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withMaxPods(Integer maxPods) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withMaxPods(maxPods); + return this; + } + + /** + * Get the osType property: The operating system type. The default is Linux. + * + * @return the osType value. + */ + public OSType osType() { + return this.innerProperties() == null ? null : this.innerProperties().osType(); + } + + /** + * Set the osType property: The operating system type. The default is Linux. + * + * @param osType the osType value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withOsType(OSType osType) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withOsType(osType); + return this; + } + + /** + * Get the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. + * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is + * Windows. + * + * @return the osSku value. + */ + public OSSku osSku() { + return this.innerProperties() == null ? null : this.innerProperties().osSku(); + } + + /** + * Set the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. + * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is + * Windows. + * + * @param osSku the osSku value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withOsSku(OSSku osSku) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withOsSku(osSku); + return this; + } + + /** + * Get the maxCount property: The maximum number of nodes for auto-scaling. + * + * @return the maxCount value. + */ + public Integer maxCount() { + return this.innerProperties() == null ? null : this.innerProperties().maxCount(); + } + + /** + * Set the maxCount property: The maximum number of nodes for auto-scaling. + * + * @param maxCount the maxCount value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withMaxCount(Integer maxCount) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withMaxCount(maxCount); + return this; + } + + /** + * Get the minCount property: The minimum number of nodes for auto-scaling. + * + * @return the minCount value. + */ + public Integer minCount() { + return this.innerProperties() == null ? null : this.innerProperties().minCount(); + } + + /** + * Set the minCount property: The minimum number of nodes for auto-scaling. + * + * @param minCount the minCount value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withMinCount(Integer minCount) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withMinCount(minCount); + return this; + } + + /** + * Get the enableAutoScaling property: Whether to enable auto-scaler. + * + * @return the enableAutoScaling value. + */ + public Boolean enableAutoScaling() { + return this.innerProperties() == null ? null : this.innerProperties().enableAutoScaling(); + } + + /** + * Set the enableAutoScaling property: Whether to enable auto-scaler. + * + * @param enableAutoScaling the enableAutoScaling value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withEnableAutoScaling(Boolean enableAutoScaling) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withEnableAutoScaling(enableAutoScaling); + return this; + } + + /** + * Get the scaleDownMode property: The scale down mode to use when scaling the Agent Pool. This also effects the + * cluster autoscaler behavior. If not specified, it defaults to Delete. + * + * @return the scaleDownMode value. + */ + public ScaleDownMode scaleDownMode() { + return this.innerProperties() == null ? null : this.innerProperties().scaleDownMode(); + } + + /** + * Set the scaleDownMode property: The scale down mode to use when scaling the Agent Pool. This also effects the + * cluster autoscaler behavior. If not specified, it defaults to Delete. + * + * @param scaleDownMode the scaleDownMode value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withScaleDownMode(ScaleDownMode scaleDownMode) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withScaleDownMode(scaleDownMode); + return this; + } + + /** + * Get the type property: The type of Agent Pool. + * + * @return the type value. + */ + public AgentPoolType typePropertiesType() { + return this.innerProperties() == null ? null : this.innerProperties().type(); + } + + /** + * Set the type property: The type of Agent Pool. + * + * @param type the type value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withTypePropertiesType(AgentPoolType type) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withType(type); + return this; + } + + /** + * Get the mode property: The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all + * times. For additional information on agent pool restrictions and best practices, see: + * https://docs.microsoft.com/azure/aks/use-system-pools. + * + * @return the mode value. + */ + public AgentPoolMode mode() { + return this.innerProperties() == null ? null : this.innerProperties().mode(); + } + + /** + * Set the mode property: The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all + * times. For additional information on agent pool restrictions and best practices, see: + * https://docs.microsoft.com/azure/aks/use-system-pools. + * + * @param mode the mode value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withMode(AgentPoolMode mode) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withMode(mode); + return this; + } + + /** + * Get the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version + * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When + * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the + * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an + * upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an + * AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control + * plane. The node pool minor version must be within two minor versions of the control plane version. The node pool + * version cannot be greater than the control plane version. For more information see [upgrading a node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + * + * @return the orchestratorVersion value. + */ + public String orchestratorVersion() { + return this.innerProperties() == null ? null : this.innerProperties().orchestratorVersion(); + } + + /** + * Set the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version + * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When + * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the + * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an + * upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an + * AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control + * plane. The node pool minor version must be within two minor versions of the control plane version. The node pool + * version cannot be greater than the control plane version. For more information see [upgrading a node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + * + * @param orchestratorVersion the orchestratorVersion value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withOrchestratorVersion(String orchestratorVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withOrchestratorVersion(orchestratorVersion); + return this; + } + + /** + * Get the currentOrchestratorVersion property: The version of Kubernetes the Agent Pool is running. If + * orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to + * it. If orchestratorVersion is <major.minor>, this field will contain the full <major.minor.patch> + * version being used. + * + * @return the currentOrchestratorVersion value. + */ + public String currentOrchestratorVersion() { + return this.innerProperties() == null ? null : this.innerProperties().currentOrchestratorVersion(); + } + + /** + * Get the nodeImageVersion property: The version of node image. + * + * @return the nodeImageVersion value. + */ + public String nodeImageVersion() { + return this.innerProperties() == null ? null : this.innerProperties().nodeImageVersion(); + } + + /** + * Get the upgradeSettings property: Settings for upgrading the agentpool. + * + * @return the upgradeSettings value. + */ + public AgentPoolUpgradeSettings upgradeSettings() { + return this.innerProperties() == null ? null : this.innerProperties().upgradeSettings(); + } + + /** + * Set the upgradeSettings property: Settings for upgrading the agentpool. + * + * @param upgradeSettings the upgradeSettings value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withUpgradeSettings(upgradeSettings); + return this; + } + + /** + * Get the provisioningState property: The current deployment or provisioning state. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the powerState property: Whether the Agent Pool is running or stopped. When an Agent Pool is first created it + * is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops + * all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and + * provisioning state is Succeeded. + * + * @return the powerState value. + */ + public PowerState powerState() { + return this.innerProperties() == null ? null : this.innerProperties().powerState(); + } + + /** + * Set the powerState property: Whether the Agent Pool is running or stopped. When an Agent Pool is first created it + * is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops + * all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and + * provisioning state is Succeeded. + * + * @param powerState the powerState value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withPowerState(PowerState powerState) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withPowerState(powerState); + return this; + } + + /** + * Get the availabilityZones property: The list of Availability zones to use for nodes. This can only be specified + * if the AgentPoolType property is 'VirtualMachineScaleSets'. + * + * @return the availabilityZones value. + */ + public List availabilityZones() { + return this.innerProperties() == null ? null : this.innerProperties().availabilityZones(); + } + + /** + * Set the availabilityZones property: The list of Availability zones to use for nodes. This can only be specified + * if the AgentPoolType property is 'VirtualMachineScaleSets'. + * + * @param availabilityZones the availabilityZones value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withAvailabilityZones(List availabilityZones) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withAvailabilityZones(availabilityZones); + return this; + } + + /** + * Get the enableNodePublicIp property: Whether each node is allocated its own public IP. Some scenarios may require + * nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming + * workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For + * more information see [assigning a public IP per + * node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + * The default is false. + * + * @return the enableNodePublicIp value. + */ + public Boolean enableNodePublicIp() { + return this.innerProperties() == null ? null : this.innerProperties().enableNodePublicIp(); + } + + /** + * Set the enableNodePublicIp property: Whether each node is allocated its own public IP. Some scenarios may require + * nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming + * workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For + * more information see [assigning a public IP per + * node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + * The default is false. + * + * @param enableNodePublicIp the enableNodePublicIp value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withEnableNodePublicIp(Boolean enableNodePublicIp) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withEnableNodePublicIp(enableNodePublicIp); + return this; + } + + /** + * Get the nodePublicIpPrefixId property: The public IP prefix ID which VM nodes should use IPs from. This is of the + * form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + * + * @return the nodePublicIpPrefixId value. + */ + public String nodePublicIpPrefixId() { + return this.innerProperties() == null ? null : this.innerProperties().nodePublicIpPrefixId(); + } + + /** + * Set the nodePublicIpPrefixId property: The public IP prefix ID which VM nodes should use IPs from. This is of the + * form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + * + * @param nodePublicIpPrefixId the nodePublicIpPrefixId value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withNodePublicIpPrefixId(String nodePublicIpPrefixId) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withNodePublicIpPrefixId(nodePublicIpPrefixId); + return this; + } + + /** + * Get the scaleSetPriority property: The Virtual Machine Scale Set priority. + * + * @return the scaleSetPriority value. + */ + public ScaleSetPriority scaleSetPriority() { + return this.innerProperties() == null ? null : this.innerProperties().scaleSetPriority(); + } + + /** + * Set the scaleSetPriority property: The Virtual Machine Scale Set priority. + * + * @param scaleSetPriority the scaleSetPriority value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withScaleSetPriority(ScaleSetPriority scaleSetPriority) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withScaleSetPriority(scaleSetPriority); + return this; + } + + /** + * Get the scaleSetEvictionPolicy property: The Virtual Machine Scale Set eviction policy. The eviction policy + * specifies what to do with the VM when it is evicted. The default is Delete. For more information about eviction + * see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms). + * + * @return the scaleSetEvictionPolicy value. + */ + public ScaleSetEvictionPolicy scaleSetEvictionPolicy() { + return this.innerProperties() == null ? null : this.innerProperties().scaleSetEvictionPolicy(); + } + + /** + * Set the scaleSetEvictionPolicy property: The Virtual Machine Scale Set eviction policy. The eviction policy + * specifies what to do with the VM when it is evicted. The default is Delete. For more information about eviction + * see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms). + * + * @param scaleSetEvictionPolicy the scaleSetEvictionPolicy value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withScaleSetEvictionPolicy(scaleSetEvictionPolicy); + return this; + } + + /** + * Get the spotMaxPrice property: The max price (in US Dollars) you are willing to pay for spot instances. Possible + * values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. + * Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any + * on-demand price. For more details on spot pricing, see [spot VMs + * pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). + * + * @return the spotMaxPrice value. + */ + public Float spotMaxPrice() { + return this.innerProperties() == null ? null : this.innerProperties().spotMaxPrice(); + } + + /** + * Set the spotMaxPrice property: The max price (in US Dollars) you are willing to pay for spot instances. Possible + * values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. + * Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any + * on-demand price. For more details on spot pricing, see [spot VMs + * pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). + * + * @param spotMaxPrice the spotMaxPrice value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withSpotMaxPrice(Float spotMaxPrice) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withSpotMaxPrice(spotMaxPrice); + return this; + } + + /** + * Get the tags property: The tags to be persisted on the agent pool virtual machine scale set. + * + * @return the tags value. + */ + public Map tags() { + return this.innerProperties() == null ? null : this.innerProperties().tags(); + } + + /** + * Set the tags property: The tags to be persisted on the agent pool virtual machine scale set. + * + * @param tags the tags value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withTags(Map tags) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withTags(tags); + return this; + } + + /** + * Get the nodeLabels property: The node labels to be persisted across all nodes in agent pool. + * + * @return the nodeLabels value. + */ + public Map nodeLabels() { + return this.innerProperties() == null ? null : this.innerProperties().nodeLabels(); + } + + /** + * Set the nodeLabels property: The node labels to be persisted across all nodes in agent pool. + * + * @param nodeLabels the nodeLabels value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withNodeLabels(Map nodeLabels) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withNodeLabels(nodeLabels); + return this; + } + + /** + * Get the nodeTaints property: The taints added to new nodes during node pool create and scale. For example, + * key=value:NoSchedule. + * + * @return the nodeTaints value. + */ + public List nodeTaints() { + return this.innerProperties() == null ? null : this.innerProperties().nodeTaints(); + } + + /** + * Set the nodeTaints property: The taints added to new nodes during node pool create and scale. For example, + * key=value:NoSchedule. + * + * @param nodeTaints the nodeTaints value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withNodeTaints(List nodeTaints) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withNodeTaints(nodeTaints); + return this; + } + + /** + * Get the proximityPlacementGroupId property: The ID for Proximity Placement Group. + * + * @return the proximityPlacementGroupId value. + */ + public String proximityPlacementGroupId() { + return this.innerProperties() == null ? null : this.innerProperties().proximityPlacementGroupId(); + } + + /** + * Set the proximityPlacementGroupId property: The ID for Proximity Placement Group. + * + * @param proximityPlacementGroupId the proximityPlacementGroupId value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withProximityPlacementGroupId(String proximityPlacementGroupId) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withProximityPlacementGroupId(proximityPlacementGroupId); + return this; + } + + /** + * Get the kubeletConfig property: The Kubelet configuration on the agent pool nodes. + * + * @return the kubeletConfig value. + */ + public KubeletConfig kubeletConfig() { + return this.innerProperties() == null ? null : this.innerProperties().kubeletConfig(); + } + + /** + * Set the kubeletConfig property: The Kubelet configuration on the agent pool nodes. + * + * @param kubeletConfig the kubeletConfig value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withKubeletConfig(KubeletConfig kubeletConfig) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withKubeletConfig(kubeletConfig); + return this; + } + + /** + * Get the linuxOSConfig property: The OS configuration of Linux agent nodes. + * + * @return the linuxOSConfig value. + */ + public LinuxOSConfig linuxOSConfig() { + return this.innerProperties() == null ? null : this.innerProperties().linuxOSConfig(); + } + + /** + * Set the linuxOSConfig property: The OS configuration of Linux agent nodes. + * + * @param linuxOSConfig the linuxOSConfig value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withLinuxOSConfig(LinuxOSConfig linuxOSConfig) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withLinuxOSConfig(linuxOSConfig); + return this; + } + + /** + * Get the enableEncryptionAtHost property: Whether to enable host based OS and data drive encryption. This is only + * supported on certain VM sizes and in certain Azure regions. For more information, see: + * https://docs.microsoft.com/azure/aks/enable-host-encryption. + * + * @return the enableEncryptionAtHost value. + */ + public Boolean enableEncryptionAtHost() { + return this.innerProperties() == null ? null : this.innerProperties().enableEncryptionAtHost(); + } + + /** + * Set the enableEncryptionAtHost property: Whether to enable host based OS and data drive encryption. This is only + * supported on certain VM sizes and in certain Azure regions. For more information, see: + * https://docs.microsoft.com/azure/aks/enable-host-encryption. + * + * @param enableEncryptionAtHost the enableEncryptionAtHost value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withEnableEncryptionAtHost(Boolean enableEncryptionAtHost) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withEnableEncryptionAtHost(enableEncryptionAtHost); + return this; + } + + /** + * Get the enableUltraSsd property: Whether to enable UltraSSD. + * + * @return the enableUltraSsd value. + */ + public Boolean enableUltraSsd() { + return this.innerProperties() == null ? null : this.innerProperties().enableUltraSsd(); + } + + /** + * Set the enableUltraSsd property: Whether to enable UltraSSD. + * + * @param enableUltraSsd the enableUltraSsd value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withEnableUltraSsd(Boolean enableUltraSsd) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withEnableUltraSsd(enableUltraSsd); + return this; + } + + /** + * Get the enableFips property: Whether to use a FIPS-enabled OS. See [Add a FIPS-enabled node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more + * details. + * + * @return the enableFips value. + */ + public Boolean enableFips() { + return this.innerProperties() == null ? null : this.innerProperties().enableFips(); + } + + /** + * Set the enableFips property: Whether to use a FIPS-enabled OS. See [Add a FIPS-enabled node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more + * details. + * + * @param enableFips the enableFips value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withEnableFips(Boolean enableFips) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withEnableFips(enableFips); + return this; + } + + /** + * Get the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for + * supported GPU VM SKU. + * + * @return the gpuInstanceProfile value. + */ + public GpuInstanceProfile gpuInstanceProfile() { + return this.innerProperties() == null ? null : this.innerProperties().gpuInstanceProfile(); + } + + /** + * Set the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for + * supported GPU VM SKU. + * + * @param gpuInstanceProfile the gpuInstanceProfile value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withGpuInstanceProfile(gpuInstanceProfile); + return this; + } + + /** + * Get the creationData property: CreationData to be used to specify the source Snapshot ID if the node pool will be + * created/upgraded using a snapshot. + * + * @return the creationData value. + */ + public CreationData creationData() { + return this.innerProperties() == null ? null : this.innerProperties().creationData(); + } + + /** + * Set the creationData property: CreationData to be used to specify the source Snapshot ID if the node pool will be + * created/upgraded using a snapshot. + * + * @param creationData the creationData value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withCreationData(CreationData creationData) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withCreationData(creationData); + return this; + } + + /** + * Get the capacityReservationGroupId property: The fully qualified resource ID of the Capacity Reservation Group to + * provide virtual machines from a reserved group of Virtual Machines. This is of the form: + * '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/capacityreservationgroups/{capacityReservationGroupName}' + * Customers use it to create an agentpool with a specified CRG. For more information see [Capacity + * Reservation](https://learn.microsoft.com/en-us/azure/virtual-machines/capacity-reservation-overview). + * + * @return the capacityReservationGroupId value. + */ + public String capacityReservationGroupId() { + return this.innerProperties() == null ? null : this.innerProperties().capacityReservationGroupId(); + } + + /** + * Set the capacityReservationGroupId property: The fully qualified resource ID of the Capacity Reservation Group to + * provide virtual machines from a reserved group of Virtual Machines. This is of the form: + * '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/capacityreservationgroups/{capacityReservationGroupName}' + * Customers use it to create an agentpool with a specified CRG. For more information see [Capacity + * Reservation](https://learn.microsoft.com/en-us/azure/virtual-machines/capacity-reservation-overview). + * + * @param capacityReservationGroupId the capacityReservationGroupId value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withCapacityReservationGroupId(String capacityReservationGroupId) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withCapacityReservationGroupId(capacityReservationGroupId); + return this; + } + + /** + * Get the hostGroupId property: The fully qualified resource ID of the Dedicated Host Group to provision virtual + * machines from, used only in creation scenario and not allowed to changed once set. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + * For more information see [Azure dedicated + * hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). + * + * @return the hostGroupId value. + */ + public String hostGroupId() { + return this.innerProperties() == null ? null : this.innerProperties().hostGroupId(); + } + + /** + * Set the hostGroupId property: The fully qualified resource ID of the Dedicated Host Group to provision virtual + * machines from, used only in creation scenario and not allowed to changed once set. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + * For more information see [Azure dedicated + * hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). + * + * @param hostGroupId the hostGroupId value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withHostGroupId(String hostGroupId) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withHostGroupId(hostGroupId); + return this; + } + + /** + * Get the networkProfile property: Network-related settings of an agent pool. + * + * @return the networkProfile value. + */ + public AgentPoolNetworkProfile networkProfile() { + return this.innerProperties() == null ? null : this.innerProperties().networkProfile(); + } + + /** + * Set the networkProfile property: Network-related settings of an agent pool. + * + * @param networkProfile the networkProfile value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withNetworkProfile(AgentPoolNetworkProfile networkProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withNetworkProfile(networkProfile); + return this; + } + + /** + * Get the windowsProfile property: The Windows agent pool's specific profile. + * + * @return the windowsProfile value. + */ + public AgentPoolWindowsProfile windowsProfile() { + return this.innerProperties() == null ? null : this.innerProperties().windowsProfile(); + } + + /** + * Set the windowsProfile property: The Windows agent pool's specific profile. + * + * @param windowsProfile the windowsProfile value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withWindowsProfile(windowsProfile); + return this; + } + + /** + * Get the securityProfile property: The security settings of an agent pool. + * + * @return the securityProfile value. + */ + public AgentPoolSecurityProfile securityProfile() { + return this.innerProperties() == null ? null : this.innerProperties().securityProfile(); + } + + /** + * Set the securityProfile property: The security settings of an agent pool. + * + * @param securityProfile the securityProfile value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withSecurityProfile(AgentPoolSecurityProfile securityProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withSecurityProfile(securityProfile); + return this; + } + + /** + * Get the gpuProfile property: GPU settings for the Agent Pool. + * + * @return the gpuProfile value. + */ + public GpuProfile gpuProfile() { + return this.innerProperties() == null ? null : this.innerProperties().gpuProfile(); + } + + /** + * Set the gpuProfile property: GPU settings for the Agent Pool. + * + * @param gpuProfile the gpuProfile value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withGpuProfile(GpuProfile gpuProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withGpuProfile(gpuProfile); + return this; + } + + /** + * Get the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be + * set if agent pool mode is not Gateway. + * + * @return the gatewayProfile value. + */ + public AgentPoolGatewayProfile gatewayProfile() { + return this.innerProperties() == null ? null : this.innerProperties().gatewayProfile(); + } + + /** + * Set the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be + * set if agent pool mode is not Gateway. + * + * @param gatewayProfile the gatewayProfile value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withGatewayProfile(AgentPoolGatewayProfile gatewayProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withGatewayProfile(gatewayProfile); + return this; + } + + /** + * Get the virtualMachinesProfile property: Specifications on VirtualMachines agent pool. + * + * @return the virtualMachinesProfile value. + */ + public VirtualMachinesProfile virtualMachinesProfile() { + return this.innerProperties() == null ? null : this.innerProperties().virtualMachinesProfile(); + } + + /** + * Set the virtualMachinesProfile property: Specifications on VirtualMachines agent pool. + * + * @param virtualMachinesProfile the virtualMachinesProfile value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withVirtualMachinesProfile(VirtualMachinesProfile virtualMachinesProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withVirtualMachinesProfile(virtualMachinesProfile); + return this; + } + + /** + * Get the virtualMachineNodesStatus property: The status of nodes in a VirtualMachines agent pool. + * + * @return the virtualMachineNodesStatus value. + */ + public List virtualMachineNodesStatus() { + return this.innerProperties() == null ? null : this.innerProperties().virtualMachineNodesStatus(); + } + + /** + * Set the virtualMachineNodesStatus property: The status of nodes in a VirtualMachines agent pool. + * + * @param virtualMachineNodesStatus the virtualMachineNodesStatus value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withVirtualMachineNodesStatus(List virtualMachineNodesStatus) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withVirtualMachineNodesStatus(virtualMachineNodesStatus); + return this; + } + + /** + * Get the status property: Contains read-only information about the Agent Pool. + * + * @return the status value. + */ + public AgentPoolStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Set the status property: Contains read-only information about the Agent Pool. + * + * @param status the status value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withStatus(AgentPoolStatus status) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withStatus(status); + return this; + } + + /** + * Get the localDnsProfile property: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS + * helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see + * aka.ms/aks/localdns. + * + * @return the localDnsProfile value. + */ + public LocalDnsProfile localDnsProfile() { + return this.innerProperties() == null ? null : this.innerProperties().localDnsProfile(); + } + + /** + * Set the localDnsProfile property: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS + * helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see + * aka.ms/aks/localdns. + * + * @param localDnsProfile the localDnsProfile value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withLocalDnsProfile(LocalDnsProfile localDnsProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withLocalDnsProfile(localDnsProfile); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolInner 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 AgentPoolInner. + */ + public static AgentPoolInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolInner deserializedAgentPoolInner = new AgentPoolInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedAgentPoolInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedAgentPoolInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedAgentPoolInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedAgentPoolInner.innerProperties + = ManagedClusterAgentPoolProfileProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedAgentPoolInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java new file mode 100644 index 000000000000..4860c5cec6a8 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.AgentPoolUpgradeProfilePropertiesUpgradesItem; +import com.azure.resourcemanager.containerservice.models.OSType; +import java.io.IOException; +import java.util.List; + +/** + * The list of available upgrades for an agent pool. + */ +@Fluent +public final class AgentPoolUpgradeProfileInner extends ProxyResource { + /* + * The properties of the agent pool upgrade profile. + */ + private AgentPoolUpgradeProfileProperties innerProperties = new AgentPoolUpgradeProfileProperties(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of AgentPoolUpgradeProfileInner class. + */ + public AgentPoolUpgradeProfileInner() { + } + + /** + * Get the innerProperties property: The properties of the agent pool upgrade profile. + * + * @return the innerProperties value. + */ + private AgentPoolUpgradeProfileProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.innerProperties() == null ? null : this.innerProperties().kubernetesVersion(); + } + + /** + * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @param kubernetesVersion the kubernetesVersion value to set. + * @return the AgentPoolUpgradeProfileInner object itself. + */ + public AgentPoolUpgradeProfileInner withKubernetesVersion(String kubernetesVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new AgentPoolUpgradeProfileProperties(); + } + this.innerProperties().withKubernetesVersion(kubernetesVersion); + return this; + } + + /** + * Get the osType property: The operating system type. The default is Linux. + * + * @return the osType value. + */ + public OSType osType() { + return this.innerProperties() == null ? null : this.innerProperties().osType(); + } + + /** + * Set the osType property: The operating system type. The default is Linux. + * + * @param osType the osType value to set. + * @return the AgentPoolUpgradeProfileInner object itself. + */ + public AgentPoolUpgradeProfileInner withOsType(OSType osType) { + if (this.innerProperties() == null) { + this.innerProperties = new AgentPoolUpgradeProfileProperties(); + } + this.innerProperties().withOsType(osType); + return this; + } + + /** + * Get the upgrades property: List of orchestrator types and versions available for upgrade. + * + * @return the upgrades value. + */ + public List upgrades() { + return this.innerProperties() == null ? null : this.innerProperties().upgrades(); + } + + /** + * Set the upgrades property: List of orchestrator types and versions available for upgrade. + * + * @param upgrades the upgrades value to set. + * @return the AgentPoolUpgradeProfileInner object itself. + */ + public AgentPoolUpgradeProfileInner withUpgrades(List upgrades) { + if (this.innerProperties() == null) { + this.innerProperties = new AgentPoolUpgradeProfileProperties(); + } + this.innerProperties().withUpgrades(upgrades); + return this; + } + + /** + * Get the latestNodeImageVersion property: The latest AKS supported node image version. + * + * @return the latestNodeImageVersion value. + */ + public String latestNodeImageVersion() { + return this.innerProperties() == null ? null : this.innerProperties().latestNodeImageVersion(); + } + + /** + * Set the latestNodeImageVersion property: The latest AKS supported node image version. + * + * @param latestNodeImageVersion the latestNodeImageVersion value to set. + * @return the AgentPoolUpgradeProfileInner object itself. + */ + public AgentPoolUpgradeProfileInner withLatestNodeImageVersion(String latestNodeImageVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new AgentPoolUpgradeProfileProperties(); + } + this.innerProperties().withLatestNodeImageVersion(latestNodeImageVersion); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model AgentPoolUpgradeProfileInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AgentPoolUpgradeProfileInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolUpgradeProfileInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolUpgradeProfileInner 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 AgentPoolUpgradeProfileInner. + */ + public static AgentPoolUpgradeProfileInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolUpgradeProfileInner deserializedAgentPoolUpgradeProfileInner = new AgentPoolUpgradeProfileInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedAgentPoolUpgradeProfileInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedAgentPoolUpgradeProfileInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedAgentPoolUpgradeProfileInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedAgentPoolUpgradeProfileInner.innerProperties + = AgentPoolUpgradeProfileProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedAgentPoolUpgradeProfileInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolUpgradeProfileInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java new file mode 100644 index 000000000000..e05c4dbd0934 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.AgentPoolUpgradeProfilePropertiesUpgradesItem; +import com.azure.resourcemanager.containerservice.models.OSType; +import java.io.IOException; +import java.util.List; + +/** + * The list of available upgrade versions. + */ +@Fluent +public final class AgentPoolUpgradeProfileProperties implements JsonSerializable { + /* + * The Kubernetes version (major.minor.patch). + */ + private String kubernetesVersion; + + /* + * The operating system type. The default is Linux. + */ + private OSType osType; + + /* + * List of orchestrator types and versions available for upgrade. + */ + private List upgrades; + + /* + * The latest AKS supported node image version. + */ + private String latestNodeImageVersion; + + /** + * Creates an instance of AgentPoolUpgradeProfileProperties class. + */ + public AgentPoolUpgradeProfileProperties() { + } + + /** + * Get the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @param kubernetesVersion the kubernetesVersion value to set. + * @return the AgentPoolUpgradeProfileProperties object itself. + */ + public AgentPoolUpgradeProfileProperties withKubernetesVersion(String kubernetesVersion) { + this.kubernetesVersion = kubernetesVersion; + return this; + } + + /** + * Get the osType property: The operating system type. The default is Linux. + * + * @return the osType value. + */ + public OSType osType() { + return this.osType; + } + + /** + * Set the osType property: The operating system type. The default is Linux. + * + * @param osType the osType value to set. + * @return the AgentPoolUpgradeProfileProperties object itself. + */ + public AgentPoolUpgradeProfileProperties withOsType(OSType osType) { + this.osType = osType; + return this; + } + + /** + * Get the upgrades property: List of orchestrator types and versions available for upgrade. + * + * @return the upgrades value. + */ + public List upgrades() { + return this.upgrades; + } + + /** + * Set the upgrades property: List of orchestrator types and versions available for upgrade. + * + * @param upgrades the upgrades value to set. + * @return the AgentPoolUpgradeProfileProperties object itself. + */ + public AgentPoolUpgradeProfileProperties + withUpgrades(List upgrades) { + this.upgrades = upgrades; + return this; + } + + /** + * Get the latestNodeImageVersion property: The latest AKS supported node image version. + * + * @return the latestNodeImageVersion value. + */ + public String latestNodeImageVersion() { + return this.latestNodeImageVersion; + } + + /** + * Set the latestNodeImageVersion property: The latest AKS supported node image version. + * + * @param latestNodeImageVersion the latestNodeImageVersion value to set. + * @return the AgentPoolUpgradeProfileProperties object itself. + */ + public AgentPoolUpgradeProfileProperties withLatestNodeImageVersion(String latestNodeImageVersion) { + this.latestNodeImageVersion = latestNodeImageVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (kubernetesVersion() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property kubernetesVersion in model AgentPoolUpgradeProfileProperties")); + } + if (osType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property osType in model AgentPoolUpgradeProfileProperties")); + } + if (upgrades() != null) { + upgrades().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AgentPoolUpgradeProfileProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); + jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); + jsonWriter.writeArrayField("upgrades", this.upgrades, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("latestNodeImageVersion", this.latestNodeImageVersion); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolUpgradeProfileProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolUpgradeProfileProperties 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 AgentPoolUpgradeProfileProperties. + */ + public static AgentPoolUpgradeProfileProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolUpgradeProfileProperties deserializedAgentPoolUpgradeProfileProperties + = new AgentPoolUpgradeProfileProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kubernetesVersion".equals(fieldName)) { + deserializedAgentPoolUpgradeProfileProperties.kubernetesVersion = reader.getString(); + } else if ("osType".equals(fieldName)) { + deserializedAgentPoolUpgradeProfileProperties.osType = OSType.fromString(reader.getString()); + } else if ("upgrades".equals(fieldName)) { + List upgrades + = reader.readArray(reader1 -> AgentPoolUpgradeProfilePropertiesUpgradesItem.fromJson(reader1)); + deserializedAgentPoolUpgradeProfileProperties.upgrades = upgrades; + } else if ("latestNodeImageVersion".equals(fieldName)) { + deserializedAgentPoolUpgradeProfileProperties.latestNodeImageVersion = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolUpgradeProfileProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CommandResultProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CommandResultProperties.java new file mode 100644 index 000000000000..477c0c268457 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CommandResultProperties.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * The results of a run command. + */ +@Immutable +public final class CommandResultProperties implements JsonSerializable { + /* + * provisioning State + */ + private String provisioningState; + + /* + * The exit code of the command + */ + private Integer exitCode; + + /* + * The time when the command started. + */ + private OffsetDateTime startedAt; + + /* + * The time when the command finished. + */ + private OffsetDateTime finishedAt; + + /* + * The command output. + */ + private String logs; + + /* + * An explanation of why provisioningState is set to failed (if so). + */ + private String reason; + + /** + * Creates an instance of CommandResultProperties class. + */ + public CommandResultProperties() { + } + + /** + * Get the provisioningState property: provisioning State. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the exitCode property: The exit code of the command. + * + * @return the exitCode value. + */ + public Integer exitCode() { + return this.exitCode; + } + + /** + * Get the startedAt property: The time when the command started. + * + * @return the startedAt value. + */ + public OffsetDateTime startedAt() { + return this.startedAt; + } + + /** + * Get the finishedAt property: The time when the command finished. + * + * @return the finishedAt value. + */ + public OffsetDateTime finishedAt() { + return this.finishedAt; + } + + /** + * Get the logs property: The command output. + * + * @return the logs value. + */ + public String logs() { + return this.logs; + } + + /** + * Get the reason property: An explanation of why provisioningState is set to failed (if so). + * + * @return the reason value. + */ + public String reason() { + return this.reason; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CommandResultProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CommandResultProperties 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 CommandResultProperties. + */ + public static CommandResultProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CommandResultProperties deserializedCommandResultProperties = new CommandResultProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedCommandResultProperties.provisioningState = reader.getString(); + } else if ("exitCode".equals(fieldName)) { + deserializedCommandResultProperties.exitCode = reader.getNullable(JsonReader::getInt); + } else if ("startedAt".equals(fieldName)) { + deserializedCommandResultProperties.startedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("finishedAt".equals(fieldName)) { + deserializedCommandResultProperties.finishedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("logs".equals(fieldName)) { + deserializedCommandResultProperties.logs = reader.getString(); + } else if ("reason".equals(fieldName)) { + deserializedCommandResultProperties.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCommandResultProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CredentialResultsInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CredentialResultsInner.java new file mode 100644 index 000000000000..972b1e5c612f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CredentialResultsInner.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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.containerservice.models.CredentialResult; +import java.io.IOException; +import java.util.List; + +/** + * The list credential result response. + */ +@Immutable +public final class CredentialResultsInner implements JsonSerializable { + /* + * Base64-encoded Kubernetes configuration file. + */ + private List kubeconfigs; + + /** + * Creates an instance of CredentialResultsInner class. + */ + public CredentialResultsInner() { + } + + /** + * Get the kubeconfigs property: Base64-encoded Kubernetes configuration file. + * + * @return the kubeconfigs value. + */ + public List kubeconfigs() { + return this.kubeconfigs; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (kubeconfigs() != null) { + kubeconfigs().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CredentialResultsInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CredentialResultsInner 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 CredentialResultsInner. + */ + public static CredentialResultsInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CredentialResultsInner deserializedCredentialResultsInner = new CredentialResultsInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kubeconfigs".equals(fieldName)) { + List kubeconfigs + = reader.readArray(reader1 -> CredentialResult.fromJson(reader1)); + deserializedCredentialResultsInner.kubeconfigs = kubeconfigs; + } else { + reader.skipChildren(); + } + } + + return deserializedCredentialResultsInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/KubernetesVersionListResultInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/KubernetesVersionListResultInner.java new file mode 100644 index 000000000000..a9574fe999f0 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/KubernetesVersionListResultInner.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.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 com.azure.resourcemanager.containerservice.models.KubernetesVersion; +import java.io.IOException; +import java.util.List; + +/** + * Hold values properties, which is array of KubernetesVersion. + */ +@Fluent +public final class KubernetesVersionListResultInner implements JsonSerializable { + /* + * Array of AKS supported Kubernetes versions. + */ + private List values; + + /** + * Creates an instance of KubernetesVersionListResultInner class. + */ + public KubernetesVersionListResultInner() { + } + + /** + * Get the values property: Array of AKS supported Kubernetes versions. + * + * @return the values value. + */ + public List values() { + return this.values; + } + + /** + * Set the values property: Array of AKS supported Kubernetes versions. + * + * @param values the values value to set. + * @return the KubernetesVersionListResultInner object itself. + */ + public KubernetesVersionListResultInner withValues(List values) { + this.values = values; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (values() != null) { + values().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KubernetesVersionListResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KubernetesVersionListResultInner 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 KubernetesVersionListResultInner. + */ + public static KubernetesVersionListResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KubernetesVersionListResultInner deserializedKubernetesVersionListResultInner + = new KubernetesVersionListResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> KubernetesVersion.fromJson(reader1)); + deserializedKubernetesVersionListResultInner.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedKubernetesVersionListResultInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java new file mode 100644 index 000000000000..806cd7e16e72 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.MachineProperties; +import java.io.IOException; +import java.util.List; + +/** + * A machine. Contains details about the underlying virtual machine. A machine may be visible here but not in kubectl + * get nodes; if so it may be because the machine has not been registered with the Kubernetes API Server yet. + */ +@Fluent +public final class MachineInner extends ProxyResource { + /* + * The properties of the machine + */ + private MachineProperties properties; + + /* + * The Availability zone in which machine is located. + */ + private List zones; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of MachineInner class. + */ + public MachineInner() { + } + + /** + * Get the properties property: The properties of the machine. + * + * @return the properties value. + */ + public MachineProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties of the machine. + * + * @param properties the properties value to set. + * @return the MachineInner object itself. + */ + public MachineInner withProperties(MachineProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the zones property: The Availability zone in which machine is located. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineInner 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 MachineInner. + */ + public static MachineInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineInner deserializedMachineInner = new MachineInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMachineInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedMachineInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedMachineInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedMachineInner.properties = MachineProperties.fromJson(reader); + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedMachineInner.zones = zones; + } else if ("systemData".equals(fieldName)) { + deserializedMachineInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationInner.java new file mode 100644 index 000000000000..f967d26974bd --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationInner.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.MaintenanceWindow; +import com.azure.resourcemanager.containerservice.models.TimeInWeek; +import com.azure.resourcemanager.containerservice.models.TimeSpan; +import java.io.IOException; +import java.util.List; + +/** + * Planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster. See [planned + * maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for more information about planned + * maintenance. + */ +@Fluent +public final class MaintenanceConfigurationInner extends ProxyResource { + /* + * Properties of a default maintenance configuration. + */ + private MaintenanceConfigurationProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of MaintenanceConfigurationInner class. + */ + public MaintenanceConfigurationInner() { + } + + /** + * Get the innerProperties property: Properties of a default maintenance configuration. + * + * @return the innerProperties value. + */ + private MaintenanceConfigurationProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the timeInWeek property: Time slots during the week when planned maintenance is allowed to proceed. If two + * array entries specify the same day of the week, the applied configuration is the union of times in both entries. + * + * @return the timeInWeek value. + */ + public List timeInWeek() { + return this.innerProperties() == null ? null : this.innerProperties().timeInWeek(); + } + + /** + * Set the timeInWeek property: Time slots during the week when planned maintenance is allowed to proceed. If two + * array entries specify the same day of the week, the applied configuration is the union of times in both entries. + * + * @param timeInWeek the timeInWeek value to set. + * @return the MaintenanceConfigurationInner object itself. + */ + public MaintenanceConfigurationInner withTimeInWeek(List timeInWeek) { + if (this.innerProperties() == null) { + this.innerProperties = new MaintenanceConfigurationProperties(); + } + this.innerProperties().withTimeInWeek(timeInWeek); + return this; + } + + /** + * Get the notAllowedTime property: Time slots on which upgrade is not allowed. + * + * @return the notAllowedTime value. + */ + public List notAllowedTime() { + return this.innerProperties() == null ? null : this.innerProperties().notAllowedTime(); + } + + /** + * Set the notAllowedTime property: Time slots on which upgrade is not allowed. + * + * @param notAllowedTime the notAllowedTime value to set. + * @return the MaintenanceConfigurationInner object itself. + */ + public MaintenanceConfigurationInner withNotAllowedTime(List notAllowedTime) { + if (this.innerProperties() == null) { + this.innerProperties = new MaintenanceConfigurationProperties(); + } + this.innerProperties().withNotAllowedTime(notAllowedTime); + return this; + } + + /** + * Get the maintenanceWindow property: Maintenance window for the maintenance configuration. + * + * @return the maintenanceWindow value. + */ + public MaintenanceWindow maintenanceWindow() { + return this.innerProperties() == null ? null : this.innerProperties().maintenanceWindow(); + } + + /** + * Set the maintenanceWindow property: Maintenance window for the maintenance configuration. + * + * @param maintenanceWindow the maintenanceWindow value to set. + * @return the MaintenanceConfigurationInner object itself. + */ + public MaintenanceConfigurationInner withMaintenanceWindow(MaintenanceWindow maintenanceWindow) { + if (this.innerProperties() == null) { + this.innerProperties = new MaintenanceConfigurationProperties(); + } + this.innerProperties().withMaintenanceWindow(maintenanceWindow); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceConfigurationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceConfigurationInner 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 MaintenanceConfigurationInner. + */ + public static MaintenanceConfigurationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceConfigurationInner deserializedMaintenanceConfigurationInner + = new MaintenanceConfigurationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMaintenanceConfigurationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedMaintenanceConfigurationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedMaintenanceConfigurationInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedMaintenanceConfigurationInner.innerProperties + = MaintenanceConfigurationProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedMaintenanceConfigurationInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceConfigurationInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationProperties.java new file mode 100644 index 000000000000..278a29cd3848 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationProperties.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.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 com.azure.resourcemanager.containerservice.models.MaintenanceWindow; +import com.azure.resourcemanager.containerservice.models.TimeInWeek; +import com.azure.resourcemanager.containerservice.models.TimeSpan; +import java.io.IOException; +import java.util.List; + +/** + * Properties used to configure planned maintenance for a Managed Cluster. + */ +@Fluent +public final class MaintenanceConfigurationProperties implements JsonSerializable { + /* + * Time slots during the week when planned maintenance is allowed to proceed. If two array entries specify the same + * day of the week, the applied configuration is the union of times in both entries. + */ + private List timeInWeek; + + /* + * Time slots on which upgrade is not allowed. + */ + private List notAllowedTime; + + /* + * Maintenance window for the maintenance configuration. + */ + private MaintenanceWindow maintenanceWindow; + + /** + * Creates an instance of MaintenanceConfigurationProperties class. + */ + public MaintenanceConfigurationProperties() { + } + + /** + * Get the timeInWeek property: Time slots during the week when planned maintenance is allowed to proceed. If two + * array entries specify the same day of the week, the applied configuration is the union of times in both entries. + * + * @return the timeInWeek value. + */ + public List timeInWeek() { + return this.timeInWeek; + } + + /** + * Set the timeInWeek property: Time slots during the week when planned maintenance is allowed to proceed. If two + * array entries specify the same day of the week, the applied configuration is the union of times in both entries. + * + * @param timeInWeek the timeInWeek value to set. + * @return the MaintenanceConfigurationProperties object itself. + */ + public MaintenanceConfigurationProperties withTimeInWeek(List timeInWeek) { + this.timeInWeek = timeInWeek; + return this; + } + + /** + * Get the notAllowedTime property: Time slots on which upgrade is not allowed. + * + * @return the notAllowedTime value. + */ + public List notAllowedTime() { + return this.notAllowedTime; + } + + /** + * Set the notAllowedTime property: Time slots on which upgrade is not allowed. + * + * @param notAllowedTime the notAllowedTime value to set. + * @return the MaintenanceConfigurationProperties object itself. + */ + public MaintenanceConfigurationProperties withNotAllowedTime(List notAllowedTime) { + this.notAllowedTime = notAllowedTime; + return this; + } + + /** + * Get the maintenanceWindow property: Maintenance window for the maintenance configuration. + * + * @return the maintenanceWindow value. + */ + public MaintenanceWindow maintenanceWindow() { + return this.maintenanceWindow; + } + + /** + * Set the maintenanceWindow property: Maintenance window for the maintenance configuration. + * + * @param maintenanceWindow the maintenanceWindow value to set. + * @return the MaintenanceConfigurationProperties object itself. + */ + public MaintenanceConfigurationProperties withMaintenanceWindow(MaintenanceWindow maintenanceWindow) { + this.maintenanceWindow = maintenanceWindow; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (timeInWeek() != null) { + timeInWeek().forEach(e -> e.validate()); + } + if (notAllowedTime() != null) { + notAllowedTime().forEach(e -> e.validate()); + } + if (maintenanceWindow() != null) { + maintenanceWindow().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("timeInWeek", this.timeInWeek, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("notAllowedTime", this.notAllowedTime, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("maintenanceWindow", this.maintenanceWindow); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceConfigurationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceConfigurationProperties 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 MaintenanceConfigurationProperties. + */ + public static MaintenanceConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceConfigurationProperties deserializedMaintenanceConfigurationProperties + = new MaintenanceConfigurationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("timeInWeek".equals(fieldName)) { + List timeInWeek = reader.readArray(reader1 -> TimeInWeek.fromJson(reader1)); + deserializedMaintenanceConfigurationProperties.timeInWeek = timeInWeek; + } else if ("notAllowedTime".equals(fieldName)) { + List notAllowedTime = reader.readArray(reader1 -> TimeSpan.fromJson(reader1)); + deserializedMaintenanceConfigurationProperties.notAllowedTime = notAllowedTime; + } else if ("maintenanceWindow".equals(fieldName)) { + deserializedMaintenanceConfigurationProperties.maintenanceWindow + = MaintenanceWindow.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceConfigurationProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAccessProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAccessProfileInner.java new file mode 100644 index 000000000000..e99678c9e8be --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAccessProfileInner.java @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Managed cluster Access Profile. + */ +@Fluent +public final class ManagedClusterAccessProfileInner extends Resource { + private static final byte[] EMPTY_BYTE_ARRAY = new byte[0]; + + /* + * AccessProfile of a managed cluster. + */ + private AccessProfile innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedClusterAccessProfileInner class. + */ + public ManagedClusterAccessProfileInner() { + } + + /** + * Get the innerProperties property: AccessProfile of a managed cluster. + * + * @return the innerProperties value. + */ + private AccessProfile innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAccessProfileInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAccessProfileInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the kubeConfig property: Base64-encoded Kubernetes configuration file. + * + * @return the kubeConfig value. + */ + public byte[] kubeConfig() { + return this.innerProperties() == null ? EMPTY_BYTE_ARRAY : this.innerProperties().kubeConfig(); + } + + /** + * Set the kubeConfig property: Base64-encoded Kubernetes configuration file. + * + * @param kubeConfig the kubeConfig value to set. + * @return the ManagedClusterAccessProfileInner object itself. + */ + public ManagedClusterAccessProfileInner withKubeConfig(byte[] kubeConfig) { + if (this.innerProperties() == null) { + this.innerProperties = new AccessProfile(); + } + this.innerProperties().withKubeConfig(kubeConfig); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterAccessProfileInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterAccessProfileInner 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 ManagedClusterAccessProfileInner. + */ + public static ManagedClusterAccessProfileInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterAccessProfileInner deserializedManagedClusterAccessProfileInner + = new ManagedClusterAccessProfileInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedClusterAccessProfileInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedClusterAccessProfileInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedClusterAccessProfileInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedManagedClusterAccessProfileInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedManagedClusterAccessProfileInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedManagedClusterAccessProfileInner.innerProperties = AccessProfile.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedManagedClusterAccessProfileInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterAccessProfileInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java new file mode 100644 index 000000000000..721d64f00f7d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java @@ -0,0 +1,1896 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.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 com.azure.resourcemanager.containerservice.models.AgentPoolGatewayProfile; +import com.azure.resourcemanager.containerservice.models.AgentPoolMode; +import com.azure.resourcemanager.containerservice.models.AgentPoolNetworkProfile; +import com.azure.resourcemanager.containerservice.models.AgentPoolSecurityProfile; +import com.azure.resourcemanager.containerservice.models.AgentPoolStatus; +import com.azure.resourcemanager.containerservice.models.AgentPoolType; +import com.azure.resourcemanager.containerservice.models.AgentPoolUpgradeSettings; +import com.azure.resourcemanager.containerservice.models.AgentPoolWindowsProfile; +import com.azure.resourcemanager.containerservice.models.CreationData; +import com.azure.resourcemanager.containerservice.models.GpuInstanceProfile; +import com.azure.resourcemanager.containerservice.models.GpuProfile; +import com.azure.resourcemanager.containerservice.models.KubeletConfig; +import com.azure.resourcemanager.containerservice.models.KubeletDiskType; +import com.azure.resourcemanager.containerservice.models.LinuxOSConfig; +import com.azure.resourcemanager.containerservice.models.LocalDnsProfile; +import com.azure.resourcemanager.containerservice.models.OSDiskType; +import com.azure.resourcemanager.containerservice.models.OSSku; +import com.azure.resourcemanager.containerservice.models.OSType; +import com.azure.resourcemanager.containerservice.models.PodIpAllocationMode; +import com.azure.resourcemanager.containerservice.models.PowerState; +import com.azure.resourcemanager.containerservice.models.ScaleDownMode; +import com.azure.resourcemanager.containerservice.models.ScaleSetEvictionPolicy; +import com.azure.resourcemanager.containerservice.models.ScaleSetPriority; +import com.azure.resourcemanager.containerservice.models.VirtualMachineNodes; +import com.azure.resourcemanager.containerservice.models.VirtualMachinesProfile; +import com.azure.resourcemanager.containerservice.models.WorkloadRuntime; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Properties for the container service agent pool profile. + */ +@Fluent +public class ManagedClusterAgentPoolProfileProperties + implements JsonSerializable { + /* + * Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is + * updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable + * optimistic concurrency per the normal eTag convention. + */ + private String etag; + + /* + * Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) + * for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1. + */ + private Integer count; + + /* + * The size of the agent pool VMs. VM size availability varies by region. If a node contains insufficient compute + * resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: + * https://docs.microsoft.com/azure/aks/quotas-skus-regions + */ + private String vmSize; + + /* + * OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify + * 0, it will apply the default osDisk size according to the vmSize specified. + */ + private Integer osDiskSizeGB; + + /* + * The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the VM supports it and + * has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed + * after creation. For more information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + */ + private OSDiskType osDiskType; + + /* + * Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. + */ + private KubeletDiskType kubeletDiskType; + + /* + * Determines the type of workload a node can run. + */ + private WorkloadRuntime workloadRuntime; + + /* + * Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd + * after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for + * Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a script). + */ + private String messageOfTheDay; + + /* + * The ID of the subnet which agent pool nodes and optionally pods will join on startup. If this is not specified, a + * VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, + * otherwise it applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{ + * virtualNetworkName}/subnets/{subnetName} + */ + private String vnetSubnetId; + + /* + * The ID of the subnet which pods will join when launched. If omitted, pod IPs are statically assigned on the node + * subnet (see vnetSubnetID for more details). This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{ + * virtualNetworkName}/subnets/{subnetName} + */ + private String podSubnetId; + + /* + * Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The + * default is 'DynamicIndividual'. + */ + private PodIpAllocationMode podIpAllocationMode; + + /* + * The maximum number of pods that can run on a node. + */ + private Integer maxPods; + + /* + * The operating system type. The default is Linux. + */ + private OSType osType; + + /* + * Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 + * when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + */ + private OSSku osSku; + + /* + * The maximum number of nodes for auto-scaling + */ + private Integer maxCount; + + /* + * The minimum number of nodes for auto-scaling + */ + private Integer minCount; + + /* + * Whether to enable auto-scaler + */ + private Boolean enableAutoScaling; + + /* + * The scale down mode to use when scaling the Agent Pool. This also effects the cluster autoscaler behavior. If not + * specified, it defaults to Delete. + */ + private ScaleDownMode scaleDownMode; + + /* + * The type of Agent Pool. + */ + private AgentPoolType type; + + /* + * The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional + * information on agent pool restrictions and best practices, see: + * https://docs.microsoft.com/azure/aks/use-system-pools + */ + private AgentPoolMode mode; + + /* + * The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and + * (e.g. 1.20) are supported. When is specified, the latest supported GA patch version + * is chosen automatically. Updating the cluster with the same once it has been created (e.g. 1.14.x + * -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should + * upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same + * major version as the control plane. The node pool minor version must be within two minor versions of the control + * plane version. The node pool version cannot be greater than the control plane version. For more information see + * [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + */ + private String orchestratorVersion; + + /* + * The version of Kubernetes the Agent Pool is running. If orchestratorVersion is a fully specified version + * , this field will be exactly equal to it. If orchestratorVersion is , this field + * will contain the full version being used. + */ + private String currentOrchestratorVersion; + + /* + * The version of node image + */ + private String nodeImageVersion; + + /* + * Settings for upgrading the agentpool + */ + private AgentPoolUpgradeSettings upgradeSettings; + + /* + * The current deployment or provisioning state. + */ + private String provisioningState; + + /* + * Whether the Agent Pool is running or stopped. When an Agent Pool is first created it is initially Running. The + * Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does + * not accrue billing charges. An Agent Pool can only be stopped if it is Running and provisioning state is + * Succeeded + */ + private PowerState powerState; + + /* + * The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is + * 'VirtualMachineScaleSets'. + */ + private List availabilityZones; + + /* + * Whether each node is allocated its own public IP. Some scenarios may require nodes in a node pool to receive + * their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make + * a direct connection to a cloud virtual machine to minimize hops. For more information see [assigning a public IP + * per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node- + * pools). The default is false. + */ + private Boolean enableNodePublicIp; + + /* + * The public IP prefix ID which VM nodes should use IPs from. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{ + * publicIPPrefixName} + */ + private String nodePublicIpPrefixId; + + /* + * The Virtual Machine Scale Set priority. + */ + private ScaleSetPriority scaleSetPriority; + + /* + * The Virtual Machine Scale Set eviction policy. The eviction policy specifies what to do with the VM when it is + * evicted. The default is Delete. For more information about eviction see [spot + * VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms) + */ + private ScaleSetEvictionPolicy scaleSetEvictionPolicy; + + /* + * The max price (in US Dollars) you are willing to pay for spot instances. Possible values are any decimal value + * greater than zero or -1 which indicates default price to be up-to on-demand. Possible values are any decimal + * value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on + * spot pricing, see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) + */ + private Float spotMaxPrice; + + /* + * The tags to be persisted on the agent pool virtual machine scale set. + */ + private Map tags; + + /* + * The node labels to be persisted across all nodes in agent pool. + */ + private Map nodeLabels; + + /* + * The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. + */ + private List nodeTaints; + + /* + * The ID for Proximity Placement Group. + */ + private String proximityPlacementGroupId; + + /* + * The Kubelet configuration on the agent pool nodes. + */ + private KubeletConfig kubeletConfig; + + /* + * The OS configuration of Linux agent nodes. + */ + private LinuxOSConfig linuxOSConfig; + + /* + * Whether to enable host based OS and data drive encryption. This is only supported on certain VM sizes and in + * certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption + */ + private Boolean enableEncryptionAtHost; + + /* + * Whether to enable UltraSSD + */ + private Boolean enableUltraSsd; + + /* + * Whether to use a FIPS-enabled OS. See [Add a FIPS-enabled node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more + * details. + */ + private Boolean enableFips; + + /* + * GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. + */ + private GpuInstanceProfile gpuInstanceProfile; + + /* + * CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a + * snapshot. + */ + private CreationData creationData; + + /* + * The fully qualified resource ID of the Capacity Reservation Group to provide virtual machines from a reserved + * group of Virtual Machines. This is of the form: + * '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/ + * capacityreservationgroups/{capacityReservationGroupName}' Customers use it to create an agentpool with a + * specified CRG. For more information see [Capacity + * Reservation](https://learn.microsoft.com/en-us/azure/virtual-machines/capacity-reservation-overview) + */ + private String capacityReservationGroupId; + + /* + * The fully qualified resource ID of the Dedicated Host Group to provision virtual machines from, used only in + * creation scenario and not allowed to changed once set. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{ + * hostGroupName}. For more information see [Azure dedicated + * hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). + */ + private String hostGroupId; + + /* + * Network-related settings of an agent pool. + */ + private AgentPoolNetworkProfile networkProfile; + + /* + * The Windows agent pool's specific profile. + */ + private AgentPoolWindowsProfile windowsProfile; + + /* + * The security settings of an agent pool. + */ + private AgentPoolSecurityProfile securityProfile; + + /* + * GPU settings for the Agent Pool. + */ + private GpuProfile gpuProfile; + + /* + * Profile specific to a managed agent pool in Gateway mode. This field cannot be set if agent pool mode is not + * Gateway. + */ + private AgentPoolGatewayProfile gatewayProfile; + + /* + * Specifications on VirtualMachines agent pool. + */ + private VirtualMachinesProfile virtualMachinesProfile; + + /* + * The status of nodes in a VirtualMachines agent pool. + */ + private List virtualMachineNodesStatus; + + /* + * Contains read-only information about the Agent Pool. + */ + private AgentPoolStatus status; + + /* + * Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve performance and + * reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns. + */ + private LocalDnsProfile localDnsProfile; + + /** + * Creates an instance of ManagedClusterAgentPoolProfileProperties class. + */ + public ManagedClusterAgentPoolProfileProperties() { + } + + /** + * Get the etag property: Unique read-only string used to implement optimistic concurrency. The eTag value will + * change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a + * subsequent request to enable optimistic concurrency per the normal eTag convention. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Set the etag property: Unique read-only string used to implement optimistic concurrency. The eTag value will + * change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a + * subsequent request to enable optimistic concurrency per the normal eTag convention. + * + * @param etag the etag value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + ManagedClusterAgentPoolProfileProperties withEtag(String etag) { + this.etag = etag; + return this; + } + + /** + * Get the count property: Number of agents (VMs) to host docker containers. Allowed values must be in the range of + * 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default + * value is 1. + * + * @return the count value. + */ + public Integer count() { + return this.count; + } + + /** + * Set the count property: Number of agents (VMs) to host docker containers. Allowed values must be in the range of + * 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default + * value is 1. + * + * @param count the count value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get the vmSize property: The size of the agent pool VMs. VM size availability varies by region. If a node + * contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on + * restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + * + * @return the vmSize value. + */ + public String vmSize() { + return this.vmSize; + } + + /** + * Set the vmSize property: The size of the agent pool VMs. VM size availability varies by region. If a node + * contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on + * restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + * + * @param vmSize the vmSize value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withVmSize(String vmSize) { + this.vmSize = vmSize; + return this; + } + + /** + * Get the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the + * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + * + * @return the osDiskSizeGB value. + */ + public Integer osDiskSizeGB() { + return this.osDiskSizeGB; + } + + /** + * Set the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the + * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + * + * @param osDiskSizeGB the osDiskSizeGB value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withOsDiskSizeGB(Integer osDiskSizeGB) { + this.osDiskSizeGB = osDiskSizeGB; + return this; + } + + /** + * Get the osDiskType property: The OS disk type to be used for machines in the agent pool. The default is + * 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, + * defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + * + * @return the osDiskType value. + */ + public OSDiskType osDiskType() { + return this.osDiskType; + } + + /** + * Set the osDiskType property: The OS disk type to be used for machines in the agent pool. The default is + * 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, + * defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + * + * @param osDiskType the osDiskType value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withOsDiskType(OSDiskType osDiskType) { + this.osDiskType = osDiskType; + return this; + } + + /** + * Get the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and + * Kubelet ephemeral storage. + * + * @return the kubeletDiskType value. + */ + public KubeletDiskType kubeletDiskType() { + return this.kubeletDiskType; + } + + /** + * Set the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and + * Kubelet ephemeral storage. + * + * @param kubeletDiskType the kubeletDiskType value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withKubeletDiskType(KubeletDiskType kubeletDiskType) { + this.kubeletDiskType = kubeletDiskType; + return this; + } + + /** + * Get the workloadRuntime property: Determines the type of workload a node can run. + * + * @return the workloadRuntime value. + */ + public WorkloadRuntime workloadRuntime() { + return this.workloadRuntime; + } + + /** + * Set the workloadRuntime property: Determines the type of workload a node can run. + * + * @param workloadRuntime the workloadRuntime value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withWorkloadRuntime(WorkloadRuntime workloadRuntime) { + this.workloadRuntime = workloadRuntime; + return this; + } + + /** + * Get the messageOfTheDay property: Message of the day for Linux nodes, base64-encoded. A base64-encoded string + * which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux + * nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not + * be executed as a script). + * + * @return the messageOfTheDay value. + */ + public String messageOfTheDay() { + return this.messageOfTheDay; + } + + /** + * Set the messageOfTheDay property: Message of the day for Linux nodes, base64-encoded. A base64-encoded string + * which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux + * nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not + * be executed as a script). + * + * @param messageOfTheDay the messageOfTheDay value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withMessageOfTheDay(String messageOfTheDay) { + this.messageOfTheDay = messageOfTheDay; + return this; + } + + /** + * Get the vnetSubnetId property: The ID of the subnet which agent pool nodes and optionally pods will join on + * startup. If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, + * this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @return the vnetSubnetId value. + */ + public String vnetSubnetId() { + return this.vnetSubnetId; + } + + /** + * Set the vnetSubnetId property: The ID of the subnet which agent pool nodes and optionally pods will join on + * startup. If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, + * this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @param vnetSubnetId the vnetSubnetId value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withVnetSubnetId(String vnetSubnetId) { + this.vnetSubnetId = vnetSubnetId; + return this; + } + + /** + * Get the podSubnetId property: The ID of the subnet which pods will join when launched. If omitted, pod IPs are + * statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @return the podSubnetId value. + */ + public String podSubnetId() { + return this.podSubnetId; + } + + /** + * Set the podSubnetId property: The ID of the subnet which pods will join when launched. If omitted, pod IPs are + * statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @param podSubnetId the podSubnetId value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withPodSubnetId(String podSubnetId) { + this.podSubnetId = podSubnetId; + return this; + } + + /** + * Get the podIpAllocationMode property: Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. + * Must be used with podSubnetId. The default is 'DynamicIndividual'. + * + * @return the podIpAllocationMode value. + */ + public PodIpAllocationMode podIpAllocationMode() { + return this.podIpAllocationMode; + } + + /** + * Set the podIpAllocationMode property: Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. + * Must be used with podSubnetId. The default is 'DynamicIndividual'. + * + * @param podIpAllocationMode the podIpAllocationMode value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withPodIpAllocationMode(PodIpAllocationMode podIpAllocationMode) { + this.podIpAllocationMode = podIpAllocationMode; + return this; + } + + /** + * Get the maxPods property: The maximum number of pods that can run on a node. + * + * @return the maxPods value. + */ + public Integer maxPods() { + return this.maxPods; + } + + /** + * Set the maxPods property: The maximum number of pods that can run on a node. + * + * @param maxPods the maxPods value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withMaxPods(Integer maxPods) { + this.maxPods = maxPods; + return this; + } + + /** + * Get the osType property: The operating system type. The default is Linux. + * + * @return the osType value. + */ + public OSType osType() { + return this.osType; + } + + /** + * Set the osType property: The operating system type. The default is Linux. + * + * @param osType the osType value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withOsType(OSType osType) { + this.osType = osType; + return this; + } + + /** + * Get the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. + * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is + * Windows. + * + * @return the osSku value. + */ + public OSSku osSku() { + return this.osSku; + } + + /** + * Set the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. + * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is + * Windows. + * + * @param osSku the osSku value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withOsSku(OSSku osSku) { + this.osSku = osSku; + return this; + } + + /** + * Get the maxCount property: The maximum number of nodes for auto-scaling. + * + * @return the maxCount value. + */ + public Integer maxCount() { + return this.maxCount; + } + + /** + * Set the maxCount property: The maximum number of nodes for auto-scaling. + * + * @param maxCount the maxCount value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withMaxCount(Integer maxCount) { + this.maxCount = maxCount; + return this; + } + + /** + * Get the minCount property: The minimum number of nodes for auto-scaling. + * + * @return the minCount value. + */ + public Integer minCount() { + return this.minCount; + } + + /** + * Set the minCount property: The minimum number of nodes for auto-scaling. + * + * @param minCount the minCount value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withMinCount(Integer minCount) { + this.minCount = minCount; + return this; + } + + /** + * Get the enableAutoScaling property: Whether to enable auto-scaler. + * + * @return the enableAutoScaling value. + */ + public Boolean enableAutoScaling() { + return this.enableAutoScaling; + } + + /** + * Set the enableAutoScaling property: Whether to enable auto-scaler. + * + * @param enableAutoScaling the enableAutoScaling value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withEnableAutoScaling(Boolean enableAutoScaling) { + this.enableAutoScaling = enableAutoScaling; + return this; + } + + /** + * Get the scaleDownMode property: The scale down mode to use when scaling the Agent Pool. This also effects the + * cluster autoscaler behavior. If not specified, it defaults to Delete. + * + * @return the scaleDownMode value. + */ + public ScaleDownMode scaleDownMode() { + return this.scaleDownMode; + } + + /** + * Set the scaleDownMode property: The scale down mode to use when scaling the Agent Pool. This also effects the + * cluster autoscaler behavior. If not specified, it defaults to Delete. + * + * @param scaleDownMode the scaleDownMode value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withScaleDownMode(ScaleDownMode scaleDownMode) { + this.scaleDownMode = scaleDownMode; + return this; + } + + /** + * Get the type property: The type of Agent Pool. + * + * @return the type value. + */ + public AgentPoolType type() { + return this.type; + } + + /** + * Set the type property: The type of Agent Pool. + * + * @param type the type value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withType(AgentPoolType type) { + this.type = type; + return this; + } + + /** + * Get the mode property: The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all + * times. For additional information on agent pool restrictions and best practices, see: + * https://docs.microsoft.com/azure/aks/use-system-pools. + * + * @return the mode value. + */ + public AgentPoolMode mode() { + return this.mode; + } + + /** + * Set the mode property: The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all + * times. For additional information on agent pool restrictions and best practices, see: + * https://docs.microsoft.com/azure/aks/use-system-pools. + * + * @param mode the mode value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withMode(AgentPoolMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version + * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When + * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the + * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an + * upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an + * AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control + * plane. The node pool minor version must be within two minor versions of the control plane version. The node pool + * version cannot be greater than the control plane version. For more information see [upgrading a node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + * + * @return the orchestratorVersion value. + */ + public String orchestratorVersion() { + return this.orchestratorVersion; + } + + /** + * Set the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version + * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When + * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the + * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an + * upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an + * AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control + * plane. The node pool minor version must be within two minor versions of the control plane version. The node pool + * version cannot be greater than the control plane version. For more information see [upgrading a node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + * + * @param orchestratorVersion the orchestratorVersion value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withOrchestratorVersion(String orchestratorVersion) { + this.orchestratorVersion = orchestratorVersion; + return this; + } + + /** + * Get the currentOrchestratorVersion property: The version of Kubernetes the Agent Pool is running. If + * orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to + * it. If orchestratorVersion is <major.minor>, this field will contain the full <major.minor.patch> + * version being used. + * + * @return the currentOrchestratorVersion value. + */ + public String currentOrchestratorVersion() { + return this.currentOrchestratorVersion; + } + + /** + * Set the currentOrchestratorVersion property: The version of Kubernetes the Agent Pool is running. If + * orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to + * it. If orchestratorVersion is <major.minor>, this field will contain the full <major.minor.patch> + * version being used. + * + * @param currentOrchestratorVersion the currentOrchestratorVersion value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + ManagedClusterAgentPoolProfileProperties withCurrentOrchestratorVersion(String currentOrchestratorVersion) { + this.currentOrchestratorVersion = currentOrchestratorVersion; + return this; + } + + /** + * Get the nodeImageVersion property: The version of node image. + * + * @return the nodeImageVersion value. + */ + public String nodeImageVersion() { + return this.nodeImageVersion; + } + + /** + * Set the nodeImageVersion property: The version of node image. + * + * @param nodeImageVersion the nodeImageVersion value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + ManagedClusterAgentPoolProfileProperties withNodeImageVersion(String nodeImageVersion) { + this.nodeImageVersion = nodeImageVersion; + return this; + } + + /** + * Get the upgradeSettings property: Settings for upgrading the agentpool. + * + * @return the upgradeSettings value. + */ + public AgentPoolUpgradeSettings upgradeSettings() { + return this.upgradeSettings; + } + + /** + * Set the upgradeSettings property: Settings for upgrading the agentpool. + * + * @param upgradeSettings the upgradeSettings value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings) { + this.upgradeSettings = upgradeSettings; + return this; + } + + /** + * Get the provisioningState property: The current deployment or provisioning state. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: The current deployment or provisioning state. + * + * @param provisioningState the provisioningState value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + ManagedClusterAgentPoolProfileProperties withProvisioningState(String provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get the powerState property: Whether the Agent Pool is running or stopped. When an Agent Pool is first created it + * is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops + * all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and + * provisioning state is Succeeded. + * + * @return the powerState value. + */ + public PowerState powerState() { + return this.powerState; + } + + /** + * Set the powerState property: Whether the Agent Pool is running or stopped. When an Agent Pool is first created it + * is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops + * all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and + * provisioning state is Succeeded. + * + * @param powerState the powerState value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withPowerState(PowerState powerState) { + this.powerState = powerState; + return this; + } + + /** + * Get the availabilityZones property: The list of Availability zones to use for nodes. This can only be specified + * if the AgentPoolType property is 'VirtualMachineScaleSets'. + * + * @return the availabilityZones value. + */ + public List availabilityZones() { + return this.availabilityZones; + } + + /** + * Set the availabilityZones property: The list of Availability zones to use for nodes. This can only be specified + * if the AgentPoolType property is 'VirtualMachineScaleSets'. + * + * @param availabilityZones the availabilityZones value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withAvailabilityZones(List availabilityZones) { + this.availabilityZones = availabilityZones; + return this; + } + + /** + * Get the enableNodePublicIp property: Whether each node is allocated its own public IP. Some scenarios may require + * nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming + * workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For + * more information see [assigning a public IP per + * node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + * The default is false. + * + * @return the enableNodePublicIp value. + */ + public Boolean enableNodePublicIp() { + return this.enableNodePublicIp; + } + + /** + * Set the enableNodePublicIp property: Whether each node is allocated its own public IP. Some scenarios may require + * nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming + * workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For + * more information see [assigning a public IP per + * node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + * The default is false. + * + * @param enableNodePublicIp the enableNodePublicIp value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withEnableNodePublicIp(Boolean enableNodePublicIp) { + this.enableNodePublicIp = enableNodePublicIp; + return this; + } + + /** + * Get the nodePublicIpPrefixId property: The public IP prefix ID which VM nodes should use IPs from. This is of the + * form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + * + * @return the nodePublicIpPrefixId value. + */ + public String nodePublicIpPrefixId() { + return this.nodePublicIpPrefixId; + } + + /** + * Set the nodePublicIpPrefixId property: The public IP prefix ID which VM nodes should use IPs from. This is of the + * form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + * + * @param nodePublicIpPrefixId the nodePublicIpPrefixId value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withNodePublicIpPrefixId(String nodePublicIpPrefixId) { + this.nodePublicIpPrefixId = nodePublicIpPrefixId; + return this; + } + + /** + * Get the scaleSetPriority property: The Virtual Machine Scale Set priority. + * + * @return the scaleSetPriority value. + */ + public ScaleSetPriority scaleSetPriority() { + return this.scaleSetPriority; + } + + /** + * Set the scaleSetPriority property: The Virtual Machine Scale Set priority. + * + * @param scaleSetPriority the scaleSetPriority value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withScaleSetPriority(ScaleSetPriority scaleSetPriority) { + this.scaleSetPriority = scaleSetPriority; + return this; + } + + /** + * Get the scaleSetEvictionPolicy property: The Virtual Machine Scale Set eviction policy. The eviction policy + * specifies what to do with the VM when it is evicted. The default is Delete. For more information about eviction + * see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms). + * + * @return the scaleSetEvictionPolicy value. + */ + public ScaleSetEvictionPolicy scaleSetEvictionPolicy() { + return this.scaleSetEvictionPolicy; + } + + /** + * Set the scaleSetEvictionPolicy property: The Virtual Machine Scale Set eviction policy. The eviction policy + * specifies what to do with the VM when it is evicted. The default is Delete. For more information about eviction + * see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms). + * + * @param scaleSetEvictionPolicy the scaleSetEvictionPolicy value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties + withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy) { + this.scaleSetEvictionPolicy = scaleSetEvictionPolicy; + return this; + } + + /** + * Get the spotMaxPrice property: The max price (in US Dollars) you are willing to pay for spot instances. Possible + * values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. + * Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any + * on-demand price. For more details on spot pricing, see [spot VMs + * pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). + * + * @return the spotMaxPrice value. + */ + public Float spotMaxPrice() { + return this.spotMaxPrice; + } + + /** + * Set the spotMaxPrice property: The max price (in US Dollars) you are willing to pay for spot instances. Possible + * values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. + * Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any + * on-demand price. For more details on spot pricing, see [spot VMs + * pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). + * + * @param spotMaxPrice the spotMaxPrice value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withSpotMaxPrice(Float spotMaxPrice) { + this.spotMaxPrice = spotMaxPrice; + return this; + } + + /** + * Get the tags property: The tags to be persisted on the agent pool virtual machine scale set. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: The tags to be persisted on the agent pool virtual machine scale set. + * + * @param tags the tags value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the nodeLabels property: The node labels to be persisted across all nodes in agent pool. + * + * @return the nodeLabels value. + */ + public Map nodeLabels() { + return this.nodeLabels; + } + + /** + * Set the nodeLabels property: The node labels to be persisted across all nodes in agent pool. + * + * @param nodeLabels the nodeLabels value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withNodeLabels(Map nodeLabels) { + this.nodeLabels = nodeLabels; + return this; + } + + /** + * Get the nodeTaints property: The taints added to new nodes during node pool create and scale. For example, + * key=value:NoSchedule. + * + * @return the nodeTaints value. + */ + public List nodeTaints() { + return this.nodeTaints; + } + + /** + * Set the nodeTaints property: The taints added to new nodes during node pool create and scale. For example, + * key=value:NoSchedule. + * + * @param nodeTaints the nodeTaints value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withNodeTaints(List nodeTaints) { + this.nodeTaints = nodeTaints; + return this; + } + + /** + * Get the proximityPlacementGroupId property: The ID for Proximity Placement Group. + * + * @return the proximityPlacementGroupId value. + */ + public String proximityPlacementGroupId() { + return this.proximityPlacementGroupId; + } + + /** + * Set the proximityPlacementGroupId property: The ID for Proximity Placement Group. + * + * @param proximityPlacementGroupId the proximityPlacementGroupId value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withProximityPlacementGroupId(String proximityPlacementGroupId) { + this.proximityPlacementGroupId = proximityPlacementGroupId; + return this; + } + + /** + * Get the kubeletConfig property: The Kubelet configuration on the agent pool nodes. + * + * @return the kubeletConfig value. + */ + public KubeletConfig kubeletConfig() { + return this.kubeletConfig; + } + + /** + * Set the kubeletConfig property: The Kubelet configuration on the agent pool nodes. + * + * @param kubeletConfig the kubeletConfig value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withKubeletConfig(KubeletConfig kubeletConfig) { + this.kubeletConfig = kubeletConfig; + return this; + } + + /** + * Get the linuxOSConfig property: The OS configuration of Linux agent nodes. + * + * @return the linuxOSConfig value. + */ + public LinuxOSConfig linuxOSConfig() { + return this.linuxOSConfig; + } + + /** + * Set the linuxOSConfig property: The OS configuration of Linux agent nodes. + * + * @param linuxOSConfig the linuxOSConfig value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withLinuxOSConfig(LinuxOSConfig linuxOSConfig) { + this.linuxOSConfig = linuxOSConfig; + return this; + } + + /** + * Get the enableEncryptionAtHost property: Whether to enable host based OS and data drive encryption. This is only + * supported on certain VM sizes and in certain Azure regions. For more information, see: + * https://docs.microsoft.com/azure/aks/enable-host-encryption. + * + * @return the enableEncryptionAtHost value. + */ + public Boolean enableEncryptionAtHost() { + return this.enableEncryptionAtHost; + } + + /** + * Set the enableEncryptionAtHost property: Whether to enable host based OS and data drive encryption. This is only + * supported on certain VM sizes and in certain Azure regions. For more information, see: + * https://docs.microsoft.com/azure/aks/enable-host-encryption. + * + * @param enableEncryptionAtHost the enableEncryptionAtHost value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withEnableEncryptionAtHost(Boolean enableEncryptionAtHost) { + this.enableEncryptionAtHost = enableEncryptionAtHost; + return this; + } + + /** + * Get the enableUltraSsd property: Whether to enable UltraSSD. + * + * @return the enableUltraSsd value. + */ + public Boolean enableUltraSsd() { + return this.enableUltraSsd; + } + + /** + * Set the enableUltraSsd property: Whether to enable UltraSSD. + * + * @param enableUltraSsd the enableUltraSsd value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withEnableUltraSsd(Boolean enableUltraSsd) { + this.enableUltraSsd = enableUltraSsd; + return this; + } + + /** + * Get the enableFips property: Whether to use a FIPS-enabled OS. See [Add a FIPS-enabled node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more + * details. + * + * @return the enableFips value. + */ + public Boolean enableFips() { + return this.enableFips; + } + + /** + * Set the enableFips property: Whether to use a FIPS-enabled OS. See [Add a FIPS-enabled node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more + * details. + * + * @param enableFips the enableFips value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withEnableFips(Boolean enableFips) { + this.enableFips = enableFips; + return this; + } + + /** + * Get the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for + * supported GPU VM SKU. + * + * @return the gpuInstanceProfile value. + */ + public GpuInstanceProfile gpuInstanceProfile() { + return this.gpuInstanceProfile; + } + + /** + * Set the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for + * supported GPU VM SKU. + * + * @param gpuInstanceProfile the gpuInstanceProfile value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile) { + this.gpuInstanceProfile = gpuInstanceProfile; + return this; + } + + /** + * Get the creationData property: CreationData to be used to specify the source Snapshot ID if the node pool will be + * created/upgraded using a snapshot. + * + * @return the creationData value. + */ + public CreationData creationData() { + return this.creationData; + } + + /** + * Set the creationData property: CreationData to be used to specify the source Snapshot ID if the node pool will be + * created/upgraded using a snapshot. + * + * @param creationData the creationData value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withCreationData(CreationData creationData) { + this.creationData = creationData; + return this; + } + + /** + * Get the capacityReservationGroupId property: The fully qualified resource ID of the Capacity Reservation Group to + * provide virtual machines from a reserved group of Virtual Machines. This is of the form: + * '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/capacityreservationgroups/{capacityReservationGroupName}' + * Customers use it to create an agentpool with a specified CRG. For more information see [Capacity + * Reservation](https://learn.microsoft.com/en-us/azure/virtual-machines/capacity-reservation-overview). + * + * @return the capacityReservationGroupId value. + */ + public String capacityReservationGroupId() { + return this.capacityReservationGroupId; + } + + /** + * Set the capacityReservationGroupId property: The fully qualified resource ID of the Capacity Reservation Group to + * provide virtual machines from a reserved group of Virtual Machines. This is of the form: + * '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/capacityreservationgroups/{capacityReservationGroupName}' + * Customers use it to create an agentpool with a specified CRG. For more information see [Capacity + * Reservation](https://learn.microsoft.com/en-us/azure/virtual-machines/capacity-reservation-overview). + * + * @param capacityReservationGroupId the capacityReservationGroupId value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withCapacityReservationGroupId(String capacityReservationGroupId) { + this.capacityReservationGroupId = capacityReservationGroupId; + return this; + } + + /** + * Get the hostGroupId property: The fully qualified resource ID of the Dedicated Host Group to provision virtual + * machines from, used only in creation scenario and not allowed to changed once set. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + * For more information see [Azure dedicated + * hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). + * + * @return the hostGroupId value. + */ + public String hostGroupId() { + return this.hostGroupId; + } + + /** + * Set the hostGroupId property: The fully qualified resource ID of the Dedicated Host Group to provision virtual + * machines from, used only in creation scenario and not allowed to changed once set. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + * For more information see [Azure dedicated + * hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). + * + * @param hostGroupId the hostGroupId value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withHostGroupId(String hostGroupId) { + this.hostGroupId = hostGroupId; + return this; + } + + /** + * Get the networkProfile property: Network-related settings of an agent pool. + * + * @return the networkProfile value. + */ + public AgentPoolNetworkProfile networkProfile() { + return this.networkProfile; + } + + /** + * Set the networkProfile property: Network-related settings of an agent pool. + * + * @param networkProfile the networkProfile value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withNetworkProfile(AgentPoolNetworkProfile networkProfile) { + this.networkProfile = networkProfile; + return this; + } + + /** + * Get the windowsProfile property: The Windows agent pool's specific profile. + * + * @return the windowsProfile value. + */ + public AgentPoolWindowsProfile windowsProfile() { + return this.windowsProfile; + } + + /** + * Set the windowsProfile property: The Windows agent pool's specific profile. + * + * @param windowsProfile the windowsProfile value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { + this.windowsProfile = windowsProfile; + return this; + } + + /** + * Get the securityProfile property: The security settings of an agent pool. + * + * @return the securityProfile value. + */ + public AgentPoolSecurityProfile securityProfile() { + return this.securityProfile; + } + + /** + * Set the securityProfile property: The security settings of an agent pool. + * + * @param securityProfile the securityProfile value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withSecurityProfile(AgentPoolSecurityProfile securityProfile) { + this.securityProfile = securityProfile; + return this; + } + + /** + * Get the gpuProfile property: GPU settings for the Agent Pool. + * + * @return the gpuProfile value. + */ + public GpuProfile gpuProfile() { + return this.gpuProfile; + } + + /** + * Set the gpuProfile property: GPU settings for the Agent Pool. + * + * @param gpuProfile the gpuProfile value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withGpuProfile(GpuProfile gpuProfile) { + this.gpuProfile = gpuProfile; + return this; + } + + /** + * Get the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be + * set if agent pool mode is not Gateway. + * + * @return the gatewayProfile value. + */ + public AgentPoolGatewayProfile gatewayProfile() { + return this.gatewayProfile; + } + + /** + * Set the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be + * set if agent pool mode is not Gateway. + * + * @param gatewayProfile the gatewayProfile value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withGatewayProfile(AgentPoolGatewayProfile gatewayProfile) { + this.gatewayProfile = gatewayProfile; + return this; + } + + /** + * Get the virtualMachinesProfile property: Specifications on VirtualMachines agent pool. + * + * @return the virtualMachinesProfile value. + */ + public VirtualMachinesProfile virtualMachinesProfile() { + return this.virtualMachinesProfile; + } + + /** + * Set the virtualMachinesProfile property: Specifications on VirtualMachines agent pool. + * + * @param virtualMachinesProfile the virtualMachinesProfile value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties + withVirtualMachinesProfile(VirtualMachinesProfile virtualMachinesProfile) { + this.virtualMachinesProfile = virtualMachinesProfile; + return this; + } + + /** + * Get the virtualMachineNodesStatus property: The status of nodes in a VirtualMachines agent pool. + * + * @return the virtualMachineNodesStatus value. + */ + public List virtualMachineNodesStatus() { + return this.virtualMachineNodesStatus; + } + + /** + * Set the virtualMachineNodesStatus property: The status of nodes in a VirtualMachines agent pool. + * + * @param virtualMachineNodesStatus the virtualMachineNodesStatus value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties + withVirtualMachineNodesStatus(List virtualMachineNodesStatus) { + this.virtualMachineNodesStatus = virtualMachineNodesStatus; + return this; + } + + /** + * Get the status property: Contains read-only information about the Agent Pool. + * + * @return the status value. + */ + public AgentPoolStatus status() { + return this.status; + } + + /** + * Set the status property: Contains read-only information about the Agent Pool. + * + * @param status the status value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withStatus(AgentPoolStatus status) { + this.status = status; + return this; + } + + /** + * Get the localDnsProfile property: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS + * helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see + * aka.ms/aks/localdns. + * + * @return the localDnsProfile value. + */ + public LocalDnsProfile localDnsProfile() { + return this.localDnsProfile; + } + + /** + * Set the localDnsProfile property: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS + * helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see + * aka.ms/aks/localdns. + * + * @param localDnsProfile the localDnsProfile value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withLocalDnsProfile(LocalDnsProfile localDnsProfile) { + this.localDnsProfile = localDnsProfile; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (upgradeSettings() != null) { + upgradeSettings().validate(); + } + if (powerState() != null) { + powerState().validate(); + } + if (kubeletConfig() != null) { + kubeletConfig().validate(); + } + if (linuxOSConfig() != null) { + linuxOSConfig().validate(); + } + if (creationData() != null) { + creationData().validate(); + } + if (networkProfile() != null) { + networkProfile().validate(); + } + if (windowsProfile() != null) { + windowsProfile().validate(); + } + if (securityProfile() != null) { + securityProfile().validate(); + } + if (gpuProfile() != null) { + gpuProfile().validate(); + } + if (gatewayProfile() != null) { + gatewayProfile().validate(); + } + if (virtualMachinesProfile() != null) { + virtualMachinesProfile().validate(); + } + if (virtualMachineNodesStatus() != null) { + virtualMachineNodesStatus().forEach(e -> e.validate()); + } + if (status() != null) { + status().validate(); + } + if (localDnsProfile() != null) { + localDnsProfile().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeStringField("vmSize", this.vmSize); + jsonWriter.writeNumberField("osDiskSizeGB", this.osDiskSizeGB); + jsonWriter.writeStringField("osDiskType", this.osDiskType == null ? null : this.osDiskType.toString()); + jsonWriter.writeStringField("kubeletDiskType", + this.kubeletDiskType == null ? null : this.kubeletDiskType.toString()); + jsonWriter.writeStringField("workloadRuntime", + this.workloadRuntime == null ? null : this.workloadRuntime.toString()); + jsonWriter.writeStringField("messageOfTheDay", this.messageOfTheDay); + jsonWriter.writeStringField("vnetSubnetID", this.vnetSubnetId); + jsonWriter.writeStringField("podSubnetID", this.podSubnetId); + jsonWriter.writeStringField("podIPAllocationMode", + this.podIpAllocationMode == null ? null : this.podIpAllocationMode.toString()); + jsonWriter.writeNumberField("maxPods", this.maxPods); + jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); + jsonWriter.writeStringField("osSKU", this.osSku == null ? null : this.osSku.toString()); + jsonWriter.writeNumberField("maxCount", this.maxCount); + jsonWriter.writeNumberField("minCount", this.minCount); + jsonWriter.writeBooleanField("enableAutoScaling", this.enableAutoScaling); + jsonWriter.writeStringField("scaleDownMode", this.scaleDownMode == null ? null : this.scaleDownMode.toString()); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeStringField("orchestratorVersion", this.orchestratorVersion); + jsonWriter.writeJsonField("upgradeSettings", this.upgradeSettings); + jsonWriter.writeJsonField("powerState", this.powerState); + jsonWriter.writeArrayField("availabilityZones", this.availabilityZones, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("enableNodePublicIP", this.enableNodePublicIp); + jsonWriter.writeStringField("nodePublicIPPrefixID", this.nodePublicIpPrefixId); + jsonWriter.writeStringField("scaleSetPriority", + this.scaleSetPriority == null ? null : this.scaleSetPriority.toString()); + jsonWriter.writeStringField("scaleSetEvictionPolicy", + this.scaleSetEvictionPolicy == null ? null : this.scaleSetEvictionPolicy.toString()); + jsonWriter.writeNumberField("spotMaxPrice", this.spotMaxPrice); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("nodeLabels", this.nodeLabels, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("nodeTaints", this.nodeTaints, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("proximityPlacementGroupID", this.proximityPlacementGroupId); + jsonWriter.writeJsonField("kubeletConfig", this.kubeletConfig); + jsonWriter.writeJsonField("linuxOSConfig", this.linuxOSConfig); + jsonWriter.writeBooleanField("enableEncryptionAtHost", this.enableEncryptionAtHost); + jsonWriter.writeBooleanField("enableUltraSSD", this.enableUltraSsd); + jsonWriter.writeBooleanField("enableFIPS", this.enableFips); + jsonWriter.writeStringField("gpuInstanceProfile", + this.gpuInstanceProfile == null ? null : this.gpuInstanceProfile.toString()); + jsonWriter.writeJsonField("creationData", this.creationData); + jsonWriter.writeStringField("capacityReservationGroupID", this.capacityReservationGroupId); + jsonWriter.writeStringField("hostGroupID", this.hostGroupId); + jsonWriter.writeJsonField("networkProfile", this.networkProfile); + jsonWriter.writeJsonField("windowsProfile", this.windowsProfile); + jsonWriter.writeJsonField("securityProfile", this.securityProfile); + jsonWriter.writeJsonField("gpuProfile", this.gpuProfile); + jsonWriter.writeJsonField("gatewayProfile", this.gatewayProfile); + jsonWriter.writeJsonField("virtualMachinesProfile", this.virtualMachinesProfile); + jsonWriter.writeArrayField("virtualMachineNodesStatus", this.virtualMachineNodesStatus, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("status", this.status); + jsonWriter.writeJsonField("localDNSProfile", this.localDnsProfile); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterAgentPoolProfileProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterAgentPoolProfileProperties 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 ManagedClusterAgentPoolProfileProperties. + */ + public static ManagedClusterAgentPoolProfileProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterAgentPoolProfileProperties deserializedManagedClusterAgentPoolProfileProperties + = new ManagedClusterAgentPoolProfileProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("eTag".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.etag = reader.getString(); + } else if ("count".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.count = reader.getNullable(JsonReader::getInt); + } else if ("vmSize".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.vmSize = reader.getString(); + } else if ("osDiskSizeGB".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.osDiskSizeGB + = reader.getNullable(JsonReader::getInt); + } else if ("osDiskType".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.osDiskType + = OSDiskType.fromString(reader.getString()); + } else if ("kubeletDiskType".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.kubeletDiskType + = KubeletDiskType.fromString(reader.getString()); + } else if ("workloadRuntime".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.workloadRuntime + = WorkloadRuntime.fromString(reader.getString()); + } else if ("messageOfTheDay".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.messageOfTheDay = reader.getString(); + } else if ("vnetSubnetID".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.vnetSubnetId = reader.getString(); + } else if ("podSubnetID".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.podSubnetId = reader.getString(); + } else if ("podIPAllocationMode".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.podIpAllocationMode + = PodIpAllocationMode.fromString(reader.getString()); + } else if ("maxPods".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.maxPods + = reader.getNullable(JsonReader::getInt); + } else if ("osType".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.osType = OSType.fromString(reader.getString()); + } else if ("osSKU".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.osSku = OSSku.fromString(reader.getString()); + } else if ("maxCount".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.maxCount + = reader.getNullable(JsonReader::getInt); + } else if ("minCount".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.minCount + = reader.getNullable(JsonReader::getInt); + } else if ("enableAutoScaling".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.enableAutoScaling + = reader.getNullable(JsonReader::getBoolean); + } else if ("scaleDownMode".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.scaleDownMode + = ScaleDownMode.fromString(reader.getString()); + } else if ("type".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.type + = AgentPoolType.fromString(reader.getString()); + } else if ("mode".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.mode + = AgentPoolMode.fromString(reader.getString()); + } else if ("orchestratorVersion".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.orchestratorVersion = reader.getString(); + } else if ("currentOrchestratorVersion".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.currentOrchestratorVersion + = reader.getString(); + } else if ("nodeImageVersion".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.nodeImageVersion = reader.getString(); + } else if ("upgradeSettings".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.upgradeSettings + = AgentPoolUpgradeSettings.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.provisioningState = reader.getString(); + } else if ("powerState".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.powerState = PowerState.fromJson(reader); + } else if ("availabilityZones".equals(fieldName)) { + List availabilityZones = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedClusterAgentPoolProfileProperties.availabilityZones = availabilityZones; + } else if ("enableNodePublicIP".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.enableNodePublicIp + = reader.getNullable(JsonReader::getBoolean); + } else if ("nodePublicIPPrefixID".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.nodePublicIpPrefixId = reader.getString(); + } else if ("scaleSetPriority".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.scaleSetPriority + = ScaleSetPriority.fromString(reader.getString()); + } else if ("scaleSetEvictionPolicy".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.scaleSetEvictionPolicy + = ScaleSetEvictionPolicy.fromString(reader.getString()); + } else if ("spotMaxPrice".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.spotMaxPrice + = reader.getNullable(JsonReader::getFloat); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedManagedClusterAgentPoolProfileProperties.tags = tags; + } else if ("nodeLabels".equals(fieldName)) { + Map nodeLabels = reader.readMap(reader1 -> reader1.getString()); + deserializedManagedClusterAgentPoolProfileProperties.nodeLabels = nodeLabels; + } else if ("nodeTaints".equals(fieldName)) { + List nodeTaints = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedClusterAgentPoolProfileProperties.nodeTaints = nodeTaints; + } else if ("proximityPlacementGroupID".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.proximityPlacementGroupId = reader.getString(); + } else if ("kubeletConfig".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.kubeletConfig = KubeletConfig.fromJson(reader); + } else if ("linuxOSConfig".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.linuxOSConfig = LinuxOSConfig.fromJson(reader); + } else if ("enableEncryptionAtHost".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.enableEncryptionAtHost + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableUltraSSD".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.enableUltraSsd + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableFIPS".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.enableFips + = reader.getNullable(JsonReader::getBoolean); + } else if ("gpuInstanceProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.gpuInstanceProfile + = GpuInstanceProfile.fromString(reader.getString()); + } else if ("creationData".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.creationData = CreationData.fromJson(reader); + } else if ("capacityReservationGroupID".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.capacityReservationGroupId + = reader.getString(); + } else if ("hostGroupID".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.hostGroupId = reader.getString(); + } else if ("networkProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.networkProfile + = AgentPoolNetworkProfile.fromJson(reader); + } else if ("windowsProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.windowsProfile + = AgentPoolWindowsProfile.fromJson(reader); + } else if ("securityProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.securityProfile + = AgentPoolSecurityProfile.fromJson(reader); + } else if ("gpuProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.gpuProfile = GpuProfile.fromJson(reader); + } else if ("gatewayProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.gatewayProfile + = AgentPoolGatewayProfile.fromJson(reader); + } else if ("virtualMachinesProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.virtualMachinesProfile + = VirtualMachinesProfile.fromJson(reader); + } else if ("virtualMachineNodesStatus".equals(fieldName)) { + List virtualMachineNodesStatus + = reader.readArray(reader1 -> VirtualMachineNodes.fromJson(reader1)); + deserializedManagedClusterAgentPoolProfileProperties.virtualMachineNodesStatus + = virtualMachineNodesStatus; + } else if ("status".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.status = AgentPoolStatus.fromJson(reader); + } else if ("localDNSProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.localDnsProfile + = LocalDnsProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterAgentPoolProfileProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java new file mode 100644 index 000000000000..18a411bb1328 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java @@ -0,0 +1,1338 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.ClusterUpgradeSettings; +import com.azure.resourcemanager.containerservice.models.ContainerServiceLinuxProfile; +import com.azure.resourcemanager.containerservice.models.ContainerServiceNetworkProfile; +import com.azure.resourcemanager.containerservice.models.ExtendedLocation; +import com.azure.resourcemanager.containerservice.models.KubernetesSupportPlan; +import com.azure.resourcemanager.containerservice.models.ManagedClusterAIToolchainOperatorProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterAddonProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterApiServerAccessProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterAutoUpgradeProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterAzureMonitorProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterBootstrapProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterHttpProxyConfig; +import com.azure.resourcemanager.containerservice.models.ManagedClusterIdentity; +import com.azure.resourcemanager.containerservice.models.ManagedClusterIngressProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterMetricsProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterNodeProvisioningProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterNodeResourceGroupProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterOidcIssuerProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterPodIdentityProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterPropertiesAutoScalerProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterSecurityProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterSku; +import com.azure.resourcemanager.containerservice.models.ManagedClusterStatus; +import com.azure.resourcemanager.containerservice.models.ManagedClusterStorageProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterWindowsProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterWorkloadAutoScalerProfile; +import com.azure.resourcemanager.containerservice.models.PowerState; +import com.azure.resourcemanager.containerservice.models.PublicNetworkAccess; +import com.azure.resourcemanager.containerservice.models.ServiceMeshProfile; +import com.azure.resourcemanager.containerservice.models.UserAssignedIdentity; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Managed cluster. + */ +@Fluent +public final class ManagedClusterInner extends Resource { + /* + * Properties of a managed cluster. + */ + private ManagedClusterProperties innerProperties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String etag; + + /* + * The managed cluster SKU. + */ + private ManagedClusterSku sku; + + /* + * The extended location of the Virtual Machine. + */ + private ExtendedLocation extendedLocation; + + /* + * The identity of the managed cluster, if configured. + */ + private ManagedClusterIdentity identity; + + /* + * This is primarily used to expose different UI experiences in the portal for different kinds + */ + private String kind; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedClusterInner class. + */ + public ManagedClusterInner() { + } + + /** + * Get the innerProperties property: Properties of a managed cluster. + * + * @return the innerProperties value. + */ + private ManagedClusterProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the etag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Get the sku property: The managed cluster SKU. + * + * @return the sku value. + */ + public ManagedClusterSku sku() { + return this.sku; + } + + /** + * Set the sku property: The managed cluster SKU. + * + * @param sku the sku value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withSku(ManagedClusterSku sku) { + this.sku = sku; + 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 ManagedClusterInner object itself. + */ + public ManagedClusterInner withExtendedLocation(ExtendedLocation extendedLocation) { + this.extendedLocation = extendedLocation; + return this; + } + + /** + * Get the identity property: The identity of the managed cluster, if configured. + * + * @return the identity value. + */ + public ManagedClusterIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The identity of the managed cluster, if configured. + * + * @param identity the identity value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withIdentity(ManagedClusterIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the kind property: This is primarily used to expose different UI experiences in the portal for different + * kinds. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: This is primarily used to expose different UI experiences in the portal for different + * kinds. + * + * @param kind the kind value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: The current provisioning state. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the powerState property: The Power State of the cluster. + * + * @return the powerState value. + */ + public PowerState powerState() { + return this.innerProperties() == null ? null : this.innerProperties().powerState(); + } + + /** + * Get the maxAgentPools property: The max number of agent pools for the managed cluster. + * + * @return the maxAgentPools value. + */ + public Integer maxAgentPools() { + return this.innerProperties() == null ? null : this.innerProperties().maxAgentPools(); + } + + /** + * Get the kubernetesVersion property: The version of Kubernetes specified by the user. Both patch version + * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When + * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the + * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an + * upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor + * versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, + * upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not + * allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.innerProperties() == null ? null : this.innerProperties().kubernetesVersion(); + } + + /** + * Set the kubernetesVersion property: The version of Kubernetes specified by the user. Both patch version + * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When + * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the + * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an + * upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor + * versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, + * upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not + * allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. + * + * @param kubernetesVersion the kubernetesVersion value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withKubernetesVersion(String kubernetesVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withKubernetesVersion(kubernetesVersion); + return this; + } + + /** + * Get the currentKubernetesVersion property: The version of Kubernetes the Managed Cluster is running. If + * kubernetesVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to + * it. If kubernetesVersion was <major.minor>, this field will contain the full <major.minor.patch> + * version being used. + * + * @return the currentKubernetesVersion value. + */ + public String currentKubernetesVersion() { + return this.innerProperties() == null ? null : this.innerProperties().currentKubernetesVersion(); + } + + /** + * Get the dnsPrefix property: The DNS prefix of the Managed Cluster. This cannot be updated once the Managed + * Cluster has been created. + * + * @return the dnsPrefix value. + */ + public String dnsPrefix() { + return this.innerProperties() == null ? null : this.innerProperties().dnsPrefix(); + } + + /** + * Set the dnsPrefix property: The DNS prefix of the Managed Cluster. This cannot be updated once the Managed + * Cluster has been created. + * + * @param dnsPrefix the dnsPrefix value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withDnsPrefix(String dnsPrefix) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withDnsPrefix(dnsPrefix); + return this; + } + + /** + * Get the fqdnSubdomain property: The FQDN subdomain of the private cluster with custom private dns zone. This + * cannot be updated once the Managed Cluster has been created. + * + * @return the fqdnSubdomain value. + */ + public String fqdnSubdomain() { + return this.innerProperties() == null ? null : this.innerProperties().fqdnSubdomain(); + } + + /** + * Set the fqdnSubdomain property: The FQDN subdomain of the private cluster with custom private dns zone. This + * cannot be updated once the Managed Cluster has been created. + * + * @param fqdnSubdomain the fqdnSubdomain value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withFqdnSubdomain(String fqdnSubdomain) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withFqdnSubdomain(fqdnSubdomain); + return this; + } + + /** + * Get the fqdn property: The FQDN of the master pool. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.innerProperties() == null ? null : this.innerProperties().fqdn(); + } + + /** + * Get the privateFqdn property: The FQDN of private cluster. + * + * @return the privateFqdn value. + */ + public String privateFqdn() { + return this.innerProperties() == null ? null : this.innerProperties().privateFqdn(); + } + + /** + * Get the azurePortalFqdn property: The special FQDN used by the Azure Portal to access the Managed Cluster. This + * FQDN is for use only by the Azure Portal and should not be used by other clients. The Azure Portal requires + * certain Cross-Origin Resource Sharing (CORS) headers to be sent in some responses, which Kubernetes APIServer + * doesn't handle by default. This special FQDN supports CORS, allowing the Azure Portal to function properly. + * + * @return the azurePortalFqdn value. + */ + public String azurePortalFqdn() { + return this.innerProperties() == null ? null : this.innerProperties().azurePortalFqdn(); + } + + /** + * Get the agentPoolProfiles property: The agent pool properties. + * + * @return the agentPoolProfiles value. + */ + public List agentPoolProfiles() { + return this.innerProperties() == null ? null : this.innerProperties().agentPoolProfiles(); + } + + /** + * Set the agentPoolProfiles property: The agent pool properties. + * + * @param agentPoolProfiles the agentPoolProfiles value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withAgentPoolProfiles(List agentPoolProfiles) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withAgentPoolProfiles(agentPoolProfiles); + return this; + } + + /** + * Get the linuxProfile property: The profile for Linux VMs in the Managed Cluster. + * + * @return the linuxProfile value. + */ + public ContainerServiceLinuxProfile linuxProfile() { + return this.innerProperties() == null ? null : this.innerProperties().linuxProfile(); + } + + /** + * Set the linuxProfile property: The profile for Linux VMs in the Managed Cluster. + * + * @param linuxProfile the linuxProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withLinuxProfile(ContainerServiceLinuxProfile linuxProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withLinuxProfile(linuxProfile); + return this; + } + + /** + * Get the windowsProfile property: The profile for Windows VMs in the Managed Cluster. + * + * @return the windowsProfile value. + */ + public ManagedClusterWindowsProfile windowsProfile() { + return this.innerProperties() == null ? null : this.innerProperties().windowsProfile(); + } + + /** + * Set the windowsProfile property: The profile for Windows VMs in the Managed Cluster. + * + * @param windowsProfile the windowsProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withWindowsProfile(ManagedClusterWindowsProfile windowsProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withWindowsProfile(windowsProfile); + return this; + } + + /** + * Get the servicePrincipalProfile property: Information about a service principal identity for the cluster to use + * for manipulating Azure APIs. + * + * @return the servicePrincipalProfile value. + */ + public ManagedClusterServicePrincipalProfile servicePrincipalProfile() { + return this.innerProperties() == null ? null : this.innerProperties().servicePrincipalProfile(); + } + + /** + * Set the servicePrincipalProfile property: Information about a service principal identity for the cluster to use + * for manipulating Azure APIs. + * + * @param servicePrincipalProfile the servicePrincipalProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner + withServicePrincipalProfile(ManagedClusterServicePrincipalProfile servicePrincipalProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withServicePrincipalProfile(servicePrincipalProfile); + return this; + } + + /** + * Get the addonProfiles property: The profile of managed cluster add-on. + * + * @return the addonProfiles value. + */ + public Map addonProfiles() { + return this.innerProperties() == null ? null : this.innerProperties().addonProfiles(); + } + + /** + * Set the addonProfiles property: The profile of managed cluster add-on. + * + * @param addonProfiles the addonProfiles value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withAddonProfiles(Map addonProfiles) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withAddonProfiles(addonProfiles); + return this; + } + + /** + * Get the podIdentityProfile property: The pod identity profile of the Managed Cluster. See [use AAD pod + * identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on AAD pod identity + * integration. + * + * @return the podIdentityProfile value. + */ + public ManagedClusterPodIdentityProfile podIdentityProfile() { + return this.innerProperties() == null ? null : this.innerProperties().podIdentityProfile(); + } + + /** + * Set the podIdentityProfile property: The pod identity profile of the Managed Cluster. See [use AAD pod + * identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on AAD pod identity + * integration. + * + * @param podIdentityProfile the podIdentityProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withPodIdentityProfile(ManagedClusterPodIdentityProfile podIdentityProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withPodIdentityProfile(podIdentityProfile); + return this; + } + + /** + * Get the oidcIssuerProfile property: The OIDC issuer profile of the Managed Cluster. + * + * @return the oidcIssuerProfile value. + */ + public ManagedClusterOidcIssuerProfile oidcIssuerProfile() { + return this.innerProperties() == null ? null : this.innerProperties().oidcIssuerProfile(); + } + + /** + * Set the oidcIssuerProfile property: The OIDC issuer profile of the Managed Cluster. + * + * @param oidcIssuerProfile the oidcIssuerProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withOidcIssuerProfile(ManagedClusterOidcIssuerProfile oidcIssuerProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withOidcIssuerProfile(oidcIssuerProfile); + return this; + } + + /** + * Get the nodeResourceGroup property: The name of the resource group containing agent pool nodes. + * + * @return the nodeResourceGroup value. + */ + public String nodeResourceGroup() { + return this.innerProperties() == null ? null : this.innerProperties().nodeResourceGroup(); + } + + /** + * Set the nodeResourceGroup property: The name of the resource group containing agent pool nodes. + * + * @param nodeResourceGroup the nodeResourceGroup value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withNodeResourceGroup(String nodeResourceGroup) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withNodeResourceGroup(nodeResourceGroup); + return this; + } + + /** + * Get the nodeResourceGroupProfile property: Profile of the node resource group configuration. + * + * @return the nodeResourceGroupProfile value. + */ + public ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile() { + return this.innerProperties() == null ? null : this.innerProperties().nodeResourceGroupProfile(); + } + + /** + * Set the nodeResourceGroupProfile property: Profile of the node resource group configuration. + * + * @param nodeResourceGroupProfile the nodeResourceGroupProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner + withNodeResourceGroupProfile(ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withNodeResourceGroupProfile(nodeResourceGroupProfile); + return this; + } + + /** + * Get the enableRbac property: Whether to enable Kubernetes Role-Based Access Control. + * + * @return the enableRbac value. + */ + public Boolean enableRbac() { + return this.innerProperties() == null ? null : this.innerProperties().enableRbac(); + } + + /** + * Set the enableRbac property: Whether to enable Kubernetes Role-Based Access Control. + * + * @param enableRbac the enableRbac value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withEnableRbac(Boolean enableRbac) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withEnableRbac(enableRbac); + return this; + } + + /** + * Get the supportPlan property: The support plan for the Managed Cluster. If unspecified, the default is + * 'KubernetesOfficial'. + * + * @return the supportPlan value. + */ + public KubernetesSupportPlan supportPlan() { + return this.innerProperties() == null ? null : this.innerProperties().supportPlan(); + } + + /** + * Set the supportPlan property: The support plan for the Managed Cluster. If unspecified, the default is + * 'KubernetesOfficial'. + * + * @param supportPlan the supportPlan value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withSupportPlan(KubernetesSupportPlan supportPlan) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withSupportPlan(supportPlan); + return this; + } + + /** + * Get the networkProfile property: The network configuration profile. + * + * @return the networkProfile value. + */ + public ContainerServiceNetworkProfile networkProfile() { + return this.innerProperties() == null ? null : this.innerProperties().networkProfile(); + } + + /** + * Set the networkProfile property: The network configuration profile. + * + * @param networkProfile the networkProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withNetworkProfile(ContainerServiceNetworkProfile networkProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withNetworkProfile(networkProfile); + return this; + } + + /** + * Get the aadProfile property: The Azure Active Directory configuration. + * + * @return the aadProfile value. + */ + public ManagedClusterAadProfile aadProfile() { + return this.innerProperties() == null ? null : this.innerProperties().aadProfile(); + } + + /** + * Set the aadProfile property: The Azure Active Directory configuration. + * + * @param aadProfile the aadProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withAadProfile(ManagedClusterAadProfile aadProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withAadProfile(aadProfile); + return this; + } + + /** + * Get the autoUpgradeProfile property: The auto upgrade configuration. + * + * @return the autoUpgradeProfile value. + */ + public ManagedClusterAutoUpgradeProfile autoUpgradeProfile() { + return this.innerProperties() == null ? null : this.innerProperties().autoUpgradeProfile(); + } + + /** + * Set the autoUpgradeProfile property: The auto upgrade configuration. + * + * @param autoUpgradeProfile the autoUpgradeProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withAutoUpgradeProfile(ManagedClusterAutoUpgradeProfile autoUpgradeProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withAutoUpgradeProfile(autoUpgradeProfile); + return this; + } + + /** + * Get the upgradeSettings property: Settings for upgrading a cluster. + * + * @return the upgradeSettings value. + */ + public ClusterUpgradeSettings upgradeSettings() { + return this.innerProperties() == null ? null : this.innerProperties().upgradeSettings(); + } + + /** + * Set the upgradeSettings property: Settings for upgrading a cluster. + * + * @param upgradeSettings the upgradeSettings value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withUpgradeSettings(ClusterUpgradeSettings upgradeSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withUpgradeSettings(upgradeSettings); + return this; + } + + /** + * Get the autoScalerProfile property: Parameters to be applied to the cluster-autoscaler when enabled. + * + * @return the autoScalerProfile value. + */ + public ManagedClusterPropertiesAutoScalerProfile autoScalerProfile() { + return this.innerProperties() == null ? null : this.innerProperties().autoScalerProfile(); + } + + /** + * Set the autoScalerProfile property: Parameters to be applied to the cluster-autoscaler when enabled. + * + * @param autoScalerProfile the autoScalerProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withAutoScalerProfile(ManagedClusterPropertiesAutoScalerProfile autoScalerProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withAutoScalerProfile(autoScalerProfile); + return this; + } + + /** + * Get the apiServerAccessProfile property: The access profile for managed cluster API server. + * + * @return the apiServerAccessProfile value. + */ + public ManagedClusterApiServerAccessProfile apiServerAccessProfile() { + return this.innerProperties() == null ? null : this.innerProperties().apiServerAccessProfile(); + } + + /** + * Set the apiServerAccessProfile property: The access profile for managed cluster API server. + * + * @param apiServerAccessProfile the apiServerAccessProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withApiServerAccessProfile(ManagedClusterApiServerAccessProfile apiServerAccessProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withApiServerAccessProfile(apiServerAccessProfile); + return this; + } + + /** + * Get the diskEncryptionSetId property: The Resource ID of the disk encryption set to use for enabling encryption + * at rest. This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. + * + * @return the diskEncryptionSetId value. + */ + public String diskEncryptionSetId() { + return this.innerProperties() == null ? null : this.innerProperties().diskEncryptionSetId(); + } + + /** + * Set the diskEncryptionSetId property: The Resource ID of the disk encryption set to use for enabling encryption + * at rest. This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. + * + * @param diskEncryptionSetId the diskEncryptionSetId value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withDiskEncryptionSetId(String diskEncryptionSetId) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withDiskEncryptionSetId(diskEncryptionSetId); + return this; + } + + /** + * Get the identityProfile property: The user identity associated with the managed cluster. This identity will be + * used by the kubelet. Only one user assigned identity is allowed. The only accepted key is "kubeletidentity", with + * value of "resourceId": + * "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". + * + * @return the identityProfile value. + */ + public Map identityProfile() { + return this.innerProperties() == null ? null : this.innerProperties().identityProfile(); + } + + /** + * Set the identityProfile property: The user identity associated with the managed cluster. This identity will be + * used by the kubelet. Only one user assigned identity is allowed. The only accepted key is "kubeletidentity", with + * value of "resourceId": + * "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". + * + * @param identityProfile the identityProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withIdentityProfile(Map identityProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withIdentityProfile(identityProfile); + return this; + } + + /** + * Get the privateLinkResources property: Private link resources associated with the cluster. + * + * @return the privateLinkResources value. + */ + public List privateLinkResources() { + return this.innerProperties() == null ? null : this.innerProperties().privateLinkResources(); + } + + /** + * Set the privateLinkResources property: Private link resources associated with the cluster. + * + * @param privateLinkResources the privateLinkResources value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withPrivateLinkResources(List privateLinkResources) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withPrivateLinkResources(privateLinkResources); + return this; + } + + /** + * Get the disableLocalAccounts property: If local accounts should be disabled on the Managed Cluster. If set to + * true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters + * that are AAD enabled. For more details see [disable local + * accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). + * + * @return the disableLocalAccounts value. + */ + public Boolean disableLocalAccounts() { + return this.innerProperties() == null ? null : this.innerProperties().disableLocalAccounts(); + } + + /** + * Set the disableLocalAccounts property: If local accounts should be disabled on the Managed Cluster. If set to + * true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters + * that are AAD enabled. For more details see [disable local + * accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). + * + * @param disableLocalAccounts the disableLocalAccounts value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withDisableLocalAccounts(Boolean disableLocalAccounts) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withDisableLocalAccounts(disableLocalAccounts); + return this; + } + + /** + * Get the httpProxyConfig property: Configurations for provisioning the cluster with HTTP proxy servers. + * + * @return the httpProxyConfig value. + */ + public ManagedClusterHttpProxyConfig httpProxyConfig() { + return this.innerProperties() == null ? null : this.innerProperties().httpProxyConfig(); + } + + /** + * Set the httpProxyConfig property: Configurations for provisioning the cluster with HTTP proxy servers. + * + * @param httpProxyConfig the httpProxyConfig value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withHttpProxyConfig(ManagedClusterHttpProxyConfig httpProxyConfig) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withHttpProxyConfig(httpProxyConfig); + return this; + } + + /** + * Get the securityProfile property: Security profile for the managed cluster. + * + * @return the securityProfile value. + */ + public ManagedClusterSecurityProfile securityProfile() { + return this.innerProperties() == null ? null : this.innerProperties().securityProfile(); + } + + /** + * Set the securityProfile property: Security profile for the managed cluster. + * + * @param securityProfile the securityProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withSecurityProfile(ManagedClusterSecurityProfile securityProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withSecurityProfile(securityProfile); + return this; + } + + /** + * Get the storageProfile property: Storage profile for the managed cluster. + * + * @return the storageProfile value. + */ + public ManagedClusterStorageProfile storageProfile() { + return this.innerProperties() == null ? null : this.innerProperties().storageProfile(); + } + + /** + * Set the storageProfile property: Storage profile for the managed cluster. + * + * @param storageProfile the storageProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withStorageProfile(ManagedClusterStorageProfile storageProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withStorageProfile(storageProfile); + return this; + } + + /** + * Get the ingressProfile property: Ingress profile for the managed cluster. + * + * @return the ingressProfile value. + */ + public ManagedClusterIngressProfile ingressProfile() { + return this.innerProperties() == null ? null : this.innerProperties().ingressProfile(); + } + + /** + * Set the ingressProfile property: Ingress profile for the managed cluster. + * + * @param ingressProfile the ingressProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withIngressProfile(ManagedClusterIngressProfile ingressProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withIngressProfile(ingressProfile); + return this; + } + + /** + * Get the publicNetworkAccess property: PublicNetworkAccess of the managedCluster. Allow or deny public network + * access for AKS. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + } + + /** + * Set the publicNetworkAccess property: PublicNetworkAccess of the managedCluster. Allow or deny public network + * access for AKS. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + return this; + } + + /** + * Get the workloadAutoScalerProfile property: Workload Auto-scaler profile for the managed cluster. + * + * @return the workloadAutoScalerProfile value. + */ + public ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile() { + return this.innerProperties() == null ? null : this.innerProperties().workloadAutoScalerProfile(); + } + + /** + * Set the workloadAutoScalerProfile property: Workload Auto-scaler profile for the managed cluster. + * + * @param workloadAutoScalerProfile the workloadAutoScalerProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner + withWorkloadAutoScalerProfile(ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withWorkloadAutoScalerProfile(workloadAutoScalerProfile); + return this; + } + + /** + * Get the azureMonitorProfile property: Azure Monitor addon profiles for monitoring the managed cluster. + * + * @return the azureMonitorProfile value. + */ + public ManagedClusterAzureMonitorProfile azureMonitorProfile() { + return this.innerProperties() == null ? null : this.innerProperties().azureMonitorProfile(); + } + + /** + * Set the azureMonitorProfile property: Azure Monitor addon profiles for monitoring the managed cluster. + * + * @param azureMonitorProfile the azureMonitorProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withAzureMonitorProfile(ManagedClusterAzureMonitorProfile azureMonitorProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withAzureMonitorProfile(azureMonitorProfile); + return this; + } + + /** + * Get the serviceMeshProfile property: Service mesh profile for a managed cluster. + * + * @return the serviceMeshProfile value. + */ + public ServiceMeshProfile serviceMeshProfile() { + return this.innerProperties() == null ? null : this.innerProperties().serviceMeshProfile(); + } + + /** + * Set the serviceMeshProfile property: Service mesh profile for a managed cluster. + * + * @param serviceMeshProfile the serviceMeshProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withServiceMeshProfile(ServiceMeshProfile serviceMeshProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withServiceMeshProfile(serviceMeshProfile); + return this; + } + + /** + * Get the resourceUid property: The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds + * (i.e: create, delete, create sequence). + * + * @return the resourceUid value. + */ + public String resourceUid() { + return this.innerProperties() == null ? null : this.innerProperties().resourceUid(); + } + + /** + * Get the metricsProfile property: Optional cluster metrics configuration. + * + * @return the metricsProfile value. + */ + public ManagedClusterMetricsProfile metricsProfile() { + return this.innerProperties() == null ? null : this.innerProperties().metricsProfile(); + } + + /** + * Set the metricsProfile property: Optional cluster metrics configuration. + * + * @param metricsProfile the metricsProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withMetricsProfile(ManagedClusterMetricsProfile metricsProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withMetricsProfile(metricsProfile); + return this; + } + + /** + * Get the nodeProvisioningProfile property: Node provisioning settings that apply to the whole cluster. + * + * @return the nodeProvisioningProfile value. + */ + public ManagedClusterNodeProvisioningProfile nodeProvisioningProfile() { + return this.innerProperties() == null ? null : this.innerProperties().nodeProvisioningProfile(); + } + + /** + * Set the nodeProvisioningProfile property: Node provisioning settings that apply to the whole cluster. + * + * @param nodeProvisioningProfile the nodeProvisioningProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner + withNodeProvisioningProfile(ManagedClusterNodeProvisioningProfile nodeProvisioningProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withNodeProvisioningProfile(nodeProvisioningProfile); + return this; + } + + /** + * Get the bootstrapProfile property: Profile of the cluster bootstrap configuration. + * + * @return the bootstrapProfile value. + */ + public ManagedClusterBootstrapProfile bootstrapProfile() { + return this.innerProperties() == null ? null : this.innerProperties().bootstrapProfile(); + } + + /** + * Set the bootstrapProfile property: Profile of the cluster bootstrap configuration. + * + * @param bootstrapProfile the bootstrapProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withBootstrapProfile(ManagedClusterBootstrapProfile bootstrapProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withBootstrapProfile(bootstrapProfile); + return this; + } + + /** + * Get the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. + * + * @return the aiToolchainOperatorProfile value. + */ + public ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile() { + return this.innerProperties() == null ? null : this.innerProperties().aiToolchainOperatorProfile(); + } + + /** + * Set the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. + * + * @param aiToolchainOperatorProfile the aiToolchainOperatorProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner + withAiToolchainOperatorProfile(ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withAiToolchainOperatorProfile(aiToolchainOperatorProfile); + return this; + } + + /** + * Get the status property: Contains read-only information about the Managed Cluster. + * + * @return the status value. + */ + public ManagedClusterStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Set the status property: Contains read-only information about the Managed Cluster. + * + * @param status the status value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withStatus(ManagedClusterStatus status) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withStatus(status); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + if (sku() != null) { + sku().validate(); + } + if (extendedLocation() != null) { + extendedLocation().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("kind", this.kind); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterInner 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 ManagedClusterInner. + */ + public static ManagedClusterInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterInner deserializedManagedClusterInner = new ManagedClusterInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedClusterInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedClusterInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedClusterInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedManagedClusterInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedManagedClusterInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedManagedClusterInner.innerProperties = ManagedClusterProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedManagedClusterInner.etag = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedManagedClusterInner.sku = ManagedClusterSku.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedManagedClusterInner.extendedLocation = ExtendedLocation.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedManagedClusterInner.identity = ManagedClusterIdentity.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedManagedClusterInner.kind = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedManagedClusterInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java new file mode 100644 index 000000000000..2d3a5904c461 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java @@ -0,0 +1,1465 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.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 com.azure.resourcemanager.containerservice.models.ClusterUpgradeSettings; +import com.azure.resourcemanager.containerservice.models.ContainerServiceLinuxProfile; +import com.azure.resourcemanager.containerservice.models.ContainerServiceNetworkProfile; +import com.azure.resourcemanager.containerservice.models.KubernetesSupportPlan; +import com.azure.resourcemanager.containerservice.models.ManagedClusterAIToolchainOperatorProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterAddonProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterApiServerAccessProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterAutoUpgradeProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterAzureMonitorProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterBootstrapProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterHttpProxyConfig; +import com.azure.resourcemanager.containerservice.models.ManagedClusterIngressProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterMetricsProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterNodeProvisioningProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterNodeResourceGroupProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterOidcIssuerProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterPodIdentityProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterPropertiesAutoScalerProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterSecurityProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterStatus; +import com.azure.resourcemanager.containerservice.models.ManagedClusterStorageProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterWindowsProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterWorkloadAutoScalerProfile; +import com.azure.resourcemanager.containerservice.models.PowerState; +import com.azure.resourcemanager.containerservice.models.PublicNetworkAccess; +import com.azure.resourcemanager.containerservice.models.ServiceMeshProfile; +import com.azure.resourcemanager.containerservice.models.UserAssignedIdentity; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Properties of the managed cluster. + */ +@Fluent +public final class ManagedClusterProperties implements JsonSerializable { + /* + * The current provisioning state. + */ + private String provisioningState; + + /* + * The Power State of the cluster. + */ + private PowerState powerState; + + /* + * The max number of agent pools for the managed cluster. + */ + private Integer maxAgentPools; + + /* + * The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and + * (e.g. 1.20) are supported. When is specified, the latest supported GA patch version + * is chosen automatically. Updating the cluster with the same once it has been created (e.g. 1.14.x + * -> 1.14) will not trigger an upgrade, even if a newer patch version is available. When you upgrade a supported + * AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed sequentially by major + * version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> + * 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for + * more details. + */ + private String kubernetesVersion; + + /* + * The version of Kubernetes the Managed Cluster is running. If kubernetesVersion was a fully specified version + * , this field will be exactly equal to it. If kubernetesVersion was , this field + * will contain the full version being used. + */ + private String currentKubernetesVersion; + + /* + * The DNS prefix of the Managed Cluster. This cannot be updated once the Managed Cluster has been created. + */ + private String dnsPrefix; + + /* + * The FQDN subdomain of the private cluster with custom private dns zone. This cannot be updated once the Managed + * Cluster has been created. + */ + private String fqdnSubdomain; + + /* + * The FQDN of the master pool. + */ + private String fqdn; + + /* + * The FQDN of private cluster. + */ + private String privateFqdn; + + /* + * The special FQDN used by the Azure Portal to access the Managed Cluster. This FQDN is for use only by the Azure + * Portal and should not be used by other clients. The Azure Portal requires certain Cross-Origin Resource Sharing + * (CORS) headers to be sent in some responses, which Kubernetes APIServer doesn't handle by default. This special + * FQDN supports CORS, allowing the Azure Portal to function properly. + */ + private String azurePortalFqdn; + + /* + * The agent pool properties. + */ + private List agentPoolProfiles; + + /* + * The profile for Linux VMs in the Managed Cluster. + */ + private ContainerServiceLinuxProfile linuxProfile; + + /* + * The profile for Windows VMs in the Managed Cluster. + */ + private ManagedClusterWindowsProfile windowsProfile; + + /* + * Information about a service principal identity for the cluster to use for manipulating Azure APIs. + */ + private ManagedClusterServicePrincipalProfile servicePrincipalProfile; + + /* + * The profile of managed cluster add-on. + */ + private Map addonProfiles; + + /* + * The pod identity profile of the Managed Cluster. See [use AAD pod + * identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on AAD pod identity + * integration. + */ + private ManagedClusterPodIdentityProfile podIdentityProfile; + + /* + * The OIDC issuer profile of the Managed Cluster. + */ + private ManagedClusterOidcIssuerProfile oidcIssuerProfile; + + /* + * The name of the resource group containing agent pool nodes. + */ + private String nodeResourceGroup; + + /* + * Profile of the node resource group configuration. + */ + private ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile; + + /* + * Whether to enable Kubernetes Role-Based Access Control. + */ + private Boolean enableRbac; + + /* + * The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'. + */ + private KubernetesSupportPlan supportPlan; + + /* + * The network configuration profile. + */ + private ContainerServiceNetworkProfile networkProfile; + + /* + * The Azure Active Directory configuration. + */ + private ManagedClusterAadProfile aadProfile; + + /* + * The auto upgrade configuration. + */ + private ManagedClusterAutoUpgradeProfile autoUpgradeProfile; + + /* + * Settings for upgrading a cluster. + */ + private ClusterUpgradeSettings upgradeSettings; + + /* + * Parameters to be applied to the cluster-autoscaler when enabled + */ + private ManagedClusterPropertiesAutoScalerProfile autoScalerProfile; + + /* + * The access profile for managed cluster API server. + */ + private ManagedClusterApiServerAccessProfile apiServerAccessProfile; + + /* + * The Resource ID of the disk encryption set to use for enabling encryption at rest. This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/ + * diskEncryptionSets/{encryptionSetName}' + */ + private String diskEncryptionSetId; + + /* + * The user identity associated with the managed cluster. This identity will be used by the kubelet. Only one user + * assigned identity is allowed. The only accepted key is "kubeletidentity", with value of "resourceId": + * "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". + */ + private Map identityProfile; + + /* + * Private link resources associated with the cluster. + */ + private List privateLinkResources; + + /* + * If local accounts should be disabled on the Managed Cluster. If set to true, getting static credentials will be + * disabled for this cluster. This must only be used on Managed Clusters that are AAD enabled. For more details see + * [disable local accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). + */ + private Boolean disableLocalAccounts; + + /* + * Configurations for provisioning the cluster with HTTP proxy servers. + */ + private ManagedClusterHttpProxyConfig httpProxyConfig; + + /* + * Security profile for the managed cluster. + */ + private ManagedClusterSecurityProfile securityProfile; + + /* + * Storage profile for the managed cluster. + */ + private ManagedClusterStorageProfile storageProfile; + + /* + * Ingress profile for the managed cluster. + */ + private ManagedClusterIngressProfile ingressProfile; + + /* + * PublicNetworkAccess of the managedCluster. Allow or deny public network access for AKS + */ + private PublicNetworkAccess publicNetworkAccess; + + /* + * Workload Auto-scaler profile for the managed cluster. + */ + private ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile; + + /* + * Azure Monitor addon profiles for monitoring the managed cluster. + */ + private ManagedClusterAzureMonitorProfile azureMonitorProfile; + + /* + * Service mesh profile for a managed cluster. + */ + private ServiceMeshProfile serviceMeshProfile; + + /* + * The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds (i.e: create, delete, create + * sequence) + */ + private String resourceUid; + + /* + * Optional cluster metrics configuration. + */ + private ManagedClusterMetricsProfile metricsProfile; + + /* + * Node provisioning settings that apply to the whole cluster. + */ + private ManagedClusterNodeProvisioningProfile nodeProvisioningProfile; + + /* + * Profile of the cluster bootstrap configuration. + */ + private ManagedClusterBootstrapProfile bootstrapProfile; + + /* + * AI toolchain operator settings that apply to the whole cluster. + */ + private ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile; + + /* + * Contains read-only information about the Managed Cluster. + */ + private ManagedClusterStatus status; + + /** + * Creates an instance of ManagedClusterProperties class. + */ + public ManagedClusterProperties() { + } + + /** + * Get the provisioningState property: The current provisioning state. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the powerState property: The Power State of the cluster. + * + * @return the powerState value. + */ + public PowerState powerState() { + return this.powerState; + } + + /** + * Get the maxAgentPools property: The max number of agent pools for the managed cluster. + * + * @return the maxAgentPools value. + */ + public Integer maxAgentPools() { + return this.maxAgentPools; + } + + /** + * Get the kubernetesVersion property: The version of Kubernetes specified by the user. Both patch version + * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When + * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the + * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an + * upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor + * versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, + * upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not + * allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set the kubernetesVersion property: The version of Kubernetes specified by the user. Both patch version + * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When + * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the + * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an + * upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor + * versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, + * upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not + * allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. + * + * @param kubernetesVersion the kubernetesVersion value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withKubernetesVersion(String kubernetesVersion) { + this.kubernetesVersion = kubernetesVersion; + return this; + } + + /** + * Get the currentKubernetesVersion property: The version of Kubernetes the Managed Cluster is running. If + * kubernetesVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to + * it. If kubernetesVersion was <major.minor>, this field will contain the full <major.minor.patch> + * version being used. + * + * @return the currentKubernetesVersion value. + */ + public String currentKubernetesVersion() { + return this.currentKubernetesVersion; + } + + /** + * Get the dnsPrefix property: The DNS prefix of the Managed Cluster. This cannot be updated once the Managed + * Cluster has been created. + * + * @return the dnsPrefix value. + */ + public String dnsPrefix() { + return this.dnsPrefix; + } + + /** + * Set the dnsPrefix property: The DNS prefix of the Managed Cluster. This cannot be updated once the Managed + * Cluster has been created. + * + * @param dnsPrefix the dnsPrefix value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withDnsPrefix(String dnsPrefix) { + this.dnsPrefix = dnsPrefix; + return this; + } + + /** + * Get the fqdnSubdomain property: The FQDN subdomain of the private cluster with custom private dns zone. This + * cannot be updated once the Managed Cluster has been created. + * + * @return the fqdnSubdomain value. + */ + public String fqdnSubdomain() { + return this.fqdnSubdomain; + } + + /** + * Set the fqdnSubdomain property: The FQDN subdomain of the private cluster with custom private dns zone. This + * cannot be updated once the Managed Cluster has been created. + * + * @param fqdnSubdomain the fqdnSubdomain value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withFqdnSubdomain(String fqdnSubdomain) { + this.fqdnSubdomain = fqdnSubdomain; + return this; + } + + /** + * Get the fqdn property: The FQDN of the master pool. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Get the privateFqdn property: The FQDN of private cluster. + * + * @return the privateFqdn value. + */ + public String privateFqdn() { + return this.privateFqdn; + } + + /** + * Get the azurePortalFqdn property: The special FQDN used by the Azure Portal to access the Managed Cluster. This + * FQDN is for use only by the Azure Portal and should not be used by other clients. The Azure Portal requires + * certain Cross-Origin Resource Sharing (CORS) headers to be sent in some responses, which Kubernetes APIServer + * doesn't handle by default. This special FQDN supports CORS, allowing the Azure Portal to function properly. + * + * @return the azurePortalFqdn value. + */ + public String azurePortalFqdn() { + return this.azurePortalFqdn; + } + + /** + * Get the agentPoolProfiles property: The agent pool properties. + * + * @return the agentPoolProfiles value. + */ + public List agentPoolProfiles() { + return this.agentPoolProfiles; + } + + /** + * Set the agentPoolProfiles property: The agent pool properties. + * + * @param agentPoolProfiles the agentPoolProfiles value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withAgentPoolProfiles(List agentPoolProfiles) { + this.agentPoolProfiles = agentPoolProfiles; + return this; + } + + /** + * Get the linuxProfile property: The profile for Linux VMs in the Managed Cluster. + * + * @return the linuxProfile value. + */ + public ContainerServiceLinuxProfile linuxProfile() { + return this.linuxProfile; + } + + /** + * Set the linuxProfile property: The profile for Linux VMs in the Managed Cluster. + * + * @param linuxProfile the linuxProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withLinuxProfile(ContainerServiceLinuxProfile linuxProfile) { + this.linuxProfile = linuxProfile; + return this; + } + + /** + * Get the windowsProfile property: The profile for Windows VMs in the Managed Cluster. + * + * @return the windowsProfile value. + */ + public ManagedClusterWindowsProfile windowsProfile() { + return this.windowsProfile; + } + + /** + * Set the windowsProfile property: The profile for Windows VMs in the Managed Cluster. + * + * @param windowsProfile the windowsProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withWindowsProfile(ManagedClusterWindowsProfile windowsProfile) { + this.windowsProfile = windowsProfile; + return this; + } + + /** + * Get the servicePrincipalProfile property: Information about a service principal identity for the cluster to use + * for manipulating Azure APIs. + * + * @return the servicePrincipalProfile value. + */ + public ManagedClusterServicePrincipalProfile servicePrincipalProfile() { + return this.servicePrincipalProfile; + } + + /** + * Set the servicePrincipalProfile property: Information about a service principal identity for the cluster to use + * for manipulating Azure APIs. + * + * @param servicePrincipalProfile the servicePrincipalProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties + withServicePrincipalProfile(ManagedClusterServicePrincipalProfile servicePrincipalProfile) { + this.servicePrincipalProfile = servicePrincipalProfile; + return this; + } + + /** + * Get the addonProfiles property: The profile of managed cluster add-on. + * + * @return the addonProfiles value. + */ + public Map addonProfiles() { + return this.addonProfiles; + } + + /** + * Set the addonProfiles property: The profile of managed cluster add-on. + * + * @param addonProfiles the addonProfiles value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withAddonProfiles(Map addonProfiles) { + this.addonProfiles = addonProfiles; + return this; + } + + /** + * Get the podIdentityProfile property: The pod identity profile of the Managed Cluster. See [use AAD pod + * identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on AAD pod identity + * integration. + * + * @return the podIdentityProfile value. + */ + public ManagedClusterPodIdentityProfile podIdentityProfile() { + return this.podIdentityProfile; + } + + /** + * Set the podIdentityProfile property: The pod identity profile of the Managed Cluster. See [use AAD pod + * identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on AAD pod identity + * integration. + * + * @param podIdentityProfile the podIdentityProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withPodIdentityProfile(ManagedClusterPodIdentityProfile podIdentityProfile) { + this.podIdentityProfile = podIdentityProfile; + return this; + } + + /** + * Get the oidcIssuerProfile property: The OIDC issuer profile of the Managed Cluster. + * + * @return the oidcIssuerProfile value. + */ + public ManagedClusterOidcIssuerProfile oidcIssuerProfile() { + return this.oidcIssuerProfile; + } + + /** + * Set the oidcIssuerProfile property: The OIDC issuer profile of the Managed Cluster. + * + * @param oidcIssuerProfile the oidcIssuerProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withOidcIssuerProfile(ManagedClusterOidcIssuerProfile oidcIssuerProfile) { + this.oidcIssuerProfile = oidcIssuerProfile; + return this; + } + + /** + * Get the nodeResourceGroup property: The name of the resource group containing agent pool nodes. + * + * @return the nodeResourceGroup value. + */ + public String nodeResourceGroup() { + return this.nodeResourceGroup; + } + + /** + * Set the nodeResourceGroup property: The name of the resource group containing agent pool nodes. + * + * @param nodeResourceGroup the nodeResourceGroup value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withNodeResourceGroup(String nodeResourceGroup) { + this.nodeResourceGroup = nodeResourceGroup; + return this; + } + + /** + * Get the nodeResourceGroupProfile property: Profile of the node resource group configuration. + * + * @return the nodeResourceGroupProfile value. + */ + public ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile() { + return this.nodeResourceGroupProfile; + } + + /** + * Set the nodeResourceGroupProfile property: Profile of the node resource group configuration. + * + * @param nodeResourceGroupProfile the nodeResourceGroupProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties + withNodeResourceGroupProfile(ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile) { + this.nodeResourceGroupProfile = nodeResourceGroupProfile; + return this; + } + + /** + * Get the enableRbac property: Whether to enable Kubernetes Role-Based Access Control. + * + * @return the enableRbac value. + */ + public Boolean enableRbac() { + return this.enableRbac; + } + + /** + * Set the enableRbac property: Whether to enable Kubernetes Role-Based Access Control. + * + * @param enableRbac the enableRbac value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withEnableRbac(Boolean enableRbac) { + this.enableRbac = enableRbac; + return this; + } + + /** + * Get the supportPlan property: The support plan for the Managed Cluster. If unspecified, the default is + * 'KubernetesOfficial'. + * + * @return the supportPlan value. + */ + public KubernetesSupportPlan supportPlan() { + return this.supportPlan; + } + + /** + * Set the supportPlan property: The support plan for the Managed Cluster. If unspecified, the default is + * 'KubernetesOfficial'. + * + * @param supportPlan the supportPlan value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withSupportPlan(KubernetesSupportPlan supportPlan) { + this.supportPlan = supportPlan; + return this; + } + + /** + * Get the networkProfile property: The network configuration profile. + * + * @return the networkProfile value. + */ + public ContainerServiceNetworkProfile networkProfile() { + return this.networkProfile; + } + + /** + * Set the networkProfile property: The network configuration profile. + * + * @param networkProfile the networkProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withNetworkProfile(ContainerServiceNetworkProfile networkProfile) { + this.networkProfile = networkProfile; + return this; + } + + /** + * Get the aadProfile property: The Azure Active Directory configuration. + * + * @return the aadProfile value. + */ + public ManagedClusterAadProfile aadProfile() { + return this.aadProfile; + } + + /** + * Set the aadProfile property: The Azure Active Directory configuration. + * + * @param aadProfile the aadProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withAadProfile(ManagedClusterAadProfile aadProfile) { + this.aadProfile = aadProfile; + return this; + } + + /** + * Get the autoUpgradeProfile property: The auto upgrade configuration. + * + * @return the autoUpgradeProfile value. + */ + public ManagedClusterAutoUpgradeProfile autoUpgradeProfile() { + return this.autoUpgradeProfile; + } + + /** + * Set the autoUpgradeProfile property: The auto upgrade configuration. + * + * @param autoUpgradeProfile the autoUpgradeProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withAutoUpgradeProfile(ManagedClusterAutoUpgradeProfile autoUpgradeProfile) { + this.autoUpgradeProfile = autoUpgradeProfile; + return this; + } + + /** + * Get the upgradeSettings property: Settings for upgrading a cluster. + * + * @return the upgradeSettings value. + */ + public ClusterUpgradeSettings upgradeSettings() { + return this.upgradeSettings; + } + + /** + * Set the upgradeSettings property: Settings for upgrading a cluster. + * + * @param upgradeSettings the upgradeSettings value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withUpgradeSettings(ClusterUpgradeSettings upgradeSettings) { + this.upgradeSettings = upgradeSettings; + return this; + } + + /** + * Get the autoScalerProfile property: Parameters to be applied to the cluster-autoscaler when enabled. + * + * @return the autoScalerProfile value. + */ + public ManagedClusterPropertiesAutoScalerProfile autoScalerProfile() { + return this.autoScalerProfile; + } + + /** + * Set the autoScalerProfile property: Parameters to be applied to the cluster-autoscaler when enabled. + * + * @param autoScalerProfile the autoScalerProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withAutoScalerProfile(ManagedClusterPropertiesAutoScalerProfile autoScalerProfile) { + this.autoScalerProfile = autoScalerProfile; + return this; + } + + /** + * Get the apiServerAccessProfile property: The access profile for managed cluster API server. + * + * @return the apiServerAccessProfile value. + */ + public ManagedClusterApiServerAccessProfile apiServerAccessProfile() { + return this.apiServerAccessProfile; + } + + /** + * Set the apiServerAccessProfile property: The access profile for managed cluster API server. + * + * @param apiServerAccessProfile the apiServerAccessProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties + withApiServerAccessProfile(ManagedClusterApiServerAccessProfile apiServerAccessProfile) { + this.apiServerAccessProfile = apiServerAccessProfile; + return this; + } + + /** + * Get the diskEncryptionSetId property: The Resource ID of the disk encryption set to use for enabling encryption + * at rest. This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. + * + * @return the diskEncryptionSetId value. + */ + public String diskEncryptionSetId() { + return this.diskEncryptionSetId; + } + + /** + * Set the diskEncryptionSetId property: The Resource ID of the disk encryption set to use for enabling encryption + * at rest. This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. + * + * @param diskEncryptionSetId the diskEncryptionSetId value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withDiskEncryptionSetId(String diskEncryptionSetId) { + this.diskEncryptionSetId = diskEncryptionSetId; + return this; + } + + /** + * Get the identityProfile property: The user identity associated with the managed cluster. This identity will be + * used by the kubelet. Only one user assigned identity is allowed. The only accepted key is "kubeletidentity", with + * value of "resourceId": + * "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". + * + * @return the identityProfile value. + */ + public Map identityProfile() { + return this.identityProfile; + } + + /** + * Set the identityProfile property: The user identity associated with the managed cluster. This identity will be + * used by the kubelet. Only one user assigned identity is allowed. The only accepted key is "kubeletidentity", with + * value of "resourceId": + * "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". + * + * @param identityProfile the identityProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withIdentityProfile(Map identityProfile) { + this.identityProfile = identityProfile; + return this; + } + + /** + * Get the privateLinkResources property: Private link resources associated with the cluster. + * + * @return the privateLinkResources value. + */ + public List privateLinkResources() { + return this.privateLinkResources; + } + + /** + * Set the privateLinkResources property: Private link resources associated with the cluster. + * + * @param privateLinkResources the privateLinkResources value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withPrivateLinkResources(List privateLinkResources) { + this.privateLinkResources = privateLinkResources; + return this; + } + + /** + * Get the disableLocalAccounts property: If local accounts should be disabled on the Managed Cluster. If set to + * true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters + * that are AAD enabled. For more details see [disable local + * accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). + * + * @return the disableLocalAccounts value. + */ + public Boolean disableLocalAccounts() { + return this.disableLocalAccounts; + } + + /** + * Set the disableLocalAccounts property: If local accounts should be disabled on the Managed Cluster. If set to + * true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters + * that are AAD enabled. For more details see [disable local + * accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). + * + * @param disableLocalAccounts the disableLocalAccounts value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withDisableLocalAccounts(Boolean disableLocalAccounts) { + this.disableLocalAccounts = disableLocalAccounts; + return this; + } + + /** + * Get the httpProxyConfig property: Configurations for provisioning the cluster with HTTP proxy servers. + * + * @return the httpProxyConfig value. + */ + public ManagedClusterHttpProxyConfig httpProxyConfig() { + return this.httpProxyConfig; + } + + /** + * Set the httpProxyConfig property: Configurations for provisioning the cluster with HTTP proxy servers. + * + * @param httpProxyConfig the httpProxyConfig value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withHttpProxyConfig(ManagedClusterHttpProxyConfig httpProxyConfig) { + this.httpProxyConfig = httpProxyConfig; + return this; + } + + /** + * Get the securityProfile property: Security profile for the managed cluster. + * + * @return the securityProfile value. + */ + public ManagedClusterSecurityProfile securityProfile() { + return this.securityProfile; + } + + /** + * Set the securityProfile property: Security profile for the managed cluster. + * + * @param securityProfile the securityProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withSecurityProfile(ManagedClusterSecurityProfile securityProfile) { + this.securityProfile = securityProfile; + return this; + } + + /** + * Get the storageProfile property: Storage profile for the managed cluster. + * + * @return the storageProfile value. + */ + public ManagedClusterStorageProfile storageProfile() { + return this.storageProfile; + } + + /** + * Set the storageProfile property: Storage profile for the managed cluster. + * + * @param storageProfile the storageProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withStorageProfile(ManagedClusterStorageProfile storageProfile) { + this.storageProfile = storageProfile; + return this; + } + + /** + * Get the ingressProfile property: Ingress profile for the managed cluster. + * + * @return the ingressProfile value. + */ + public ManagedClusterIngressProfile ingressProfile() { + return this.ingressProfile; + } + + /** + * Set the ingressProfile property: Ingress profile for the managed cluster. + * + * @param ingressProfile the ingressProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withIngressProfile(ManagedClusterIngressProfile ingressProfile) { + this.ingressProfile = ingressProfile; + return this; + } + + /** + * Get the publicNetworkAccess property: PublicNetworkAccess of the managedCluster. Allow or deny public network + * access for AKS. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: PublicNetworkAccess of the managedCluster. Allow or deny public network + * access for AKS. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the workloadAutoScalerProfile property: Workload Auto-scaler profile for the managed cluster. + * + * @return the workloadAutoScalerProfile value. + */ + public ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile() { + return this.workloadAutoScalerProfile; + } + + /** + * Set the workloadAutoScalerProfile property: Workload Auto-scaler profile for the managed cluster. + * + * @param workloadAutoScalerProfile the workloadAutoScalerProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties + withWorkloadAutoScalerProfile(ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile) { + this.workloadAutoScalerProfile = workloadAutoScalerProfile; + return this; + } + + /** + * Get the azureMonitorProfile property: Azure Monitor addon profiles for monitoring the managed cluster. + * + * @return the azureMonitorProfile value. + */ + public ManagedClusterAzureMonitorProfile azureMonitorProfile() { + return this.azureMonitorProfile; + } + + /** + * Set the azureMonitorProfile property: Azure Monitor addon profiles for monitoring the managed cluster. + * + * @param azureMonitorProfile the azureMonitorProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withAzureMonitorProfile(ManagedClusterAzureMonitorProfile azureMonitorProfile) { + this.azureMonitorProfile = azureMonitorProfile; + return this; + } + + /** + * Get the serviceMeshProfile property: Service mesh profile for a managed cluster. + * + * @return the serviceMeshProfile value. + */ + public ServiceMeshProfile serviceMeshProfile() { + return this.serviceMeshProfile; + } + + /** + * Set the serviceMeshProfile property: Service mesh profile for a managed cluster. + * + * @param serviceMeshProfile the serviceMeshProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withServiceMeshProfile(ServiceMeshProfile serviceMeshProfile) { + this.serviceMeshProfile = serviceMeshProfile; + return this; + } + + /** + * Get the resourceUid property: The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds + * (i.e: create, delete, create sequence). + * + * @return the resourceUid value. + */ + public String resourceUid() { + return this.resourceUid; + } + + /** + * Get the metricsProfile property: Optional cluster metrics configuration. + * + * @return the metricsProfile value. + */ + public ManagedClusterMetricsProfile metricsProfile() { + return this.metricsProfile; + } + + /** + * Set the metricsProfile property: Optional cluster metrics configuration. + * + * @param metricsProfile the metricsProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withMetricsProfile(ManagedClusterMetricsProfile metricsProfile) { + this.metricsProfile = metricsProfile; + return this; + } + + /** + * Get the nodeProvisioningProfile property: Node provisioning settings that apply to the whole cluster. + * + * @return the nodeProvisioningProfile value. + */ + public ManagedClusterNodeProvisioningProfile nodeProvisioningProfile() { + return this.nodeProvisioningProfile; + } + + /** + * Set the nodeProvisioningProfile property: Node provisioning settings that apply to the whole cluster. + * + * @param nodeProvisioningProfile the nodeProvisioningProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties + withNodeProvisioningProfile(ManagedClusterNodeProvisioningProfile nodeProvisioningProfile) { + this.nodeProvisioningProfile = nodeProvisioningProfile; + return this; + } + + /** + * Get the bootstrapProfile property: Profile of the cluster bootstrap configuration. + * + * @return the bootstrapProfile value. + */ + public ManagedClusterBootstrapProfile bootstrapProfile() { + return this.bootstrapProfile; + } + + /** + * Set the bootstrapProfile property: Profile of the cluster bootstrap configuration. + * + * @param bootstrapProfile the bootstrapProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withBootstrapProfile(ManagedClusterBootstrapProfile bootstrapProfile) { + this.bootstrapProfile = bootstrapProfile; + return this; + } + + /** + * Get the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. + * + * @return the aiToolchainOperatorProfile value. + */ + public ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile() { + return this.aiToolchainOperatorProfile; + } + + /** + * Set the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. + * + * @param aiToolchainOperatorProfile the aiToolchainOperatorProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties + withAiToolchainOperatorProfile(ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile) { + this.aiToolchainOperatorProfile = aiToolchainOperatorProfile; + return this; + } + + /** + * Get the status property: Contains read-only information about the Managed Cluster. + * + * @return the status value. + */ + public ManagedClusterStatus status() { + return this.status; + } + + /** + * Set the status property: Contains read-only information about the Managed Cluster. + * + * @param status the status value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withStatus(ManagedClusterStatus status) { + this.status = status; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (powerState() != null) { + powerState().validate(); + } + if (agentPoolProfiles() != null) { + agentPoolProfiles().forEach(e -> e.validate()); + } + if (linuxProfile() != null) { + linuxProfile().validate(); + } + if (windowsProfile() != null) { + windowsProfile().validate(); + } + if (servicePrincipalProfile() != null) { + servicePrincipalProfile().validate(); + } + if (addonProfiles() != null) { + addonProfiles().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + if (podIdentityProfile() != null) { + podIdentityProfile().validate(); + } + if (oidcIssuerProfile() != null) { + oidcIssuerProfile().validate(); + } + if (nodeResourceGroupProfile() != null) { + nodeResourceGroupProfile().validate(); + } + if (networkProfile() != null) { + networkProfile().validate(); + } + if (aadProfile() != null) { + aadProfile().validate(); + } + if (autoUpgradeProfile() != null) { + autoUpgradeProfile().validate(); + } + if (upgradeSettings() != null) { + upgradeSettings().validate(); + } + if (autoScalerProfile() != null) { + autoScalerProfile().validate(); + } + if (apiServerAccessProfile() != null) { + apiServerAccessProfile().validate(); + } + if (identityProfile() != null) { + identityProfile().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + if (privateLinkResources() != null) { + privateLinkResources().forEach(e -> e.validate()); + } + if (httpProxyConfig() != null) { + httpProxyConfig().validate(); + } + if (securityProfile() != null) { + securityProfile().validate(); + } + if (storageProfile() != null) { + storageProfile().validate(); + } + if (ingressProfile() != null) { + ingressProfile().validate(); + } + if (workloadAutoScalerProfile() != null) { + workloadAutoScalerProfile().validate(); + } + if (azureMonitorProfile() != null) { + azureMonitorProfile().validate(); + } + if (serviceMeshProfile() != null) { + serviceMeshProfile().validate(); + } + if (metricsProfile() != null) { + metricsProfile().validate(); + } + if (nodeProvisioningProfile() != null) { + nodeProvisioningProfile().validate(); + } + if (bootstrapProfile() != null) { + bootstrapProfile().validate(); + } + if (aiToolchainOperatorProfile() != null) { + aiToolchainOperatorProfile().validate(); + } + if (status() != null) { + status().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); + jsonWriter.writeStringField("dnsPrefix", this.dnsPrefix); + jsonWriter.writeStringField("fqdnSubdomain", this.fqdnSubdomain); + jsonWriter.writeArrayField("agentPoolProfiles", this.agentPoolProfiles, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("linuxProfile", this.linuxProfile); + jsonWriter.writeJsonField("windowsProfile", this.windowsProfile); + jsonWriter.writeJsonField("servicePrincipalProfile", this.servicePrincipalProfile); + jsonWriter.writeMapField("addonProfiles", this.addonProfiles, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("podIdentityProfile", this.podIdentityProfile); + jsonWriter.writeJsonField("oidcIssuerProfile", this.oidcIssuerProfile); + jsonWriter.writeStringField("nodeResourceGroup", this.nodeResourceGroup); + jsonWriter.writeJsonField("nodeResourceGroupProfile", this.nodeResourceGroupProfile); + jsonWriter.writeBooleanField("enableRBAC", this.enableRbac); + jsonWriter.writeStringField("supportPlan", this.supportPlan == null ? null : this.supportPlan.toString()); + jsonWriter.writeJsonField("networkProfile", this.networkProfile); + jsonWriter.writeJsonField("aadProfile", this.aadProfile); + jsonWriter.writeJsonField("autoUpgradeProfile", this.autoUpgradeProfile); + jsonWriter.writeJsonField("upgradeSettings", this.upgradeSettings); + jsonWriter.writeJsonField("autoScalerProfile", this.autoScalerProfile); + jsonWriter.writeJsonField("apiServerAccessProfile", this.apiServerAccessProfile); + jsonWriter.writeStringField("diskEncryptionSetID", this.diskEncryptionSetId); + jsonWriter.writeMapField("identityProfile", this.identityProfile, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("privateLinkResources", this.privateLinkResources, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeBooleanField("disableLocalAccounts", this.disableLocalAccounts); + jsonWriter.writeJsonField("httpProxyConfig", this.httpProxyConfig); + jsonWriter.writeJsonField("securityProfile", this.securityProfile); + jsonWriter.writeJsonField("storageProfile", this.storageProfile); + jsonWriter.writeJsonField("ingressProfile", this.ingressProfile); + jsonWriter.writeStringField("publicNetworkAccess", + this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); + jsonWriter.writeJsonField("workloadAutoScalerProfile", this.workloadAutoScalerProfile); + jsonWriter.writeJsonField("azureMonitorProfile", this.azureMonitorProfile); + jsonWriter.writeJsonField("serviceMeshProfile", this.serviceMeshProfile); + jsonWriter.writeJsonField("metricsProfile", this.metricsProfile); + jsonWriter.writeJsonField("nodeProvisioningProfile", this.nodeProvisioningProfile); + jsonWriter.writeJsonField("bootstrapProfile", this.bootstrapProfile); + jsonWriter.writeJsonField("aiToolchainOperatorProfile", this.aiToolchainOperatorProfile); + jsonWriter.writeJsonField("status", this.status); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterProperties 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 ManagedClusterProperties. + */ + public static ManagedClusterProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterProperties deserializedManagedClusterProperties = new ManagedClusterProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedManagedClusterProperties.provisioningState = reader.getString(); + } else if ("powerState".equals(fieldName)) { + deserializedManagedClusterProperties.powerState = PowerState.fromJson(reader); + } else if ("maxAgentPools".equals(fieldName)) { + deserializedManagedClusterProperties.maxAgentPools = reader.getNullable(JsonReader::getInt); + } else if ("kubernetesVersion".equals(fieldName)) { + deserializedManagedClusterProperties.kubernetesVersion = reader.getString(); + } else if ("currentKubernetesVersion".equals(fieldName)) { + deserializedManagedClusterProperties.currentKubernetesVersion = reader.getString(); + } else if ("dnsPrefix".equals(fieldName)) { + deserializedManagedClusterProperties.dnsPrefix = reader.getString(); + } else if ("fqdnSubdomain".equals(fieldName)) { + deserializedManagedClusterProperties.fqdnSubdomain = reader.getString(); + } else if ("fqdn".equals(fieldName)) { + deserializedManagedClusterProperties.fqdn = reader.getString(); + } else if ("privateFQDN".equals(fieldName)) { + deserializedManagedClusterProperties.privateFqdn = reader.getString(); + } else if ("azurePortalFQDN".equals(fieldName)) { + deserializedManagedClusterProperties.azurePortalFqdn = reader.getString(); + } else if ("agentPoolProfiles".equals(fieldName)) { + List agentPoolProfiles + = reader.readArray(reader1 -> ManagedClusterAgentPoolProfile.fromJson(reader1)); + deserializedManagedClusterProperties.agentPoolProfiles = agentPoolProfiles; + } else if ("linuxProfile".equals(fieldName)) { + deserializedManagedClusterProperties.linuxProfile = ContainerServiceLinuxProfile.fromJson(reader); + } else if ("windowsProfile".equals(fieldName)) { + deserializedManagedClusterProperties.windowsProfile = ManagedClusterWindowsProfile.fromJson(reader); + } else if ("servicePrincipalProfile".equals(fieldName)) { + deserializedManagedClusterProperties.servicePrincipalProfile + = ManagedClusterServicePrincipalProfile.fromJson(reader); + } else if ("addonProfiles".equals(fieldName)) { + Map addonProfiles + = reader.readMap(reader1 -> ManagedClusterAddonProfile.fromJson(reader1)); + deserializedManagedClusterProperties.addonProfiles = addonProfiles; + } else if ("podIdentityProfile".equals(fieldName)) { + deserializedManagedClusterProperties.podIdentityProfile + = ManagedClusterPodIdentityProfile.fromJson(reader); + } else if ("oidcIssuerProfile".equals(fieldName)) { + deserializedManagedClusterProperties.oidcIssuerProfile + = ManagedClusterOidcIssuerProfile.fromJson(reader); + } else if ("nodeResourceGroup".equals(fieldName)) { + deserializedManagedClusterProperties.nodeResourceGroup = reader.getString(); + } else if ("nodeResourceGroupProfile".equals(fieldName)) { + deserializedManagedClusterProperties.nodeResourceGroupProfile + = ManagedClusterNodeResourceGroupProfile.fromJson(reader); + } else if ("enableRBAC".equals(fieldName)) { + deserializedManagedClusterProperties.enableRbac = reader.getNullable(JsonReader::getBoolean); + } else if ("supportPlan".equals(fieldName)) { + deserializedManagedClusterProperties.supportPlan + = KubernetesSupportPlan.fromString(reader.getString()); + } else if ("networkProfile".equals(fieldName)) { + deserializedManagedClusterProperties.networkProfile + = ContainerServiceNetworkProfile.fromJson(reader); + } else if ("aadProfile".equals(fieldName)) { + deserializedManagedClusterProperties.aadProfile = ManagedClusterAadProfile.fromJson(reader); + } else if ("autoUpgradeProfile".equals(fieldName)) { + deserializedManagedClusterProperties.autoUpgradeProfile + = ManagedClusterAutoUpgradeProfile.fromJson(reader); + } else if ("upgradeSettings".equals(fieldName)) { + deserializedManagedClusterProperties.upgradeSettings = ClusterUpgradeSettings.fromJson(reader); + } else if ("autoScalerProfile".equals(fieldName)) { + deserializedManagedClusterProperties.autoScalerProfile + = ManagedClusterPropertiesAutoScalerProfile.fromJson(reader); + } else if ("apiServerAccessProfile".equals(fieldName)) { + deserializedManagedClusterProperties.apiServerAccessProfile + = ManagedClusterApiServerAccessProfile.fromJson(reader); + } else if ("diskEncryptionSetID".equals(fieldName)) { + deserializedManagedClusterProperties.diskEncryptionSetId = reader.getString(); + } else if ("identityProfile".equals(fieldName)) { + Map identityProfile + = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); + deserializedManagedClusterProperties.identityProfile = identityProfile; + } else if ("privateLinkResources".equals(fieldName)) { + List privateLinkResources + = reader.readArray(reader1 -> PrivateLinkResourceInner.fromJson(reader1)); + deserializedManagedClusterProperties.privateLinkResources = privateLinkResources; + } else if ("disableLocalAccounts".equals(fieldName)) { + deserializedManagedClusterProperties.disableLocalAccounts + = reader.getNullable(JsonReader::getBoolean); + } else if ("httpProxyConfig".equals(fieldName)) { + deserializedManagedClusterProperties.httpProxyConfig + = ManagedClusterHttpProxyConfig.fromJson(reader); + } else if ("securityProfile".equals(fieldName)) { + deserializedManagedClusterProperties.securityProfile + = ManagedClusterSecurityProfile.fromJson(reader); + } else if ("storageProfile".equals(fieldName)) { + deserializedManagedClusterProperties.storageProfile = ManagedClusterStorageProfile.fromJson(reader); + } else if ("ingressProfile".equals(fieldName)) { + deserializedManagedClusterProperties.ingressProfile = ManagedClusterIngressProfile.fromJson(reader); + } else if ("publicNetworkAccess".equals(fieldName)) { + deserializedManagedClusterProperties.publicNetworkAccess + = PublicNetworkAccess.fromString(reader.getString()); + } else if ("workloadAutoScalerProfile".equals(fieldName)) { + deserializedManagedClusterProperties.workloadAutoScalerProfile + = ManagedClusterWorkloadAutoScalerProfile.fromJson(reader); + } else if ("azureMonitorProfile".equals(fieldName)) { + deserializedManagedClusterProperties.azureMonitorProfile + = ManagedClusterAzureMonitorProfile.fromJson(reader); + } else if ("serviceMeshProfile".equals(fieldName)) { + deserializedManagedClusterProperties.serviceMeshProfile = ServiceMeshProfile.fromJson(reader); + } else if ("resourceUID".equals(fieldName)) { + deserializedManagedClusterProperties.resourceUid = reader.getString(); + } else if ("metricsProfile".equals(fieldName)) { + deserializedManagedClusterProperties.metricsProfile = ManagedClusterMetricsProfile.fromJson(reader); + } else if ("nodeProvisioningProfile".equals(fieldName)) { + deserializedManagedClusterProperties.nodeProvisioningProfile + = ManagedClusterNodeProvisioningProfile.fromJson(reader); + } else if ("bootstrapProfile".equals(fieldName)) { + deserializedManagedClusterProperties.bootstrapProfile + = ManagedClusterBootstrapProfile.fromJson(reader); + } else if ("aiToolchainOperatorProfile".equals(fieldName)) { + deserializedManagedClusterProperties.aiToolchainOperatorProfile + = ManagedClusterAIToolchainOperatorProfile.fromJson(reader); + } else if ("status".equals(fieldName)) { + deserializedManagedClusterProperties.status = ManagedClusterStatus.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileInner.java new file mode 100644 index 000000000000..7dbf28e3cba4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileInner.java @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.ManagedClusterPoolUpgradeProfile; +import java.io.IOException; +import java.util.List; + +/** + * The list of available upgrades for compute pools. + */ +@Fluent +public final class ManagedClusterUpgradeProfileInner extends ProxyResource { + /* + * The properties of the upgrade profile. + */ + private ManagedClusterUpgradeProfileProperties innerProperties = new ManagedClusterUpgradeProfileProperties(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedClusterUpgradeProfileInner class. + */ + public ManagedClusterUpgradeProfileInner() { + } + + /** + * Get the innerProperties property: The properties of the upgrade profile. + * + * @return the innerProperties value. + */ + private ManagedClusterUpgradeProfileProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the controlPlaneProfile property: The list of available upgrade versions for the control plane. + * + * @return the controlPlaneProfile value. + */ + public ManagedClusterPoolUpgradeProfile controlPlaneProfile() { + return this.innerProperties() == null ? null : this.innerProperties().controlPlaneProfile(); + } + + /** + * Set the controlPlaneProfile property: The list of available upgrade versions for the control plane. + * + * @param controlPlaneProfile the controlPlaneProfile value to set. + * @return the ManagedClusterUpgradeProfileInner object itself. + */ + public ManagedClusterUpgradeProfileInner + withControlPlaneProfile(ManagedClusterPoolUpgradeProfile controlPlaneProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterUpgradeProfileProperties(); + } + this.innerProperties().withControlPlaneProfile(controlPlaneProfile); + return this; + } + + /** + * Get the agentPoolProfiles property: The list of available upgrade versions for agent pools. + * + * @return the agentPoolProfiles value. + */ + public List agentPoolProfiles() { + return this.innerProperties() == null ? null : this.innerProperties().agentPoolProfiles(); + } + + /** + * Set the agentPoolProfiles property: The list of available upgrade versions for agent pools. + * + * @param agentPoolProfiles the agentPoolProfiles value to set. + * @return the ManagedClusterUpgradeProfileInner object itself. + */ + public ManagedClusterUpgradeProfileInner + withAgentPoolProfiles(List agentPoolProfiles) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterUpgradeProfileProperties(); + } + this.innerProperties().withAgentPoolProfiles(agentPoolProfiles); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model ManagedClusterUpgradeProfileInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterUpgradeProfileInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterUpgradeProfileInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterUpgradeProfileInner 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 ManagedClusterUpgradeProfileInner. + */ + public static ManagedClusterUpgradeProfileInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterUpgradeProfileInner deserializedManagedClusterUpgradeProfileInner + = new ManagedClusterUpgradeProfileInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedClusterUpgradeProfileInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedClusterUpgradeProfileInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedClusterUpgradeProfileInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedManagedClusterUpgradeProfileInner.innerProperties + = ManagedClusterUpgradeProfileProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedManagedClusterUpgradeProfileInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterUpgradeProfileInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileProperties.java new file mode 100644 index 000000000000..624fe6953d50 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileProperties.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.ManagedClusterPoolUpgradeProfile; +import java.io.IOException; +import java.util.List; + +/** + * Control plane and agent pool upgrade profiles. + */ +@Fluent +public final class ManagedClusterUpgradeProfileProperties + implements JsonSerializable { + /* + * The list of available upgrade versions for the control plane. + */ + private ManagedClusterPoolUpgradeProfile controlPlaneProfile; + + /* + * The list of available upgrade versions for agent pools. + */ + private List agentPoolProfiles; + + /** + * Creates an instance of ManagedClusterUpgradeProfileProperties class. + */ + public ManagedClusterUpgradeProfileProperties() { + } + + /** + * Get the controlPlaneProfile property: The list of available upgrade versions for the control plane. + * + * @return the controlPlaneProfile value. + */ + public ManagedClusterPoolUpgradeProfile controlPlaneProfile() { + return this.controlPlaneProfile; + } + + /** + * Set the controlPlaneProfile property: The list of available upgrade versions for the control plane. + * + * @param controlPlaneProfile the controlPlaneProfile value to set. + * @return the ManagedClusterUpgradeProfileProperties object itself. + */ + public ManagedClusterUpgradeProfileProperties + withControlPlaneProfile(ManagedClusterPoolUpgradeProfile controlPlaneProfile) { + this.controlPlaneProfile = controlPlaneProfile; + return this; + } + + /** + * Get the agentPoolProfiles property: The list of available upgrade versions for agent pools. + * + * @return the agentPoolProfiles value. + */ + public List agentPoolProfiles() { + return this.agentPoolProfiles; + } + + /** + * Set the agentPoolProfiles property: The list of available upgrade versions for agent pools. + * + * @param agentPoolProfiles the agentPoolProfiles value to set. + * @return the ManagedClusterUpgradeProfileProperties object itself. + */ + public ManagedClusterUpgradeProfileProperties + withAgentPoolProfiles(List agentPoolProfiles) { + this.agentPoolProfiles = agentPoolProfiles; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (controlPlaneProfile() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property controlPlaneProfile in model ManagedClusterUpgradeProfileProperties")); + } else { + controlPlaneProfile().validate(); + } + if (agentPoolProfiles() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property agentPoolProfiles in model ManagedClusterUpgradeProfileProperties")); + } else { + agentPoolProfiles().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterUpgradeProfileProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("controlPlaneProfile", this.controlPlaneProfile); + jsonWriter.writeArrayField("agentPoolProfiles", this.agentPoolProfiles, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterUpgradeProfileProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterUpgradeProfileProperties 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 ManagedClusterUpgradeProfileProperties. + */ + public static ManagedClusterUpgradeProfileProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterUpgradeProfileProperties deserializedManagedClusterUpgradeProfileProperties + = new ManagedClusterUpgradeProfileProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("controlPlaneProfile".equals(fieldName)) { + deserializedManagedClusterUpgradeProfileProperties.controlPlaneProfile + = ManagedClusterPoolUpgradeProfile.fromJson(reader); + } else if ("agentPoolProfiles".equals(fieldName)) { + List agentPoolProfiles + = reader.readArray(reader1 -> ManagedClusterPoolUpgradeProfile.fromJson(reader1)); + deserializedManagedClusterUpgradeProfileProperties.agentPoolProfiles = agentPoolProfiles; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterUpgradeProfileProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedNamespaceInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedNamespaceInner.java new file mode 100644 index 000000000000..f64de2c3397e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedNamespaceInner.java @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.NamespaceProperties; +import java.io.IOException; +import java.util.Map; + +/** + * Namespace managed by ARM. + */ +@Fluent +public final class ManagedNamespaceInner extends Resource { + /* + * Properties of a namespace. + */ + private NamespaceProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String etag; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedNamespaceInner class. + */ + public ManagedNamespaceInner() { + } + + /** + * Get the properties property: Properties of a namespace. + * + * @return the properties value. + */ + public NamespaceProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Properties of a namespace. + * + * @param properties the properties value to set. + * @return the ManagedNamespaceInner object itself. + */ + public ManagedNamespaceInner withProperties(NamespaceProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the etag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedNamespaceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedNamespaceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedNamespaceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedNamespaceInner 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 ManagedNamespaceInner. + */ + public static ManagedNamespaceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedNamespaceInner deserializedManagedNamespaceInner = new ManagedNamespaceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedNamespaceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedNamespaceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedNamespaceInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedManagedNamespaceInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedManagedNamespaceInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedManagedNamespaceInner.properties = NamespaceProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedManagedNamespaceInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedManagedNamespaceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedNamespaceInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshRevisionProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshRevisionProfileInner.java new file mode 100644 index 000000000000..f5d81ffcf56c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshRevisionProfileInner.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.MeshRevisionProfileProperties; +import java.io.IOException; + +/** + * Mesh revision profile for a mesh. + */ +@Fluent +public final class MeshRevisionProfileInner extends ProxyResource { + /* + * Mesh revision profile properties for a mesh + */ + private MeshRevisionProfileProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of MeshRevisionProfileInner class. + */ + public MeshRevisionProfileInner() { + } + + /** + * Get the properties property: Mesh revision profile properties for a mesh. + * + * @return the properties value. + */ + public MeshRevisionProfileProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Mesh revision profile properties for a mesh. + * + * @param properties the properties value to set. + * @return the MeshRevisionProfileInner object itself. + */ + public MeshRevisionProfileInner withProperties(MeshRevisionProfileProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MeshRevisionProfileInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MeshRevisionProfileInner 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 MeshRevisionProfileInner. + */ + public static MeshRevisionProfileInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MeshRevisionProfileInner deserializedMeshRevisionProfileInner = new MeshRevisionProfileInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMeshRevisionProfileInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedMeshRevisionProfileInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedMeshRevisionProfileInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedMeshRevisionProfileInner.properties = MeshRevisionProfileProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedMeshRevisionProfileInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMeshRevisionProfileInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshUpgradeProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshUpgradeProfileInner.java new file mode 100644 index 000000000000..0796a76591cb --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshUpgradeProfileInner.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.MeshUpgradeProfileProperties; +import java.io.IOException; + +/** + * Upgrade profile for given mesh. + */ +@Fluent +public final class MeshUpgradeProfileInner extends ProxyResource { + /* + * Mesh upgrade profile properties for a major.minor release. + */ + private MeshUpgradeProfileProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of MeshUpgradeProfileInner class. + */ + public MeshUpgradeProfileInner() { + } + + /** + * Get the properties property: Mesh upgrade profile properties for a major.minor release. + * + * @return the properties value. + */ + public MeshUpgradeProfileProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Mesh upgrade profile properties for a major.minor release. + * + * @param properties the properties value to set. + * @return the MeshUpgradeProfileInner object itself. + */ + public MeshUpgradeProfileInner withProperties(MeshUpgradeProfileProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MeshUpgradeProfileInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MeshUpgradeProfileInner 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 MeshUpgradeProfileInner. + */ + public static MeshUpgradeProfileInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MeshUpgradeProfileInner deserializedMeshUpgradeProfileInner = new MeshUpgradeProfileInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMeshUpgradeProfileInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedMeshUpgradeProfileInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedMeshUpgradeProfileInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedMeshUpgradeProfileInner.properties = MeshUpgradeProfileProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedMeshUpgradeProfileInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMeshUpgradeProfileInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueDisplay.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueDisplay.java new file mode 100644 index 000000000000..099e1ac25d68 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueDisplay.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 java.io.IOException; + +/** + * Describes the properties of a Operation Value Display. + */ +@Immutable +public final class OperationValueDisplay implements JsonSerializable { + /* + * The display name of the operation. + */ + private String operation; + + /* + * The display name of the resource the operation applies to. + */ + private String resource; + + /* + * The description of the operation. + */ + private String description; + + /* + * The resource provider for the operation. + */ + private String provider; + + /** + * Creates an instance of OperationValueDisplay class. + */ + public OperationValueDisplay() { + } + + /** + * Get the operation property: The display name of the operation. + * + * @return the operation value. + */ + public String operation() { + return this.operation; + } + + /** + * Get the resource property: The display name of the resource the operation applies to. + * + * @return the resource value. + */ + public String resource() { + return this.resource; + } + + /** + * Get the description property: The description of the operation. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the provider property: The resource provider for the operation. + * + * @return the provider value. + */ + public String provider() { + return this.provider; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationValueDisplay from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationValueDisplay 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 OperationValueDisplay. + */ + public static OperationValueDisplay fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationValueDisplay deserializedOperationValueDisplay = new OperationValueDisplay(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("operation".equals(fieldName)) { + deserializedOperationValueDisplay.operation = reader.getString(); + } else if ("resource".equals(fieldName)) { + deserializedOperationValueDisplay.resource = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedOperationValueDisplay.description = reader.getString(); + } else if ("provider".equals(fieldName)) { + deserializedOperationValueDisplay.provider = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationValueDisplay; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueInner.java new file mode 100644 index 000000000000..8d4a6a194969 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueInner.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 java.io.IOException; + +/** + * Describes the properties of a Operation value. + */ +@Immutable +public final class OperationValueInner implements JsonSerializable { + /* + * The origin of the operation. + */ + private String origin; + + /* + * The name of the operation. + */ + private String name; + + /* + * Describes the properties of a Operation Value Display. + */ + private OperationValueDisplay innerDisplay; + + /** + * Creates an instance of OperationValueInner class. + */ + public OperationValueInner() { + } + + /** + * Get the origin property: The origin of the operation. + * + * @return the origin value. + */ + public String origin() { + return this.origin; + } + + /** + * Get the name property: The name of the operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the innerDisplay property: Describes the properties of a Operation Value Display. + * + * @return the innerDisplay value. + */ + private OperationValueDisplay innerDisplay() { + return this.innerDisplay; + } + + /** + * Get the operation property: The display name of the operation. + * + * @return the operation value. + */ + public String operation() { + return this.innerDisplay() == null ? null : this.innerDisplay().operation(); + } + + /** + * Get the resource property: The display name of the resource the operation applies to. + * + * @return the resource value. + */ + public String resource() { + return this.innerDisplay() == null ? null : this.innerDisplay().resource(); + } + + /** + * Get the description property: The description of the operation. + * + * @return the description value. + */ + public String description() { + return this.innerDisplay() == null ? null : this.innerDisplay().description(); + } + + /** + * Get the provider property: The resource provider for the operation. + * + * @return the provider value. + */ + public String provider() { + return this.innerDisplay() == null ? null : this.innerDisplay().provider(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerDisplay() != null) { + innerDisplay().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("display", this.innerDisplay); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationValueInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationValueInner 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 OperationValueInner. + */ + public static OperationValueInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationValueInner deserializedOperationValueInner = new OperationValueInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("origin".equals(fieldName)) { + deserializedOperationValueInner.origin = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedOperationValueInner.name = reader.getString(); + } else if ("display".equals(fieldName)) { + deserializedOperationValueInner.innerDisplay = OperationValueDisplay.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationValueInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OutboundEnvironmentEndpointInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OutboundEnvironmentEndpointInner.java new file mode 100644 index 000000000000..f60ba9c31a8c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OutboundEnvironmentEndpointInner.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.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 com.azure.resourcemanager.containerservice.models.EndpointDependency; +import java.io.IOException; +import java.util.List; + +/** + * Egress endpoints which AKS agent nodes connect to for common purpose. + */ +@Fluent +public final class OutboundEnvironmentEndpointInner implements JsonSerializable { + /* + * The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. + */ + private String category; + + /* + * The endpoints that AKS agent nodes connect to + */ + private List endpoints; + + /** + * Creates an instance of OutboundEnvironmentEndpointInner class. + */ + public OutboundEnvironmentEndpointInner() { + } + + /** + * Get the category property: The category of endpoints accessed by the AKS agent node, e.g. + * azure-resource-management, apiserver, etc. + * + * @return the category value. + */ + public String category() { + return this.category; + } + + /** + * Set the category property: The category of endpoints accessed by the AKS agent node, e.g. + * azure-resource-management, apiserver, etc. + * + * @param category the category value to set. + * @return the OutboundEnvironmentEndpointInner object itself. + */ + public OutboundEnvironmentEndpointInner withCategory(String category) { + this.category = category; + return this; + } + + /** + * Get the endpoints property: The endpoints that AKS agent nodes connect to. + * + * @return the endpoints value. + */ + public List endpoints() { + return this.endpoints; + } + + /** + * Set the endpoints property: The endpoints that AKS agent nodes connect to. + * + * @param endpoints the endpoints value to set. + * @return the OutboundEnvironmentEndpointInner object itself. + */ + public OutboundEnvironmentEndpointInner withEndpoints(List endpoints) { + this.endpoints = endpoints; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (endpoints() != null) { + endpoints().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("category", this.category); + jsonWriter.writeArrayField("endpoints", this.endpoints, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OutboundEnvironmentEndpointInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OutboundEnvironmentEndpointInner 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 OutboundEnvironmentEndpointInner. + */ + public static OutboundEnvironmentEndpointInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OutboundEnvironmentEndpointInner deserializedOutboundEnvironmentEndpointInner + = new OutboundEnvironmentEndpointInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("category".equals(fieldName)) { + deserializedOutboundEnvironmentEndpointInner.category = reader.getString(); + } else if ("endpoints".equals(fieldName)) { + List endpoints + = reader.readArray(reader1 -> EndpointDependency.fromJson(reader1)); + deserializedOutboundEnvironmentEndpointInner.endpoints = endpoints; + } else { + reader.skipChildren(); + } + } + + return deserializedOutboundEnvironmentEndpointInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionInner.java new file mode 100644 index 000000000000..d6598faf679b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionInner.java @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.PrivateEndpoint; +import com.azure.resourcemanager.containerservice.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.containerservice.models.PrivateLinkServiceConnectionState; +import java.io.IOException; + +/** + * A private endpoint connection. + */ +@Fluent +public final class PrivateEndpointConnectionInner extends ProxyResource { + /* + * The properties of a private endpoint connection. + */ + private PrivateEndpointConnectionProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of PrivateEndpointConnectionInner class. + */ + public PrivateEndpointConnectionInner() { + } + + /** + * Get the innerProperties property: The properties of a private endpoint connection. + * + * @return the innerProperties value. + */ + private PrivateEndpointConnectionProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the provisioningState property: The current provisioning state. + * + * @return the provisioningState value. + */ + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the privateEndpoint property: The resource of private endpoint. + * + * @return the privateEndpoint value. + */ + public PrivateEndpoint privateEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); + } + + /** + * Set the privateEndpoint property: The resource of private endpoint. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateEndpoint(privateEndpoint); + return this; + } + + /** + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); + } + + /** + * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner + withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpointConnectionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnectionInner 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 PrivateEndpointConnectionInner. + */ + public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnectionInner deserializedPrivateEndpointConnectionInner + = new PrivateEndpointConnectionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.innerProperties + = PrivateEndpointConnectionProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnectionInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionListResultInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionListResultInner.java new file mode 100644 index 000000000000..3d5b7a349f39 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionListResultInner.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.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; + +/** + * A list of private endpoint connections. + */ +@Fluent +public final class PrivateEndpointConnectionListResultInner + implements JsonSerializable { + /* + * The collection value. + */ + private List value; + + /** + * Creates an instance of PrivateEndpointConnectionListResultInner class. + */ + public PrivateEndpointConnectionListResultInner() { + } + + /** + * Get the value property: The collection value. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The collection value. + * + * @param value the value value to set. + * @return the PrivateEndpointConnectionListResultInner object itself. + */ + public PrivateEndpointConnectionListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpointConnectionListResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnectionListResultInner 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 PrivateEndpointConnectionListResultInner. + */ + public static PrivateEndpointConnectionListResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnectionListResultInner deserializedPrivateEndpointConnectionListResultInner + = new PrivateEndpointConnectionListResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); + deserializedPrivateEndpointConnectionListResultInner.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnectionListResultInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionProperties.java new file mode 100644 index 000000000000..1ba3b3f5c011 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionProperties.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.PrivateEndpoint; +import com.azure.resourcemanager.containerservice.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.containerservice.models.PrivateLinkServiceConnectionState; +import java.io.IOException; + +/** + * Properties of a private endpoint connection. + */ +@Fluent +public final class PrivateEndpointConnectionProperties + implements JsonSerializable { + /* + * The current provisioning state. + */ + private PrivateEndpointConnectionProvisioningState provisioningState; + + /* + * The resource of private endpoint. + */ + private PrivateEndpoint privateEndpoint; + + /* + * A collection of information about the state of the connection between service consumer and provider. + */ + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /** + * Creates an instance of PrivateEndpointConnectionProperties class. + */ + public PrivateEndpointConnectionProperties() { + } + + /** + * Get the provisioningState property: The current provisioning state. + * + * @return the provisioningState value. + */ + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the privateEndpoint property: The resource of private endpoint. + * + * @return the privateEndpoint value. + */ + public PrivateEndpoint privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set the privateEndpoint property: The resource of private endpoint. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties + withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (privateEndpoint() != null) { + privateEndpoint().validate(); + } + if (privateLinkServiceConnectionState() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property privateLinkServiceConnectionState in model PrivateEndpointConnectionProperties")); + } else { + privateLinkServiceConnectionState().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState); + jsonWriter.writeJsonField("privateEndpoint", this.privateEndpoint); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpointConnectionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnectionProperties 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 PrivateEndpointConnectionProperties. + */ + public static PrivateEndpointConnectionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnectionProperties deserializedPrivateEndpointConnectionProperties + = new PrivateEndpointConnectionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("privateLinkServiceConnectionState".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.privateLinkServiceConnectionState + = PrivateLinkServiceConnectionState.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.provisioningState + = PrivateEndpointConnectionProvisioningState.fromString(reader.getString()); + } else if ("privateEndpoint".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.privateEndpoint = PrivateEndpoint.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnectionProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourceInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourceInner.java new file mode 100644 index 000000000000..92cfef3b82e8 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourceInner.java @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.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; + +/** + * A private link resource. + */ +@Fluent +public final class PrivateLinkResourceInner implements JsonSerializable { + /* + * The ID of the private link resource. + */ + private String id; + + /* + * The name of the private link resource. See [naming rules](https://aka.ms/search-naming-rules) for more details. + */ + private String name; + + /* + * The resource type. + */ + private String type; + + /* + * The group ID of the resource. + */ + private String groupId; + + /* + * The RequiredMembers of the resource + */ + private List requiredMembers; + + /* + * The private link service ID of the resource, this field is exposed only to NRP internally. + */ + private String privateLinkServiceId; + + /** + * Creates an instance of PrivateLinkResourceInner class. + */ + public PrivateLinkResourceInner() { + } + + /** + * Get the id property: The ID of the private link resource. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The ID of the private link resource. + * + * @param id the id value to set. + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: The name of the private link resource. See [naming + * rules](https://aka.ms/search-naming-rules) for more details. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the private link resource. See [naming + * rules](https://aka.ms/search-naming-rules) for more details. + * + * @param name the name value to set. + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: The resource type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: The resource type. + * + * @param type the type value to set. + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withType(String type) { + this.type = type; + return this; + } + + /** + * Get the groupId property: The group ID of the resource. + * + * @return the groupId value. + */ + public String groupId() { + return this.groupId; + } + + /** + * Set the groupId property: The group ID of the resource. + * + * @param groupId the groupId value to set. + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withGroupId(String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get the requiredMembers property: The RequiredMembers of the resource. + * + * @return the requiredMembers value. + */ + public List requiredMembers() { + return this.requiredMembers; + } + + /** + * Set the requiredMembers property: The RequiredMembers of the resource. + * + * @param requiredMembers the requiredMembers value to set. + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withRequiredMembers(List requiredMembers) { + this.requiredMembers = requiredMembers; + return this; + } + + /** + * Get the privateLinkServiceId property: The private link service ID of the resource, this field is exposed only to + * NRP internally. + * + * @return the privateLinkServiceId value. + */ + public String privateLinkServiceId() { + return this.privateLinkServiceId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("type", this.type); + jsonWriter.writeStringField("groupId", this.groupId); + jsonWriter.writeArrayField("requiredMembers", this.requiredMembers, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourceInner 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 PrivateLinkResourceInner. + */ + public static PrivateLinkResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourceInner deserializedPrivateLinkResourceInner = new PrivateLinkResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateLinkResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPrivateLinkResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPrivateLinkResourceInner.type = reader.getString(); + } else if ("groupId".equals(fieldName)) { + deserializedPrivateLinkResourceInner.groupId = reader.getString(); + } else if ("requiredMembers".equals(fieldName)) { + List requiredMembers = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateLinkResourceInner.requiredMembers = requiredMembers; + } else if ("privateLinkServiceID".equals(fieldName)) { + deserializedPrivateLinkResourceInner.privateLinkServiceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourceInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourcesListResultInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourcesListResultInner.java new file mode 100644 index 000000000000..5d38ebfc0410 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourcesListResultInner.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.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; + +/** + * A list of private link resources. + */ +@Fluent +public final class PrivateLinkResourcesListResultInner + implements JsonSerializable { + /* + * The collection value. + */ + private List value; + + /** + * Creates an instance of PrivateLinkResourcesListResultInner class. + */ + public PrivateLinkResourcesListResultInner() { + } + + /** + * Get the value property: The collection value. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The collection value. + * + * @param value the value value to set. + * @return the PrivateLinkResourcesListResultInner object itself. + */ + public PrivateLinkResourcesListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResourcesListResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourcesListResultInner 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 PrivateLinkResourcesListResultInner. + */ + public static PrivateLinkResourcesListResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourcesListResultInner deserializedPrivateLinkResourcesListResultInner + = new PrivateLinkResourcesListResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PrivateLinkResourceInner.fromJson(reader1)); + deserializedPrivateLinkResourcesListResultInner.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourcesListResultInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/RunCommandResultInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/RunCommandResultInner.java new file mode 100644 index 000000000000..17d578d3da75 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/RunCommandResultInner.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 java.io.IOException; +import java.time.OffsetDateTime; + +/** + * run command result. + */ +@Immutable +public final class RunCommandResultInner implements JsonSerializable { + /* + * The command id. + */ + private String id; + + /* + * Properties of command result. + */ + private CommandResultProperties innerProperties; + + /** + * Creates an instance of RunCommandResultInner class. + */ + public RunCommandResultInner() { + } + + /** + * Get the id property: The command id. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the innerProperties property: Properties of command result. + * + * @return the innerProperties value. + */ + private CommandResultProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the provisioningState property: provisioning State. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the exitCode property: The exit code of the command. + * + * @return the exitCode value. + */ + public Integer exitCode() { + return this.innerProperties() == null ? null : this.innerProperties().exitCode(); + } + + /** + * Get the startedAt property: The time when the command started. + * + * @return the startedAt value. + */ + public OffsetDateTime startedAt() { + return this.innerProperties() == null ? null : this.innerProperties().startedAt(); + } + + /** + * Get the finishedAt property: The time when the command finished. + * + * @return the finishedAt value. + */ + public OffsetDateTime finishedAt() { + return this.innerProperties() == null ? null : this.innerProperties().finishedAt(); + } + + /** + * Get the logs property: The command output. + * + * @return the logs value. + */ + public String logs() { + return this.innerProperties() == null ? null : this.innerProperties().logs(); + } + + /** + * Get the reason property: An explanation of why provisioningState is set to failed (if so). + * + * @return the reason value. + */ + public String reason() { + return this.innerProperties() == null ? null : this.innerProperties().reason(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RunCommandResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RunCommandResultInner 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 RunCommandResultInner. + */ + public static RunCommandResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RunCommandResultInner deserializedRunCommandResultInner = new RunCommandResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRunCommandResultInner.id = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedRunCommandResultInner.innerProperties = CommandResultProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRunCommandResultInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotInner.java new file mode 100644 index 000000000000..316c26c3236c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotInner.java @@ -0,0 +1,288 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.CreationData; +import com.azure.resourcemanager.containerservice.models.OSSku; +import com.azure.resourcemanager.containerservice.models.OSType; +import com.azure.resourcemanager.containerservice.models.SnapshotType; +import java.io.IOException; +import java.util.Map; + +/** + * A node pool snapshot resource. + */ +@Fluent +public final class SnapshotInner extends Resource { + /* + * Properties of a snapshot. + */ + private SnapshotProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of SnapshotInner class. + */ + public SnapshotInner() { + } + + /** + * Get the innerProperties property: Properties of a snapshot. + * + * @return the innerProperties value. + */ + private SnapshotProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public SnapshotInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SnapshotInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the creationData property: CreationData to be used to specify the source agent pool resource ID to create + * this snapshot. + * + * @return the creationData value. + */ + public CreationData creationData() { + return this.innerProperties() == null ? null : this.innerProperties().creationData(); + } + + /** + * Set the creationData property: CreationData to be used to specify the source agent pool resource ID to create + * this snapshot. + * + * @param creationData the creationData value to set. + * @return the SnapshotInner object itself. + */ + public SnapshotInner withCreationData(CreationData creationData) { + if (this.innerProperties() == null) { + this.innerProperties = new SnapshotProperties(); + } + this.innerProperties().withCreationData(creationData); + return this; + } + + /** + * Get the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @return the snapshotType value. + */ + public SnapshotType snapshotType() { + return this.innerProperties() == null ? null : this.innerProperties().snapshotType(); + } + + /** + * Set the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @param snapshotType the snapshotType value to set. + * @return the SnapshotInner object itself. + */ + public SnapshotInner withSnapshotType(SnapshotType snapshotType) { + if (this.innerProperties() == null) { + this.innerProperties = new SnapshotProperties(); + } + this.innerProperties().withSnapshotType(snapshotType); + return this; + } + + /** + * Get the kubernetesVersion property: The version of Kubernetes. + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.innerProperties() == null ? null : this.innerProperties().kubernetesVersion(); + } + + /** + * Get the nodeImageVersion property: The version of node image. + * + * @return the nodeImageVersion value. + */ + public String nodeImageVersion() { + return this.innerProperties() == null ? null : this.innerProperties().nodeImageVersion(); + } + + /** + * Get the osType property: The operating system type. The default is Linux. + * + * @return the osType value. + */ + public OSType osType() { + return this.innerProperties() == null ? null : this.innerProperties().osType(); + } + + /** + * Get the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. + * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is + * Windows. + * + * @return the osSku value. + */ + public OSSku osSku() { + return this.innerProperties() == null ? null : this.innerProperties().osSku(); + } + + /** + * Get the vmSize property: The size of the VM. + * + * @return the vmSize value. + */ + public String vmSize() { + return this.innerProperties() == null ? null : this.innerProperties().vmSize(); + } + + /** + * Get the enableFips property: Whether to use a FIPS-enabled OS. + * + * @return the enableFips value. + */ + public Boolean enableFips() { + return this.innerProperties() == null ? null : this.innerProperties().enableFips(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SnapshotInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SnapshotInner 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 SnapshotInner. + */ + public static SnapshotInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SnapshotInner deserializedSnapshotInner = new SnapshotInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSnapshotInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSnapshotInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSnapshotInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedSnapshotInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSnapshotInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedSnapshotInner.innerProperties = SnapshotProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedSnapshotInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSnapshotInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotProperties.java new file mode 100644 index 000000000000..4a94514b28dc --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotProperties.java @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.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 com.azure.resourcemanager.containerservice.models.CreationData; +import com.azure.resourcemanager.containerservice.models.OSSku; +import com.azure.resourcemanager.containerservice.models.OSType; +import com.azure.resourcemanager.containerservice.models.SnapshotType; +import java.io.IOException; + +/** + * Properties used to configure a node pool snapshot. + */ +@Fluent +public final class SnapshotProperties implements JsonSerializable { + /* + * CreationData to be used to specify the source agent pool resource ID to create this snapshot. + */ + private CreationData creationData; + + /* + * The type of a snapshot. The default is NodePool. + */ + private SnapshotType snapshotType; + + /* + * The version of Kubernetes. + */ + private String kubernetesVersion; + + /* + * The version of node image. + */ + private String nodeImageVersion; + + /* + * The operating system type. The default is Linux. + */ + private OSType osType; + + /* + * Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 + * when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + */ + private OSSku osSku; + + /* + * The size of the VM. + */ + private String vmSize; + + /* + * Whether to use a FIPS-enabled OS. + */ + private Boolean enableFips; + + /** + * Creates an instance of SnapshotProperties class. + */ + public SnapshotProperties() { + } + + /** + * Get the creationData property: CreationData to be used to specify the source agent pool resource ID to create + * this snapshot. + * + * @return the creationData value. + */ + public CreationData creationData() { + return this.creationData; + } + + /** + * Set the creationData property: CreationData to be used to specify the source agent pool resource ID to create + * this snapshot. + * + * @param creationData the creationData value to set. + * @return the SnapshotProperties object itself. + */ + public SnapshotProperties withCreationData(CreationData creationData) { + this.creationData = creationData; + return this; + } + + /** + * Get the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @return the snapshotType value. + */ + public SnapshotType snapshotType() { + return this.snapshotType; + } + + /** + * Set the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @param snapshotType the snapshotType value to set. + * @return the SnapshotProperties object itself. + */ + public SnapshotProperties withSnapshotType(SnapshotType snapshotType) { + this.snapshotType = snapshotType; + return this; + } + + /** + * Get the kubernetesVersion property: The version of Kubernetes. + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Get the nodeImageVersion property: The version of node image. + * + * @return the nodeImageVersion value. + */ + public String nodeImageVersion() { + return this.nodeImageVersion; + } + + /** + * Get the osType property: The operating system type. The default is Linux. + * + * @return the osType value. + */ + public OSType osType() { + return this.osType; + } + + /** + * Get the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. + * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is + * Windows. + * + * @return the osSku value. + */ + public OSSku osSku() { + return this.osSku; + } + + /** + * Get the vmSize property: The size of the VM. + * + * @return the vmSize value. + */ + public String vmSize() { + return this.vmSize; + } + + /** + * Get the enableFips property: Whether to use a FIPS-enabled OS. + * + * @return the enableFips value. + */ + public Boolean enableFips() { + return this.enableFips; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (creationData() != null) { + creationData().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("creationData", this.creationData); + jsonWriter.writeStringField("snapshotType", this.snapshotType == null ? null : this.snapshotType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SnapshotProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SnapshotProperties 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 SnapshotProperties. + */ + public static SnapshotProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SnapshotProperties deserializedSnapshotProperties = new SnapshotProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("creationData".equals(fieldName)) { + deserializedSnapshotProperties.creationData = CreationData.fromJson(reader); + } else if ("snapshotType".equals(fieldName)) { + deserializedSnapshotProperties.snapshotType = SnapshotType.fromString(reader.getString()); + } else if ("kubernetesVersion".equals(fieldName)) { + deserializedSnapshotProperties.kubernetesVersion = reader.getString(); + } else if ("nodeImageVersion".equals(fieldName)) { + deserializedSnapshotProperties.nodeImageVersion = reader.getString(); + } else if ("osType".equals(fieldName)) { + deserializedSnapshotProperties.osType = OSType.fromString(reader.getString()); + } else if ("osSku".equals(fieldName)) { + deserializedSnapshotProperties.osSku = OSSku.fromString(reader.getString()); + } else if ("vmSize".equals(fieldName)) { + deserializedSnapshotProperties.vmSize = reader.getString(); + } else if ("enableFIPS".equals(fieldName)) { + deserializedSnapshotProperties.enableFips = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedSnapshotProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingInner.java new file mode 100644 index 000000000000..b52b9665d120 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingInner.java @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.TrustedAccessRoleBindingProvisioningState; +import java.io.IOException; +import java.util.List; + +/** + * Defines binding between a resource and role. + */ +@Fluent +public final class TrustedAccessRoleBindingInner extends ProxyResource { + /* + * Properties for trusted access role binding + */ + private TrustedAccessRoleBindingProperties innerProperties = new TrustedAccessRoleBindingProperties(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of TrustedAccessRoleBindingInner class. + */ + public TrustedAccessRoleBindingInner() { + } + + /** + * Get the innerProperties property: Properties for trusted access role binding. + * + * @return the innerProperties value. + */ + private TrustedAccessRoleBindingProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the provisioningState property: The current provisioning state of trusted access role binding. + * + * @return the provisioningState value. + */ + public TrustedAccessRoleBindingProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the sourceResourceId property: The ARM resource ID of source resource that trusted access is configured for. + * + * @return the sourceResourceId value. + */ + public String sourceResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().sourceResourceId(); + } + + /** + * Set the sourceResourceId property: The ARM resource ID of source resource that trusted access is configured for. + * + * @param sourceResourceId the sourceResourceId value to set. + * @return the TrustedAccessRoleBindingInner object itself. + */ + public TrustedAccessRoleBindingInner withSourceResourceId(String sourceResourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new TrustedAccessRoleBindingProperties(); + } + this.innerProperties().withSourceResourceId(sourceResourceId); + return this; + } + + /** + * Get the roles property: A list of roles to bind, each item is a resource type qualified role name. For example: + * 'Microsoft.MachineLearningServices/workspaces/reader'. + * + * @return the roles value. + */ + public List roles() { + return this.innerProperties() == null ? null : this.innerProperties().roles(); + } + + /** + * Set the roles property: A list of roles to bind, each item is a resource type qualified role name. For example: + * 'Microsoft.MachineLearningServices/workspaces/reader'. + * + * @param roles the roles value to set. + * @return the TrustedAccessRoleBindingInner object itself. + */ + public TrustedAccessRoleBindingInner withRoles(List roles) { + if (this.innerProperties() == null) { + this.innerProperties = new TrustedAccessRoleBindingProperties(); + } + this.innerProperties().withRoles(roles); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model TrustedAccessRoleBindingInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TrustedAccessRoleBindingInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrustedAccessRoleBindingInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrustedAccessRoleBindingInner 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 TrustedAccessRoleBindingInner. + */ + public static TrustedAccessRoleBindingInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrustedAccessRoleBindingInner deserializedTrustedAccessRoleBindingInner + = new TrustedAccessRoleBindingInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedTrustedAccessRoleBindingInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedTrustedAccessRoleBindingInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedTrustedAccessRoleBindingInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedTrustedAccessRoleBindingInner.innerProperties + = TrustedAccessRoleBindingProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedTrustedAccessRoleBindingInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedTrustedAccessRoleBindingInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingProperties.java new file mode 100644 index 000000000000..1b46798c4b31 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingProperties.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.TrustedAccessRoleBindingProvisioningState; +import java.io.IOException; +import java.util.List; + +/** + * Properties for trusted access role binding. + */ +@Fluent +public final class TrustedAccessRoleBindingProperties implements JsonSerializable { + /* + * The current provisioning state of trusted access role binding. + */ + private TrustedAccessRoleBindingProvisioningState provisioningState; + + /* + * The ARM resource ID of source resource that trusted access is configured for. + */ + private String sourceResourceId; + + /* + * A list of roles to bind, each item is a resource type qualified role name. For example: + * 'Microsoft.MachineLearningServices/workspaces/reader'. + */ + private List roles; + + /** + * Creates an instance of TrustedAccessRoleBindingProperties class. + */ + public TrustedAccessRoleBindingProperties() { + } + + /** + * Get the provisioningState property: The current provisioning state of trusted access role binding. + * + * @return the provisioningState value. + */ + public TrustedAccessRoleBindingProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the sourceResourceId property: The ARM resource ID of source resource that trusted access is configured for. + * + * @return the sourceResourceId value. + */ + public String sourceResourceId() { + return this.sourceResourceId; + } + + /** + * Set the sourceResourceId property: The ARM resource ID of source resource that trusted access is configured for. + * + * @param sourceResourceId the sourceResourceId value to set. + * @return the TrustedAccessRoleBindingProperties object itself. + */ + public TrustedAccessRoleBindingProperties withSourceResourceId(String sourceResourceId) { + this.sourceResourceId = sourceResourceId; + return this; + } + + /** + * Get the roles property: A list of roles to bind, each item is a resource type qualified role name. For example: + * 'Microsoft.MachineLearningServices/workspaces/reader'. + * + * @return the roles value. + */ + public List roles() { + return this.roles; + } + + /** + * Set the roles property: A list of roles to bind, each item is a resource type qualified role name. For example: + * 'Microsoft.MachineLearningServices/workspaces/reader'. + * + * @param roles the roles value to set. + * @return the TrustedAccessRoleBindingProperties object itself. + */ + public TrustedAccessRoleBindingProperties withRoles(List roles) { + this.roles = roles; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sourceResourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property sourceResourceId in model TrustedAccessRoleBindingProperties")); + } + if (roles() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property roles in model TrustedAccessRoleBindingProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TrustedAccessRoleBindingProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sourceResourceId", this.sourceResourceId); + jsonWriter.writeArrayField("roles", this.roles, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrustedAccessRoleBindingProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrustedAccessRoleBindingProperties 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 TrustedAccessRoleBindingProperties. + */ + public static TrustedAccessRoleBindingProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrustedAccessRoleBindingProperties deserializedTrustedAccessRoleBindingProperties + = new TrustedAccessRoleBindingProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourceResourceId".equals(fieldName)) { + deserializedTrustedAccessRoleBindingProperties.sourceResourceId = reader.getString(); + } else if ("roles".equals(fieldName)) { + List roles = reader.readArray(reader1 -> reader1.getString()); + deserializedTrustedAccessRoleBindingProperties.roles = roles; + } else if ("provisioningState".equals(fieldName)) { + deserializedTrustedAccessRoleBindingProperties.provisioningState + = TrustedAccessRoleBindingProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedTrustedAccessRoleBindingProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleInner.java new file mode 100644 index 000000000000..f637cfcd4c09 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleInner.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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.containerservice.models.TrustedAccessRoleRule; +import java.io.IOException; +import java.util.List; + +/** + * Trusted access role definition. + */ +@Immutable +public final class TrustedAccessRoleInner implements JsonSerializable { + /* + * Resource type of Azure resource + */ + private String sourceResourceType; + + /* + * Name of role, name is unique under a source resource type + */ + private String name; + + /* + * List of rules for the role. This maps to 'rules' property of [Kubernetes Cluster + * Role](https://kubernetes.io/docs/reference/kubernetes-api/authorization-resources/cluster-role-v1/#ClusterRole). + */ + private List rules; + + /** + * Creates an instance of TrustedAccessRoleInner class. + */ + public TrustedAccessRoleInner() { + } + + /** + * Get the sourceResourceType property: Resource type of Azure resource. + * + * @return the sourceResourceType value. + */ + public String sourceResourceType() { + return this.sourceResourceType; + } + + /** + * Get the name property: Name of role, name is unique under a source resource type. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the rules property: List of rules for the role. This maps to 'rules' property of [Kubernetes Cluster + * Role](https://kubernetes.io/docs/reference/kubernetes-api/authorization-resources/cluster-role-v1/#ClusterRole). + * + * @return the rules value. + */ + public List rules() { + return this.rules; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (rules() != null) { + rules().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrustedAccessRoleInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrustedAccessRoleInner 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 TrustedAccessRoleInner. + */ + public static TrustedAccessRoleInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrustedAccessRoleInner deserializedTrustedAccessRoleInner = new TrustedAccessRoleInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourceResourceType".equals(fieldName)) { + deserializedTrustedAccessRoleInner.sourceResourceType = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedTrustedAccessRoleInner.name = reader.getString(); + } else if ("rules".equals(fieldName)) { + List rules + = reader.readArray(reader1 -> TrustedAccessRoleRule.fromJson(reader1)); + deserializedTrustedAccessRoleInner.rules = rules; + } else { + reader.skipChildren(); + } + } + + return deserializedTrustedAccessRoleInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/package-info.java index 7c29cfce72f3..0e534a509796 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/package-info.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Deprecated generated code +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the inner data models for OrchestratorManagementClient. - * Orchestrator Client. + * Package containing the inner data models for ContainerServiceManagementClient. + * Container Service Client. */ package com.azure.resourcemanager.containerservice.fluent.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/package-info.java index 8ca3630db960..168c6b8d8282 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/package-info.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Deprecated generated code +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the service clients for OrchestratorManagementClient. - * Orchestrator Client. + * Package containing the service clients for ContainerServiceManagementClient. + * Container Service Client. */ package com.azure.resourcemanager.containerservice.fluent; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java new file mode 100644 index 000000000000..dad390719619 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java @@ -0,0 +1,2170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.AgentPoolsClient; +import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolAvailableVersionsInner; +import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner; +import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolUpgradeProfileInner; +import com.azure.resourcemanager.containerservice.models.AgentPoolDeleteMachinesParameter; +import com.azure.resourcemanager.containerservice.models.AgentPoolListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in AgentPoolsClient. + */ +public final class AgentPoolsClientImpl implements AgentPoolsClient { + /** + * The proxy service used to perform REST calls. + */ + private final AgentPoolsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of AgentPoolsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AgentPoolsClientImpl(ContainerServiceManagementClientImpl client) { + this.service + = RestProxy.create(AgentPoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientAgentPools to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceManagementClientAgentPools") + public interface AgentPoolsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("if-none-match") String ifNoneMatch, @BodyParam("application/json") AgentPoolInner parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, + @QueryParam("ignore-pod-disruption-budget") Boolean ignorePodDisruptionBudget, + @HeaderParam("if-match") String ifMatch, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/abort") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> abortLatestOperation(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deleteMachines(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, + @BodyParam("application/json") AgentPoolDeleteMachinesParameter machines, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> upgradeNodeImageVersion(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getUpgradeProfile(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getAvailableAgentPoolVersions( + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String resourceName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String resourceName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName)); + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); + } + + /** + * Gets the specified managed cluster agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 specified managed cluster agent pool along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified managed cluster agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 specified managed cluster agent pool along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, agentPoolName, accept, context); + } + + /** + * Gets the specified managed cluster agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 specified managed cluster agent pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String resourceName, String agentPoolName) { + return getWithResponseAsync(resourceGroupName, resourceName, agentPoolName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified managed cluster agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 specified managed cluster agent pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, String agentPoolName, + Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, agentPoolName, context).block(); + } + + /** + * Gets the specified managed cluster agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 specified managed cluster agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AgentPoolInner get(String resourceGroupName, String resourceName, String agentPoolName) { + return getWithResponse(resourceGroupName, resourceName, agentPoolName, Context.NONE).getValue(); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @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 agent Pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, AgentPoolInner parameters, String ifMatch, String ifNoneMatch) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, ifMatch, ifNoneMatch, + parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @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 agent Pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, AgentPoolInner parameters, String ifMatch, String ifNoneMatch, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, ifMatch, ifNoneMatch, + parameters, accept, context); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, AgentPoolInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, AgentPoolInner parameters, String ifMatch, String ifNoneMatch) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + agentPoolName, parameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + AgentPoolInner.class, AgentPoolInner.class, this.client.getContext()); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, AgentPoolInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, AgentPoolInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + agentPoolName, parameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + AgentPoolInner.class, AgentPoolInner.class, this.client.getContext()); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AgentPoolInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, AgentPoolInner parameters, String ifMatch, String ifNoneMatch, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + agentPoolName, parameters, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + AgentPoolInner.class, AgentPoolInner.class, context); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AgentPoolInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String agentPoolName, AgentPoolInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return this + .beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch, ifNoneMatch) + .getSyncPoller(); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AgentPoolInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String agentPoolName, AgentPoolInner parameters, String ifMatch, String ifNoneMatch, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch, ifNoneMatch, + context) + .getSyncPoller(); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @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 agent Pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolInner parameters, String ifMatch, String ifNoneMatch) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch, + ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @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 agent Pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch, + ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @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 agent Pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String agentPoolName, AgentPoolInner parameters, String ifMatch, String ifNoneMatch, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch, + ifNoneMatch, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @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 agent Pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AgentPoolInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return createOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch, ifNoneMatch) + .block(); + } + + /** + * Creates or updates an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The agent pool to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @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 agent Pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AgentPoolInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolInner parameters, String ifMatch, String ifNoneMatch, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch, ifNoneMatch, + context).block(); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName, Boolean ignorePodDisruptionBudget, String ifMatch) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, + ignorePodDisruptionBudget, ifMatch, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName, Boolean ignorePodDisruptionBudget, String ifMatch, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch, accept, context); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String agentPoolName, Boolean ignorePodDisruptionBudget, String ifMatch) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, agentPoolName, + ignorePodDisruptionBudget, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String agentPoolName) { + final Boolean ignorePodDisruptionBudget = null; + final String ifMatch = null; + Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, agentPoolName, + ignorePodDisruptionBudget, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String agentPoolName, Boolean ignorePodDisruptionBudget, String ifMatch, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, agentPoolName, + ignorePodDisruptionBudget, ifMatch, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String agentPoolName) { + final Boolean ignorePodDisruptionBudget = null; + final String ifMatch = null; + return this.beginDeleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch) + .getSyncPoller(); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String agentPoolName, Boolean ignorePodDisruptionBudget, String ifMatch, Context context) { + return this + .beginDeleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch, + context) + .getSyncPoller(); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String resourceName, String agentPoolName, + Boolean ignorePodDisruptionBudget, String ifMatch) { + return beginDeleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String resourceName, String agentPoolName) { + final Boolean ignorePodDisruptionBudget = null; + final String ifMatch = null; + return beginDeleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String agentPoolName, + Boolean ignorePodDisruptionBudget, String ifMatch, Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String agentPoolName) { + final Boolean ignorePodDisruptionBudget = null; + final String ifMatch = null; + deleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch).block(); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param ifMatch The request should only proceed if an entity matches this string. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String agentPoolName, + Boolean ignorePodDisruptionBudget, String ifMatch, Context context) { + deleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch, context) + .block(); + } + + /** + * Aborts last operation running on agent pool. + * + * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and + * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> abortLatestOperationWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.abortLatestOperation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Aborts last operation running on agent pool. + * + * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and + * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> abortLatestOperationWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.abortLatestOperation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, accept, context); + } + + /** + * Aborts last operation running on agent pool. + * + * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and + * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginAbortLatestOperationAsync(String resourceGroupName, + String resourceName, String agentPoolName) { + Mono>> mono + = abortLatestOperationWithResponseAsync(resourceGroupName, resourceName, agentPoolName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Aborts last operation running on agent pool. + * + * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and + * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginAbortLatestOperationAsync(String resourceGroupName, + String resourceName, String agentPoolName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = abortLatestOperationWithResponseAsync(resourceGroupName, resourceName, agentPoolName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Aborts last operation running on agent pool. + * + * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and + * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, + String agentPoolName) { + return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName).getSyncPoller(); + } + + /** + * Aborts last operation running on agent pool. + * + * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and + * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, + String agentPoolName, Context context) { + return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName, context) + .getSyncPoller(); + } + + /** + * Aborts last operation running on agent pool. + * + * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and + * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono abortLatestOperationAsync(String resourceGroupName, String resourceName, String agentPoolName) { + return beginAbortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Aborts last operation running on agent pool. + * + * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and + * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono abortLatestOperationAsync(String resourceGroupName, String resourceName, String agentPoolName, + Context context) { + return beginAbortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Aborts last operation running on agent pool. + * + * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and + * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void abortLatestOperation(String resourceGroupName, String resourceName, String agentPoolName) { + abortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName).block(); + } + + /** + * Aborts last operation running on agent pool. + * + * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and + * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can + * take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void abortLatestOperation(String resourceGroupName, String resourceName, String agentPoolName, + Context context) { + abortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName, context).block(); + } + + /** + * Deletes specific machines in an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machines A list of machines from the agent pool to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteMachinesWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, AgentPoolDeleteMachinesParameter machines) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (machines == null) { + return Mono.error(new IllegalArgumentException("Parameter machines is required and cannot be null.")); + } else { + machines.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.deleteMachines(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, machines, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes specific machines in an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machines A list of machines from the agent pool to be deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteMachinesWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, AgentPoolDeleteMachinesParameter machines, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (machines == null) { + return Mono.error(new IllegalArgumentException("Parameter machines is required and cannot be null.")); + } else { + machines.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.deleteMachines(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, machines, accept, context); + } + + /** + * Deletes specific machines in an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machines A list of machines from the agent pool to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteMachinesAsync(String resourceGroupName, String resourceName, + String agentPoolName, AgentPoolDeleteMachinesParameter machines) { + Mono>> mono + = deleteMachinesWithResponseAsync(resourceGroupName, resourceName, agentPoolName, machines); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes specific machines in an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machines A list of machines from the agent pool to be deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteMachinesAsync(String resourceGroupName, String resourceName, + String agentPoolName, AgentPoolDeleteMachinesParameter machines, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteMachinesWithResponseAsync(resourceGroupName, resourceName, agentPoolName, machines, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes specific machines in an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machines A list of machines from the agent pool to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteMachines(String resourceGroupName, String resourceName, + String agentPoolName, AgentPoolDeleteMachinesParameter machines) { + return this.beginDeleteMachinesAsync(resourceGroupName, resourceName, agentPoolName, machines).getSyncPoller(); + } + + /** + * Deletes specific machines in an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machines A list of machines from the agent pool to be deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteMachines(String resourceGroupName, String resourceName, + String agentPoolName, AgentPoolDeleteMachinesParameter machines, Context context) { + return this.beginDeleteMachinesAsync(resourceGroupName, resourceName, agentPoolName, machines, context) + .getSyncPoller(); + } + + /** + * Deletes specific machines in an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machines A list of machines from the agent pool to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteMachinesAsync(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolDeleteMachinesParameter machines) { + return beginDeleteMachinesAsync(resourceGroupName, resourceName, agentPoolName, machines).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes specific machines in an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machines A list of machines from the agent pool to be deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteMachinesAsync(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolDeleteMachinesParameter machines, Context context) { + return beginDeleteMachinesAsync(resourceGroupName, resourceName, agentPoolName, machines, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes specific machines in an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machines A list of machines from the agent pool to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteMachines(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolDeleteMachinesParameter machines) { + deleteMachinesAsync(resourceGroupName, resourceName, agentPoolName, machines).block(); + } + + /** + * Deletes specific machines in an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machines A list of machines from the agent pool to be deleted. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteMachines(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolDeleteMachinesParameter machines, Context context) { + deleteMachinesAsync(resourceGroupName, resourceName, agentPoolName, machines, context).block(); + } + + /** + * Upgrades the node image version of an agent pool to the latest. + * + * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> upgradeNodeImageVersionWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.upgradeNodeImageVersion(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Upgrades the node image version of an agent pool to the latest. + * + * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> upgradeNodeImageVersionWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.upgradeNodeImageVersion(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, accept, context); + } + + /** + * Upgrades the node image version of an agent pool to the latest. + * + * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, AgentPoolInner> + beginUpgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, String agentPoolName) { + Mono>> mono + = upgradeNodeImageVersionWithResponseAsync(resourceGroupName, resourceName, agentPoolName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + AgentPoolInner.class, AgentPoolInner.class, this.client.getContext()); + } + + /** + * Upgrades the node image version of an agent pool to the latest. + * + * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AgentPoolInner> beginUpgradeNodeImageVersionAsync( + String resourceGroupName, String resourceName, String agentPoolName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = upgradeNodeImageVersionWithResponseAsync(resourceGroupName, resourceName, agentPoolName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + AgentPoolInner.class, AgentPoolInner.class, context); + } + + /** + * Upgrades the node image version of an agent pool to the latest. + * + * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AgentPoolInner> beginUpgradeNodeImageVersion(String resourceGroupName, + String resourceName, String agentPoolName) { + return this.beginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).getSyncPoller(); + } + + /** + * Upgrades the node image version of an agent pool to the latest. + * + * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AgentPoolInner> beginUpgradeNodeImageVersion(String resourceGroupName, + String resourceName, String agentPoolName, Context context) { + return this.beginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName, context) + .getSyncPoller(); + } + + /** + * Upgrades the node image version of an agent pool to the latest. + * + * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono upgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, + String agentPoolName) { + return beginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Upgrades the node image version of an agent pool to the latest. + * + * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono upgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, + String agentPoolName, Context context) { + return beginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Upgrades the node image version of an agent pool to the latest. + * + * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AgentPoolInner upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName) { + return upgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).block(); + } + + /** + * Upgrades the node image version of an agent pool to the latest. + * + * Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS + * provides one new image per week with the latest updates. For more details on node image versions, see: + * https://docs.microsoft.com/azure/aks/node-image-upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AgentPoolInner upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName, + Context context) { + return upgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName, context).block(); + } + + /** + * Gets the upgrade profile for an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 upgrade profile for an agent pool along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getUpgradeProfileWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the upgrade profile for an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 upgrade profile for an agent pool along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getUpgradeProfileWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, accept, context); + } + + /** + * Gets the upgrade profile for an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 upgrade profile for an agent pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getUpgradeProfileAsync(String resourceGroupName, String resourceName, + String agentPoolName) { + return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, agentPoolName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the upgrade profile for an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 upgrade profile for an agent pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getUpgradeProfileWithResponse(String resourceGroupName, + String resourceName, String agentPoolName, Context context) { + return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, agentPoolName, context).block(); + } + + /** + * Gets the upgrade profile for an agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @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 upgrade profile for an agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AgentPoolUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName, + String agentPoolName) { + return getUpgradeProfileWithResponse(resourceGroupName, resourceName, agentPoolName, Context.NONE).getValue(); + } + + /** + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of available versions for an agent pool along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + getAvailableAgentPoolVersionsWithResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.getAvailableAgentPoolVersions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of available versions for an agent pool along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getAvailableAgentPoolVersionsWithResponseAsync(String resourceGroupName, String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getAvailableAgentPoolVersions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + } + + /** + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of available versions for an agent pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAvailableAgentPoolVersionsAsync(String resourceGroupName, + String resourceName) { + return getAvailableAgentPoolVersionsWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of available versions for an agent pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAvailableAgentPoolVersionsWithResponse(String resourceGroupName, + String resourceName, Context context) { + return getAvailableAgentPoolVersionsWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of available versions for an agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AgentPoolAvailableVersionsInner getAvailableAgentPoolVersions(String resourceGroupName, + String resourceName) { + return getAvailableAgentPoolVersionsWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientBuilder.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientBuilder.java new file mode 100644 index 000000000000..70114c534bc8 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientBuilder.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerAdapter; +import java.time.Duration; + +/** + * A builder for creating a new instance of the ContainerServiceManagementClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { ContainerServiceManagementClientImpl.class }) +public final class ContainerServiceManagementClientBuilder { + /* + * The ID of the target subscription. The value must be an UUID. + */ + private String subscriptionId; + + /** + * Sets The ID of the target subscription. The value must be an UUID. + * + * @param subscriptionId the subscriptionId value. + * @return the ContainerServiceManagementClientBuilder. + */ + public ContainerServiceManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /* + * server parameter + */ + private String endpoint; + + /** + * Sets server parameter. + * + * @param endpoint the endpoint value. + * @return the ContainerServiceManagementClientBuilder. + */ + public ContainerServiceManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The environment to connect to + */ + private AzureEnvironment environment; + + /** + * Sets The environment to connect to. + * + * @param environment the environment value. + * @return the ContainerServiceManagementClientBuilder. + */ + public ContainerServiceManagementClientBuilder environment(AzureEnvironment environment) { + this.environment = environment; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the ContainerServiceManagementClientBuilder. + */ + public ContainerServiceManagementClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The default poll interval for long-running operation + */ + private Duration defaultPollInterval; + + /** + * Sets The default poll interval for long-running operation. + * + * @param defaultPollInterval the defaultPollInterval value. + * @return the ContainerServiceManagementClientBuilder. + */ + public ContainerServiceManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the ContainerServiceManagementClientBuilder. + */ + public ContainerServiceManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /** + * Builds an instance of ContainerServiceManagementClientImpl with the provided parameters. + * + * @return an instance of ContainerServiceManagementClientImpl. + */ + public ContainerServiceManagementClientImpl buildClient() { + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + ContainerServiceManagementClientImpl client = new ContainerServiceManagementClientImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + return client; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java new file mode 100644 index 000000000000..bcfaad3533ce --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java @@ -0,0 +1,317 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.resourcemanager.containerservice.fluent.AgentPoolsClient; +import com.azure.resourcemanager.containerservice.fluent.ContainerServiceManagementClient; +import com.azure.resourcemanager.containerservice.fluent.MachinesClient; +import com.azure.resourcemanager.containerservice.fluent.MaintenanceConfigurationsClient; +import com.azure.resourcemanager.containerservice.fluent.ManagedClustersClient; +import com.azure.resourcemanager.containerservice.fluent.ManagedNamespacesClient; +import com.azure.resourcemanager.containerservice.fluent.OperationsClient; +import com.azure.resourcemanager.containerservice.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.containerservice.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.containerservice.fluent.ResolvePrivateLinkServiceIdsClient; +import com.azure.resourcemanager.containerservice.fluent.SnapshotsClient; +import com.azure.resourcemanager.containerservice.fluent.TrustedAccessRoleBindingsClient; +import com.azure.resourcemanager.containerservice.fluent.TrustedAccessRolesClient; +import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; +import java.time.Duration; + +/** + * Initializes a new instance of the ContainerServiceManagementClientImpl type. + */ +@ServiceClient(builder = ContainerServiceManagementClientBuilder.class) +public final class ContainerServiceManagementClientImpl extends AzureServiceClient + implements ContainerServiceManagementClient { + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** + * server parameter. + */ + private final String endpoint; + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Api Version. + */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The default poll interval for long-running operation. + */ + private final Duration defaultPollInterval; + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + public Duration getDefaultPollInterval() { + return this.defaultPollInterval; + } + + /** + * The OperationsClient object to access its operations. + */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + + /** + * The ManagedClustersClient object to access its operations. + */ + private final ManagedClustersClient managedClusters; + + /** + * Gets the ManagedClustersClient object to access its operations. + * + * @return the ManagedClustersClient object. + */ + public ManagedClustersClient getManagedClusters() { + return this.managedClusters; + } + + /** + * The TrustedAccessRolesClient object to access its operations. + */ + private final TrustedAccessRolesClient trustedAccessRoles; + + /** + * Gets the TrustedAccessRolesClient object to access its operations. + * + * @return the TrustedAccessRolesClient object. + */ + public TrustedAccessRolesClient getTrustedAccessRoles() { + return this.trustedAccessRoles; + } + + /** + * The SnapshotsClient object to access its operations. + */ + private final SnapshotsClient snapshots; + + /** + * Gets the SnapshotsClient object to access its operations. + * + * @return the SnapshotsClient object. + */ + public SnapshotsClient getSnapshots() { + return this.snapshots; + } + + /** + * The AgentPoolsClient object to access its operations. + */ + private final AgentPoolsClient agentPools; + + /** + * Gets the AgentPoolsClient object to access its operations. + * + * @return the AgentPoolsClient object. + */ + public AgentPoolsClient getAgentPools() { + return this.agentPools; + } + + /** + * The MachinesClient object to access its operations. + */ + private final MachinesClient machines; + + /** + * Gets the MachinesClient object to access its operations. + * + * @return the MachinesClient object. + */ + public MachinesClient getMachines() { + return this.machines; + } + + /** + * The MaintenanceConfigurationsClient object to access its operations. + */ + private final MaintenanceConfigurationsClient maintenanceConfigurations; + + /** + * Gets the MaintenanceConfigurationsClient object to access its operations. + * + * @return the MaintenanceConfigurationsClient object. + */ + public MaintenanceConfigurationsClient getMaintenanceConfigurations() { + return this.maintenanceConfigurations; + } + + /** + * The ManagedNamespacesClient object to access its operations. + */ + private final ManagedNamespacesClient managedNamespaces; + + /** + * Gets the ManagedNamespacesClient object to access its operations. + * + * @return the ManagedNamespacesClient object. + */ + public ManagedNamespacesClient getManagedNamespaces() { + return this.managedNamespaces; + } + + /** + * The PrivateEndpointConnectionsClient object to access its operations. + */ + private final PrivateEndpointConnectionsClient privateEndpointConnections; + + /** + * Gets the PrivateEndpointConnectionsClient object to access its operations. + * + * @return the PrivateEndpointConnectionsClient object. + */ + public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * The PrivateLinkResourcesClient object to access its operations. + */ + private final PrivateLinkResourcesClient privateLinkResources; + + /** + * Gets the PrivateLinkResourcesClient object to access its operations. + * + * @return the PrivateLinkResourcesClient object. + */ + public PrivateLinkResourcesClient getPrivateLinkResources() { + return this.privateLinkResources; + } + + /** + * The ResolvePrivateLinkServiceIdsClient object to access its operations. + */ + private final ResolvePrivateLinkServiceIdsClient resolvePrivateLinkServiceIds; + + /** + * Gets the ResolvePrivateLinkServiceIdsClient object to access its operations. + * + * @return the ResolvePrivateLinkServiceIdsClient object. + */ + public ResolvePrivateLinkServiceIdsClient getResolvePrivateLinkServiceIds() { + return this.resolvePrivateLinkServiceIds; + } + + /** + * The TrustedAccessRoleBindingsClient object to access its operations. + */ + private final TrustedAccessRoleBindingsClient trustedAccessRoleBindings; + + /** + * Gets the TrustedAccessRoleBindingsClient object to access its operations. + * + * @return the TrustedAccessRoleBindingsClient object. + */ + public TrustedAccessRoleBindingsClient getTrustedAccessRoleBindings() { + return this.trustedAccessRoleBindings; + } + + /** + * Initializes an instance of ContainerServiceManagementClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param defaultPollInterval The default poll interval for long-running operation. + * @param environment The Azure environment. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. + * @param endpoint server parameter. + */ + ContainerServiceManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + super(httpPipeline, serializerAdapter, environment); + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.defaultPollInterval = defaultPollInterval; + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = "2025-10-01"; + this.operations = new OperationsClientImpl(this); + this.managedClusters = new ManagedClustersClientImpl(this); + this.trustedAccessRoles = new TrustedAccessRolesClientImpl(this); + this.snapshots = new SnapshotsClientImpl(this); + this.agentPools = new AgentPoolsClientImpl(this); + this.machines = new MachinesClientImpl(this); + this.maintenanceConfigurations = new MaintenanceConfigurationsClientImpl(this); + this.managedNamespaces = new ManagedNamespacesClientImpl(this); + this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); + this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); + this.resolvePrivateLinkServiceIds = new ResolvePrivateLinkServiceIdsClientImpl(this); + this.trustedAccessRoleBindings = new TrustedAccessRoleBindingsClientImpl(this); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java new file mode 100644 index 000000000000..41d6203753d4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java @@ -0,0 +1,442 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservice.fluent.MachinesClient; +import com.azure.resourcemanager.containerservice.fluent.models.MachineInner; +import com.azure.resourcemanager.containerservice.models.MachineListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in MachinesClient. + */ +public final class MachinesClientImpl implements MachinesClient { + /** + * The proxy service used to perform REST calls. + */ + private final MachinesService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of MachinesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MachinesClientImpl(ContainerServiceManagementClientImpl client) { + this.service = RestProxy.create(MachinesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientMachines to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceManagementClientMachines") + public interface MachinesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, @PathParam("machineName") String machineName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a list of machines in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of machines in the specified agent pool along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String resourceName, + String agentPoolName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of machines in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of machines in the specified agent pool along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String resourceName, + String agentPoolName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, agentPoolName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of machines in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of machines in the specified agent pool as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String resourceName, String agentPoolName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, agentPoolName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of machines in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of machines in the specified agent pool as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String resourceName, String agentPoolName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, agentPoolName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of machines in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of machines in the specified agent pool as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName, String agentPoolName) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName, agentPoolName)); + } + + /** + * Gets a list of machines in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of machines in the specified agent pool as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName, String agentPoolName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName, agentPoolName, context)); + } + + /** + * Get a specific machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a specific machine in the specified agent pool along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName, String machineName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, machineName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a specific machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a specific machine in the specified agent pool along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName, String machineName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, agentPoolName, machineName, accept, context); + } + + /** + * Get a specific machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a specific machine in the specified agent pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String resourceName, String agentPoolName, + String machineName) { + return getWithResponseAsync(resourceGroupName, resourceName, agentPoolName, machineName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a specific machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a specific machine in the specified agent pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, agentPoolName, machineName, context).block(); + } + + /** + * Get a specific machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a specific machine in the specified agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MachineInner get(String resourceGroupName, String resourceName, String agentPoolName, String machineName) { + return getWithResponse(resourceGroupName, resourceName, agentPoolName, machineName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of machines in the specified agent pool along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of machines in the specified agent pool along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java new file mode 100644 index 000000000000..9b1c74156581 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java @@ -0,0 +1,747 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservice.fluent.MaintenanceConfigurationsClient; +import com.azure.resourcemanager.containerservice.fluent.models.MaintenanceConfigurationInner; +import com.azure.resourcemanager.containerservice.models.MaintenanceConfigurationListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in MaintenanceConfigurationsClient. + */ +public final class MaintenanceConfigurationsClientImpl implements MaintenanceConfigurationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final MaintenanceConfigurationsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of MaintenanceConfigurationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MaintenanceConfigurationsClientImpl(ContainerServiceManagementClientImpl client) { + this.service = RestProxy.create(MaintenanceConfigurationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientMaintenanceConfigurations to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceManagementClientMaintenanceConfigurations") + public interface MaintenanceConfigurationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedCluster(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("configName") String configName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("configName") String configName, + @BodyParam("application/json") MaintenanceConfigurationInner parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("configName") String configName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedClusterNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByManagedClusterSinglePageAsync(String resourceGroupName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByManagedClusterSinglePageAsync(String resourceGroupName, String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByManagedClusterAsync(String resourceGroupName, + String resourceName) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByManagedClusterAsync(String resourceGroupName, + String resourceName, Context context) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, + String resourceName) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); + } + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, + String resourceName, Context context) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); + } + + /** + * Gets the specified maintenance configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @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 specified maintenance configuration of a managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, + String resourceName, String configName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (configName == null) { + return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, configName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified maintenance configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @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 specified maintenance configuration of a managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String resourceName, String configName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (configName == null) { + return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, configName, accept, context); + } + + /** + * Gets the specified maintenance configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @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 specified maintenance configuration of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String resourceName, + String configName) { + return getWithResponseAsync(resourceGroupName, resourceName, configName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified maintenance configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @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 specified maintenance configuration of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, + String configName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, configName, context).block(); + } + + /** + * Gets the specified maintenance configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @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 specified maintenance configuration of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceConfigurationInner get(String resourceGroupName, String resourceName, String configName) { + return getWithResponse(resourceGroupName, resourceName, configName, Context.NONE).getValue(); + } + + /** + * Creates or updates a maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @param parameters The maintenance configuration to create or update. + * @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 planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster + * along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String configName, MaintenanceConfigurationInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (configName == null) { + return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, configName, parameters, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @param parameters The maintenance configuration to create or update. + * @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 planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster + * along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String configName, MaintenanceConfigurationInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (configName == null) { + return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, configName, parameters, accept, context); + } + + /** + * Creates or updates a maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @param parameters The maintenance configuration to create or update. + * @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 planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String configName, MaintenanceConfigurationInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, configName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates or updates a maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @param parameters The maintenance configuration to create or update. + * @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 planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster + * along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, + String resourceName, String configName, MaintenanceConfigurationInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, configName, parameters, context) + .block(); + } + + /** + * Creates or updates a maintenance configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @param parameters The maintenance configuration to create or update. + * @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 planned maintenance configuration, used to configure when updates can be deployed to a Managed Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceConfigurationInner createOrUpdate(String resourceGroupName, String resourceName, + String configName, MaintenanceConfigurationInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, resourceName, configName, parameters, Context.NONE) + .getValue(); + } + + /** + * Deletes a maintenance configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String configName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (configName == null) { + return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, configName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a maintenance configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String configName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (configName == null) { + return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, configName, accept, context); + } + + /** + * Deletes a maintenance configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String resourceName, String configName) { + return deleteWithResponseAsync(resourceGroupName, resourceName, configName).flatMap(ignored -> Mono.empty()); + } + + /** + * Deletes a maintenance configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String resourceName, String configName, + Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, configName, context).block(); + } + + /** + * Deletes a maintenance configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String configName) { + deleteWithResponse(resourceGroupName, resourceName, configName, Context.NONE); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByManagedClusterNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java new file mode 100644 index 000000000000..75c29684f314 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java @@ -0,0 +1,5442 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.ManagedClustersClient; +import com.azure.resourcemanager.containerservice.fluent.models.CredentialResultsInner; +import com.azure.resourcemanager.containerservice.fluent.models.KubernetesVersionListResultInner; +import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterAccessProfileInner; +import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterInner; +import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterUpgradeProfileInner; +import com.azure.resourcemanager.containerservice.fluent.models.MeshRevisionProfileInner; +import com.azure.resourcemanager.containerservice.fluent.models.MeshUpgradeProfileInner; +import com.azure.resourcemanager.containerservice.fluent.models.OutboundEnvironmentEndpointInner; +import com.azure.resourcemanager.containerservice.fluent.models.RunCommandResultInner; +import com.azure.resourcemanager.containerservice.models.Format; +import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterListResult; +import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClustersGetCommandResultResponse; +import com.azure.resourcemanager.containerservice.models.MeshRevisionProfileList; +import com.azure.resourcemanager.containerservice.models.MeshUpgradeProfileList; +import com.azure.resourcemanager.containerservice.models.OutboundEnvironmentEndpointCollection; +import com.azure.resourcemanager.containerservice.models.RunCommandRequest; +import com.azure.resourcemanager.containerservice.models.TagsObject; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ManagedClustersClient. + */ +public final class ManagedClustersClientImpl implements InnerSupportsGet, + InnerSupportsListing, InnerSupportsDelete, ManagedClustersClient { + /** + * The proxy service used to perform REST calls. + */ + private final ManagedClustersService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of ManagedClustersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ManagedClustersClientImpl(ContainerServiceManagementClientImpl client) { + this.service + = RestProxy.create(ManagedClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientManagedClusters to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceManagementClientManagedClusters") + public interface ManagedClustersService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/kubernetesVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listKubernetesVersions(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listMeshRevisionProfiles(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles/{mode}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getMeshRevisionProfile(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("mode") String mode, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("if-match") String ifMatch, @HeaderParam("if-none-match") String ifNoneMatch, + @BodyParam("application/json") ManagedClusterInner parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateTags(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("if-match") String ifMatch, @BodyParam("application/json") TagsObject parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("if-match") String ifMatch, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/abort") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> abortLatestOperation(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getAccessProfile(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("roleName") String roleName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono getCommandResult(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("commandId") String commandId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listClusterAdminCredentials(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @QueryParam("server-fqdn") String serverFqdn, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listClusterMonitoringUserCredentials(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @QueryParam("server-fqdn") String serverFqdn, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listClusterUserCredentials(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @QueryParam("server-fqdn") String serverFqdn, @QueryParam("format") Format format, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listMeshUpgradeProfiles(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles/{mode}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getMeshUpgradeProfile(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("mode") String mode, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listOutboundNetworkDependenciesEndpoints( + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resetAadProfile(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @BodyParam("application/json") ManagedClusterAadProfile parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resetServicePrincipalProfile(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @BodyParam("application/json") ManagedClusterServicePrincipalProfile parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> rotateClusterCertificates(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> rotateServiceAccountSigningKeys(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> runCommand(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @BodyParam("application/json") RunCommandRequest requestPayload, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> start(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> stop(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getUpgradeProfile(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listMeshRevisionProfilesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listMeshUpgradeProfilesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listOutboundNetworkDependenciesEndpointsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. + * @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 hold values properties, which is array of KubernetesVersion along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listKubernetesVersionsWithResponseAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listKubernetesVersions(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. + * @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 hold values properties, which is array of KubernetesVersion along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listKubernetesVersionsWithResponseAsync(String location, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listKubernetesVersions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context); + } + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. + * @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 hold values properties, which is array of KubernetesVersion on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listKubernetesVersionsAsync(String location) { + return listKubernetesVersionsWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. + * @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 hold values properties, which is array of KubernetesVersion along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listKubernetesVersionsWithResponse(String location, + Context context) { + return listKubernetesVersionsWithResponseAsync(location, context).block(); + } + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. + * @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 hold values properties, which is array of KubernetesVersion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KubernetesVersionListResultInner listKubernetesVersions(String location) { + return listKubernetesVersionsWithResponse(location, Context.NONE).getValue(); + } + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @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 holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMeshRevisionProfilesSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listMeshRevisionProfiles(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @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 holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMeshRevisionProfilesSinglePageAsync(String location, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listMeshRevisionProfiles(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listMeshRevisionProfilesAsync(String location) { + return new PagedFlux<>(() -> listMeshRevisionProfilesSinglePageAsync(location), + nextLink -> listMeshRevisionProfilesNextSinglePageAsync(nextLink)); + } + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMeshRevisionProfilesAsync(String location, Context context) { + return new PagedFlux<>(() -> listMeshRevisionProfilesSinglePageAsync(location, context), + nextLink -> listMeshRevisionProfilesNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMeshRevisionProfiles(String location) { + return new PagedIterable<>(listMeshRevisionProfilesAsync(location)); + } + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMeshRevisionProfiles(String location, Context context) { + return new PagedIterable<>(listMeshRevisionProfilesAsync(location, context)); + } + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @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 mesh revision profile for a mesh along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getMeshRevisionProfileWithResponseAsync(String location, + String mode) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getMeshRevisionProfile(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, mode, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @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 mesh revision profile for a mesh along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMeshRevisionProfileWithResponseAsync(String location, + String mode, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getMeshRevisionProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, mode, accept, context); + } + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @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 mesh revision profile for a mesh on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getMeshRevisionProfileAsync(String location, String mode) { + return getMeshRevisionProfileWithResponseAsync(location, mode).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @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 mesh revision profile for a mesh along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMeshRevisionProfileWithResponse(String location, String mode, + Context context) { + return getMeshRevisionProfileWithResponseAsync(location, mode, context).block(); + } + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @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 mesh revision profile for a mesh. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MeshRevisionProfileInner getMeshRevisionProfile(String location, String mode) { + return getMeshRevisionProfileWithResponse(location, mode, Context.NONE).getValue(); + } + + /** + * Gets a list of managed clusters in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed clusters in the specified subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of managed clusters in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed clusters in the specified subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of managed clusters in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed clusters in the specified subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of managed clusters in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed clusters in the specified subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of managed clusters in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed clusters in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Gets a list of managed clusters in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed clusters in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Lists managed clusters in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedCluster list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists managed clusters in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedCluster list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists managed clusters in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedCluster list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists managed clusters in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedCluster list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists managed clusters in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedCluster list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Lists managed clusters in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedCluster list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Gets a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + } + + /** + * Gets a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @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 managed cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterInner parameters, String ifMatch, String ifNoneMatch) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, ifNoneMatch, parameters, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @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 managed cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterInner parameters, String ifMatch, String ifNoneMatch, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, ifNoneMatch, parameters, accept, + context); + } + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, ManagedClusterInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, ManagedClusterInner parameters, String ifMatch, + String ifNoneMatch) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedClusterInner.class, ManagedClusterInner.class, this.client.getContext()); + } + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, ManagedClusterInner> + beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, ManagedClusterInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedClusterInner.class, ManagedClusterInner.class, this.client.getContext()); + } + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ManagedClusterInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, ManagedClusterInner parameters, String ifMatch, + String ifNoneMatch, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + parameters, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedClusterInner.class, ManagedClusterInner.class, context); + } + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ManagedClusterInner> + beginCreateOrUpdate(String resourceGroupName, String resourceName, ManagedClusterInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch) + .getSyncPoller(); + } + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ManagedClusterInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, ManagedClusterInner parameters, String ifMatch, + String ifNoneMatch, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch, context) + .getSyncPoller(); + } + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @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 managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + ManagedClusterInner parameters, String ifMatch, String ifNoneMatch) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @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 managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + ManagedClusterInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @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 managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + ManagedClusterInner parameters, String ifMatch, String ifNoneMatch, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterInner createOrUpdate(String resourceGroupName, String resourceName, + ManagedClusterInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return createOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch).block(); + } + + /** + * Creates or updates a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterInner createOrUpdate(String resourceGroupName, String resourceName, + ManagedClusterInner parameters, String ifMatch, String ifNoneMatch, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch, context).block(); + } + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param ifMatch The request should only proceed if an entity matches this string. + * @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 managed cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> updateTagsWithResponseAsync(String resourceGroupName, String resourceName, + TagsObject parameters, String ifMatch) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param ifMatch The request should only proceed if an entity matches this string. + * @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 managed cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateTagsWithResponseAsync(String resourceGroupName, String resourceName, + TagsObject parameters, String ifMatch, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, parameters, accept, context); + } + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, ManagedClusterInner> + beginUpdateTagsAsync(String resourceGroupName, String resourceName, TagsObject parameters, String ifMatch) { + Mono>> mono + = updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedClusterInner.class, ManagedClusterInner.class, this.client.getContext()); + } + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, ManagedClusterInner> + beginUpdateTagsAsync(String resourceGroupName, String resourceName, TagsObject parameters) { + final String ifMatch = null; + Mono>> mono + = updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedClusterInner.class, ManagedClusterInner.class, this.client.getContext()); + } + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ManagedClusterInner> beginUpdateTagsAsync( + String resourceGroupName, String resourceName, TagsObject parameters, String ifMatch, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, ifMatch, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedClusterInner.class, ManagedClusterInner.class, context); + } + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ManagedClusterInner> beginUpdateTags(String resourceGroupName, + String resourceName, TagsObject parameters) { + final String ifMatch = null; + return this.beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch).getSyncPoller(); + } + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ManagedClusterInner> beginUpdateTags(String resourceGroupName, + String resourceName, TagsObject parameters, String ifMatch, Context context) { + return this.beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch, context).getSyncPoller(); + } + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param ifMatch The request should only proceed if an entity matches this string. + * @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 managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateTagsAsync(String resourceGroupName, String resourceName, + TagsObject parameters, String ifMatch) { + return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags 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 managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateTagsAsync(String resourceGroupName, String resourceName, + TagsObject parameters) { + final String ifMatch = null; + return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param ifMatch The request should only proceed if an entity matches this string. + * @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 managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync(String resourceGroupName, String resourceName, + TagsObject parameters, String ifMatch, Context context) { + return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags 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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters) { + final String ifMatch = null; + return updateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch).block(); + } + + /** + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param ifMatch The request should only proceed if an entity matches this string. + * @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 managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters, + String ifMatch, Context context) { + return updateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch, context).block(); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String ifMatch) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String ifMatch, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, ifMatch, accept, context); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String ifMatch) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName) { + final String ifMatch = null; + Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String ifMatch, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName) { + final String ifMatch = null; + return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch).getSyncPoller(); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, String ifMatch, + Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch, context).getSyncPoller(); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String resourceName, String ifMatch) { + return beginDeleteAsync(resourceGroupName, resourceName, ifMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String resourceName) { + final String ifMatch = null; + return beginDeleteAsync(resourceGroupName, resourceName, ifMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String ifMatch, Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, ifMatch, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName) { + final String ifMatch = null; + deleteAsync(resourceGroupName, resourceName, ifMatch).block(); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String ifMatch, Context context) { + deleteAsync(resourceGroupName, resourceName, ifMatch, context).block(); + } + + /** + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> abortLatestOperationWithResponseAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.abortLatestOperation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> abortLatestOperationWithResponseAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.abortLatestOperation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + } + + /** + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginAbortLatestOperationAsync(String resourceGroupName, + String resourceName) { + Mono>> mono = abortLatestOperationWithResponseAsync(resourceGroupName, resourceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginAbortLatestOperationAsync(String resourceGroupName, + String resourceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = abortLatestOperationWithResponseAsync(resourceGroupName, resourceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName) { + return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName).getSyncPoller(); + } + + /** + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, + Context context) { + return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName, context).getSyncPoller(); + } + + /** + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono abortLatestOperationAsync(String resourceGroupName, String resourceName) { + return beginAbortLatestOperationAsync(resourceGroupName, resourceName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono abortLatestOperationAsync(String resourceGroupName, String resourceName, Context context) { + return beginAbortLatestOperationAsync(resourceGroupName, resourceName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void abortLatestOperation(String resourceGroupName, String resourceName) { + abortLatestOperationAsync(resourceGroupName, resourceName).block(); + } + + /** + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void abortLatestOperation(String resourceGroupName, String resourceName, Context context) { + abortLatestOperationAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed cluster Access Profile along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAccessProfileWithResponseAsync(String resourceGroupName, + String resourceName, String roleName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (roleName == null) { + return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getAccessProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, roleName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed cluster Access Profile along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAccessProfileWithResponseAsync(String resourceGroupName, + String resourceName, String roleName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (roleName == null) { + return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getAccessProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, roleName, accept, context); + } + + /** + * Gets an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed cluster Access Profile on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAccessProfileAsync(String resourceGroupName, String resourceName, + String roleName) { + return getAccessProfileWithResponseAsync(resourceGroupName, resourceName, roleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed cluster Access Profile along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAccessProfileWithResponse(String resourceGroupName, + String resourceName, String roleName, Context context) { + return getAccessProfileWithResponseAsync(resourceGroupName, resourceName, roleName, context).block(); + } + + /** + * Gets an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed cluster Access Profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterAccessProfileInner getAccessProfile(String resourceGroupName, String resourceName, + String roleName) { + return getAccessProfileWithResponse(resourceGroupName, resourceName, roleName, Context.NONE).getValue(); + } + + /** + * Gets the results of a command which has been run on the Managed Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. + * @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 results of a command which has been run on the Managed Cluster on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getCommandResultWithResponseAsync(String resourceGroupName, + String resourceName, String commandId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (commandId == null) { + return Mono.error(new IllegalArgumentException("Parameter commandId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getCommandResult(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, commandId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the results of a command which has been run on the Managed Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. + * @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 results of a command which has been run on the Managed Cluster on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getCommandResultWithResponseAsync(String resourceGroupName, + String resourceName, String commandId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (commandId == null) { + return Mono.error(new IllegalArgumentException("Parameter commandId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getCommandResult(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, commandId, accept, context); + } + + /** + * Gets the results of a command which has been run on the Managed Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. + * @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 results of a command which has been run on the Managed Cluster on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getCommandResultAsync(String resourceGroupName, String resourceName, + String commandId) { + return getCommandResultWithResponseAsync(resourceGroupName, resourceName, commandId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the results of a command which has been run on the Managed Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. + * @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 results of a command which has been run on the Managed Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClustersGetCommandResultResponse getCommandResultWithResponse(String resourceGroupName, + String resourceName, String commandId, Context context) { + return getCommandResultWithResponseAsync(resourceGroupName, resourceName, commandId, context).block(); + } + + /** + * Gets the results of a command which has been run on the Managed Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. + * @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 results of a command which has been run on the Managed Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RunCommandResultInner getCommandResult(String resourceGroupName, String resourceName, String commandId) { + return getCommandResultWithResponse(resourceGroupName, resourceName, commandId, Context.NONE).getValue(); + } + + /** + * Lists the admin credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listClusterAdminCredentialsWithResponseAsync(String resourceGroupName, + String resourceName, String serverFqdn) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listClusterAdminCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, serverFqdn, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists the admin credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listClusterAdminCredentialsWithResponseAsync( + String resourceGroupName, String resourceName, String serverFqdn, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listClusterAdminCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, serverFqdn, accept, context); + } + + /** + * Lists the admin credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listClusterAdminCredentialsAsync(String resourceGroupName, + String resourceName) { + final String serverFqdn = null; + return listClusterAdminCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Lists the admin credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @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 list credential result response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listClusterAdminCredentialsWithResponse(String resourceGroupName, + String resourceName, String serverFqdn, Context context) { + return listClusterAdminCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn, context) + .block(); + } + + /** + * Lists the admin credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CredentialResultsInner listClusterAdminCredentials(String resourceGroupName, String resourceName) { + final String serverFqdn = null; + return listClusterAdminCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, Context.NONE) + .getValue(); + } + + /** + * Lists the cluster monitoring user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listClusterMonitoringUserCredentialsWithResponseAsync( + String resourceGroupName, String resourceName, String serverFqdn) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listClusterMonitoringUserCredentials(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, + serverFqdn, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists the cluster monitoring user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listClusterMonitoringUserCredentialsWithResponseAsync( + String resourceGroupName, String resourceName, String serverFqdn, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listClusterMonitoringUserCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, serverFqdn, accept, context); + } + + /** + * Lists the cluster monitoring user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listClusterMonitoringUserCredentialsAsync(String resourceGroupName, + String resourceName) { + final String serverFqdn = null; + return listClusterMonitoringUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Lists the cluster monitoring user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @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 list credential result response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listClusterMonitoringUserCredentialsWithResponse(String resourceGroupName, + String resourceName, String serverFqdn, Context context) { + return listClusterMonitoringUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn, + context).block(); + } + + /** + * Lists the cluster monitoring user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CredentialResultsInner listClusterMonitoringUserCredentials(String resourceGroupName, String resourceName) { + final String serverFqdn = null; + return listClusterMonitoringUserCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, + Context.NONE).getValue(); + } + + /** + * Lists the user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return + * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary + * in the path. + * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listClusterUserCredentialsWithResponseAsync(String resourceGroupName, + String resourceName, String serverFqdn, Format format) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listClusterUserCredentials(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, + serverFqdn, format, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists the user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return + * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary + * in the path. + * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listClusterUserCredentialsWithResponseAsync(String resourceGroupName, + String resourceName, String serverFqdn, Format format, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listClusterUserCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, serverFqdn, format, accept, context); + } + + /** + * Lists the user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listClusterUserCredentialsAsync(String resourceGroupName, String resourceName) { + final String serverFqdn = null; + final Format format = null; + return listClusterUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn, format) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Lists the user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return + * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary + * in the path. + * @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 list credential result response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listClusterUserCredentialsWithResponse(String resourceGroupName, + String resourceName, String serverFqdn, Format format, Context context) { + return listClusterUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn, format, context) + .block(); + } + + /** + * Lists the user credentials of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CredentialResultsInner listClusterUserCredentials(String resourceGroupName, String resourceName) { + final String serverFqdn = null; + final Format format = null; + return listClusterUserCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, format, Context.NONE) + .getValue(); + } + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listMeshUpgradeProfilesSinglePageAsync(String resourceGroupName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listMeshUpgradeProfiles(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listMeshUpgradeProfilesSinglePageAsync(String resourceGroupName, String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listMeshUpgradeProfiles(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listMeshUpgradeProfilesAsync(String resourceGroupName, + String resourceName) { + return new PagedFlux<>(() -> listMeshUpgradeProfilesSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listMeshUpgradeProfilesNextSinglePageAsync(nextLink)); + } + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMeshUpgradeProfilesAsync(String resourceGroupName, + String resourceName, Context context) { + return new PagedFlux<>(() -> listMeshUpgradeProfilesSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listMeshUpgradeProfilesNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMeshUpgradeProfiles(String resourceGroupName, + String resourceName) { + return new PagedIterable<>(listMeshUpgradeProfilesAsync(resourceGroupName, resourceName)); + } + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMeshUpgradeProfiles(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listMeshUpgradeProfilesAsync(resourceGroupName, resourceName, context)); + } + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @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 available upgrades for a service mesh in a cluster along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getMeshUpgradeProfileWithResponseAsync(String resourceGroupName, + String resourceName, String mode) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.getMeshUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, mode, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @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 available upgrades for a service mesh in a cluster along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMeshUpgradeProfileWithResponseAsync(String resourceGroupName, + String resourceName, String mode, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getMeshUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, mode, accept, context); + } + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @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 available upgrades for a service mesh in a cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getMeshUpgradeProfileAsync(String resourceGroupName, String resourceName, + String mode) { + return getMeshUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, mode) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @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 available upgrades for a service mesh in a cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMeshUpgradeProfileWithResponse(String resourceGroupName, + String resourceName, String mode, Context context) { + return getMeshUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, mode, context).block(); + } + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @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 available upgrades for a service mesh in a cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MeshUpgradeProfileInner getMeshUpgradeProfile(String resourceGroupName, String resourceName, String mode) { + return getMeshUpgradeProfileWithResponse(resourceGroupName, resourceName, mode, Context.NONE).getValue(); + } + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listOutboundNetworkDependenciesEndpointsSinglePageAsync(String resourceGroupName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, + context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listOutboundNetworkDependenciesEndpointsSinglePageAsync(String resourceGroupName, String resourceName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux + listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>( + () -> listOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux + listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, String resourceName, Context context) { + return new PagedFlux<>( + () -> listOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable + listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, resourceName)); + } + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable + listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String resourceName, Context context) { + return new PagedIterable<>( + listOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, resourceName, context)); + } + + /** + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> resetAadProfileWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterAadProfile parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.resetAadProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resetAadProfileWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterAadProfile parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.resetAadProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context); + } + + /** + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginResetAadProfileAsync(String resourceGroupName, String resourceName, + ManagedClusterAadProfile parameters) { + Mono>> mono + = resetAadProfileWithResponseAsync(resourceGroupName, resourceName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginResetAadProfileAsync(String resourceGroupName, String resourceName, + ManagedClusterAadProfile parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = resetAadProfileWithResponseAsync(resourceGroupName, resourceName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResetAadProfile(String resourceGroupName, String resourceName, + ManagedClusterAadProfile parameters) { + return this.beginResetAadProfileAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + } + + /** + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResetAadProfile(String resourceGroupName, String resourceName, + ManagedClusterAadProfile parameters, Context context) { + return this.beginResetAadProfileAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); + } + + /** + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono resetAadProfileAsync(String resourceGroupName, String resourceName, + ManagedClusterAadProfile parameters) { + return beginResetAadProfileAsync(resourceGroupName, resourceName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resetAadProfileAsync(String resourceGroupName, String resourceName, + ManagedClusterAadProfile parameters, Context context) { + return beginResetAadProfileAsync(resourceGroupName, resourceName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resetAadProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters) { + resetAadProfileAsync(resourceGroupName, resourceName, parameters).block(); + } + + /** + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resetAadProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, + Context context) { + resetAadProfileAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> resetServicePrincipalProfileWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterServicePrincipalProfile parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.resetServicePrincipalProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resetServicePrincipalProfileWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterServicePrincipalProfile parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.resetServicePrincipalProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context); + } + + /** + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginResetServicePrincipalProfileAsync(String resourceGroupName, + String resourceName, ManagedClusterServicePrincipalProfile parameters) { + Mono>> mono + = resetServicePrincipalProfileWithResponseAsync(resourceGroupName, resourceName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginResetServicePrincipalProfileAsync(String resourceGroupName, + String resourceName, ManagedClusterServicePrincipalProfile parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = resetServicePrincipalProfileWithResponseAsync(resourceGroupName, resourceName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResetServicePrincipalProfile(String resourceGroupName, + String resourceName, ManagedClusterServicePrincipalProfile parameters) { + return this.beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + } + + /** + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResetServicePrincipalProfile(String resourceGroupName, + String resourceName, ManagedClusterServicePrincipalProfile parameters, Context context) { + return this.beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters, context) + .getSyncPoller(); + } + + /** + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono resetServicePrincipalProfileAsync(String resourceGroupName, String resourceName, + ManagedClusterServicePrincipalProfile parameters) { + return beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resetServicePrincipalProfileAsync(String resourceGroupName, String resourceName, + ManagedClusterServicePrincipalProfile parameters, Context context) { + return beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resetServicePrincipalProfile(String resourceGroupName, String resourceName, + ManagedClusterServicePrincipalProfile parameters) { + resetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters).block(); + } + + /** + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resetServicePrincipalProfile(String resourceGroupName, String resourceName, + ManagedClusterServicePrincipalProfile parameters, Context context) { + resetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.rotateClusterCertificates(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.rotateClusterCertificates(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + } + + /** + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, + String resourceName) { + Mono>> mono + = rotateClusterCertificatesWithResponseAsync(resourceGroupName, resourceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, + String resourceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = rotateClusterCertificatesWithResponseAsync(resourceGroupName, resourceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRotateClusterCertificates(String resourceGroupName, + String resourceName) { + return this.beginRotateClusterCertificatesAsync(resourceGroupName, resourceName).getSyncPoller(); + } + + /** + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRotateClusterCertificates(String resourceGroupName, + String resourceName, Context context) { + return this.beginRotateClusterCertificatesAsync(resourceGroupName, resourceName, context).getSyncPoller(); + } + + /** + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono rotateClusterCertificatesAsync(String resourceGroupName, String resourceName) { + return beginRotateClusterCertificatesAsync(resourceGroupName, resourceName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono rotateClusterCertificatesAsync(String resourceGroupName, String resourceName, Context context) { + return beginRotateClusterCertificatesAsync(resourceGroupName, resourceName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void rotateClusterCertificates(String resourceGroupName, String resourceName) { + rotateClusterCertificatesAsync(resourceGroupName, resourceName).block(); + } + + /** + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void rotateClusterCertificates(String resourceGroupName, String resourceName, Context context) { + rotateClusterCertificatesAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> rotateServiceAccountSigningKeysWithResponseAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.rotateServiceAccountSigningKeys(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> rotateServiceAccountSigningKeysWithResponseAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.rotateServiceAccountSigningKeys(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + } + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginRotateServiceAccountSigningKeysAsync(String resourceGroupName, + String resourceName) { + Mono>> mono + = rotateServiceAccountSigningKeysWithResponseAsync(resourceGroupName, resourceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRotateServiceAccountSigningKeysAsync(String resourceGroupName, + String resourceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = rotateServiceAccountSigningKeysWithResponseAsync(resourceGroupName, resourceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRotateServiceAccountSigningKeys(String resourceGroupName, + String resourceName) { + return this.beginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName).getSyncPoller(); + } + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRotateServiceAccountSigningKeys(String resourceGroupName, + String resourceName, Context context) { + return this.beginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName, context).getSyncPoller(); + } + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono rotateServiceAccountSigningKeysAsync(String resourceGroupName, String resourceName) { + return beginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono rotateServiceAccountSigningKeysAsync(String resourceGroupName, String resourceName, + Context context) { + return beginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName) { + rotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName).block(); + } + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName, Context context) { + rotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Submits a command to run against the Managed Cluster. + * + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return run command result along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> runCommandWithResponseAsync(String resourceGroupName, String resourceName, + RunCommandRequest requestPayload) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (requestPayload == null) { + return Mono.error(new IllegalArgumentException("Parameter requestPayload is required and cannot be null.")); + } else { + requestPayload.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.runCommand(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, requestPayload, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Submits a command to run against the Managed Cluster. + * + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return run command result along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> runCommandWithResponseAsync(String resourceGroupName, String resourceName, + RunCommandRequest requestPayload, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (requestPayload == null) { + return Mono.error(new IllegalArgumentException("Parameter requestPayload is required and cannot be null.")); + } else { + requestPayload.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.runCommand(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, requestPayload, accept, context); + } + + /** + * Submits a command to run against the Managed Cluster. + * + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of run command result. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, RunCommandResultInner> + beginRunCommandAsync(String resourceGroupName, String resourceName, RunCommandRequest requestPayload) { + Mono>> mono + = runCommandWithResponseAsync(resourceGroupName, resourceName, requestPayload); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), RunCommandResultInner.class, RunCommandResultInner.class, + this.client.getContext()); + } + + /** + * Submits a command to run against the Managed Cluster. + * + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of run command result. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RunCommandResultInner> beginRunCommandAsync( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = runCommandWithResponseAsync(resourceGroupName, resourceName, requestPayload, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), RunCommandResultInner.class, RunCommandResultInner.class, context); + } + + /** + * Submits a command to run against the Managed Cluster. + * + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of run command result. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RunCommandResultInner> + beginRunCommand(String resourceGroupName, String resourceName, RunCommandRequest requestPayload) { + return this.beginRunCommandAsync(resourceGroupName, resourceName, requestPayload).getSyncPoller(); + } + + /** + * Submits a command to run against the Managed Cluster. + * + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of run command result. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RunCommandResultInner> beginRunCommand( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload, Context context) { + return this.beginRunCommandAsync(resourceGroupName, resourceName, requestPayload, context).getSyncPoller(); + } + + /** + * Submits a command to run against the Managed Cluster. + * + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return run command result on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono runCommandAsync(String resourceGroupName, String resourceName, + RunCommandRequest requestPayload) { + return beginRunCommandAsync(resourceGroupName, resourceName, requestPayload).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Submits a command to run against the Managed Cluster. + * + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return run command result on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono runCommandAsync(String resourceGroupName, String resourceName, + RunCommandRequest requestPayload, Context context) { + return beginRunCommandAsync(resourceGroupName, resourceName, requestPayload, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Submits a command to run against the Managed Cluster. + * + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return run command result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RunCommandResultInner runCommand(String resourceGroupName, String resourceName, + RunCommandRequest requestPayload) { + return runCommandAsync(resourceGroupName, resourceName, requestPayload).block(); + } + + /** + * Submits a command to run against the Managed Cluster. + * + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return run command result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RunCommandResultInner runCommand(String resourceGroupName, String resourceName, + RunCommandRequest requestPayload, Context context) { + return runCommandAsync(resourceGroupName, resourceName, requestPayload, context).block(); + } + + /** + * Starts a previously stopped Managed Cluster + * + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> startWithResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Starts a previously stopped Managed Cluster + * + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startWithResponseAsync(String resourceGroupName, String resourceName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.start(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context); + } + + /** + * Starts a previously stopped Managed Cluster + * + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginStartAsync(String resourceGroupName, String resourceName) { + Mono>> mono = startWithResponseAsync(resourceGroupName, resourceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Starts a previously stopped Managed Cluster + * + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginStartAsync(String resourceGroupName, String resourceName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = startWithResponseAsync(resourceGroupName, resourceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Starts a previously stopped Managed Cluster + * + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStart(String resourceGroupName, String resourceName) { + return this.beginStartAsync(resourceGroupName, resourceName).getSyncPoller(); + } + + /** + * Starts a previously stopped Managed Cluster + * + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStart(String resourceGroupName, String resourceName, + Context context) { + return this.beginStartAsync(resourceGroupName, resourceName, context).getSyncPoller(); + } + + /** + * Starts a previously stopped Managed Cluster + * + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono startAsync(String resourceGroupName, String resourceName) { + return beginStartAsync(resourceGroupName, resourceName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Starts a previously stopped Managed Cluster + * + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startAsync(String resourceGroupName, String resourceName, Context context) { + return beginStartAsync(resourceGroupName, resourceName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Starts a previously stopped Managed Cluster + * + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void start(String resourceGroupName, String resourceName) { + startAsync(resourceGroupName, resourceName).block(); + } + + /** + * Starts a previously stopped Managed Cluster + * + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void start(String resourceGroupName, String resourceName, Context context) { + startAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Stops a Managed Cluster + * + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> stopWithResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Stops a Managed Cluster + * + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> stopWithResponseAsync(String resourceGroupName, String resourceName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.stop(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context); + } + + /** + * Stops a Managed Cluster + * + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginStopAsync(String resourceGroupName, String resourceName) { + Mono>> mono = stopWithResponseAsync(resourceGroupName, resourceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Stops a Managed Cluster + * + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginStopAsync(String resourceGroupName, String resourceName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = stopWithResponseAsync(resourceGroupName, resourceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Stops a Managed Cluster + * + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStop(String resourceGroupName, String resourceName) { + return this.beginStopAsync(resourceGroupName, resourceName).getSyncPoller(); + } + + /** + * Stops a Managed Cluster + * + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStop(String resourceGroupName, String resourceName, + Context context) { + return this.beginStopAsync(resourceGroupName, resourceName, context).getSyncPoller(); + } + + /** + * Stops a Managed Cluster + * + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono stopAsync(String resourceGroupName, String resourceName) { + return beginStopAsync(resourceGroupName, resourceName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stops a Managed Cluster + * + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopAsync(String resourceGroupName, String resourceName, Context context) { + return beginStopAsync(resourceGroupName, resourceName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stops a Managed Cluster + * + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stop(String resourceGroupName, String resourceName) { + stopAsync(resourceGroupName, resourceName).block(); + } + + /** + * Stops a Managed Cluster + * + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stop(String resourceGroupName, String resourceName, Context context) { + stopAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + getUpgradeProfileWithResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getUpgradeProfileWithResponseAsync(String resourceGroupName, String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + } + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getUpgradeProfileAsync(String resourceGroupName, + String resourceName) { + return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getUpgradeProfileWithResponse(String resourceGroupName, + String resourceName, Context context) { + return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName) { + return getUpgradeProfileWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMeshRevisionProfilesNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listMeshRevisionProfilesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMeshRevisionProfilesNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listMeshRevisionProfilesNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed clusters in the specified subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed clusters in the specified subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedCluster list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedCluster list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMeshUpgradeProfilesNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listMeshUpgradeProfilesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMeshUpgradeProfilesNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listMeshUpgradeProfilesNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listOutboundNetworkDependenciesEndpointsNext(nextLink, + this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listOutboundNetworkDependenciesEndpointsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java new file mode 100644 index 000000000000..11c3ac09dfc0 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java @@ -0,0 +1,1258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.ManagedNamespacesClient; +import com.azure.resourcemanager.containerservice.fluent.models.CredentialResultsInner; +import com.azure.resourcemanager.containerservice.fluent.models.ManagedNamespaceInner; +import com.azure.resourcemanager.containerservice.models.ManagedNamespaceListResult; +import com.azure.resourcemanager.containerservice.models.TagsObject; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ManagedNamespacesClient. + */ +public final class ManagedNamespacesClientImpl implements ManagedNamespacesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ManagedNamespacesService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of ManagedNamespacesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ManagedNamespacesClientImpl(ContainerServiceManagementClientImpl client) { + this.service + = RestProxy.create(ManagedNamespacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientManagedNamespaces to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceManagementClientManagedNamespaces") + public interface ManagedNamespacesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedCluster(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("managedNamespaceName") String managedNamespaceName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("managedNamespaceName") String managedNamespaceName, + @BodyParam("application/json") ManagedNamespaceInner parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("managedNamespaceName") String managedNamespaceName, + @BodyParam("application/json") TagsObject parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("managedNamespaceName") String managedNamespaceName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}/listCredential") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listCredential(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("managedNamespaceName") String managedNamespaceName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedClusterNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a list of managed namespaces in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed namespaces in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of managed namespaces in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed namespaces in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of managed namespaces in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed namespaces in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of managed namespaces in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed namespaces in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of managed namespaces in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed namespaces in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); + } + + /** + * Gets a list of managed namespaces in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed namespaces in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); + } + + /** + * Gets the specified namespace of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @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 specified namespace of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String managedNamespaceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (managedNamespaceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, managedNamespaceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified namespace of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @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 specified namespace of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String managedNamespaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (managedNamespaceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, managedNamespaceName, accept, context); + } + + /** + * Gets the specified namespace of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @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 specified namespace of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String resourceName, + String managedNamespaceName) { + return getWithResponseAsync(resourceGroupName, resourceName, managedNamespaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified namespace of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @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 specified namespace of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, + String managedNamespaceName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, managedNamespaceName, context).block(); + } + + /** + * Gets the specified namespace of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @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 specified namespace of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedNamespaceInner get(String resourceGroupName, String resourceName, String managedNamespaceName) { + return getWithResponse(resourceGroupName, resourceName, managedNamespaceName, Context.NONE).getValue(); + } + + /** + * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like + * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters The namespace to create or update. + * @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 namespace managed by ARM along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String managedNamespaceName, ManagedNamespaceInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (managedNamespaceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, managedNamespaceName, parameters, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like + * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters The namespace to create or update. + * @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 namespace managed by ARM along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String managedNamespaceName, ManagedNamespaceInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (managedNamespaceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, managedNamespaceName, parameters, accept, + context); + } + + /** + * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like + * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters The namespace to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of namespace managed by ARM. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, ManagedNamespaceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String managedNamespaceName, ManagedNamespaceInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, managedNamespaceName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ManagedNamespaceInner.class, ManagedNamespaceInner.class, + this.client.getContext()); + } + + /** + * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like + * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters The namespace to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of namespace managed by ARM. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ManagedNamespaceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String managedNamespaceName, ManagedNamespaceInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + managedNamespaceName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ManagedNamespaceInner.class, ManagedNamespaceInner.class, context); + } + + /** + * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like + * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters The namespace to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of namespace managed by ARM. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ManagedNamespaceInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String managedNamespaceName, ManagedNamespaceInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, managedNamespaceName, parameters) + .getSyncPoller(); + } + + /** + * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like + * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters The namespace to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of namespace managed by ARM. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ManagedNamespaceInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String managedNamespaceName, ManagedNamespaceInner parameters, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, managedNamespaceName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like + * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters The namespace to create or update. + * @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 namespace managed by ARM on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String managedNamespaceName, ManagedNamespaceInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, managedNamespaceName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like + * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters The namespace to create or update. + * @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 namespace managed by ARM on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String managedNamespaceName, ManagedNamespaceInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, managedNamespaceName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like + * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters The namespace to create or update. + * @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 namespace managed by ARM. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedNamespaceInner createOrUpdate(String resourceGroupName, String resourceName, + String managedNamespaceName, ManagedNamespaceInner parameters) { + return createOrUpdateAsync(resourceGroupName, resourceName, managedNamespaceName, parameters).block(); + } + + /** + * Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like + * resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters The namespace to create or update. + * @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 namespace managed by ARM. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedNamespaceInner createOrUpdate(String resourceGroupName, String resourceName, + String managedNamespaceName, ManagedNamespaceInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, managedNamespaceName, parameters, context).block(); + } + + /** + * Updates tags on a managed namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters Parameters supplied to the patch namespace operation, we only support patch tags for now. + * @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 namespace managed by ARM along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateWithResponseAsync(String resourceGroupName, String resourceName, + String managedNamespaceName, TagsObject parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (managedNamespaceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, managedNamespaceName, parameters, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates tags on a managed namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters Parameters supplied to the patch namespace operation, we only support patch tags for now. + * @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 namespace managed by ARM along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String resourceName, + String managedNamespaceName, TagsObject parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (managedNamespaceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, managedNamespaceName, parameters, accept, context); + } + + /** + * Updates tags on a managed namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters Parameters supplied to the patch namespace operation, we only support patch tags for now. + * @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 namespace managed by ARM on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String resourceName, + String managedNamespaceName, TagsObject parameters) { + return updateWithResponseAsync(resourceGroupName, resourceName, managedNamespaceName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates tags on a managed namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters Parameters supplied to the patch namespace operation, we only support patch tags for now. + * @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 namespace managed by ARM along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String resourceName, + String managedNamespaceName, TagsObject parameters, Context context) { + return updateWithResponseAsync(resourceGroupName, resourceName, managedNamespaceName, parameters, context) + .block(); + } + + /** + * Updates tags on a managed namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param parameters Parameters supplied to the patch namespace operation, we only support patch tags for now. + * @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 namespace managed by ARM. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedNamespaceInner update(String resourceGroupName, String resourceName, String managedNamespaceName, + TagsObject parameters) { + return updateWithResponse(resourceGroupName, resourceName, managedNamespaceName, parameters, Context.NONE) + .getValue(); + } + + /** + * Deletes a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String managedNamespaceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (managedNamespaceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, managedNamespaceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String managedNamespaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (managedNamespaceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, managedNamespaceName, accept, context); + } + + /** + * Deletes a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String managedNamespaceName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, managedNamespaceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String managedNamespaceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, managedNamespaceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String managedNamespaceName) { + return this.beginDeleteAsync(resourceGroupName, resourceName, managedNamespaceName).getSyncPoller(); + } + + /** + * Deletes a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String managedNamespaceName, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, managedNamespaceName, context).getSyncPoller(); + } + + /** + * Deletes a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String resourceName, String managedNamespaceName) { + return beginDeleteAsync(resourceGroupName, resourceName, managedNamespaceName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String managedNamespaceName, + Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, managedNamespaceName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String managedNamespaceName) { + deleteAsync(resourceGroupName, resourceName, managedNamespaceName).block(); + } + + /** + * Deletes a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String managedNamespaceName, Context context) { + deleteAsync(resourceGroupName, resourceName, managedNamespaceName, context).block(); + } + + /** + * Lists the credentials of a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listCredentialWithResponseAsync(String resourceGroupName, + String resourceName, String managedNamespaceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (managedNamespaceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listCredential(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, managedNamespaceName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists the credentials of a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCredentialWithResponseAsync(String resourceGroupName, + String resourceName, String managedNamespaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (managedNamespaceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listCredential(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, managedNamespaceName, accept, context); + } + + /** + * Lists the credentials of a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @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 list credential result response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listCredentialAsync(String resourceGroupName, String resourceName, + String managedNamespaceName) { + return listCredentialWithResponseAsync(resourceGroupName, resourceName, managedNamespaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Lists the credentials of a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @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 list credential result response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listCredentialWithResponse(String resourceGroupName, String resourceName, + String managedNamespaceName, Context context) { + return listCredentialWithResponseAsync(resourceGroupName, resourceName, managedNamespaceName, context).block(); + } + + /** + * Lists the credentials of a namespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param managedNamespaceName The name of the managed namespace. + * @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 list credential result response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CredentialResultsInner listCredential(String resourceGroupName, String resourceName, + String managedNamespaceName) { + return listCredentialWithResponse(resourceGroupName, resourceName, managedNamespaceName, Context.NONE) + .getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed namespaces in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed namespaces in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java new file mode 100644 index 000000000000..ee07c04374b2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservice.fluent.OperationsClient; +import com.azure.resourcemanager.containerservice.fluent.models.OperationValueInner; +import com.azure.resourcemanager.containerservice.models.OperationListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ +public final class OperationsClientImpl implements OperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final OperationsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of OperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationsClientImpl(ContainerServiceManagementClientImpl client) { + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientOperations to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceManagementClientOperations") + public interface OperationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.ContainerService/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a list of operations. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of operations. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of operations. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of operations. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of operations. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Gets a list of operations. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java new file mode 100644 index 000000000000..5050fa42fd20 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java @@ -0,0 +1,761 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.containerservice.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerservice.fluent.models.PrivateEndpointConnectionListResultInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. + */ +public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final PrivateEndpointConnectionsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of PrivateEndpointConnectionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PrivateEndpointConnectionsClientImpl(ContainerServiceManagementClientImpl client) { + this.service = RestProxy.create(PrivateEndpointConnectionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientPrivateEndpointConnections to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceManagementClientPrivateEndpointConnections") + public interface PrivateEndpointConnectionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @BodyParam("application/json") PrivateEndpointConnectionInner parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listWithResponseAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context); + } + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listAsync(String resourceGroupName, String resourceName) { + return listWithResponseAsync(resourceGroupName, resourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listWithResponse(String resourceGroupName, + String resourceName, Context context) { + return listWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionListResultInner list(String resourceGroupName, String resourceName) { + return listWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + /** + * Gets the specified private endpoint connection. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, + String resourceName, String privateEndpointConnectionName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, privateEndpointConnectionName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified private endpoint connection. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String resourceName, String privateEndpointConnectionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, privateEndpointConnectionName, accept, context); + } + + /** + * Gets the specified private endpoint connection. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String resourceName, + String privateEndpointConnectionName) { + return getWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified private endpoint connection. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context).block(); + } + + /** + * Gets the specified private endpoint connection. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner get(String resourceGroupName, String resourceName, + String privateEndpointConnectionName) { + return getWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, Context.NONE).getValue(); + } + + /** + * Updates a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters The updated private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateWithResponseAsync(String resourceGroupName, + String resourceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, privateEndpointConnectionName, + parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters The updated private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, + String resourceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, privateEndpointConnectionName, parameters, accept, context); + } + + /** + * Updates a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters The updated private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { + return updateWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters The updated private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { + return updateWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, parameters, + context).block(); + } + + /** + * Updates a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters The updated private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner update(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { + return updateWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, parameters, + Context.NONE).getValue(); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String privateEndpointConnectionName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, privateEndpointConnectionName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, privateEndpointConnectionName, accept, context); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String privateEndpointConnectionName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String privateEndpointConnectionName) { + return this.beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName).getSyncPoller(); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context) + .getSyncPoller(); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + return beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName, + Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + deleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName).block(); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName, + Context context) { + deleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context).block(); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java new file mode 100644 index 000000000000..48917d918b58 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservice.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.containerservice.fluent.models.PrivateLinkResourcesListResultInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. + */ +public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient { + /** + * The proxy service used to perform REST calls. + */ + private final PrivateLinkResourcesService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of PrivateLinkResourcesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PrivateLinkResourcesClientImpl(ContainerServiceManagementClientImpl client) { + this.service = RestProxy.create(PrivateLinkResourcesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientPrivateLinkResources to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceManagementClientPrivateLinkResources") + public interface PrivateLinkResourcesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a list of private link resources in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listWithResponseAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of private link resources in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context); + } + + /** + * Gets a list of private link resources in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listAsync(String resourceGroupName, String resourceName) { + return listWithResponseAsync(resourceGroupName, resourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a list of private link resources in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listWithResponse(String resourceGroupName, String resourceName, + Context context) { + return listWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets a list of private link resources in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkResourcesListResultInner list(String resourceGroupName, String resourceName) { + return listWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java new file mode 100644 index 000000000000..24de7ec25b4b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservice.fluent.ResolvePrivateLinkServiceIdsClient; +import com.azure.resourcemanager.containerservice.fluent.models.PrivateLinkResourceInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ResolvePrivateLinkServiceIdsClient. + */ +public final class ResolvePrivateLinkServiceIdsClientImpl implements ResolvePrivateLinkServiceIdsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ResolvePrivateLinkServiceIdsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of ResolvePrivateLinkServiceIdsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ResolvePrivateLinkServiceIdsClientImpl(ContainerServiceManagementClientImpl client) { + this.service = RestProxy.create(ResolvePrivateLinkServiceIdsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientResolvePrivateLinkServiceIds to be + * used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceManagementClientResolvePrivateLinkServiceIds") + public interface ResolvePrivateLinkServiceIdsService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> post(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @BodyParam("application/json") PrivateLinkResourceInner parameters, @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets the private link service ID for the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters required in order to resolve a private link service ID. + * @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 private link service ID for the specified managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> postWithResponseAsync(String resourceGroupName, String resourceName, + PrivateLinkResourceInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.post(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the private link service ID for the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters required in order to resolve a private link service ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link service ID for the specified managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> postWithResponseAsync(String resourceGroupName, + String resourceName, PrivateLinkResourceInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.post(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, parameters, accept, context); + } + + /** + * Gets the private link service ID for the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters required in order to resolve a private link service ID. + * @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 private link service ID for the specified managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono postAsync(String resourceGroupName, String resourceName, + PrivateLinkResourceInner parameters) { + return postWithResponseAsync(resourceGroupName, resourceName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the private link service ID for the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters required in order to resolve a private link service ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link service ID for the specified managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response postWithResponse(String resourceGroupName, String resourceName, + PrivateLinkResourceInner parameters, Context context) { + return postWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Gets the private link service ID for the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters required in order to resolve a private link service ID. + * @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 private link service ID for the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkResourceInner post(String resourceGroupName, String resourceName, + PrivateLinkResourceInner parameters) { + return postWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java new file mode 100644 index 000000000000..32143c32af45 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java @@ -0,0 +1,989 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservice.fluent.SnapshotsClient; +import com.azure.resourcemanager.containerservice.fluent.models.SnapshotInner; +import com.azure.resourcemanager.containerservice.models.SnapshotListResult; +import com.azure.resourcemanager.containerservice.models.TagsObject; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SnapshotsClient. + */ +public final class SnapshotsClientImpl implements InnerSupportsGet, InnerSupportsListing, + InnerSupportsDelete, SnapshotsClient { + /** + * The proxy service used to perform REST calls. + */ + private final SnapshotsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of SnapshotsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SnapshotsClientImpl(ContainerServiceManagementClientImpl client) { + this.service + = RestProxy.create(SnapshotsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientSnapshots to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceManagementClientSnapshots") + public interface SnapshotsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @BodyParam("application/json") SnapshotInner parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateTags(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @BodyParam("application/json") TagsObject parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a list of snapshots in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of snapshots in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of snapshots in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of snapshots in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of snapshots in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Gets a list of snapshots in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Lists snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Lists snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + } + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SnapshotInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + /** + * Creates or updates a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + SnapshotInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + SnapshotInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context); + } + + /** + * Creates or updates a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a node pool snapshot resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + SnapshotInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates or updates a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a node pool snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, + SnapshotInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Creates or updates a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a node pool snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SnapshotInner createOrUpdate(String resourceGroupName, String resourceName, SnapshotInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); + } + + /** + * Updates tags on a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateTagsWithResponseAsync(String resourceGroupName, String resourceName, + TagsObject parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates tags on a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, String resourceName, + TagsObject parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context); + } + + /** + * Updates tags on a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a node pool snapshot resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateTagsAsync(String resourceGroupName, String resourceName, TagsObject parameters) { + return updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates tags on a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a node pool snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateTagsWithResponse(String resourceGroupName, String resourceName, + TagsObject parameters, Context context) { + return updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Updates tags on a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a node pool snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SnapshotInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters) { + return updateTagsWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); + } + + /** + * Deletes a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context); + } + + /** + * Deletes a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String resourceName) { + return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap(ignored -> Mono.empty()); + } + + /** + * Deletes a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Deletes a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName) { + deleteWithResponse(resourceGroupName, resourceName, Context.NONE); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java new file mode 100644 index 000000000000..f5c1969c0414 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java @@ -0,0 +1,952 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.TrustedAccessRoleBindingsClient; +import com.azure.resourcemanager.containerservice.fluent.models.TrustedAccessRoleBindingInner; +import com.azure.resourcemanager.containerservice.models.TrustedAccessRoleBindingListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in TrustedAccessRoleBindingsClient. + */ +public final class TrustedAccessRoleBindingsClientImpl implements TrustedAccessRoleBindingsClient { + /** + * The proxy service used to perform REST calls. + */ + private final TrustedAccessRoleBindingsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of TrustedAccessRoleBindingsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + TrustedAccessRoleBindingsClientImpl(ContainerServiceManagementClientImpl client) { + this.service = RestProxy.create(TrustedAccessRoleBindingsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientTrustedAccessRoleBindings to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceManagementClientTrustedAccessRoleBindings") + public interface TrustedAccessRoleBindingsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("trustedAccessRoleBindingName") String trustedAccessRoleBindingName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("trustedAccessRoleBindingName") String trustedAccessRoleBindingName, + @BodyParam("application/json") TrustedAccessRoleBindingInner trustedAccessRoleBinding, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("trustedAccessRoleBindingName") String trustedAccessRoleBindingName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a TrustedAccessRoleBinding list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a TrustedAccessRoleBinding list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a TrustedAccessRoleBinding list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a TrustedAccessRoleBinding list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a TrustedAccessRoleBinding list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName)); + } + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a TrustedAccessRoleBinding list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); + } + + /** + * Get a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a trusted access role binding along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, + String resourceName, String trustedAccessRoleBindingName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (trustedAccessRoleBindingName == null) { + return Mono.error( + new IllegalArgumentException("Parameter trustedAccessRoleBindingName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, trustedAccessRoleBindingName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a trusted access role binding along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String resourceName, String trustedAccessRoleBindingName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (trustedAccessRoleBindingName == null) { + return Mono.error( + new IllegalArgumentException("Parameter trustedAccessRoleBindingName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, trustedAccessRoleBindingName, accept, context); + } + + /** + * Get a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a trusted access role binding on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName) { + return getWithResponseAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a trusted access role binding along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, context).block(); + } + + /** + * Get a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a trusted access role binding. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TrustedAccessRoleBindingInner get(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName) { + return getWithResponse(resourceGroupName, resourceName, trustedAccessRoleBindingName, Context.NONE).getValue(); + } + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @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 defines binding between a resource and role along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (trustedAccessRoleBindingName == null) { + return Mono.error( + new IllegalArgumentException("Parameter trustedAccessRoleBindingName is required and cannot be null.")); + } + if (trustedAccessRoleBinding == null) { + return Mono.error( + new IllegalArgumentException("Parameter trustedAccessRoleBinding is required and cannot be null.")); + } else { + trustedAccessRoleBinding.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, trustedAccessRoleBindingName, + trustedAccessRoleBinding, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @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 defines binding between a resource and role along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (trustedAccessRoleBindingName == null) { + return Mono.error( + new IllegalArgumentException("Parameter trustedAccessRoleBindingName is required and cannot be null.")); + } + if (trustedAccessRoleBinding == null) { + return Mono.error( + new IllegalArgumentException("Parameter trustedAccessRoleBinding is required and cannot be null.")); + } else { + trustedAccessRoleBinding.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, trustedAccessRoleBindingName, + trustedAccessRoleBinding, accept, context); + } + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of defines binding between a resource and role. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, TrustedAccessRoleBindingInner> + beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + trustedAccessRoleBindingName, trustedAccessRoleBinding); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), TrustedAccessRoleBindingInner.class, TrustedAccessRoleBindingInner.class, + this.client.getContext()); + } + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of defines binding between a resource and role. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, TrustedAccessRoleBindingInner> + beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + trustedAccessRoleBindingName, trustedAccessRoleBinding, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), TrustedAccessRoleBindingInner.class, TrustedAccessRoleBindingInner.class, + context); + } + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines binding between a resource and role. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, TrustedAccessRoleBindingInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, + trustedAccessRoleBinding) + .getSyncPoller(); + } + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines binding between a resource and role. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, TrustedAccessRoleBindingInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, + TrustedAccessRoleBindingInner trustedAccessRoleBinding, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, + trustedAccessRoleBinding, context) + .getSyncPoller(); + } + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @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 defines binding between a resource and role on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName, TrustedAccessRoleBindingInner trustedAccessRoleBinding) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, + trustedAccessRoleBinding).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @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 defines binding between a resource and role on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName, TrustedAccessRoleBindingInner trustedAccessRoleBinding, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, + trustedAccessRoleBinding, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @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 defines binding between a resource and role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TrustedAccessRoleBindingInner createOrUpdate(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName, TrustedAccessRoleBindingInner trustedAccessRoleBinding) { + return createOrUpdateAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, + trustedAccessRoleBinding).block(); + } + + /** + * Create or update a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding. + * @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 defines binding between a resource and role. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TrustedAccessRoleBindingInner createOrUpdate(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName, TrustedAccessRoleBindingInner trustedAccessRoleBinding, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, + trustedAccessRoleBinding, context).block(); + } + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (trustedAccessRoleBindingName == null) { + return Mono.error( + new IllegalArgumentException("Parameter trustedAccessRoleBindingName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, trustedAccessRoleBindingName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (trustedAccessRoleBindingName == null) { + return Mono.error( + new IllegalArgumentException("Parameter trustedAccessRoleBindingName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, trustedAccessRoleBindingName, accept, context); + } + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName) { + return this.beginDeleteAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName).getSyncPoller(); + } + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, context) + .getSyncPoller(); + } + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName) { + return beginDeleteAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, + Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName) { + deleteAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName).block(); + } + + /** + * Delete a trusted access role binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, + Context context) { + deleteAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a TrustedAccessRoleBinding list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a TrustedAccessRoleBinding list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java new file mode 100644 index 000000000000..e73aa7e0e07b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservice.fluent.TrustedAccessRolesClient; +import com.azure.resourcemanager.containerservice.fluent.models.TrustedAccessRoleInner; +import com.azure.resourcemanager.containerservice.models.TrustedAccessRoleListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in TrustedAccessRolesClient. + */ +public final class TrustedAccessRolesClientImpl implements TrustedAccessRolesClient { + /** + * The proxy service used to perform REST calls. + */ + private final TrustedAccessRolesService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of TrustedAccessRolesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + TrustedAccessRolesClientImpl(ContainerServiceManagementClientImpl client) { + this.service = RestProxy.create(TrustedAccessRolesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientTrustedAccessRoles to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceManagementClientTrustedAccessRoles") + public interface TrustedAccessRolesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List supported trusted access roles. + * + * @param location The name of the Azure region. + * @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 list of trusted access roles along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List supported trusted access roles. + * + * @param location The name of the Azure region. + * @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 list of trusted access roles along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location, + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List supported trusted access roles. + * + * @param location The name of the Azure region. + * @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 list of trusted access roles as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String location) { + return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List supported trusted access roles. + * + * @param location The name of the Azure region. + * @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 list of trusted access roles as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(location, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List supported trusted access roles. + * + * @param location The name of the Azure region. + * @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 list of trusted access roles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location) { + return new PagedIterable<>(listAsync(location)); + } + + /** + * List supported trusted access roles. + * + * @param location The name of the Azure region. + * @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 list of trusted access roles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location, Context context) { + return new PagedIterable<>(listAsync(location, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 list of trusted access roles along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 list of trusted access roles along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AbsoluteMonthlySchedule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AbsoluteMonthlySchedule.java new file mode 100644 index 000000000000..034e66a75649 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AbsoluteMonthlySchedule.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. + */ +@Fluent +public final class AbsoluteMonthlySchedule implements JsonSerializable { + /* + * Specifies the number of months between each set of occurrences. + */ + private int intervalMonths; + + /* + * The date of the month. + */ + private int dayOfMonth; + + /** + * Creates an instance of AbsoluteMonthlySchedule class. + */ + public AbsoluteMonthlySchedule() { + } + + /** + * Get the intervalMonths property: Specifies the number of months between each set of occurrences. + * + * @return the intervalMonths value. + */ + public int intervalMonths() { + return this.intervalMonths; + } + + /** + * Set the intervalMonths property: Specifies the number of months between each set of occurrences. + * + * @param intervalMonths the intervalMonths value to set. + * @return the AbsoluteMonthlySchedule object itself. + */ + public AbsoluteMonthlySchedule withIntervalMonths(int intervalMonths) { + this.intervalMonths = intervalMonths; + return this; + } + + /** + * Get the dayOfMonth property: The date of the month. + * + * @return the dayOfMonth value. + */ + public int dayOfMonth() { + return this.dayOfMonth; + } + + /** + * Set the dayOfMonth property: The date of the month. + * + * @param dayOfMonth the dayOfMonth value to set. + * @return the AbsoluteMonthlySchedule object itself. + */ + public AbsoluteMonthlySchedule withDayOfMonth(int dayOfMonth) { + this.dayOfMonth = dayOfMonth; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("intervalMonths", this.intervalMonths); + jsonWriter.writeIntField("dayOfMonth", this.dayOfMonth); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AbsoluteMonthlySchedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AbsoluteMonthlySchedule 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 AbsoluteMonthlySchedule. + */ + public static AbsoluteMonthlySchedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AbsoluteMonthlySchedule deserializedAbsoluteMonthlySchedule = new AbsoluteMonthlySchedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("intervalMonths".equals(fieldName)) { + deserializedAbsoluteMonthlySchedule.intervalMonths = reader.getInt(); + } else if ("dayOfMonth".equals(fieldName)) { + deserializedAbsoluteMonthlySchedule.dayOfMonth = reader.getInt(); + } else { + reader.skipChildren(); + } + } + + return deserializedAbsoluteMonthlySchedule; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdoptionPolicy.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdoptionPolicy.java new file mode 100644 index 000000000000..7a2cb8d39c4e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdoptionPolicy.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Action if Kubernetes namespace with same name already exists. + */ +public final class AdoptionPolicy extends ExpandableStringEnum { + /** + * Static value Never for AdoptionPolicy. + */ + public static final AdoptionPolicy NEVER = fromString("Never"); + + /** + * Static value IfIdentical for AdoptionPolicy. + */ + public static final AdoptionPolicy IF_IDENTICAL = fromString("IfIdentical"); + + /** + * Static value Always for AdoptionPolicy. + */ + public static final AdoptionPolicy ALWAYS = fromString("Always"); + + /** + * Creates a new instance of AdoptionPolicy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AdoptionPolicy() { + } + + /** + * Creates or finds a AdoptionPolicy from its string representation. + * + * @param name a name to look for. + * @return the corresponding AdoptionPolicy. + */ + public static AdoptionPolicy fromString(String name) { + return fromString(name, AdoptionPolicy.class); + } + + /** + * Gets known AdoptionPolicy values. + * + * @return known AdoptionPolicy values. + */ + public static Collection values() { + return values(AdoptionPolicy.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkPolicies.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkPolicies.java new file mode 100644 index 000000000000..3912695f8b3f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkPolicies.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enable advanced network policies. This allows users to configure Layer 7 network policies (FQDN, HTTP, Kafka). + * Policies themselves must be configured via the Cilium Network Policy resources, see + * https://docs.cilium.io/en/latest/security/policy/index.html. This can be enabled only on cilium-based clusters. If + * not specified, the default value is FQDN if security.enabled is set to true. + */ +public final class AdvancedNetworkPolicies extends ExpandableStringEnum { + /** + * Static value L7 for AdvancedNetworkPolicies. + */ + public static final AdvancedNetworkPolicies L7 = fromString("L7"); + + /** + * Static value FQDN for AdvancedNetworkPolicies. + */ + public static final AdvancedNetworkPolicies FQDN = fromString("FQDN"); + + /** + * Static value None for AdvancedNetworkPolicies. + */ + public static final AdvancedNetworkPolicies NONE = fromString("None"); + + /** + * Creates a new instance of AdvancedNetworkPolicies value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AdvancedNetworkPolicies() { + } + + /** + * Creates or finds a AdvancedNetworkPolicies from its string representation. + * + * @param name a name to look for. + * @return the corresponding AdvancedNetworkPolicies. + */ + public static AdvancedNetworkPolicies fromString(String name) { + return fromString(name, AdvancedNetworkPolicies.class); + } + + /** + * Gets known AdvancedNetworkPolicies values. + * + * @return known AdvancedNetworkPolicies values. + */ + public static Collection values() { + return values(AdvancedNetworkPolicies.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java new file mode 100644 index 000000000000..6132ead8e9b4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Advanced Networking profile for enabling observability and security feature suite on a cluster. For more information + * see aka.ms/aksadvancednetworking. + */ +@Fluent +public final class AdvancedNetworking implements JsonSerializable { + /* + * Indicates the enablement of Advanced Networking functionalities of observability and security on AKS clusters. + * When this is set to true, all observability and security features will be set to enabled unless explicitly + * disabled. If not specified, the default is false. + */ + private Boolean enabled; + + /* + * Observability profile to enable advanced network metrics and flow logs with historical contexts. + */ + private AdvancedNetworkingObservability observability; + + /* + * Security profile to enable security features on cilium based cluster. + */ + private AdvancedNetworkingSecurity security; + + /** + * Creates an instance of AdvancedNetworking class. + */ + public AdvancedNetworking() { + } + + /** + * Get the enabled property: Indicates the enablement of Advanced Networking functionalities of observability and + * security on AKS clusters. When this is set to true, all observability and security features will be set to + * enabled unless explicitly disabled. If not specified, the default is false. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates the enablement of Advanced Networking functionalities of observability and + * security on AKS clusters. When this is set to true, all observability and security features will be set to + * enabled unless explicitly disabled. If not specified, the default is false. + * + * @param enabled the enabled value to set. + * @return the AdvancedNetworking object itself. + */ + public AdvancedNetworking withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the observability property: Observability profile to enable advanced network metrics and flow logs with + * historical contexts. + * + * @return the observability value. + */ + public AdvancedNetworkingObservability observability() { + return this.observability; + } + + /** + * Set the observability property: Observability profile to enable advanced network metrics and flow logs with + * historical contexts. + * + * @param observability the observability value to set. + * @return the AdvancedNetworking object itself. + */ + public AdvancedNetworking withObservability(AdvancedNetworkingObservability observability) { + this.observability = observability; + return this; + } + + /** + * Get the security property: Security profile to enable security features on cilium based cluster. + * + * @return the security value. + */ + public AdvancedNetworkingSecurity security() { + return this.security; + } + + /** + * Set the security property: Security profile to enable security features on cilium based cluster. + * + * @param security the security value to set. + * @return the AdvancedNetworking object itself. + */ + public AdvancedNetworking withSecurity(AdvancedNetworkingSecurity security) { + this.security = security; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (observability() != null) { + observability().validate(); + } + if (security() != null) { + security().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeJsonField("observability", this.observability); + jsonWriter.writeJsonField("security", this.security); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdvancedNetworking from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdvancedNetworking 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 AdvancedNetworking. + */ + public static AdvancedNetworking fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdvancedNetworking deserializedAdvancedNetworking = new AdvancedNetworking(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedAdvancedNetworking.enabled = reader.getNullable(JsonReader::getBoolean); + } else if ("observability".equals(fieldName)) { + deserializedAdvancedNetworking.observability = AdvancedNetworkingObservability.fromJson(reader); + } else if ("security".equals(fieldName)) { + deserializedAdvancedNetworking.security = AdvancedNetworkingSecurity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAdvancedNetworking; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingObservability.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingObservability.java new file mode 100644 index 000000000000..d5296ad62ccd --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingObservability.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Observability profile to enable advanced network metrics and flow logs with historical contexts. + */ +@Fluent +public final class AdvancedNetworkingObservability implements JsonSerializable { + /* + * Indicates the enablement of Advanced Networking observability functionalities on clusters. + */ + private Boolean enabled; + + /** + * Creates an instance of AdvancedNetworkingObservability class. + */ + public AdvancedNetworkingObservability() { + } + + /** + * Get the enabled property: Indicates the enablement of Advanced Networking observability functionalities on + * clusters. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates the enablement of Advanced Networking observability functionalities on + * clusters. + * + * @param enabled the enabled value to set. + * @return the AdvancedNetworkingObservability object itself. + */ + public AdvancedNetworkingObservability withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdvancedNetworkingObservability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdvancedNetworkingObservability 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 AdvancedNetworkingObservability. + */ + public static AdvancedNetworkingObservability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdvancedNetworkingObservability deserializedAdvancedNetworkingObservability + = new AdvancedNetworkingObservability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedAdvancedNetworkingObservability.enabled = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedAdvancedNetworkingObservability; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java new file mode 100644 index 000000000000..58d38fe29209 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Security profile to enable security features on cilium based cluster. + */ +@Fluent +public final class AdvancedNetworkingSecurity implements JsonSerializable { + /* + * This feature allows user to configure network policy based on DNS (FQDN) names. It can be enabled only on cilium + * based clusters. If not specified, the default is false. + */ + private Boolean enabled; + + /* + * Enable advanced network policies. This allows users to configure Layer 7 network policies (FQDN, HTTP, Kafka). + * Policies themselves must be configured via the Cilium Network Policy resources, see + * https://docs.cilium.io/en/latest/security/policy/index.html. This can be enabled only on cilium-based clusters. + * If not specified, the default value is FQDN if security.enabled is set to true. + */ + private AdvancedNetworkPolicies advancedNetworkPolicies; + + /** + * Creates an instance of AdvancedNetworkingSecurity class. + */ + public AdvancedNetworkingSecurity() { + } + + /** + * Get the enabled property: This feature allows user to configure network policy based on DNS (FQDN) names. It can + * be enabled only on cilium based clusters. If not specified, the default is false. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: This feature allows user to configure network policy based on DNS (FQDN) names. It can + * be enabled only on cilium based clusters. If not specified, the default is false. + * + * @param enabled the enabled value to set. + * @return the AdvancedNetworkingSecurity object itself. + */ + public AdvancedNetworkingSecurity withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the advancedNetworkPolicies property: Enable advanced network policies. This allows users to configure Layer + * 7 network policies (FQDN, HTTP, Kafka). Policies themselves must be configured via the Cilium Network Policy + * resources, see https://docs.cilium.io/en/latest/security/policy/index.html. This can be enabled only on + * cilium-based clusters. If not specified, the default value is FQDN if security.enabled is set to true. + * + * @return the advancedNetworkPolicies value. + */ + public AdvancedNetworkPolicies advancedNetworkPolicies() { + return this.advancedNetworkPolicies; + } + + /** + * Set the advancedNetworkPolicies property: Enable advanced network policies. This allows users to configure Layer + * 7 network policies (FQDN, HTTP, Kafka). Policies themselves must be configured via the Cilium Network Policy + * resources, see https://docs.cilium.io/en/latest/security/policy/index.html. This can be enabled only on + * cilium-based clusters. If not specified, the default value is FQDN if security.enabled is set to true. + * + * @param advancedNetworkPolicies the advancedNetworkPolicies value to set. + * @return the AdvancedNetworkingSecurity object itself. + */ + public AdvancedNetworkingSecurity withAdvancedNetworkPolicies(AdvancedNetworkPolicies advancedNetworkPolicies) { + this.advancedNetworkPolicies = advancedNetworkPolicies; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("advancedNetworkPolicies", + this.advancedNetworkPolicies == null ? null : this.advancedNetworkPolicies.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdvancedNetworkingSecurity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdvancedNetworkingSecurity 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 AdvancedNetworkingSecurity. + */ + public static AdvancedNetworkingSecurity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdvancedNetworkingSecurity deserializedAdvancedNetworkingSecurity = new AdvancedNetworkingSecurity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedAdvancedNetworkingSecurity.enabled = reader.getNullable(JsonReader::getBoolean); + } else if ("advancedNetworkPolicies".equals(fieldName)) { + deserializedAdvancedNetworkingSecurity.advancedNetworkPolicies + = AdvancedNetworkPolicies.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAdvancedNetworkingSecurity; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java new file mode 100644 index 000000000000..cdb8136db1e7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Available version information for an agent pool. + */ +@Fluent +public final class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem + implements JsonSerializable { + /* + * Whether this version is the default agent pool version. + */ + private Boolean defaultProperty; + + /* + * The Kubernetes version (major.minor.patch). + */ + private String kubernetesVersion; + + /* + * Whether Kubernetes version is currently in preview. + */ + private Boolean isPreview; + + /** + * Creates an instance of AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem class. + */ + public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem() { + } + + /** + * Get the defaultProperty property: Whether this version is the default agent pool version. + * + * @return the defaultProperty value. + */ + public Boolean defaultProperty() { + return this.defaultProperty; + } + + /** + * Set the defaultProperty property: Whether this version is the default agent pool version. + * + * @param defaultProperty the defaultProperty value to set. + * @return the AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem object itself. + */ + public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem withDefaultProperty(Boolean defaultProperty) { + this.defaultProperty = defaultProperty; + return this; + } + + /** + * Get the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @param kubernetesVersion the kubernetesVersion value to set. + * @return the AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem object itself. + */ + public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem withKubernetesVersion(String kubernetesVersion) { + this.kubernetesVersion = kubernetesVersion; + return this; + } + + /** + * Get the isPreview property: Whether Kubernetes version is currently in preview. + * + * @return the isPreview value. + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Set the isPreview property: Whether Kubernetes version is currently in preview. + * + * @param isPreview the isPreview value to set. + * @return the AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem object itself. + */ + public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem withIsPreview(Boolean isPreview) { + this.isPreview = isPreview; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("default", this.defaultProperty); + jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); + jsonWriter.writeBooleanField("isPreview", this.isPreview); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem 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 + * AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. + */ + public static AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem deserializedAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem + = new AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("default".equals(fieldName)) { + deserializedAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.defaultProperty + = reader.getNullable(JsonReader::getBoolean); + } else if ("kubernetesVersion".equals(fieldName)) { + deserializedAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.kubernetesVersion + = reader.getString(); + } else if ("isPreview".equals(fieldName)) { + deserializedAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.isPreview + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolDeleteMachinesParameter.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolDeleteMachinesParameter.java new file mode 100644 index 000000000000..916eb8860fc9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolDeleteMachinesParameter.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +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 a list of machine names from the agent pool to be deleted. + */ +@Fluent +public final class AgentPoolDeleteMachinesParameter implements JsonSerializable { + /* + * The agent pool machine names. + */ + private List machineNames; + + /** + * Creates an instance of AgentPoolDeleteMachinesParameter class. + */ + public AgentPoolDeleteMachinesParameter() { + } + + /** + * Get the machineNames property: The agent pool machine names. + * + * @return the machineNames value. + */ + public List machineNames() { + return this.machineNames; + } + + /** + * Set the machineNames property: The agent pool machine names. + * + * @param machineNames the machineNames value to set. + * @return the AgentPoolDeleteMachinesParameter object itself. + */ + public AgentPoolDeleteMachinesParameter withMachineNames(List machineNames) { + this.machineNames = machineNames; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (machineNames() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property machineNames in model AgentPoolDeleteMachinesParameter")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AgentPoolDeleteMachinesParameter.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("machineNames", this.machineNames, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolDeleteMachinesParameter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolDeleteMachinesParameter 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 AgentPoolDeleteMachinesParameter. + */ + public static AgentPoolDeleteMachinesParameter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolDeleteMachinesParameter deserializedAgentPoolDeleteMachinesParameter + = new AgentPoolDeleteMachinesParameter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("machineNames".equals(fieldName)) { + List machineNames = reader.readArray(reader1 -> reader1.getString()); + deserializedAgentPoolDeleteMachinesParameter.machineNames = machineNames; + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolDeleteMachinesParameter; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolGatewayProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolGatewayProfile.java new file mode 100644 index 000000000000..1729e255411a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolGatewayProfile.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 of the managed cluster gateway agent pool. + */ +@Fluent +public final class AgentPoolGatewayProfile implements JsonSerializable { + /* + * The Gateway agent pool associates one public IPPrefix for each static egress gateway to provide public egress. + * The size of Public IPPrefix should be selected by the user. Each node in the agent pool is assigned with one IP + * from the IPPrefix. The IPPrefix size thus serves as a cap on the size of the Gateway agent pool. Due to Azure + * public IPPrefix size limitation, the valid value range is [28, 31] (/31 = 2 nodes/IPs, /30 = 4 nodes/IPs, /29 = 8 + * nodes/IPs, /28 = 16 nodes/IPs). The default value is 31. + */ + private Integer publicIpPrefixSize; + + /** + * Creates an instance of AgentPoolGatewayProfile class. + */ + public AgentPoolGatewayProfile() { + } + + /** + * Get the publicIpPrefixSize property: The Gateway agent pool associates one public IPPrefix for each static egress + * gateway to provide public egress. The size of Public IPPrefix should be selected by the user. Each node in the + * agent pool is assigned with one IP from the IPPrefix. The IPPrefix size thus serves as a cap on the size of the + * Gateway agent pool. Due to Azure public IPPrefix size limitation, the valid value range is [28, 31] (/31 = 2 + * nodes/IPs, /30 = 4 nodes/IPs, /29 = 8 nodes/IPs, /28 = 16 nodes/IPs). The default value is 31. + * + * @return the publicIpPrefixSize value. + */ + public Integer publicIpPrefixSize() { + return this.publicIpPrefixSize; + } + + /** + * Set the publicIpPrefixSize property: The Gateway agent pool associates one public IPPrefix for each static egress + * gateway to provide public egress. The size of Public IPPrefix should be selected by the user. Each node in the + * agent pool is assigned with one IP from the IPPrefix. The IPPrefix size thus serves as a cap on the size of the + * Gateway agent pool. Due to Azure public IPPrefix size limitation, the valid value range is [28, 31] (/31 = 2 + * nodes/IPs, /30 = 4 nodes/IPs, /29 = 8 nodes/IPs, /28 = 16 nodes/IPs). The default value is 31. + * + * @param publicIpPrefixSize the publicIpPrefixSize value to set. + * @return the AgentPoolGatewayProfile object itself. + */ + public AgentPoolGatewayProfile withPublicIpPrefixSize(Integer publicIpPrefixSize) { + this.publicIpPrefixSize = publicIpPrefixSize; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("publicIPPrefixSize", this.publicIpPrefixSize); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolGatewayProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolGatewayProfile 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 AgentPoolGatewayProfile. + */ + public static AgentPoolGatewayProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolGatewayProfile deserializedAgentPoolGatewayProfile = new AgentPoolGatewayProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("publicIPPrefixSize".equals(fieldName)) { + deserializedAgentPoolGatewayProfile.publicIpPrefixSize = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolGatewayProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolListResult.java new file mode 100644 index 000000000000..6f195436b77c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolListResult.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a AgentPool list operation. + */ +@Fluent +public final class AgentPoolListResult implements JsonSerializable { + /* + * The AgentPool items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of AgentPoolListResult class. + */ + public AgentPoolListResult() { + } + + /** + * Get the value property: The AgentPool items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The AgentPool items on this page. + * + * @param value the value value to set. + * @return the AgentPoolListResult object itself. + */ + public AgentPoolListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the AgentPoolListResult object itself. + */ + public AgentPoolListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model AgentPoolListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AgentPoolListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolListResult 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 AgentPoolListResult. + */ + public static AgentPoolListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolListResult deserializedAgentPoolListResult = new AgentPoolListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> AgentPoolInner.fromJson(reader1)); + deserializedAgentPoolListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedAgentPoolListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java new file mode 100644 index 000000000000..a44247f5ca08 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional + * information on agent pool restrictions and best practices, see: + * https://docs.microsoft.com/azure/aks/use-system-pools. + */ +public final class AgentPoolMode extends ExpandableStringEnum { + /** + * Static value System for AgentPoolMode. + */ + public static final AgentPoolMode SYSTEM = fromString("System"); + + /** + * Static value User for AgentPoolMode. + */ + public static final AgentPoolMode USER = fromString("User"); + + /** + * Static value Gateway for AgentPoolMode. + */ + public static final AgentPoolMode GATEWAY = fromString("Gateway"); + + /** + * Creates a new instance of AgentPoolMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AgentPoolMode() { + } + + /** + * Creates or finds a AgentPoolMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding AgentPoolMode. + */ + public static AgentPoolMode fromString(String name) { + return fromString(name, AgentPoolMode.class); + } + + /** + * Gets known AgentPoolMode values. + * + * @return known AgentPoolMode values. + */ + public static Collection values() { + return values(AgentPoolMode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkProfile.java new file mode 100644 index 000000000000..b6e537c7d3d5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkProfile.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Network settings of an agent pool. + */ +@Fluent +public final class AgentPoolNetworkProfile implements JsonSerializable { + /* + * IPTags of instance-level public IPs. + */ + private List nodePublicIpTags; + + /* + * The port ranges that are allowed to access. The specified ranges are allowed to overlap. + */ + private List allowedHostPorts; + + /* + * The IDs of the application security groups which agent pool will associate when created. + */ + private List applicationSecurityGroups; + + /** + * Creates an instance of AgentPoolNetworkProfile class. + */ + public AgentPoolNetworkProfile() { + } + + /** + * Get the nodePublicIpTags property: IPTags of instance-level public IPs. + * + * @return the nodePublicIpTags value. + */ + public List nodePublicIpTags() { + return this.nodePublicIpTags; + } + + /** + * Set the nodePublicIpTags property: IPTags of instance-level public IPs. + * + * @param nodePublicIpTags the nodePublicIpTags value to set. + * @return the AgentPoolNetworkProfile object itself. + */ + public AgentPoolNetworkProfile withNodePublicIpTags(List nodePublicIpTags) { + this.nodePublicIpTags = nodePublicIpTags; + return this; + } + + /** + * Get the allowedHostPorts property: The port ranges that are allowed to access. The specified ranges are allowed + * to overlap. + * + * @return the allowedHostPorts value. + */ + public List allowedHostPorts() { + return this.allowedHostPorts; + } + + /** + * Set the allowedHostPorts property: The port ranges that are allowed to access. The specified ranges are allowed + * to overlap. + * + * @param allowedHostPorts the allowedHostPorts value to set. + * @return the AgentPoolNetworkProfile object itself. + */ + public AgentPoolNetworkProfile withAllowedHostPorts(List allowedHostPorts) { + this.allowedHostPorts = allowedHostPorts; + return this; + } + + /** + * Get the applicationSecurityGroups property: The IDs of the application security groups which agent pool will + * associate when created. + * + * @return the applicationSecurityGroups value. + */ + public List applicationSecurityGroups() { + return this.applicationSecurityGroups; + } + + /** + * Set the applicationSecurityGroups property: The IDs of the application security groups which agent pool will + * associate when created. + * + * @param applicationSecurityGroups the applicationSecurityGroups value to set. + * @return the AgentPoolNetworkProfile object itself. + */ + public AgentPoolNetworkProfile withApplicationSecurityGroups(List applicationSecurityGroups) { + this.applicationSecurityGroups = applicationSecurityGroups; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (nodePublicIpTags() != null) { + nodePublicIpTags().forEach(e -> e.validate()); + } + if (allowedHostPorts() != null) { + allowedHostPorts().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("nodePublicIPTags", this.nodePublicIpTags, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("allowedHostPorts", this.allowedHostPorts, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("applicationSecurityGroups", this.applicationSecurityGroups, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolNetworkProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolNetworkProfile 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 AgentPoolNetworkProfile. + */ + public static AgentPoolNetworkProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolNetworkProfile deserializedAgentPoolNetworkProfile = new AgentPoolNetworkProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nodePublicIPTags".equals(fieldName)) { + List nodePublicIpTags = reader.readArray(reader1 -> IpTag.fromJson(reader1)); + deserializedAgentPoolNetworkProfile.nodePublicIpTags = nodePublicIpTags; + } else if ("allowedHostPorts".equals(fieldName)) { + List allowedHostPorts = reader.readArray(reader1 -> PortRange.fromJson(reader1)); + deserializedAgentPoolNetworkProfile.allowedHostPorts = allowedHostPorts; + } else if ("applicationSecurityGroups".equals(fieldName)) { + List applicationSecurityGroups = reader.readArray(reader1 -> reader1.getString()); + deserializedAgentPoolNetworkProfile.applicationSecurityGroups = applicationSecurityGroups; + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolNetworkProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java new file mode 100644 index 000000000000..1402defe71c1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 security settings of an agent pool. + */ +@Fluent +public final class AgentPoolSecurityProfile implements JsonSerializable { + /* + * vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally + * on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + */ + private Boolean enableVtpm; + + /* + * Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. + * For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + */ + private Boolean enableSecureBoot; + + /* + * SSH access method of an agent pool. + */ + private AgentPoolSshAccess sshAccess; + + /** + * Creates an instance of AgentPoolSecurityProfile class. + */ + public AgentPoolSecurityProfile() { + } + + /** + * Get the enableVtpm property: vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys + * and measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the + * default is false. + * + * @return the enableVtpm value. + */ + public Boolean enableVtpm() { + return this.enableVtpm; + } + + /** + * Set the enableVtpm property: vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys + * and measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the + * default is false. + * + * @param enableVtpm the enableVtpm value to set. + * @return the AgentPoolSecurityProfile object itself. + */ + public AgentPoolSecurityProfile withEnableVtpm(Boolean enableVtpm) { + this.enableVtpm = enableVtpm; + return this; + } + + /** + * Get the enableSecureBoot property: Secure Boot is a feature of Trusted Launch which ensures that only signed + * operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch. If not specified, the + * default is false. + * + * @return the enableSecureBoot value. + */ + public Boolean enableSecureBoot() { + return this.enableSecureBoot; + } + + /** + * Set the enableSecureBoot property: Secure Boot is a feature of Trusted Launch which ensures that only signed + * operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch. If not specified, the + * default is false. + * + * @param enableSecureBoot the enableSecureBoot value to set. + * @return the AgentPoolSecurityProfile object itself. + */ + public AgentPoolSecurityProfile withEnableSecureBoot(Boolean enableSecureBoot) { + this.enableSecureBoot = enableSecureBoot; + return this; + } + + /** + * Get the sshAccess property: SSH access method of an agent pool. + * + * @return the sshAccess value. + */ + public AgentPoolSshAccess sshAccess() { + return this.sshAccess; + } + + /** + * Set the sshAccess property: SSH access method of an agent pool. + * + * @param sshAccess the sshAccess value to set. + * @return the AgentPoolSecurityProfile object itself. + */ + public AgentPoolSecurityProfile withSshAccess(AgentPoolSshAccess sshAccess) { + this.sshAccess = sshAccess; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enableVTPM", this.enableVtpm); + jsonWriter.writeBooleanField("enableSecureBoot", this.enableSecureBoot); + jsonWriter.writeStringField("sshAccess", this.sshAccess == null ? null : this.sshAccess.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolSecurityProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolSecurityProfile 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 AgentPoolSecurityProfile. + */ + public static AgentPoolSecurityProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolSecurityProfile deserializedAgentPoolSecurityProfile = new AgentPoolSecurityProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enableVTPM".equals(fieldName)) { + deserializedAgentPoolSecurityProfile.enableVtpm = reader.getNullable(JsonReader::getBoolean); + } else if ("enableSecureBoot".equals(fieldName)) { + deserializedAgentPoolSecurityProfile.enableSecureBoot = reader.getNullable(JsonReader::getBoolean); + } else if ("sshAccess".equals(fieldName)) { + deserializedAgentPoolSecurityProfile.sshAccess = AgentPoolSshAccess.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolSecurityProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java new file mode 100644 index 000000000000..0a92ae4a7d03 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * SSH access method of an agent pool. + */ +public final class AgentPoolSshAccess extends ExpandableStringEnum { + /** + * Static value LocalUser for AgentPoolSshAccess. + */ + public static final AgentPoolSshAccess LOCAL_USER = fromString("LocalUser"); + + /** + * Static value Disabled for AgentPoolSshAccess. + */ + public static final AgentPoolSshAccess DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of AgentPoolSshAccess value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AgentPoolSshAccess() { + } + + /** + * Creates or finds a AgentPoolSshAccess from its string representation. + * + * @param name a name to look for. + * @return the corresponding AgentPoolSshAccess. + */ + public static AgentPoolSshAccess fromString(String name) { + return fromString(name, AgentPoolSshAccess.class); + } + + /** + * Gets known AgentPoolSshAccess values. + * + * @return known AgentPoolSshAccess values. + */ + public static Collection values() { + return values(AgentPoolSshAccess.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolStatus.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolStatus.java new file mode 100644 index 000000000000..f29f04ef7062 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolStatus.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +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 read-only information about the Agent Pool. + */ +@Immutable +public final class AgentPoolStatus implements JsonSerializable { + /* + * The error detail information of the agent pool. Preserves the detailed info of failure. If there was no error, + * this field is omitted. + */ + private ManagementError provisioningError; + + /** + * Creates an instance of AgentPoolStatus class. + */ + public AgentPoolStatus() { + } + + /** + * Get the provisioningError property: The error detail information of the agent pool. Preserves the detailed info + * of failure. If there was no error, this field is omitted. + * + * @return the provisioningError value. + */ + public ManagementError provisioningError() { + return this.provisioningError; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolStatus 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 AgentPoolStatus. + */ + public static AgentPoolStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolStatus deserializedAgentPoolStatus = new AgentPoolStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningError".equals(fieldName)) { + deserializedAgentPoolStatus.provisioningError = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolStatus; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolType.java new file mode 100644 index 000000000000..9b5ac363665d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of Agent Pool. + */ +public final class AgentPoolType extends ExpandableStringEnum { + /** + * Static value VirtualMachineScaleSets for AgentPoolType. + */ + public static final AgentPoolType VIRTUAL_MACHINE_SCALE_SETS = fromString("VirtualMachineScaleSets"); + + /** + * Static value AvailabilitySet for AgentPoolType. + */ + public static final AgentPoolType AVAILABILITY_SET = fromString("AvailabilitySet"); + + /** + * Static value VirtualMachines for AgentPoolType. + */ + public static final AgentPoolType VIRTUAL_MACHINES = fromString("VirtualMachines"); + + /** + * Creates a new instance of AgentPoolType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AgentPoolType() { + } + + /** + * Creates or finds a AgentPoolType from its string representation. + * + * @param name a name to look for. + * @return the corresponding AgentPoolType. + */ + public static AgentPoolType fromString(String name) { + return fromString(name, AgentPoolType.class); + } + + /** + * Gets known AgentPoolType values. + * + * @return known AgentPoolType values. + */ + public static Collection values() { + return values(AgentPoolType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java new file mode 100644 index 000000000000..d5c871c492ae --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Available upgrades for an AgentPool. + */ +@Fluent +public final class AgentPoolUpgradeProfilePropertiesUpgradesItem + implements JsonSerializable { + /* + * The Kubernetes version (major.minor.patch). + */ + private String kubernetesVersion; + + /* + * Whether the Kubernetes version is currently in preview. + */ + private Boolean isPreview; + + /** + * Creates an instance of AgentPoolUpgradeProfilePropertiesUpgradesItem class. + */ + public AgentPoolUpgradeProfilePropertiesUpgradesItem() { + } + + /** + * Get the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @param kubernetesVersion the kubernetesVersion value to set. + * @return the AgentPoolUpgradeProfilePropertiesUpgradesItem object itself. + */ + public AgentPoolUpgradeProfilePropertiesUpgradesItem withKubernetesVersion(String kubernetesVersion) { + this.kubernetesVersion = kubernetesVersion; + return this; + } + + /** + * Get the isPreview property: Whether the Kubernetes version is currently in preview. + * + * @return the isPreview value. + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Set the isPreview property: Whether the Kubernetes version is currently in preview. + * + * @param isPreview the isPreview value to set. + * @return the AgentPoolUpgradeProfilePropertiesUpgradesItem object itself. + */ + public AgentPoolUpgradeProfilePropertiesUpgradesItem withIsPreview(Boolean isPreview) { + this.isPreview = isPreview; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); + jsonWriter.writeBooleanField("isPreview", this.isPreview); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolUpgradeProfilePropertiesUpgradesItem from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolUpgradeProfilePropertiesUpgradesItem 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 AgentPoolUpgradeProfilePropertiesUpgradesItem. + */ + public static AgentPoolUpgradeProfilePropertiesUpgradesItem fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolUpgradeProfilePropertiesUpgradesItem deserializedAgentPoolUpgradeProfilePropertiesUpgradesItem + = new AgentPoolUpgradeProfilePropertiesUpgradesItem(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kubernetesVersion".equals(fieldName)) { + deserializedAgentPoolUpgradeProfilePropertiesUpgradesItem.kubernetesVersion = reader.getString(); + } else if ("isPreview".equals(fieldName)) { + deserializedAgentPoolUpgradeProfilePropertiesUpgradesItem.isPreview + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolUpgradeProfilePropertiesUpgradesItem; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java new file mode 100644 index 000000000000..4fe15df7ade6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Settings for upgrading an agentpool. + */ +@Fluent +public final class AgentPoolUpgradeSettings implements JsonSerializable { + /* + * The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer + * (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent + * pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the + * default is 10%. For more information, including best practices, see: + * https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + */ + private String maxSurge; + + /* + * The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. This can either + * be set to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage + * of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not + * specified, the default is 0. For more information, including best practices, see: + * https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + */ + private String maxUnavailable; + + /* + * The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful + * termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, + * the upgrade fails. If not specified, the default is 30 minutes. + */ + private Integer drainTimeoutInMinutes; + + /* + * The soak duration for a node. The amount of time (in minutes) to wait after draining a node and before reimaging + * it and moving on to next node. If not specified, the default is 0 minutes. + */ + private Integer nodeSoakDurationInMinutes; + + /* + * Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod + * Disruption Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the remaining + * per-node drain timeout or pod is still being in a running state, can also cause undrainable nodes. + */ + private UndrainableNodeBehavior undrainableNodeBehavior; + + /** + * Creates an instance of AgentPoolUpgradeSettings class. + */ + public AgentPoolUpgradeSettings() { + } + + /** + * Get the maxSurge property: The maximum number or percentage of nodes that are surged during upgrade. This can + * either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the + * percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded + * up. If not specified, the default is 10%. For more information, including best practices, see: + * https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. + * + * @return the maxSurge value. + */ + public String maxSurge() { + return this.maxSurge; + } + + /** + * Set the maxSurge property: The maximum number or percentage of nodes that are surged during upgrade. This can + * either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the + * percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded + * up. If not specified, the default is 10%. For more information, including best practices, see: + * https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. + * + * @param maxSurge the maxSurge value to set. + * @return the AgentPoolUpgradeSettings object itself. + */ + public AgentPoolUpgradeSettings withMaxSurge(String maxSurge) { + this.maxSurge = maxSurge; + return this; + } + + /** + * Get the maxUnavailable property: The maximum number or percentage of nodes that can be simultaneously unavailable + * during upgrade. This can either be set to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is + * specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, + * fractional nodes are rounded up. If not specified, the default is 0. For more information, including best + * practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. + * + * @return the maxUnavailable value. + */ + public String maxUnavailable() { + return this.maxUnavailable; + } + + /** + * Set the maxUnavailable property: The maximum number or percentage of nodes that can be simultaneously unavailable + * during upgrade. This can either be set to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is + * specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, + * fractional nodes are rounded up. If not specified, the default is 0. For more information, including best + * practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. + * + * @param maxUnavailable the maxUnavailable value to set. + * @return the AgentPoolUpgradeSettings object itself. + */ + public AgentPoolUpgradeSettings withMaxUnavailable(String maxUnavailable) { + this.maxUnavailable = maxUnavailable; + return this; + } + + /** + * Get the drainTimeoutInMinutes property: The drain timeout for a node. The amount of time (in minutes) to wait on + * eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption + * budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 minutes. + * + * @return the drainTimeoutInMinutes value. + */ + public Integer drainTimeoutInMinutes() { + return this.drainTimeoutInMinutes; + } + + /** + * Set the drainTimeoutInMinutes property: The drain timeout for a node. The amount of time (in minutes) to wait on + * eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption + * budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 minutes. + * + * @param drainTimeoutInMinutes the drainTimeoutInMinutes value to set. + * @return the AgentPoolUpgradeSettings object itself. + */ + public AgentPoolUpgradeSettings withDrainTimeoutInMinutes(Integer drainTimeoutInMinutes) { + this.drainTimeoutInMinutes = drainTimeoutInMinutes; + return this; + } + + /** + * Get the nodeSoakDurationInMinutes property: The soak duration for a node. The amount of time (in minutes) to wait + * after draining a node and before reimaging it and moving on to next node. If not specified, the default is 0 + * minutes. + * + * @return the nodeSoakDurationInMinutes value. + */ + public Integer nodeSoakDurationInMinutes() { + return this.nodeSoakDurationInMinutes; + } + + /** + * Set the nodeSoakDurationInMinutes property: The soak duration for a node. The amount of time (in minutes) to wait + * after draining a node and before reimaging it and moving on to next node. If not specified, the default is 0 + * minutes. + * + * @param nodeSoakDurationInMinutes the nodeSoakDurationInMinutes value to set. + * @return the AgentPoolUpgradeSettings object itself. + */ + public AgentPoolUpgradeSettings withNodeSoakDurationInMinutes(Integer nodeSoakDurationInMinutes) { + this.nodeSoakDurationInMinutes = nodeSoakDurationInMinutes; + return this; + } + + /** + * Get the undrainableNodeBehavior property: Defines the behavior for undrainable nodes during upgrade. The most + * common cause of undrainable nodes is Pod Disruption Budgets (PDBs), but other issues, such as pod termination + * grace period is exceeding the remaining per-node drain timeout or pod is still being in a running state, can also + * cause undrainable nodes. + * + * @return the undrainableNodeBehavior value. + */ + public UndrainableNodeBehavior undrainableNodeBehavior() { + return this.undrainableNodeBehavior; + } + + /** + * Set the undrainableNodeBehavior property: Defines the behavior for undrainable nodes during upgrade. The most + * common cause of undrainable nodes is Pod Disruption Budgets (PDBs), but other issues, such as pod termination + * grace period is exceeding the remaining per-node drain timeout or pod is still being in a running state, can also + * cause undrainable nodes. + * + * @param undrainableNodeBehavior the undrainableNodeBehavior value to set. + * @return the AgentPoolUpgradeSettings object itself. + */ + public AgentPoolUpgradeSettings withUndrainableNodeBehavior(UndrainableNodeBehavior undrainableNodeBehavior) { + this.undrainableNodeBehavior = undrainableNodeBehavior; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("maxSurge", this.maxSurge); + jsonWriter.writeStringField("maxUnavailable", this.maxUnavailable); + jsonWriter.writeNumberField("drainTimeoutInMinutes", this.drainTimeoutInMinutes); + jsonWriter.writeNumberField("nodeSoakDurationInMinutes", this.nodeSoakDurationInMinutes); + jsonWriter.writeStringField("undrainableNodeBehavior", + this.undrainableNodeBehavior == null ? null : this.undrainableNodeBehavior.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolUpgradeSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolUpgradeSettings 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 AgentPoolUpgradeSettings. + */ + public static AgentPoolUpgradeSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolUpgradeSettings deserializedAgentPoolUpgradeSettings = new AgentPoolUpgradeSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maxSurge".equals(fieldName)) { + deserializedAgentPoolUpgradeSettings.maxSurge = reader.getString(); + } else if ("maxUnavailable".equals(fieldName)) { + deserializedAgentPoolUpgradeSettings.maxUnavailable = reader.getString(); + } else if ("drainTimeoutInMinutes".equals(fieldName)) { + deserializedAgentPoolUpgradeSettings.drainTimeoutInMinutes = reader.getNullable(JsonReader::getInt); + } else if ("nodeSoakDurationInMinutes".equals(fieldName)) { + deserializedAgentPoolUpgradeSettings.nodeSoakDurationInMinutes + = reader.getNullable(JsonReader::getInt); + } else if ("undrainableNodeBehavior".equals(fieldName)) { + deserializedAgentPoolUpgradeSettings.undrainableNodeBehavior + = UndrainableNodeBehavior.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolUpgradeSettings; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolWindowsProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolWindowsProfile.java new file mode 100644 index 000000000000..cfefbed873d0 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolWindowsProfile.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 Windows agent pool's specific profile. + */ +@Fluent +public final class AgentPoolWindowsProfile implements JsonSerializable { + /* + * Whether to disable OutboundNAT in windows nodes. The default value is false. Outbound NAT can only be disabled if + * the cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP enabled. + */ + private Boolean disableOutboundNat; + + /** + * Creates an instance of AgentPoolWindowsProfile class. + */ + public AgentPoolWindowsProfile() { + } + + /** + * Get the disableOutboundNat property: Whether to disable OutboundNAT in windows nodes. The default value is false. + * Outbound NAT can only be disabled if the cluster outboundType is NAT Gateway and the Windows agent pool does not + * have node public IP enabled. + * + * @return the disableOutboundNat value. + */ + public Boolean disableOutboundNat() { + return this.disableOutboundNat; + } + + /** + * Set the disableOutboundNat property: Whether to disable OutboundNAT in windows nodes. The default value is false. + * Outbound NAT can only be disabled if the cluster outboundType is NAT Gateway and the Windows agent pool does not + * have node public IP enabled. + * + * @param disableOutboundNat the disableOutboundNat value to set. + * @return the AgentPoolWindowsProfile object itself. + */ + public AgentPoolWindowsProfile withDisableOutboundNat(Boolean disableOutboundNat) { + this.disableOutboundNat = disableOutboundNat; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("disableOutboundNat", this.disableOutboundNat); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolWindowsProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolWindowsProfile 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 AgentPoolWindowsProfile. + */ + public static AgentPoolWindowsProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolWindowsProfile deserializedAgentPoolWindowsProfile = new AgentPoolWindowsProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("disableOutboundNat".equals(fieldName)) { + deserializedAgentPoolWindowsProfile.disableOutboundNat = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolWindowsProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ArtifactSource.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ArtifactSource.java new file mode 100644 index 000000000000..d2be9f88a64e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ArtifactSource.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The artifact source. The source where the artifacts are downloaded from. + */ +public final class ArtifactSource extends ExpandableStringEnum { + /** + * Static value Cache for ArtifactSource. + */ + public static final ArtifactSource CACHE = fromString("Cache"); + + /** + * Static value Direct for ArtifactSource. + */ + public static final ArtifactSource DIRECT = fromString("Direct"); + + /** + * Creates a new instance of ArtifactSource value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ArtifactSource() { + } + + /** + * Creates or finds a ArtifactSource from its string representation. + * + * @param name a name to look for. + * @return the corresponding ArtifactSource. + */ + public static ArtifactSource fromString(String name) { + return fromString(name, ArtifactSource.class); + } + + /** + * Gets known ArtifactSource values. + * + * @return known ArtifactSource values. + */ + public static Collection values() { + return values(ArtifactSource.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AzureKeyVaultKms.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AzureKeyVaultKms.java new file mode 100644 index 000000000000..2f50fe818ab9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AzureKeyVaultKms.java @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Azure Key Vault key management service settings for the security profile. + */ +@Fluent +public final class AzureKeyVaultKms implements JsonSerializable { + /* + * Whether to enable Azure Key Vault key management service. The default is false. + */ + private Boolean enabled; + + /* + * Identifier of Azure Key Vault key. See [key identifier + * format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and- + * object-name) for more details. When Azure Key Vault key management service is enabled, this field is required and + * must be a valid key identifier. When Azure Key Vault key management service is disabled, leave the field empty. + */ + private String keyId; + + /* + * Network access of the key vault. Network access of key vault. The possible values are `Public` and `Private`. + * `Public` means the key vault allows public access from all networks. `Private` means the key vault disables + * public access and enables private link. The default value is `Public`. + */ + private KeyVaultNetworkAccessTypes keyVaultNetworkAccess; + + /* + * Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this field is required and must be a valid + * resource ID. When keyVaultNetworkAccess is `Public`, leave the field empty. + */ + private String keyVaultResourceId; + + /** + * Creates an instance of AzureKeyVaultKms class. + */ + public AzureKeyVaultKms() { + } + + /** + * Get the enabled property: Whether to enable Azure Key Vault key management service. The default is false. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Azure Key Vault key management service. The default is false. + * + * @param enabled the enabled value to set. + * @return the AzureKeyVaultKms object itself. + */ + public AzureKeyVaultKms withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the keyId property: Identifier of Azure Key Vault key. See [key identifier + * format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) + * for more details. When Azure Key Vault key management service is enabled, this field is required and must be a + * valid key identifier. When Azure Key Vault key management service is disabled, leave the field empty. + * + * @return the keyId value. + */ + public String keyId() { + return this.keyId; + } + + /** + * Set the keyId property: Identifier of Azure Key Vault key. See [key identifier + * format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) + * for more details. When Azure Key Vault key management service is enabled, this field is required and must be a + * valid key identifier. When Azure Key Vault key management service is disabled, leave the field empty. + * + * @param keyId the keyId value to set. + * @return the AzureKeyVaultKms object itself. + */ + public AzureKeyVaultKms withKeyId(String keyId) { + this.keyId = keyId; + return this; + } + + /** + * Get the keyVaultNetworkAccess property: Network access of the key vault. Network access of key vault. The + * possible values are `Public` and `Private`. `Public` means the key vault allows public access from all networks. + * `Private` means the key vault disables public access and enables private link. The default value is `Public`. + * + * @return the keyVaultNetworkAccess value. + */ + public KeyVaultNetworkAccessTypes keyVaultNetworkAccess() { + return this.keyVaultNetworkAccess; + } + + /** + * Set the keyVaultNetworkAccess property: Network access of the key vault. Network access of key vault. The + * possible values are `Public` and `Private`. `Public` means the key vault allows public access from all networks. + * `Private` means the key vault disables public access and enables private link. The default value is `Public`. + * + * @param keyVaultNetworkAccess the keyVaultNetworkAccess value to set. + * @return the AzureKeyVaultKms object itself. + */ + public AzureKeyVaultKms withKeyVaultNetworkAccess(KeyVaultNetworkAccessTypes keyVaultNetworkAccess) { + this.keyVaultNetworkAccess = keyVaultNetworkAccess; + return this; + } + + /** + * Get the keyVaultResourceId property: Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this + * field is required and must be a valid resource ID. When keyVaultNetworkAccess is `Public`, leave the field empty. + * + * @return the keyVaultResourceId value. + */ + public String keyVaultResourceId() { + return this.keyVaultResourceId; + } + + /** + * Set the keyVaultResourceId property: Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this + * field is required and must be a valid resource ID. When keyVaultNetworkAccess is `Public`, leave the field empty. + * + * @param keyVaultResourceId the keyVaultResourceId value to set. + * @return the AzureKeyVaultKms object itself. + */ + public AzureKeyVaultKms withKeyVaultResourceId(String keyVaultResourceId) { + this.keyVaultResourceId = keyVaultResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("keyId", this.keyId); + jsonWriter.writeStringField("keyVaultNetworkAccess", + this.keyVaultNetworkAccess == null ? null : this.keyVaultNetworkAccess.toString()); + jsonWriter.writeStringField("keyVaultResourceId", this.keyVaultResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AzureKeyVaultKms from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AzureKeyVaultKms 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 AzureKeyVaultKms. + */ + public static AzureKeyVaultKms fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AzureKeyVaultKms deserializedAzureKeyVaultKms = new AzureKeyVaultKms(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedAzureKeyVaultKms.enabled = reader.getNullable(JsonReader::getBoolean); + } else if ("keyId".equals(fieldName)) { + deserializedAzureKeyVaultKms.keyId = reader.getString(); + } else if ("keyVaultNetworkAccess".equals(fieldName)) { + deserializedAzureKeyVaultKms.keyVaultNetworkAccess + = KeyVaultNetworkAccessTypes.fromString(reader.getString()); + } else if ("keyVaultResourceId".equals(fieldName)) { + deserializedAzureKeyVaultKms.keyVaultResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAzureKeyVaultKms; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BackendPoolType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BackendPoolType.java new file mode 100644 index 000000000000..6220922381e8 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BackendPoolType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of the managed inbound Load Balancer BackendPool. + */ +public final class BackendPoolType extends ExpandableStringEnum { + /** + * Static value NodeIPConfiguration for BackendPoolType. + */ + public static final BackendPoolType NODE_IPCONFIGURATION = fromString("NodeIPConfiguration"); + + /** + * Static value NodeIP for BackendPoolType. + */ + public static final BackendPoolType NODE_IP = fromString("NodeIP"); + + /** + * Creates a new instance of BackendPoolType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BackendPoolType() { + } + + /** + * Creates or finds a BackendPoolType from its string representation. + * + * @param name a name to look for. + * @return the corresponding BackendPoolType. + */ + public static BackendPoolType fromString(String name) { + return fromString(name, BackendPoolType.class); + } + + /** + * Gets known BackendPoolType values. + * + * @return known BackendPoolType values. + */ + public static Collection values() { + return values(BackendPoolType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterUpgradeSettings.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterUpgradeSettings.java new file mode 100644 index 000000000000..fe9edbb659c0 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterUpgradeSettings.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Settings for upgrading a cluster. + */ +@Fluent +public final class ClusterUpgradeSettings implements JsonSerializable { + /* + * Settings for overrides. + */ + private UpgradeOverrideSettings overrideSettings; + + /** + * Creates an instance of ClusterUpgradeSettings class. + */ + public ClusterUpgradeSettings() { + } + + /** + * Get the overrideSettings property: Settings for overrides. + * + * @return the overrideSettings value. + */ + public UpgradeOverrideSettings overrideSettings() { + return this.overrideSettings; + } + + /** + * Set the overrideSettings property: Settings for overrides. + * + * @param overrideSettings the overrideSettings value to set. + * @return the ClusterUpgradeSettings object itself. + */ + public ClusterUpgradeSettings withOverrideSettings(UpgradeOverrideSettings overrideSettings) { + this.overrideSettings = overrideSettings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (overrideSettings() != null) { + overrideSettings().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("overrideSettings", this.overrideSettings); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClusterUpgradeSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterUpgradeSettings 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 ClusterUpgradeSettings. + */ + public static ClusterUpgradeSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterUpgradeSettings deserializedClusterUpgradeSettings = new ClusterUpgradeSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("overrideSettings".equals(fieldName)) { + deserializedClusterUpgradeSettings.overrideSettings = UpgradeOverrideSettings.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedClusterUpgradeSettings; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Code.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Code.java new file mode 100644 index 000000000000..5e916c364db4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Code.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Tells whether the cluster is Running or Stopped. + */ +public final class Code extends ExpandableStringEnum { + /** + * Static value Running for Code. + */ + public static final Code RUNNING = fromString("Running"); + + /** + * Static value Stopped for Code. + */ + public static final Code STOPPED = fromString("Stopped"); + + /** + * Creates a new instance of Code value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Code() { + } + + /** + * Creates or finds a Code from its string representation. + * + * @param name a name to look for. + * @return the corresponding Code. + */ + public static Code fromString(String name) { + return fromString(name, Code.class); + } + + /** + * Gets known Code values. + * + * @return known Code values. + */ + public static Collection values() { + return values(Code.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CompatibleVersions.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CompatibleVersions.java new file mode 100644 index 000000000000..950194c26564 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CompatibleVersions.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Version information about a product/service that is compatible with a service mesh revision. + */ +@Fluent +public final class CompatibleVersions implements JsonSerializable { + /* + * The product/service name. + */ + private String name; + + /* + * Product/service versions compatible with a service mesh add-on revision. + */ + private List versions; + + /** + * Creates an instance of CompatibleVersions class. + */ + public CompatibleVersions() { + } + + /** + * Get the name property: The product/service name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The product/service name. + * + * @param name the name value to set. + * @return the CompatibleVersions object itself. + */ + public CompatibleVersions withName(String name) { + this.name = name; + return this; + } + + /** + * Get the versions property: Product/service versions compatible with a service mesh add-on revision. + * + * @return the versions value. + */ + public List versions() { + return this.versions; + } + + /** + * Set the versions property: Product/service versions compatible with a service mesh add-on revision. + * + * @param versions the versions value to set. + * @return the CompatibleVersions object itself. + */ + public CompatibleVersions withVersions(List versions) { + this.versions = versions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeArrayField("versions", this.versions, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CompatibleVersions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CompatibleVersions 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 CompatibleVersions. + */ + public static CompatibleVersions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CompatibleVersions deserializedCompatibleVersions = new CompatibleVersions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedCompatibleVersions.name = reader.getString(); + } else if ("versions".equals(fieldName)) { + List versions = reader.readArray(reader1 -> reader1.getString()); + deserializedCompatibleVersions.versions = versions; + } else { + reader.skipChildren(); + } + } + + return deserializedCompatibleVersions; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ConnectionStatus.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ConnectionStatus.java new file mode 100644 index 000000000000..ae33005b5b63 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ConnectionStatus.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The private link service connection status. + */ +public final class ConnectionStatus extends ExpandableStringEnum { + /** + * Static value Pending for ConnectionStatus. + */ + public static final ConnectionStatus PENDING = fromString("Pending"); + + /** + * Static value Approved for ConnectionStatus. + */ + public static final ConnectionStatus APPROVED = fromString("Approved"); + + /** + * Static value Rejected for ConnectionStatus. + */ + public static final ConnectionStatus REJECTED = fromString("Rejected"); + + /** + * Static value Disconnected for ConnectionStatus. + */ + public static final ConnectionStatus DISCONNECTED = fromString("Disconnected"); + + /** + * Creates a new instance of ConnectionStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConnectionStatus() { + } + + /** + * Creates or finds a ConnectionStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ConnectionStatus. + */ + public static ConnectionStatus fromString(String name) { + return fromString(name, ConnectionStatus.class); + } + + /** + * Gets known ConnectionStatus values. + * + * @return known ConnectionStatus values. + */ + public static Collection values() { + return values(ConnectionStatus.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceLinuxProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceLinuxProfile.java new file mode 100644 index 000000000000..f78a1d7bc7f0 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceLinuxProfile.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +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 Linux VMs in the container service cluster. + */ +@Fluent +public final class ContainerServiceLinuxProfile implements JsonSerializable { + /* + * The administrator username to use for Linux VMs. + */ + private String adminUsername; + + /* + * The SSH configuration for Linux-based VMs running on Azure. + */ + private ContainerServiceSshConfiguration ssh; + + /** + * Creates an instance of ContainerServiceLinuxProfile class. + */ + public ContainerServiceLinuxProfile() { + } + + /** + * Get the adminUsername property: The administrator username to use for Linux VMs. + * + * @return the adminUsername value. + */ + public String adminUsername() { + return this.adminUsername; + } + + /** + * Set the adminUsername property: The administrator username to use for Linux VMs. + * + * @param adminUsername the adminUsername value to set. + * @return the ContainerServiceLinuxProfile object itself. + */ + public ContainerServiceLinuxProfile withAdminUsername(String adminUsername) { + this.adminUsername = adminUsername; + return this; + } + + /** + * Get the ssh property: The SSH configuration for Linux-based VMs running on Azure. + * + * @return the ssh value. + */ + public ContainerServiceSshConfiguration ssh() { + return this.ssh; + } + + /** + * Set the ssh property: The SSH configuration for Linux-based VMs running on Azure. + * + * @param ssh the ssh value to set. + * @return the ContainerServiceLinuxProfile object itself. + */ + public ContainerServiceLinuxProfile withSsh(ContainerServiceSshConfiguration ssh) { + this.ssh = ssh; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (adminUsername() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property adminUsername in model ContainerServiceLinuxProfile")); + } + if (ssh() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property ssh in model ContainerServiceLinuxProfile")); + } else { + ssh().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerServiceLinuxProfile.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("adminUsername", this.adminUsername); + jsonWriter.writeJsonField("ssh", this.ssh); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ContainerServiceLinuxProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ContainerServiceLinuxProfile 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 ContainerServiceLinuxProfile. + */ + public static ContainerServiceLinuxProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ContainerServiceLinuxProfile deserializedContainerServiceLinuxProfile = new ContainerServiceLinuxProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("adminUsername".equals(fieldName)) { + deserializedContainerServiceLinuxProfile.adminUsername = reader.getString(); + } else if ("ssh".equals(fieldName)) { + deserializedContainerServiceLinuxProfile.ssh = ContainerServiceSshConfiguration.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedContainerServiceLinuxProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java new file mode 100644 index 000000000000..333f0bcc9ba8 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java @@ -0,0 +1,615 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Profile of network configuration. + */ +@Fluent +public final class ContainerServiceNetworkProfile implements JsonSerializable { + /* + * Network plugin used for building the Kubernetes network. + */ + private NetworkPlugin networkPlugin; + + /* + * The mode the network plugin should use. + */ + private NetworkPluginMode networkPluginMode; + + /* + * Network policy used for building the Kubernetes network. + */ + private NetworkPolicy networkPolicy; + + /* + * The network mode Azure CNI is configured with. This cannot be specified if networkPlugin is anything other than + * 'azure'. + */ + private NetworkMode networkMode; + + /* + * Network dataplane used in the Kubernetes cluster. + */ + private NetworkDataplane networkDataplane; + + /* + * Advanced Networking profile for enabling observability and security feature suite on a cluster. For more + * information see aka.ms/aksadvancednetworking. + */ + private AdvancedNetworking advancedNetworking; + + /* + * A CIDR notation IP range from which to assign pod IPs when kubenet is used. + */ + private String podCidr; + + /* + * A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. + */ + private String serviceCidr; + + /* + * An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range + * specified in serviceCidr. + */ + private String dnsServiceIp; + + /* + * The outbound (egress) routing method. This can only be set at cluster creation time and cannot be changed later. + * For more information see [egress outbound type](https://docs.microsoft.com/azure/aks/egress-outboundtype). + */ + private OutboundType outboundType; + + /* + * The load balancer sku for the managed cluster. The default is 'standard'. See [Azure Load Balancer + * SKUs](https://docs.microsoft.com/azure/load-balancer/skus) for more information about the differences between + * load balancer SKUs. + */ + private LoadBalancerSku loadBalancerSku; + + /* + * Profile of the cluster load balancer. + */ + private ManagedClusterLoadBalancerProfile loadBalancerProfile; + + /* + * Profile of the cluster NAT gateway. + */ + private ManagedClusterNatGatewayProfile natGatewayProfile; + + /* + * The profile for Static Egress Gateway addon. For more details about Static Egress Gateway, see + * https://aka.ms/aks/static-egress-gateway. + */ + private ManagedClusterStaticEgressGatewayProfile staticEgressGatewayProfile; + + /* + * The CIDR notation IP ranges from which to assign pod IPs. One IPv4 CIDR is expected for single-stack networking. + * Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking. + */ + private List podCidrs; + + /* + * The CIDR notation IP ranges from which to assign service cluster IPs. One IPv4 CIDR is expected for single-stack + * networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking. They must not + * overlap with any Subnet IP ranges. + */ + private List serviceCidrs; + + /* + * The IP families used to specify IP versions available to the cluster. IP families are used to determine + * single-stack or dual-stack clusters. For single-stack, the expected value is IPv4. For dual-stack, the expected + * values are IPv4 and IPv6. + */ + private List ipFamilies; + + /** + * Creates an instance of ContainerServiceNetworkProfile class. + */ + public ContainerServiceNetworkProfile() { + } + + /** + * Get the networkPlugin property: Network plugin used for building the Kubernetes network. + * + * @return the networkPlugin value. + */ + public NetworkPlugin networkPlugin() { + return this.networkPlugin; + } + + /** + * Set the networkPlugin property: Network plugin used for building the Kubernetes network. + * + * @param networkPlugin the networkPlugin value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withNetworkPlugin(NetworkPlugin networkPlugin) { + this.networkPlugin = networkPlugin; + return this; + } + + /** + * Get the networkPluginMode property: The mode the network plugin should use. + * + * @return the networkPluginMode value. + */ + public NetworkPluginMode networkPluginMode() { + return this.networkPluginMode; + } + + /** + * Set the networkPluginMode property: The mode the network plugin should use. + * + * @param networkPluginMode the networkPluginMode value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withNetworkPluginMode(NetworkPluginMode networkPluginMode) { + this.networkPluginMode = networkPluginMode; + return this; + } + + /** + * Get the networkPolicy property: Network policy used for building the Kubernetes network. + * + * @return the networkPolicy value. + */ + public NetworkPolicy networkPolicy() { + return this.networkPolicy; + } + + /** + * Set the networkPolicy property: Network policy used for building the Kubernetes network. + * + * @param networkPolicy the networkPolicy value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withNetworkPolicy(NetworkPolicy networkPolicy) { + this.networkPolicy = networkPolicy; + return this; + } + + /** + * Get the networkMode property: The network mode Azure CNI is configured with. This cannot be specified if + * networkPlugin is anything other than 'azure'. + * + * @return the networkMode value. + */ + public NetworkMode networkMode() { + return this.networkMode; + } + + /** + * Set the networkMode property: The network mode Azure CNI is configured with. This cannot be specified if + * networkPlugin is anything other than 'azure'. + * + * @param networkMode the networkMode value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withNetworkMode(NetworkMode networkMode) { + this.networkMode = networkMode; + return this; + } + + /** + * Get the networkDataplane property: Network dataplane used in the Kubernetes cluster. + * + * @return the networkDataplane value. + */ + public NetworkDataplane networkDataplane() { + return this.networkDataplane; + } + + /** + * Set the networkDataplane property: Network dataplane used in the Kubernetes cluster. + * + * @param networkDataplane the networkDataplane value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withNetworkDataplane(NetworkDataplane networkDataplane) { + this.networkDataplane = networkDataplane; + return this; + } + + /** + * Get the advancedNetworking property: Advanced Networking profile for enabling observability and security feature + * suite on a cluster. For more information see aka.ms/aksadvancednetworking. + * + * @return the advancedNetworking value. + */ + public AdvancedNetworking advancedNetworking() { + return this.advancedNetworking; + } + + /** + * Set the advancedNetworking property: Advanced Networking profile for enabling observability and security feature + * suite on a cluster. For more information see aka.ms/aksadvancednetworking. + * + * @param advancedNetworking the advancedNetworking value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withAdvancedNetworking(AdvancedNetworking advancedNetworking) { + this.advancedNetworking = advancedNetworking; + return this; + } + + /** + * Get the podCidr property: A CIDR notation IP range from which to assign pod IPs when kubenet is used. + * + * @return the podCidr value. + */ + public String podCidr() { + return this.podCidr; + } + + /** + * Set the podCidr property: A CIDR notation IP range from which to assign pod IPs when kubenet is used. + * + * @param podCidr the podCidr value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withPodCidr(String podCidr) { + this.podCidr = podCidr; + return this; + } + + /** + * Get the serviceCidr property: A CIDR notation IP range from which to assign service cluster IPs. It must not + * overlap with any Subnet IP ranges. + * + * @return the serviceCidr value. + */ + public String serviceCidr() { + return this.serviceCidr; + } + + /** + * Set the serviceCidr property: A CIDR notation IP range from which to assign service cluster IPs. It must not + * overlap with any Subnet IP ranges. + * + * @param serviceCidr the serviceCidr value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withServiceCidr(String serviceCidr) { + this.serviceCidr = serviceCidr; + return this; + } + + /** + * Get the dnsServiceIp property: An IP address assigned to the Kubernetes DNS service. It must be within the + * Kubernetes service address range specified in serviceCidr. + * + * @return the dnsServiceIp value. + */ + public String dnsServiceIp() { + return this.dnsServiceIp; + } + + /** + * Set the dnsServiceIp property: An IP address assigned to the Kubernetes DNS service. It must be within the + * Kubernetes service address range specified in serviceCidr. + * + * @param dnsServiceIp the dnsServiceIp value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withDnsServiceIp(String dnsServiceIp) { + this.dnsServiceIp = dnsServiceIp; + return this; + } + + /** + * Get the outboundType property: The outbound (egress) routing method. This can only be set at cluster creation + * time and cannot be changed later. For more information see [egress outbound + * type](https://docs.microsoft.com/azure/aks/egress-outboundtype). + * + * @return the outboundType value. + */ + public OutboundType outboundType() { + return this.outboundType; + } + + /** + * Set the outboundType property: The outbound (egress) routing method. This can only be set at cluster creation + * time and cannot be changed later. For more information see [egress outbound + * type](https://docs.microsoft.com/azure/aks/egress-outboundtype). + * + * @param outboundType the outboundType value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withOutboundType(OutboundType outboundType) { + this.outboundType = outboundType; + return this; + } + + /** + * Get the loadBalancerSku property: The load balancer sku for the managed cluster. The default is 'standard'. See + * [Azure Load Balancer SKUs](https://docs.microsoft.com/azure/load-balancer/skus) for more information about the + * differences between load balancer SKUs. + * + * @return the loadBalancerSku value. + */ + public LoadBalancerSku loadBalancerSku() { + return this.loadBalancerSku; + } + + /** + * Set the loadBalancerSku property: The load balancer sku for the managed cluster. The default is 'standard'. See + * [Azure Load Balancer SKUs](https://docs.microsoft.com/azure/load-balancer/skus) for more information about the + * differences between load balancer SKUs. + * + * @param loadBalancerSku the loadBalancerSku value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withLoadBalancerSku(LoadBalancerSku loadBalancerSku) { + this.loadBalancerSku = loadBalancerSku; + return this; + } + + /** + * Get the loadBalancerProfile property: Profile of the cluster load balancer. + * + * @return the loadBalancerProfile value. + */ + public ManagedClusterLoadBalancerProfile loadBalancerProfile() { + return this.loadBalancerProfile; + } + + /** + * Set the loadBalancerProfile property: Profile of the cluster load balancer. + * + * @param loadBalancerProfile the loadBalancerProfile value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile + withLoadBalancerProfile(ManagedClusterLoadBalancerProfile loadBalancerProfile) { + this.loadBalancerProfile = loadBalancerProfile; + return this; + } + + /** + * Get the natGatewayProfile property: Profile of the cluster NAT gateway. + * + * @return the natGatewayProfile value. + */ + public ManagedClusterNatGatewayProfile natGatewayProfile() { + return this.natGatewayProfile; + } + + /** + * Set the natGatewayProfile property: Profile of the cluster NAT gateway. + * + * @param natGatewayProfile the natGatewayProfile value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withNatGatewayProfile(ManagedClusterNatGatewayProfile natGatewayProfile) { + this.natGatewayProfile = natGatewayProfile; + return this; + } + + /** + * Get the staticEgressGatewayProfile property: The profile for Static Egress Gateway addon. For more details about + * Static Egress Gateway, see https://aka.ms/aks/static-egress-gateway. + * + * @return the staticEgressGatewayProfile value. + */ + public ManagedClusterStaticEgressGatewayProfile staticEgressGatewayProfile() { + return this.staticEgressGatewayProfile; + } + + /** + * Set the staticEgressGatewayProfile property: The profile for Static Egress Gateway addon. For more details about + * Static Egress Gateway, see https://aka.ms/aks/static-egress-gateway. + * + * @param staticEgressGatewayProfile the staticEgressGatewayProfile value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile + withStaticEgressGatewayProfile(ManagedClusterStaticEgressGatewayProfile staticEgressGatewayProfile) { + this.staticEgressGatewayProfile = staticEgressGatewayProfile; + return this; + } + + /** + * Get the podCidrs property: The CIDR notation IP ranges from which to assign pod IPs. One IPv4 CIDR is expected + * for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack + * networking. + * + * @return the podCidrs value. + */ + public List podCidrs() { + return this.podCidrs; + } + + /** + * Set the podCidrs property: The CIDR notation IP ranges from which to assign pod IPs. One IPv4 CIDR is expected + * for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack + * networking. + * + * @param podCidrs the podCidrs value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withPodCidrs(List podCidrs) { + this.podCidrs = podCidrs; + return this; + } + + /** + * Get the serviceCidrs property: The CIDR notation IP ranges from which to assign service cluster IPs. One IPv4 + * CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for + * dual-stack networking. They must not overlap with any Subnet IP ranges. + * + * @return the serviceCidrs value. + */ + public List serviceCidrs() { + return this.serviceCidrs; + } + + /** + * Set the serviceCidrs property: The CIDR notation IP ranges from which to assign service cluster IPs. One IPv4 + * CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for + * dual-stack networking. They must not overlap with any Subnet IP ranges. + * + * @param serviceCidrs the serviceCidrs value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withServiceCidrs(List serviceCidrs) { + this.serviceCidrs = serviceCidrs; + return this; + } + + /** + * Get the ipFamilies property: The IP families used to specify IP versions available to the cluster. IP families + * are used to determine single-stack or dual-stack clusters. For single-stack, the expected value is IPv4. For + * dual-stack, the expected values are IPv4 and IPv6. + * + * @return the ipFamilies value. + */ + public List ipFamilies() { + return this.ipFamilies; + } + + /** + * Set the ipFamilies property: The IP families used to specify IP versions available to the cluster. IP families + * are used to determine single-stack or dual-stack clusters. For single-stack, the expected value is IPv4. For + * dual-stack, the expected values are IPv4 and IPv6. + * + * @param ipFamilies the ipFamilies value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withIpFamilies(List ipFamilies) { + this.ipFamilies = ipFamilies; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (advancedNetworking() != null) { + advancedNetworking().validate(); + } + if (loadBalancerProfile() != null) { + loadBalancerProfile().validate(); + } + if (natGatewayProfile() != null) { + natGatewayProfile().validate(); + } + if (staticEgressGatewayProfile() != null) { + staticEgressGatewayProfile().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("networkPlugin", this.networkPlugin == null ? null : this.networkPlugin.toString()); + jsonWriter.writeStringField("networkPluginMode", + this.networkPluginMode == null ? null : this.networkPluginMode.toString()); + jsonWriter.writeStringField("networkPolicy", this.networkPolicy == null ? null : this.networkPolicy.toString()); + jsonWriter.writeStringField("networkMode", this.networkMode == null ? null : this.networkMode.toString()); + jsonWriter.writeStringField("networkDataplane", + this.networkDataplane == null ? null : this.networkDataplane.toString()); + jsonWriter.writeJsonField("advancedNetworking", this.advancedNetworking); + jsonWriter.writeStringField("podCidr", this.podCidr); + jsonWriter.writeStringField("serviceCidr", this.serviceCidr); + jsonWriter.writeStringField("dnsServiceIP", this.dnsServiceIp); + jsonWriter.writeStringField("outboundType", this.outboundType == null ? null : this.outboundType.toString()); + jsonWriter.writeStringField("loadBalancerSku", + this.loadBalancerSku == null ? null : this.loadBalancerSku.toString()); + jsonWriter.writeJsonField("loadBalancerProfile", this.loadBalancerProfile); + jsonWriter.writeJsonField("natGatewayProfile", this.natGatewayProfile); + jsonWriter.writeJsonField("staticEgressGatewayProfile", this.staticEgressGatewayProfile); + jsonWriter.writeArrayField("podCidrs", this.podCidrs, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("serviceCidrs", this.serviceCidrs, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("ipFamilies", this.ipFamilies, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ContainerServiceNetworkProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ContainerServiceNetworkProfile 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 ContainerServiceNetworkProfile. + */ + public static ContainerServiceNetworkProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ContainerServiceNetworkProfile deserializedContainerServiceNetworkProfile + = new ContainerServiceNetworkProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("networkPlugin".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.networkPlugin + = NetworkPlugin.fromString(reader.getString()); + } else if ("networkPluginMode".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.networkPluginMode + = NetworkPluginMode.fromString(reader.getString()); + } else if ("networkPolicy".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.networkPolicy + = NetworkPolicy.fromString(reader.getString()); + } else if ("networkMode".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.networkMode = NetworkMode.fromString(reader.getString()); + } else if ("networkDataplane".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.networkDataplane + = NetworkDataplane.fromString(reader.getString()); + } else if ("advancedNetworking".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.advancedNetworking = AdvancedNetworking.fromJson(reader); + } else if ("podCidr".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.podCidr = reader.getString(); + } else if ("serviceCidr".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.serviceCidr = reader.getString(); + } else if ("dnsServiceIP".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.dnsServiceIp = reader.getString(); + } else if ("outboundType".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.outboundType + = OutboundType.fromString(reader.getString()); + } else if ("loadBalancerSku".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.loadBalancerSku + = LoadBalancerSku.fromString(reader.getString()); + } else if ("loadBalancerProfile".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.loadBalancerProfile + = ManagedClusterLoadBalancerProfile.fromJson(reader); + } else if ("natGatewayProfile".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.natGatewayProfile + = ManagedClusterNatGatewayProfile.fromJson(reader); + } else if ("staticEgressGatewayProfile".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.staticEgressGatewayProfile + = ManagedClusterStaticEgressGatewayProfile.fromJson(reader); + } else if ("podCidrs".equals(fieldName)) { + List podCidrs = reader.readArray(reader1 -> reader1.getString()); + deserializedContainerServiceNetworkProfile.podCidrs = podCidrs; + } else if ("serviceCidrs".equals(fieldName)) { + List serviceCidrs = reader.readArray(reader1 -> reader1.getString()); + deserializedContainerServiceNetworkProfile.serviceCidrs = serviceCidrs; + } else if ("ipFamilies".equals(fieldName)) { + List ipFamilies = reader.readArray(reader1 -> IpFamily.fromString(reader1.getString())); + deserializedContainerServiceNetworkProfile.ipFamilies = ipFamilies; + } else { + reader.skipChildren(); + } + } + + return deserializedContainerServiceNetworkProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshConfiguration.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshConfiguration.java new file mode 100644 index 000000000000..d27bf72b9860 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshConfiguration.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +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 ContainerServiceSshConfiguration implements JsonSerializable { + /* + * The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. + */ + private List publicKeys; + + /** + * Creates an instance of ContainerServiceSshConfiguration class. + */ + public ContainerServiceSshConfiguration() { + } + + /** + * Get the publicKeys property: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of + * 1 key may be specified. + * + * @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. A maximum of + * 1 key may be specified. + * + * @param publicKeys the publicKeys value to set. + * @return the ContainerServiceSshConfiguration object itself. + */ + public ContainerServiceSshConfiguration withPublicKeys(List publicKeys) { + this.publicKeys = publicKeys; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (publicKeys() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property publicKeys in model ContainerServiceSshConfiguration")); + } else { + publicKeys().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerServiceSshConfiguration.class); + + /** + * {@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 ContainerServiceSshConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ContainerServiceSshConfiguration 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 ContainerServiceSshConfiguration. + */ + public static ContainerServiceSshConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ContainerServiceSshConfiguration deserializedContainerServiceSshConfiguration + = new ContainerServiceSshConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("publicKeys".equals(fieldName)) { + List publicKeys + = reader.readArray(reader1 -> ContainerServiceSshPublicKey.fromJson(reader1)); + deserializedContainerServiceSshConfiguration.publicKeys = publicKeys; + } else { + reader.skipChildren(); + } + } + + return deserializedContainerServiceSshConfiguration; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshPublicKey.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshPublicKey.java new file mode 100644 index 000000000000..b25eeebcf585 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshPublicKey.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +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 data. + */ +@Fluent +public final class ContainerServiceSshPublicKey implements JsonSerializable { + /* + * Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or + * without headers. + */ + private String keyData; + + /** + * Creates an instance of ContainerServiceSshPublicKey class. + */ + public ContainerServiceSshPublicKey() { + } + + /** + * Get the keyData property: Certificate public key used to authenticate with VMs through SSH. The certificate must + * be in PEM format with or without headers. + * + * @return the keyData value. + */ + public String keyData() { + return this.keyData; + } + + /** + * Set the keyData property: Certificate public key used to authenticate with VMs through SSH. The certificate must + * be in PEM format with or without headers. + * + * @param keyData the keyData value to set. + * @return the ContainerServiceSshPublicKey object itself. + */ + public ContainerServiceSshPublicKey withKeyData(String keyData) { + this.keyData = keyData; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyData() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property keyData in model ContainerServiceSshPublicKey")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerServiceSshPublicKey.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyData", this.keyData); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ContainerServiceSshPublicKey from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ContainerServiceSshPublicKey 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 ContainerServiceSshPublicKey. + */ + public static ContainerServiceSshPublicKey fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ContainerServiceSshPublicKey deserializedContainerServiceSshPublicKey = new ContainerServiceSshPublicKey(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyData".equals(fieldName)) { + deserializedContainerServiceSshPublicKey.keyData = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedContainerServiceSshPublicKey; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CreationData.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CreationData.java new file mode 100644 index 000000000000..4a42a8ae7ac2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CreationData.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Data used when creating a target resource from a source resource. + */ +@Fluent +public final class CreationData implements JsonSerializable { + /* + * This is the ARM ID of the source object to be used to create the target object. + */ + private String sourceResourceId; + + /** + * Creates an instance of CreationData class. + */ + public CreationData() { + } + + /** + * Get the sourceResourceId property: This is the ARM ID of the source object to be used to create the target + * object. + * + * @return the sourceResourceId value. + */ + public String sourceResourceId() { + return this.sourceResourceId; + } + + /** + * Set the sourceResourceId property: This is the ARM ID of the source object to be used to create the target + * object. + * + * @param sourceResourceId the sourceResourceId value to set. + * @return the CreationData object itself. + */ + public CreationData withSourceResourceId(String sourceResourceId) { + this.sourceResourceId = sourceResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sourceResourceId", this.sourceResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CreationData from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CreationData 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 CreationData. + */ + public static CreationData fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CreationData deserializedCreationData = new CreationData(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourceResourceId".equals(fieldName)) { + deserializedCreationData.sourceResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCreationData; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CredentialResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CredentialResult.java new file mode 100644 index 000000000000..ae8cd9c8ea16 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CredentialResult.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The credential result response. + */ +@Immutable +public final class CredentialResult implements JsonSerializable { + /* + * The name of the credential. + */ + private String name; + + /* + * Base64-encoded Kubernetes configuration file. + */ + private byte[] value; + + /** + * Creates an instance of CredentialResult class. + */ + public CredentialResult() { + } + + /** + * Get the name property: The name of the credential. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the value property: Base64-encoded Kubernetes configuration file. + * + * @return the value value. + */ + public byte[] value() { + return CoreUtils.clone(this.value); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CredentialResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CredentialResult 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 CredentialResult. + */ + public static CredentialResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CredentialResult deserializedCredentialResult = new CredentialResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedCredentialResult.name = reader.getString(); + } else if ("value".equals(fieldName)) { + deserializedCredentialResult.value = reader.getBinary(); + } else { + reader.skipChildren(); + } + } + + return deserializedCredentialResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DailySchedule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DailySchedule.java new file mode 100644 index 000000000000..c55656524baf --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DailySchedule.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * For schedules like: 'recur every day' or 'recur every 3 days'. + */ +@Fluent +public final class DailySchedule implements JsonSerializable { + /* + * Specifies the number of days between each set of occurrences. + */ + private int intervalDays; + + /** + * Creates an instance of DailySchedule class. + */ + public DailySchedule() { + } + + /** + * Get the intervalDays property: Specifies the number of days between each set of occurrences. + * + * @return the intervalDays value. + */ + public int intervalDays() { + return this.intervalDays; + } + + /** + * Set the intervalDays property: Specifies the number of days between each set of occurrences. + * + * @param intervalDays the intervalDays value to set. + * @return the DailySchedule object itself. + */ + public DailySchedule withIntervalDays(int intervalDays) { + this.intervalDays = intervalDays; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("intervalDays", this.intervalDays); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DailySchedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DailySchedule 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 DailySchedule. + */ + public static DailySchedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DailySchedule deserializedDailySchedule = new DailySchedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("intervalDays".equals(fieldName)) { + deserializedDailySchedule.intervalDays = reader.getInt(); + } else { + reader.skipChildren(); + } + } + + return deserializedDailySchedule; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DateSpan.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DateSpan.java new file mode 100644 index 000000000000..48f64b128481 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DateSpan.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.Objects; + +/** + * A date range. For example, between '2022-12-23' and '2023-01-05'. + */ +@Fluent +public final class DateSpan implements JsonSerializable { + /* + * The start date of the date span. + */ + private LocalDate start; + + /* + * The end date of the date span. + */ + private LocalDate end; + + /** + * Creates an instance of DateSpan class. + */ + public DateSpan() { + } + + /** + * Get the start property: The start date of the date span. + * + * @return the start value. + */ + public LocalDate start() { + return this.start; + } + + /** + * Set the start property: The start date of the date span. + * + * @param start the start value to set. + * @return the DateSpan object itself. + */ + public DateSpan withStart(LocalDate start) { + this.start = start; + return this; + } + + /** + * Get the end property: The end date of the date span. + * + * @return the end value. + */ + public LocalDate end() { + return this.end; + } + + /** + * Set the end property: The end date of the date span. + * + * @param end the end value to set. + * @return the DateSpan object itself. + */ + public DateSpan withEnd(LocalDate end) { + this.end = end; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (start() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property start in model DateSpan")); + } + if (end() == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property end in model DateSpan")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DateSpan.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("start", Objects.toString(this.start, null)); + jsonWriter.writeStringField("end", Objects.toString(this.end, null)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DateSpan from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DateSpan 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 DateSpan. + */ + public static DateSpan fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DateSpan deserializedDateSpan = new DateSpan(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("start".equals(fieldName)) { + deserializedDateSpan.start + = reader.getNullable(nonNullReader -> LocalDate.parse(nonNullReader.getString())); + } else if ("end".equals(fieldName)) { + deserializedDateSpan.end + = reader.getNullable(nonNullReader -> LocalDate.parse(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedDateSpan; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DelegatedResource.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DelegatedResource.java new file mode 100644 index 000000000000..b795012803b1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DelegatedResource.java @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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.Objects; +import java.util.UUID; + +/** + * Delegated resource properties - internal use only. + */ +@Fluent +public final class DelegatedResource implements JsonSerializable { + /* + * The ARM resource id of the delegated resource - internal use only. + */ + private String resourceId; + + /* + * The tenant id of the delegated resource - internal use only. + */ + private UUID tenantId; + + /* + * The delegation id of the referral delegation (optional) - internal use only. + */ + private String referralResource; + + /* + * The source resource location - internal use only. + */ + private String location; + + /** + * Creates an instance of DelegatedResource class. + */ + public DelegatedResource() { + } + + /** + * Get the resourceId property: The ARM resource id of the delegated resource - internal use only. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The ARM resource id of the delegated resource - internal use only. + * + * @param resourceId the resourceId value to set. + * @return the DelegatedResource object itself. + */ + public DelegatedResource withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the tenantId property: The tenant id of the delegated resource - internal use only. + * + * @return the tenantId value. + */ + public UUID tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenant id of the delegated resource - internal use only. + * + * @param tenantId the tenantId value to set. + * @return the DelegatedResource object itself. + */ + public DelegatedResource withTenantId(UUID tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the referralResource property: The delegation id of the referral delegation (optional) - internal use only. + * + * @return the referralResource value. + */ + public String referralResource() { + return this.referralResource; + } + + /** + * Set the referralResource property: The delegation id of the referral delegation (optional) - internal use only. + * + * @param referralResource the referralResource value to set. + * @return the DelegatedResource object itself. + */ + public DelegatedResource withReferralResource(String referralResource) { + this.referralResource = referralResource; + return this; + } + + /** + * Get the location property: The source resource location - internal use only. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The source resource location - internal use only. + * + * @param location the location value to set. + * @return the DelegatedResource object itself. + */ + public DelegatedResource withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + jsonWriter.writeStringField("tenantId", Objects.toString(this.tenantId, null)); + jsonWriter.writeStringField("referralResource", this.referralResource); + jsonWriter.writeStringField("location", this.location); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DelegatedResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DelegatedResource 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 DelegatedResource. + */ + public static DelegatedResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DelegatedResource deserializedDelegatedResource = new DelegatedResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedDelegatedResource.resourceId = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedDelegatedResource.tenantId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("referralResource".equals(fieldName)) { + deserializedDelegatedResource.referralResource = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedDelegatedResource.location = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDelegatedResource; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DeletePolicy.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DeletePolicy.java new file mode 100644 index 000000000000..9fc39e8ee0de --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DeletePolicy.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Delete options of a namespace. + */ +public final class DeletePolicy extends ExpandableStringEnum { + /** + * Static value Keep for DeletePolicy. + */ + public static final DeletePolicy KEEP = fromString("Keep"); + + /** + * Static value Delete for DeletePolicy. + */ + public static final DeletePolicy DELETE = fromString("Delete"); + + /** + * Creates a new instance of DeletePolicy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeletePolicy() { + } + + /** + * Creates or finds a DeletePolicy from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeletePolicy. + */ + public static DeletePolicy fromString(String name) { + return fromString(name, DeletePolicy.class); + } + + /** + * Gets known DeletePolicy values. + * + * @return known DeletePolicy values. + */ + public static Collection values() { + return values(DeletePolicy.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDependency.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDependency.java new file mode 100644 index 000000000000..5da756e113d6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDependency.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * A domain name that AKS agent nodes are reaching at. + */ +@Fluent +public final class EndpointDependency implements JsonSerializable { + /* + * The domain name of the dependency. + */ + private String domainName; + + /* + * The Ports and Protocols used when connecting to domainName. + */ + private List endpointDetails; + + /** + * Creates an instance of EndpointDependency class. + */ + public EndpointDependency() { + } + + /** + * Get the domainName property: The domain name of the dependency. + * + * @return the domainName value. + */ + public String domainName() { + return this.domainName; + } + + /** + * Set the domainName property: The domain name of the dependency. + * + * @param domainName the domainName value to set. + * @return the EndpointDependency object itself. + */ + public EndpointDependency withDomainName(String domainName) { + this.domainName = domainName; + return this; + } + + /** + * Get the endpointDetails property: The Ports and Protocols used when connecting to domainName. + * + * @return the endpointDetails value. + */ + public List endpointDetails() { + return this.endpointDetails; + } + + /** + * Set the endpointDetails property: The Ports and Protocols used when connecting to domainName. + * + * @param endpointDetails the endpointDetails value to set. + * @return the EndpointDependency object itself. + */ + public EndpointDependency withEndpointDetails(List endpointDetails) { + this.endpointDetails = endpointDetails; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (endpointDetails() != null) { + endpointDetails().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("domainName", this.domainName); + jsonWriter.writeArrayField("endpointDetails", this.endpointDetails, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointDependency from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointDependency 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 EndpointDependency. + */ + public static EndpointDependency fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointDependency deserializedEndpointDependency = new EndpointDependency(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("domainName".equals(fieldName)) { + deserializedEndpointDependency.domainName = reader.getString(); + } else if ("endpointDetails".equals(fieldName)) { + List endpointDetails + = reader.readArray(reader1 -> EndpointDetail.fromJson(reader1)); + deserializedEndpointDependency.endpointDetails = endpointDetails; + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointDependency; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDetail.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDetail.java new file mode 100644 index 000000000000..ed2f615a1ac2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDetail.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * connect information from the AKS agent nodes to a single endpoint. + */ +@Fluent +public final class EndpointDetail implements JsonSerializable { + /* + * An IP Address that Domain Name currently resolves to. + */ + private String ipAddress; + + /* + * The port an endpoint is connected to. + */ + private Integer port; + + /* + * The protocol used for connection + */ + private String protocol; + + /* + * Description of the detail + */ + private String description; + + /** + * Creates an instance of EndpointDetail class. + */ + public EndpointDetail() { + } + + /** + * Get the ipAddress property: An IP Address that Domain Name currently resolves to. + * + * @return the ipAddress value. + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the ipAddress property: An IP Address that Domain Name currently resolves to. + * + * @param ipAddress the ipAddress value to set. + * @return the EndpointDetail object itself. + */ + public EndpointDetail withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the port property: The port an endpoint is connected to. + * + * @return the port value. + */ + public Integer port() { + return this.port; + } + + /** + * Set the port property: The port an endpoint is connected to. + * + * @param port the port value to set. + * @return the EndpointDetail object itself. + */ + public EndpointDetail withPort(Integer port) { + this.port = port; + return this; + } + + /** + * Get the protocol property: The protocol used for connection. + * + * @return the protocol value. + */ + public String protocol() { + return this.protocol; + } + + /** + * Set the protocol property: The protocol used for connection. + * + * @param protocol the protocol value to set. + * @return the EndpointDetail object itself. + */ + public EndpointDetail withProtocol(String protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the description property: Description of the detail. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the detail. + * + * @param description the description value to set. + * @return the EndpointDetail object itself. + */ + public EndpointDetail withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ipAddress", this.ipAddress); + jsonWriter.writeNumberField("port", this.port); + jsonWriter.writeStringField("protocol", this.protocol); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointDetail from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointDetail 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 EndpointDetail. + */ + public static EndpointDetail fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointDetail deserializedEndpointDetail = new EndpointDetail(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipAddress".equals(fieldName)) { + deserializedEndpointDetail.ipAddress = reader.getString(); + } else if ("port".equals(fieldName)) { + deserializedEndpointDetail.port = reader.getNullable(JsonReader::getInt); + } else if ("protocol".equals(fieldName)) { + deserializedEndpointDetail.protocol = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedEndpointDetail.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointDetail; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Expander.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Expander.java new file mode 100644 index 000000000000..73a681d770ba --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Expander.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The expander to use when scaling up. If not specified, the default is 'random'. See + * [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) for + * more information. + */ +public final class Expander extends ExpandableStringEnum { + /** + * Static value least-waste for Expander. + */ + public static final Expander LEAST_WASTE = fromString("least-waste"); + + /** + * Static value most-pods for Expander. + */ + public static final Expander MOST_PODS = fromString("most-pods"); + + /** + * Static value priority for Expander. + */ + public static final Expander PRIORITY = fromString("priority"); + + /** + * Static value random for Expander. + */ + public static final Expander RANDOM = fromString("random"); + + /** + * Creates a new instance of Expander value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Expander() { + } + + /** + * Creates or finds a Expander from its string representation. + * + * @param name a name to look for. + * @return the corresponding Expander. + */ + public static Expander fromString(String name) { + return fromString(name, Expander.class); + } + + /** + * Gets known Expander values. + * + * @return known Expander values. + */ + public static Collection values() { + return values(Expander.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocation.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocation.java new file mode 100644 index 000000000000..8855d2051c24 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocation.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 ExtendedLocationTypes 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 ExtendedLocationTypes 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(ExtendedLocationTypes type) { + this.type = type; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@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 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 = ExtendedLocationTypes.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedExtendedLocation; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocationTypes.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocationTypes.java new file mode 100644 index 000000000000..b5f3d77450db --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocationTypes.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of extendedLocation. + */ +public final class ExtendedLocationTypes extends ExpandableStringEnum { + /** + * Static value EdgeZone for ExtendedLocationTypes. + */ + public static final ExtendedLocationTypes EDGE_ZONE = fromString("EdgeZone"); + + /** + * Creates a new instance of ExtendedLocationTypes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExtendedLocationTypes() { + } + + /** + * Creates or finds a ExtendedLocationTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExtendedLocationTypes. + */ + public static ExtendedLocationTypes fromString(String name) { + return fromString(name, ExtendedLocationTypes.class); + } + + /** + * Gets known ExtendedLocationTypes values. + * + * @return known ExtendedLocationTypes values. + */ + public static Collection values() { + return values(ExtendedLocationTypes.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Format.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Format.java new file mode 100644 index 000000000000..f27af9563915 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Format.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for Format. + */ +public final class Format extends ExpandableStringEnum { + /** + * Static value azure for Format. + */ + public static final Format AZURE = fromString("azure"); + + /** + * Static value exec for Format. + */ + public static final Format EXEC = fromString("exec"); + + /** + * Creates a new instance of Format value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Format() { + } + + /** + * Creates or finds a Format from its string representation. + * + * @param name a name to look for. + * @return the corresponding Format. + */ + public static Format fromString(String name) { + return fromString(name, Format.class); + } + + /** + * Gets known Format values. + * + * @return known Format values. + */ + public static Collection values() { + return values(Format.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuDriver.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuDriver.java new file mode 100644 index 000000000000..d606e716dd65 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuDriver.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Whether to install GPU drivers. When it's not specified, default is Install. + */ +public final class GpuDriver extends ExpandableStringEnum { + /** + * Static value Install for GpuDriver. + */ + public static final GpuDriver INSTALL = fromString("Install"); + + /** + * Static value None for GpuDriver. + */ + public static final GpuDriver NONE = fromString("None"); + + /** + * Creates a new instance of GpuDriver value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public GpuDriver() { + } + + /** + * Creates or finds a GpuDriver from its string representation. + * + * @param name a name to look for. + * @return the corresponding GpuDriver. + */ + public static GpuDriver fromString(String name) { + return fromString(name, GpuDriver.class); + } + + /** + * Gets known GpuDriver values. + * + * @return known GpuDriver values. + */ + public static Collection values() { + return values(GpuDriver.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuInstanceProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuInstanceProfile.java new file mode 100644 index 000000000000..706ae87c5b9c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuInstanceProfile.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. + */ +public final class GpuInstanceProfile extends ExpandableStringEnum { + /** + * Static value MIG1g for GpuInstanceProfile. + */ + public static final GpuInstanceProfile MIG1G = fromString("MIG1g"); + + /** + * Static value MIG2g for GpuInstanceProfile. + */ + public static final GpuInstanceProfile MIG2G = fromString("MIG2g"); + + /** + * Static value MIG3g for GpuInstanceProfile. + */ + public static final GpuInstanceProfile MIG3G = fromString("MIG3g"); + + /** + * Static value MIG4g for GpuInstanceProfile. + */ + public static final GpuInstanceProfile MIG4G = fromString("MIG4g"); + + /** + * Static value MIG7g for GpuInstanceProfile. + */ + public static final GpuInstanceProfile MIG7G = fromString("MIG7g"); + + /** + * Creates a new instance of GpuInstanceProfile value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public GpuInstanceProfile() { + } + + /** + * Creates or finds a GpuInstanceProfile from its string representation. + * + * @param name a name to look for. + * @return the corresponding GpuInstanceProfile. + */ + public static GpuInstanceProfile fromString(String name) { + return fromString(name, GpuInstanceProfile.class); + } + + /** + * Gets known GpuInstanceProfile values. + * + * @return known GpuInstanceProfile values. + */ + public static Collection values() { + return values(GpuInstanceProfile.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java new file mode 100644 index 000000000000..83dd030aabe6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * GPU settings for the Agent Pool. + */ +@Fluent +public final class GpuProfile implements JsonSerializable { + /* + * Whether to install GPU drivers. When it's not specified, default is Install. + */ + private GpuDriver driver; + + /** + * Creates an instance of GpuProfile class. + */ + public GpuProfile() { + } + + /** + * Get the driver property: Whether to install GPU drivers. When it's not specified, default is Install. + * + * @return the driver value. + */ + public GpuDriver driver() { + return this.driver; + } + + /** + * Set the driver property: Whether to install GPU drivers. When it's not specified, default is Install. + * + * @param driver the driver value to set. + * @return the GpuProfile object itself. + */ + public GpuProfile withDriver(GpuDriver driver) { + this.driver = driver; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("driver", this.driver == null ? null : this.driver.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GpuProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GpuProfile 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 GpuProfile. + */ + public static GpuProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GpuProfile deserializedGpuProfile = new GpuProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("driver".equals(fieldName)) { + deserializedGpuProfile.driver = GpuDriver.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedGpuProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java new file mode 100644 index 000000000000..e780c371e177 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * To determine if address belongs IPv4 or IPv6 family. + */ +public final class IpFamily extends ExpandableStringEnum { + /** + * Static value IPv4 for IpFamily. + */ + public static final IpFamily IPV4 = fromString("IPv4"); + + /** + * Static value IPv6 for IpFamily. + */ + public static final IpFamily IPV6 = fromString("IPv6"); + + /** + * Creates a new instance of IpFamily value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IpFamily() { + } + + /** + * Creates or finds a IpFamily from its string representation. + * + * @param name a name to look for. + * @return the corresponding IpFamily. + */ + public static IpFamily fromString(String name) { + return fromString(name, IpFamily.class); + } + + /** + * Gets known IpFamily values. + * + * @return known IpFamily values. + */ + public static Collection values() { + return values(IpFamily.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpTag.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpTag.java new file mode 100644 index 000000000000..13bb78fc2c6c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpTag.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 IPTag associated with the object. + */ +@Fluent +public final class IpTag implements JsonSerializable { + /* + * The IP tag type. Example: RoutingPreference. + */ + private String ipTagType; + + /* + * The value of the IP tag associated with the public IP. Example: Internet. + */ + private String tag; + + /** + * Creates an instance of IpTag class. + */ + public IpTag() { + } + + /** + * Get the ipTagType property: The IP tag type. Example: RoutingPreference. + * + * @return the ipTagType value. + */ + public String ipTagType() { + return this.ipTagType; + } + + /** + * Set the ipTagType property: The IP tag type. Example: RoutingPreference. + * + * @param ipTagType the ipTagType value to set. + * @return the IpTag object itself. + */ + public IpTag withIpTagType(String ipTagType) { + this.ipTagType = ipTagType; + return this; + } + + /** + * Get the tag property: The value of the IP tag associated with the public IP. Example: Internet. + * + * @return the tag value. + */ + public String tag() { + return this.tag; + } + + /** + * Set the tag property: The value of the IP tag associated with the public IP. Example: Internet. + * + * @param tag the tag value to set. + * @return the IpTag object itself. + */ + public IpTag withTag(String tag) { + this.tag = tag; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@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 IpTag from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IpTag 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 IpTag. + */ + public static IpTag fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IpTag deserializedIpTag = new IpTag(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipTagType".equals(fieldName)) { + deserializedIpTag.ipTagType = reader.getString(); + } else if ("tag".equals(fieldName)) { + deserializedIpTag.tag = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIpTag; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioCertificateAuthority.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioCertificateAuthority.java new file mode 100644 index 000000000000..379541b09e4a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioCertificateAuthority.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin certificates as + * described here https://aka.ms/asm-plugin-ca. + */ +@Fluent +public final class IstioCertificateAuthority implements JsonSerializable { + /* + * Plugin certificates information for Service Mesh. + */ + private IstioPluginCertificateAuthority plugin; + + /** + * Creates an instance of IstioCertificateAuthority class. + */ + public IstioCertificateAuthority() { + } + + /** + * Get the plugin property: Plugin certificates information for Service Mesh. + * + * @return the plugin value. + */ + public IstioPluginCertificateAuthority plugin() { + return this.plugin; + } + + /** + * Set the plugin property: Plugin certificates information for Service Mesh. + * + * @param plugin the plugin value to set. + * @return the IstioCertificateAuthority object itself. + */ + public IstioCertificateAuthority withPlugin(IstioPluginCertificateAuthority plugin) { + this.plugin = plugin; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (plugin() != null) { + plugin().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("plugin", this.plugin); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IstioCertificateAuthority from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IstioCertificateAuthority 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 IstioCertificateAuthority. + */ + public static IstioCertificateAuthority fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IstioCertificateAuthority deserializedIstioCertificateAuthority = new IstioCertificateAuthority(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("plugin".equals(fieldName)) { + deserializedIstioCertificateAuthority.plugin = IstioPluginCertificateAuthority.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedIstioCertificateAuthority; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java new file mode 100644 index 000000000000..0dc7eb7ddb66 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Istio components configuration. + */ +@Fluent +public final class IstioComponents implements JsonSerializable { + /* + * Istio ingress gateways. + */ + private List ingressGateways; + + /* + * Istio egress gateways. + */ + private List egressGateways; + + /** + * Creates an instance of IstioComponents class. + */ + public IstioComponents() { + } + + /** + * Get the ingressGateways property: Istio ingress gateways. + * + * @return the ingressGateways value. + */ + public List ingressGateways() { + return this.ingressGateways; + } + + /** + * Set the ingressGateways property: Istio ingress gateways. + * + * @param ingressGateways the ingressGateways value to set. + * @return the IstioComponents object itself. + */ + public IstioComponents withIngressGateways(List ingressGateways) { + this.ingressGateways = ingressGateways; + return this; + } + + /** + * Get the egressGateways property: Istio egress gateways. + * + * @return the egressGateways value. + */ + public List egressGateways() { + return this.egressGateways; + } + + /** + * Set the egressGateways property: Istio egress gateways. + * + * @param egressGateways the egressGateways value to set. + * @return the IstioComponents object itself. + */ + public IstioComponents withEgressGateways(List egressGateways) { + this.egressGateways = egressGateways; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ingressGateways() != null) { + ingressGateways().forEach(e -> e.validate()); + } + if (egressGateways() != null) { + egressGateways().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("ingressGateways", this.ingressGateways, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("egressGateways", this.egressGateways, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IstioComponents from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IstioComponents 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 IstioComponents. + */ + public static IstioComponents fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IstioComponents deserializedIstioComponents = new IstioComponents(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ingressGateways".equals(fieldName)) { + List ingressGateways + = reader.readArray(reader1 -> IstioIngressGateway.fromJson(reader1)); + deserializedIstioComponents.ingressGateways = ingressGateways; + } else if ("egressGateways".equals(fieldName)) { + List egressGateways + = reader.readArray(reader1 -> IstioEgressGateway.fromJson(reader1)); + deserializedIstioComponents.egressGateways = egressGateways; + } else { + reader.skipChildren(); + } + } + + return deserializedIstioComponents; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioEgressGateway.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioEgressGateway.java new file mode 100644 index 000000000000..42ebfbe64cf4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioEgressGateway.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Istio egress gateway configuration. + */ +@Fluent +public final class IstioEgressGateway implements JsonSerializable { + /* + * Whether to enable the egress gateway. + */ + private boolean enabled; + + /* + * Name of the Istio add-on egress gateway. + */ + private String name; + + /* + * Namespace that the Istio add-on egress gateway should be deployed in. If unspecified, the default is + * aks-istio-egress. + */ + private String namespace; + + /* + * Name of the gateway configuration custom resource for the Istio add-on egress gateway. Must be specified when + * enabling the Istio egress gateway. Must be deployed in the same namespace that the Istio egress gateway will be + * deployed in. + */ + private String gatewayConfigurationName; + + /** + * Creates an instance of IstioEgressGateway class. + */ + public IstioEgressGateway() { + } + + /** + * Get the enabled property: Whether to enable the egress gateway. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable the egress gateway. + * + * @param enabled the enabled value to set. + * @return the IstioEgressGateway object itself. + */ + public IstioEgressGateway withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the name property: Name of the Istio add-on egress gateway. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the Istio add-on egress gateway. + * + * @param name the name value to set. + * @return the IstioEgressGateway object itself. + */ + public IstioEgressGateway withName(String name) { + this.name = name; + return this; + } + + /** + * Get the namespace property: Namespace that the Istio add-on egress gateway should be deployed in. If unspecified, + * the default is aks-istio-egress. + * + * @return the namespace value. + */ + public String namespace() { + return this.namespace; + } + + /** + * Set the namespace property: Namespace that the Istio add-on egress gateway should be deployed in. If unspecified, + * the default is aks-istio-egress. + * + * @param namespace the namespace value to set. + * @return the IstioEgressGateway object itself. + */ + public IstioEgressGateway withNamespace(String namespace) { + this.namespace = namespace; + return this; + } + + /** + * Get the gatewayConfigurationName property: Name of the gateway configuration custom resource for the Istio add-on + * egress gateway. Must be specified when enabling the Istio egress gateway. Must be deployed in the same namespace + * that the Istio egress gateway will be deployed in. + * + * @return the gatewayConfigurationName value. + */ + public String gatewayConfigurationName() { + return this.gatewayConfigurationName; + } + + /** + * Set the gatewayConfigurationName property: Name of the gateway configuration custom resource for the Istio add-on + * egress gateway. Must be specified when enabling the Istio egress gateway. Must be deployed in the same namespace + * that the Istio egress gateway will be deployed in. + * + * @param gatewayConfigurationName the gatewayConfigurationName value to set. + * @return the IstioEgressGateway object itself. + */ + public IstioEgressGateway withGatewayConfigurationName(String gatewayConfigurationName) { + this.gatewayConfigurationName = gatewayConfigurationName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model IstioEgressGateway")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IstioEgressGateway.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("namespace", this.namespace); + jsonWriter.writeStringField("gatewayConfigurationName", this.gatewayConfigurationName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IstioEgressGateway from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IstioEgressGateway 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 IstioEgressGateway. + */ + public static IstioEgressGateway fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IstioEgressGateway deserializedIstioEgressGateway = new IstioEgressGateway(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedIstioEgressGateway.enabled = reader.getBoolean(); + } else if ("name".equals(fieldName)) { + deserializedIstioEgressGateway.name = reader.getString(); + } else if ("namespace".equals(fieldName)) { + deserializedIstioEgressGateway.namespace = reader.getString(); + } else if ("gatewayConfigurationName".equals(fieldName)) { + deserializedIstioEgressGateway.gatewayConfigurationName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIstioEgressGateway; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGateway.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGateway.java new file mode 100644 index 000000000000..89c1dbb810d9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGateway.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Istio ingress gateway configuration. For now, we support up to one external ingress gateway named + * `aks-istio-ingressgateway-external` and one internal ingress gateway named `aks-istio-ingressgateway-internal`. + */ +@Fluent +public final class IstioIngressGateway implements JsonSerializable { + /* + * Mode of an ingress gateway. + */ + private IstioIngressGatewayMode mode; + + /* + * Whether to enable the ingress gateway. + */ + private boolean enabled; + + /** + * Creates an instance of IstioIngressGateway class. + */ + public IstioIngressGateway() { + } + + /** + * Get the mode property: Mode of an ingress gateway. + * + * @return the mode value. + */ + public IstioIngressGatewayMode mode() { + return this.mode; + } + + /** + * Set the mode property: Mode of an ingress gateway. + * + * @param mode the mode value to set. + * @return the IstioIngressGateway object itself. + */ + public IstioIngressGateway withMode(IstioIngressGatewayMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the enabled property: Whether to enable the ingress gateway. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable the ingress gateway. + * + * @param enabled the enabled value to set. + * @return the IstioIngressGateway object itself. + */ + public IstioIngressGateway withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (mode() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property mode in model IstioIngressGateway")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IstioIngressGateway.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IstioIngressGateway from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IstioIngressGateway 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 IstioIngressGateway. + */ + public static IstioIngressGateway fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IstioIngressGateway deserializedIstioIngressGateway = new IstioIngressGateway(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mode".equals(fieldName)) { + deserializedIstioIngressGateway.mode = IstioIngressGatewayMode.fromString(reader.getString()); + } else if ("enabled".equals(fieldName)) { + deserializedIstioIngressGateway.enabled = reader.getBoolean(); + } else { + reader.skipChildren(); + } + } + + return deserializedIstioIngressGateway; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGatewayMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGatewayMode.java new file mode 100644 index 000000000000..9373db2fab55 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGatewayMode.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Mode of an ingress gateway. + */ +public final class IstioIngressGatewayMode extends ExpandableStringEnum { + /** + * Static value External for IstioIngressGatewayMode. + */ + public static final IstioIngressGatewayMode EXTERNAL = fromString("External"); + + /** + * Static value Internal for IstioIngressGatewayMode. + */ + public static final IstioIngressGatewayMode INTERNAL = fromString("Internal"); + + /** + * Creates a new instance of IstioIngressGatewayMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IstioIngressGatewayMode() { + } + + /** + * Creates or finds a IstioIngressGatewayMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding IstioIngressGatewayMode. + */ + public static IstioIngressGatewayMode fromString(String name) { + return fromString(name, IstioIngressGatewayMode.class); + } + + /** + * Gets known IstioIngressGatewayMode values. + * + * @return known IstioIngressGatewayMode values. + */ + public static Collection values() { + return values(IstioIngressGatewayMode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioPluginCertificateAuthority.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioPluginCertificateAuthority.java new file mode 100644 index 000000000000..50a9744839c9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioPluginCertificateAuthority.java @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Plugin certificates information for Service Mesh. + */ +@Fluent +public final class IstioPluginCertificateAuthority implements JsonSerializable { + /* + * The resource ID of the Key Vault. + */ + private String keyVaultId; + + /* + * Intermediate certificate object name in Azure Key Vault. + */ + private String certObjectName; + + /* + * Intermediate certificate private key object name in Azure Key Vault. + */ + private String keyObjectName; + + /* + * Root certificate object name in Azure Key Vault. + */ + private String rootCertObjectName; + + /* + * Certificate chain object name in Azure Key Vault. + */ + private String certChainObjectName; + + /** + * Creates an instance of IstioPluginCertificateAuthority class. + */ + public IstioPluginCertificateAuthority() { + } + + /** + * Get the keyVaultId property: The resource ID of the Key Vault. + * + * @return the keyVaultId value. + */ + public String keyVaultId() { + return this.keyVaultId; + } + + /** + * Set the keyVaultId property: The resource ID of the Key Vault. + * + * @param keyVaultId the keyVaultId value to set. + * @return the IstioPluginCertificateAuthority object itself. + */ + public IstioPluginCertificateAuthority withKeyVaultId(String keyVaultId) { + this.keyVaultId = keyVaultId; + return this; + } + + /** + * Get the certObjectName property: Intermediate certificate object name in Azure Key Vault. + * + * @return the certObjectName value. + */ + public String certObjectName() { + return this.certObjectName; + } + + /** + * Set the certObjectName property: Intermediate certificate object name in Azure Key Vault. + * + * @param certObjectName the certObjectName value to set. + * @return the IstioPluginCertificateAuthority object itself. + */ + public IstioPluginCertificateAuthority withCertObjectName(String certObjectName) { + this.certObjectName = certObjectName; + return this; + } + + /** + * Get the keyObjectName property: Intermediate certificate private key object name in Azure Key Vault. + * + * @return the keyObjectName value. + */ + public String keyObjectName() { + return this.keyObjectName; + } + + /** + * Set the keyObjectName property: Intermediate certificate private key object name in Azure Key Vault. + * + * @param keyObjectName the keyObjectName value to set. + * @return the IstioPluginCertificateAuthority object itself. + */ + public IstioPluginCertificateAuthority withKeyObjectName(String keyObjectName) { + this.keyObjectName = keyObjectName; + return this; + } + + /** + * Get the rootCertObjectName property: Root certificate object name in Azure Key Vault. + * + * @return the rootCertObjectName value. + */ + public String rootCertObjectName() { + return this.rootCertObjectName; + } + + /** + * Set the rootCertObjectName property: Root certificate object name in Azure Key Vault. + * + * @param rootCertObjectName the rootCertObjectName value to set. + * @return the IstioPluginCertificateAuthority object itself. + */ + public IstioPluginCertificateAuthority withRootCertObjectName(String rootCertObjectName) { + this.rootCertObjectName = rootCertObjectName; + return this; + } + + /** + * Get the certChainObjectName property: Certificate chain object name in Azure Key Vault. + * + * @return the certChainObjectName value. + */ + public String certChainObjectName() { + return this.certChainObjectName; + } + + /** + * Set the certChainObjectName property: Certificate chain object name in Azure Key Vault. + * + * @param certChainObjectName the certChainObjectName value to set. + * @return the IstioPluginCertificateAuthority object itself. + */ + public IstioPluginCertificateAuthority withCertChainObjectName(String certChainObjectName) { + this.certChainObjectName = certChainObjectName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyVaultId", this.keyVaultId); + jsonWriter.writeStringField("certObjectName", this.certObjectName); + jsonWriter.writeStringField("keyObjectName", this.keyObjectName); + jsonWriter.writeStringField("rootCertObjectName", this.rootCertObjectName); + jsonWriter.writeStringField("certChainObjectName", this.certChainObjectName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IstioPluginCertificateAuthority from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IstioPluginCertificateAuthority 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 IstioPluginCertificateAuthority. + */ + public static IstioPluginCertificateAuthority fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IstioPluginCertificateAuthority deserializedIstioPluginCertificateAuthority + = new IstioPluginCertificateAuthority(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyVaultId".equals(fieldName)) { + deserializedIstioPluginCertificateAuthority.keyVaultId = reader.getString(); + } else if ("certObjectName".equals(fieldName)) { + deserializedIstioPluginCertificateAuthority.certObjectName = reader.getString(); + } else if ("keyObjectName".equals(fieldName)) { + deserializedIstioPluginCertificateAuthority.keyObjectName = reader.getString(); + } else if ("rootCertObjectName".equals(fieldName)) { + deserializedIstioPluginCertificateAuthority.rootCertObjectName = reader.getString(); + } else if ("certChainObjectName".equals(fieldName)) { + deserializedIstioPluginCertificateAuthority.certChainObjectName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIstioPluginCertificateAuthority; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioServiceMesh.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioServiceMesh.java new file mode 100644 index 000000000000..dc97b2b58638 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioServiceMesh.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Istio service mesh configuration. + */ +@Fluent +public final class IstioServiceMesh implements JsonSerializable { + /* + * Istio components configuration. + */ + private IstioComponents components; + + /* + * Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin certificates as + * described here https://aka.ms/asm-plugin-ca + */ + private IstioCertificateAuthority certificateAuthority; + + /* + * The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value. When + * canary upgrade is in progress, this can only hold two consecutive values. For more information, see: + * https://learn.microsoft.com/en-us/azure/aks/istio-upgrade + */ + private List revisions; + + /** + * Creates an instance of IstioServiceMesh class. + */ + public IstioServiceMesh() { + } + + /** + * Get the components property: Istio components configuration. + * + * @return the components value. + */ + public IstioComponents components() { + return this.components; + } + + /** + * Set the components property: Istio components configuration. + * + * @param components the components value to set. + * @return the IstioServiceMesh object itself. + */ + public IstioServiceMesh withComponents(IstioComponents components) { + this.components = components; + return this; + } + + /** + * Get the certificateAuthority property: Istio Service Mesh Certificate Authority (CA) configuration. For now, we + * only support plugin certificates as described here https://aka.ms/asm-plugin-ca. + * + * @return the certificateAuthority value. + */ + public IstioCertificateAuthority certificateAuthority() { + return this.certificateAuthority; + } + + /** + * Set the certificateAuthority property: Istio Service Mesh Certificate Authority (CA) configuration. For now, we + * only support plugin certificates as described here https://aka.ms/asm-plugin-ca. + * + * @param certificateAuthority the certificateAuthority value to set. + * @return the IstioServiceMesh object itself. + */ + public IstioServiceMesh withCertificateAuthority(IstioCertificateAuthority certificateAuthority) { + this.certificateAuthority = certificateAuthority; + return this; + } + + /** + * Get the revisions property: The list of revisions of the Istio control plane. When an upgrade is not in progress, + * this holds one value. When canary upgrade is in progress, this can only hold two consecutive values. For more + * information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade. + * + * @return the revisions value. + */ + public List revisions() { + return this.revisions; + } + + /** + * Set the revisions property: The list of revisions of the Istio control plane. When an upgrade is not in progress, + * this holds one value. When canary upgrade is in progress, this can only hold two consecutive values. For more + * information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade. + * + * @param revisions the revisions value to set. + * @return the IstioServiceMesh object itself. + */ + public IstioServiceMesh withRevisions(List revisions) { + this.revisions = revisions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (components() != null) { + components().validate(); + } + if (certificateAuthority() != null) { + certificateAuthority().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("components", this.components); + jsonWriter.writeJsonField("certificateAuthority", this.certificateAuthority); + jsonWriter.writeArrayField("revisions", this.revisions, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IstioServiceMesh from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IstioServiceMesh 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 IstioServiceMesh. + */ + public static IstioServiceMesh fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IstioServiceMesh deserializedIstioServiceMesh = new IstioServiceMesh(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("components".equals(fieldName)) { + deserializedIstioServiceMesh.components = IstioComponents.fromJson(reader); + } else if ("certificateAuthority".equals(fieldName)) { + deserializedIstioServiceMesh.certificateAuthority = IstioCertificateAuthority.fromJson(reader); + } else if ("revisions".equals(fieldName)) { + List revisions = reader.readArray(reader1 -> reader1.getString()); + deserializedIstioServiceMesh.revisions = revisions; + } else { + reader.skipChildren(); + } + } + + return deserializedIstioServiceMesh; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KeyVaultNetworkAccessTypes.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KeyVaultNetworkAccessTypes.java new file mode 100644 index 000000000000..f3e5532b9b76 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KeyVaultNetworkAccessTypes.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Network access of the key vault. Network access of key vault. The possible values are `Public` and `Private`. + * `Public` means the key vault allows public access from all networks. `Private` means the key vault disables public + * access and enables private link. The default value is `Public`. + */ +public final class KeyVaultNetworkAccessTypes extends ExpandableStringEnum { + /** + * Static value Public for KeyVaultNetworkAccessTypes. + */ + public static final KeyVaultNetworkAccessTypes PUBLIC = fromString("Public"); + + /** + * Static value Private for KeyVaultNetworkAccessTypes. + */ + public static final KeyVaultNetworkAccessTypes PRIVATE = fromString("Private"); + + /** + * Creates a new instance of KeyVaultNetworkAccessTypes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KeyVaultNetworkAccessTypes() { + } + + /** + * Creates or finds a KeyVaultNetworkAccessTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding KeyVaultNetworkAccessTypes. + */ + public static KeyVaultNetworkAccessTypes fromString(String name) { + return fromString(name, KeyVaultNetworkAccessTypes.class); + } + + /** + * Gets known KeyVaultNetworkAccessTypes values. + * + * @return known KeyVaultNetworkAccessTypes values. + */ + public static Collection values() { + return values(KeyVaultNetworkAccessTypes.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java new file mode 100644 index 000000000000..a14c1ea5937b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java @@ -0,0 +1,409 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Kubelet configurations of agent nodes. See [AKS custom node + * configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. + */ +@Fluent +public final class KubeletConfig implements JsonSerializable { + /* + * The CPU Manager policy to use. The default is 'none'. See [Kubernetes CPU management + * policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) + * for more information. Allowed values are 'none' and 'static'. + */ + private String cpuManagerPolicy; + + /* + * If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The default is true. + */ + private Boolean cpuCfsQuota; + + /* + * The CPU CFS quota period value. The default is '100ms.' Valid values are a sequence of decimal numbers with an + * optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', + * 'm', and 'h'. + */ + private String cpuCfsQuotaPeriod; + + /* + * The percent of disk usage after which image garbage collection is always run. To disable image garbage + * collection, set to 100. The default is 85% + */ + private Integer imageGcHighThreshold; + + /* + * The percent of disk usage before which image garbage collection is never run. This cannot be set higher than + * imageGcHighThreshold. The default is 80% + */ + private Integer imageGcLowThreshold; + + /* + * The Topology Manager policy to use. For more information see [Kubernetes Topology + * Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). The default is 'none'. Allowed + * values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. + */ + private String topologyManagerPolicy; + + /* + * Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). + */ + private List allowedUnsafeSysctls; + + /* + * If set to true it will make the Kubelet fail to start if swap is enabled on the node. + */ + private Boolean failSwapOn; + + /* + * The maximum size (e.g. 10Mi) of container log file before it is rotated. + */ + private Integer containerLogMaxSizeMB; + + /* + * The maximum number of container log files that can be present for a container. The number must be ≥ 2. + */ + private Integer containerLogMaxFiles; + + /* + * The maximum number of processes per pod. + */ + private Integer podMaxPids; + + /** + * Creates an instance of KubeletConfig class. + */ + public KubeletConfig() { + } + + /** + * Get the cpuManagerPolicy property: The CPU Manager policy to use. The default is 'none'. See [Kubernetes CPU + * management + * policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) + * for more information. Allowed values are 'none' and 'static'. + * + * @return the cpuManagerPolicy value. + */ + public String cpuManagerPolicy() { + return this.cpuManagerPolicy; + } + + /** + * Set the cpuManagerPolicy property: The CPU Manager policy to use. The default is 'none'. See [Kubernetes CPU + * management + * policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) + * for more information. Allowed values are 'none' and 'static'. + * + * @param cpuManagerPolicy the cpuManagerPolicy value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withCpuManagerPolicy(String cpuManagerPolicy) { + this.cpuManagerPolicy = cpuManagerPolicy; + return this; + } + + /** + * Get the cpuCfsQuota property: If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The + * default is true. + * + * @return the cpuCfsQuota value. + */ + public Boolean cpuCfsQuota() { + return this.cpuCfsQuota; + } + + /** + * Set the cpuCfsQuota property: If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The + * default is true. + * + * @param cpuCfsQuota the cpuCfsQuota value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withCpuCfsQuota(Boolean cpuCfsQuota) { + this.cpuCfsQuota = cpuCfsQuota; + return this; + } + + /** + * Get the cpuCfsQuotaPeriod property: The CPU CFS quota period value. The default is '100ms.' Valid values are a + * sequence of decimal numbers with an optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported + * units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + * + * @return the cpuCfsQuotaPeriod value. + */ + public String cpuCfsQuotaPeriod() { + return this.cpuCfsQuotaPeriod; + } + + /** + * Set the cpuCfsQuotaPeriod property: The CPU CFS quota period value. The default is '100ms.' Valid values are a + * sequence of decimal numbers with an optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported + * units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + * + * @param cpuCfsQuotaPeriod the cpuCfsQuotaPeriod value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withCpuCfsQuotaPeriod(String cpuCfsQuotaPeriod) { + this.cpuCfsQuotaPeriod = cpuCfsQuotaPeriod; + return this; + } + + /** + * Get the imageGcHighThreshold property: The percent of disk usage after which image garbage collection is always + * run. To disable image garbage collection, set to 100. The default is 85%. + * + * @return the imageGcHighThreshold value. + */ + public Integer imageGcHighThreshold() { + return this.imageGcHighThreshold; + } + + /** + * Set the imageGcHighThreshold property: The percent of disk usage after which image garbage collection is always + * run. To disable image garbage collection, set to 100. The default is 85%. + * + * @param imageGcHighThreshold the imageGcHighThreshold value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withImageGcHighThreshold(Integer imageGcHighThreshold) { + this.imageGcHighThreshold = imageGcHighThreshold; + return this; + } + + /** + * Get the imageGcLowThreshold property: The percent of disk usage before which image garbage collection is never + * run. This cannot be set higher than imageGcHighThreshold. The default is 80%. + * + * @return the imageGcLowThreshold value. + */ + public Integer imageGcLowThreshold() { + return this.imageGcLowThreshold; + } + + /** + * Set the imageGcLowThreshold property: The percent of disk usage before which image garbage collection is never + * run. This cannot be set higher than imageGcHighThreshold. The default is 80%. + * + * @param imageGcLowThreshold the imageGcLowThreshold value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withImageGcLowThreshold(Integer imageGcLowThreshold) { + this.imageGcLowThreshold = imageGcLowThreshold; + return this; + } + + /** + * Get the topologyManagerPolicy property: The Topology Manager policy to use. For more information see [Kubernetes + * Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). The default is 'none'. + * Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. + * + * @return the topologyManagerPolicy value. + */ + public String topologyManagerPolicy() { + return this.topologyManagerPolicy; + } + + /** + * Set the topologyManagerPolicy property: The Topology Manager policy to use. For more information see [Kubernetes + * Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). The default is 'none'. + * Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. + * + * @param topologyManagerPolicy the topologyManagerPolicy value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withTopologyManagerPolicy(String topologyManagerPolicy) { + this.topologyManagerPolicy = topologyManagerPolicy; + return this; + } + + /** + * Get the allowedUnsafeSysctls property: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). + * + * @return the allowedUnsafeSysctls value. + */ + public List allowedUnsafeSysctls() { + return this.allowedUnsafeSysctls; + } + + /** + * Set the allowedUnsafeSysctls property: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). + * + * @param allowedUnsafeSysctls the allowedUnsafeSysctls value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withAllowedUnsafeSysctls(List allowedUnsafeSysctls) { + this.allowedUnsafeSysctls = allowedUnsafeSysctls; + return this; + } + + /** + * Get the failSwapOn property: If set to true it will make the Kubelet fail to start if swap is enabled on the + * node. + * + * @return the failSwapOn value. + */ + public Boolean failSwapOn() { + return this.failSwapOn; + } + + /** + * Set the failSwapOn property: If set to true it will make the Kubelet fail to start if swap is enabled on the + * node. + * + * @param failSwapOn the failSwapOn value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withFailSwapOn(Boolean failSwapOn) { + this.failSwapOn = failSwapOn; + return this; + } + + /** + * Get the containerLogMaxSizeMB property: The maximum size (e.g. 10Mi) of container log file before it is rotated. + * + * @return the containerLogMaxSizeMB value. + */ + public Integer containerLogMaxSizeMB() { + return this.containerLogMaxSizeMB; + } + + /** + * Set the containerLogMaxSizeMB property: The maximum size (e.g. 10Mi) of container log file before it is rotated. + * + * @param containerLogMaxSizeMB the containerLogMaxSizeMB value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withContainerLogMaxSizeMB(Integer containerLogMaxSizeMB) { + this.containerLogMaxSizeMB = containerLogMaxSizeMB; + return this; + } + + /** + * Get the containerLogMaxFiles property: The maximum number of container log files that can be present for a + * container. The number must be ≥ 2. + * + * @return the containerLogMaxFiles value. + */ + public Integer containerLogMaxFiles() { + return this.containerLogMaxFiles; + } + + /** + * Set the containerLogMaxFiles property: The maximum number of container log files that can be present for a + * container. The number must be ≥ 2. + * + * @param containerLogMaxFiles the containerLogMaxFiles value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withContainerLogMaxFiles(Integer containerLogMaxFiles) { + this.containerLogMaxFiles = containerLogMaxFiles; + return this; + } + + /** + * Get the podMaxPids property: The maximum number of processes per pod. + * + * @return the podMaxPids value. + */ + public Integer podMaxPids() { + return this.podMaxPids; + } + + /** + * Set the podMaxPids property: The maximum number of processes per pod. + * + * @param podMaxPids the podMaxPids value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withPodMaxPids(Integer podMaxPids) { + this.podMaxPids = podMaxPids; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("cpuManagerPolicy", this.cpuManagerPolicy); + jsonWriter.writeBooleanField("cpuCfsQuota", this.cpuCfsQuota); + jsonWriter.writeStringField("cpuCfsQuotaPeriod", this.cpuCfsQuotaPeriod); + jsonWriter.writeNumberField("imageGcHighThreshold", this.imageGcHighThreshold); + jsonWriter.writeNumberField("imageGcLowThreshold", this.imageGcLowThreshold); + jsonWriter.writeStringField("topologyManagerPolicy", this.topologyManagerPolicy); + jsonWriter.writeArrayField("allowedUnsafeSysctls", this.allowedUnsafeSysctls, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("failSwapOn", this.failSwapOn); + jsonWriter.writeNumberField("containerLogMaxSizeMB", this.containerLogMaxSizeMB); + jsonWriter.writeNumberField("containerLogMaxFiles", this.containerLogMaxFiles); + jsonWriter.writeNumberField("podMaxPids", this.podMaxPids); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KubeletConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KubeletConfig 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 KubeletConfig. + */ + public static KubeletConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KubeletConfig deserializedKubeletConfig = new KubeletConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("cpuManagerPolicy".equals(fieldName)) { + deserializedKubeletConfig.cpuManagerPolicy = reader.getString(); + } else if ("cpuCfsQuota".equals(fieldName)) { + deserializedKubeletConfig.cpuCfsQuota = reader.getNullable(JsonReader::getBoolean); + } else if ("cpuCfsQuotaPeriod".equals(fieldName)) { + deserializedKubeletConfig.cpuCfsQuotaPeriod = reader.getString(); + } else if ("imageGcHighThreshold".equals(fieldName)) { + deserializedKubeletConfig.imageGcHighThreshold = reader.getNullable(JsonReader::getInt); + } else if ("imageGcLowThreshold".equals(fieldName)) { + deserializedKubeletConfig.imageGcLowThreshold = reader.getNullable(JsonReader::getInt); + } else if ("topologyManagerPolicy".equals(fieldName)) { + deserializedKubeletConfig.topologyManagerPolicy = reader.getString(); + } else if ("allowedUnsafeSysctls".equals(fieldName)) { + List allowedUnsafeSysctls = reader.readArray(reader1 -> reader1.getString()); + deserializedKubeletConfig.allowedUnsafeSysctls = allowedUnsafeSysctls; + } else if ("failSwapOn".equals(fieldName)) { + deserializedKubeletConfig.failSwapOn = reader.getNullable(JsonReader::getBoolean); + } else if ("containerLogMaxSizeMB".equals(fieldName)) { + deserializedKubeletConfig.containerLogMaxSizeMB = reader.getNullable(JsonReader::getInt); + } else if ("containerLogMaxFiles".equals(fieldName)) { + deserializedKubeletConfig.containerLogMaxFiles = reader.getNullable(JsonReader::getInt); + } else if ("podMaxPids".equals(fieldName)) { + deserializedKubeletConfig.podMaxPids = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedKubeletConfig; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletDiskType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletDiskType.java new file mode 100644 index 000000000000..18af44555422 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletDiskType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. + */ +public final class KubeletDiskType extends ExpandableStringEnum { + /** + * Static value OS for KubeletDiskType. + */ + public static final KubeletDiskType OS = fromString("OS"); + + /** + * Static value Temporary for KubeletDiskType. + */ + public static final KubeletDiskType TEMPORARY = fromString("Temporary"); + + /** + * Creates a new instance of KubeletDiskType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KubeletDiskType() { + } + + /** + * Creates or finds a KubeletDiskType from its string representation. + * + * @param name a name to look for. + * @return the corresponding KubeletDiskType. + */ + public static KubeletDiskType fromString(String name) { + return fromString(name, KubeletDiskType.class); + } + + /** + * Gets known KubeletDiskType values. + * + * @return known KubeletDiskType values. + */ + public static Collection values() { + return values(KubeletDiskType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesPatchVersion.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesPatchVersion.java new file mode 100644 index 000000000000..121098436176 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesPatchVersion.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Kubernetes patch version profile. + */ +@Fluent +public final class KubernetesPatchVersion implements JsonSerializable { + /* + * Possible upgrade path for given patch version + */ + private List upgrades; + + /** + * Creates an instance of KubernetesPatchVersion class. + */ + public KubernetesPatchVersion() { + } + + /** + * Get the upgrades property: Possible upgrade path for given patch version. + * + * @return the upgrades value. + */ + public List upgrades() { + return this.upgrades; + } + + /** + * Set the upgrades property: Possible upgrade path for given patch version. + * + * @param upgrades the upgrades value to set. + * @return the KubernetesPatchVersion object itself. + */ + public KubernetesPatchVersion withUpgrades(List upgrades) { + this.upgrades = upgrades; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("upgrades", this.upgrades, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KubernetesPatchVersion from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KubernetesPatchVersion 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 KubernetesPatchVersion. + */ + public static KubernetesPatchVersion fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KubernetesPatchVersion deserializedKubernetesPatchVersion = new KubernetesPatchVersion(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("upgrades".equals(fieldName)) { + List upgrades = reader.readArray(reader1 -> reader1.getString()); + deserializedKubernetesPatchVersion.upgrades = upgrades; + } else { + reader.skipChildren(); + } + } + + return deserializedKubernetesPatchVersion; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesSupportPlan.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesSupportPlan.java new file mode 100644 index 000000000000..bf35959bffb5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesSupportPlan.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Different support tiers for AKS managed clusters. + */ +public final class KubernetesSupportPlan extends ExpandableStringEnum { + /** + * Static value KubernetesOfficial for KubernetesSupportPlan. + */ + public static final KubernetesSupportPlan KUBERNETES_OFFICIAL = fromString("KubernetesOfficial"); + + /** + * Static value AKSLongTermSupport for KubernetesSupportPlan. + */ + public static final KubernetesSupportPlan AKSLONG_TERM_SUPPORT = fromString("AKSLongTermSupport"); + + /** + * Creates a new instance of KubernetesSupportPlan value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KubernetesSupportPlan() { + } + + /** + * Creates or finds a KubernetesSupportPlan from its string representation. + * + * @param name a name to look for. + * @return the corresponding KubernetesSupportPlan. + */ + public static KubernetesSupportPlan fromString(String name) { + return fromString(name, KubernetesSupportPlan.class); + } + + /** + * Gets known KubernetesSupportPlan values. + * + * @return known KubernetesSupportPlan values. + */ + public static Collection values() { + return values(KubernetesSupportPlan.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersion.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersion.java new file mode 100644 index 000000000000..809070423d78 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersion.java @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Kubernetes version profile for given major.minor release. + */ +@Fluent +public final class KubernetesVersion implements JsonSerializable { + /* + * major.minor version of Kubernetes release + */ + private String version; + + /* + * Capabilities on this Kubernetes version. + */ + private KubernetesVersionCapabilities capabilities; + + /* + * Whether this version is default. + */ + private Boolean isDefault; + + /* + * Whether this version is in preview mode. + */ + private Boolean isPreview; + + /* + * Patch versions of Kubernetes release + */ + private Map patchVersions; + + /** + * Creates an instance of KubernetesVersion class. + */ + public KubernetesVersion() { + } + + /** + * Get the version property: major.minor version of Kubernetes release. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: major.minor version of Kubernetes release. + * + * @param version the version value to set. + * @return the KubernetesVersion object itself. + */ + public KubernetesVersion withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the capabilities property: Capabilities on this Kubernetes version. + * + * @return the capabilities value. + */ + public KubernetesVersionCapabilities capabilities() { + return this.capabilities; + } + + /** + * Set the capabilities property: Capabilities on this Kubernetes version. + * + * @param capabilities the capabilities value to set. + * @return the KubernetesVersion object itself. + */ + public KubernetesVersion withCapabilities(KubernetesVersionCapabilities capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Get the isDefault property: Whether this version is default. + * + * @return the isDefault value. + */ + public Boolean isDefault() { + return this.isDefault; + } + + /** + * Set the isDefault property: Whether this version is default. + * + * @param isDefault the isDefault value to set. + * @return the KubernetesVersion object itself. + */ + public KubernetesVersion withIsDefault(Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Get the isPreview property: Whether this version is in preview mode. + * + * @return the isPreview value. + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Set the isPreview property: Whether this version is in preview mode. + * + * @param isPreview the isPreview value to set. + * @return the KubernetesVersion object itself. + */ + public KubernetesVersion withIsPreview(Boolean isPreview) { + this.isPreview = isPreview; + return this; + } + + /** + * Get the patchVersions property: Patch versions of Kubernetes release. + * + * @return the patchVersions value. + */ + public Map patchVersions() { + return this.patchVersions; + } + + /** + * Set the patchVersions property: Patch versions of Kubernetes release. + * + * @param patchVersions the patchVersions value to set. + * @return the KubernetesVersion object itself. + */ + public KubernetesVersion withPatchVersions(Map patchVersions) { + this.patchVersions = patchVersions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (capabilities() != null) { + capabilities().validate(); + } + if (patchVersions() != null) { + patchVersions().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("version", this.version); + jsonWriter.writeJsonField("capabilities", this.capabilities); + jsonWriter.writeBooleanField("isDefault", this.isDefault); + jsonWriter.writeBooleanField("isPreview", this.isPreview); + jsonWriter.writeMapField("patchVersions", this.patchVersions, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KubernetesVersion from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KubernetesVersion 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 KubernetesVersion. + */ + public static KubernetesVersion fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KubernetesVersion deserializedKubernetesVersion = new KubernetesVersion(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("version".equals(fieldName)) { + deserializedKubernetesVersion.version = reader.getString(); + } else if ("capabilities".equals(fieldName)) { + deserializedKubernetesVersion.capabilities = KubernetesVersionCapabilities.fromJson(reader); + } else if ("isDefault".equals(fieldName)) { + deserializedKubernetesVersion.isDefault = reader.getNullable(JsonReader::getBoolean); + } else if ("isPreview".equals(fieldName)) { + deserializedKubernetesVersion.isPreview = reader.getNullable(JsonReader::getBoolean); + } else if ("patchVersions".equals(fieldName)) { + Map patchVersions + = reader.readMap(reader1 -> KubernetesPatchVersion.fromJson(reader1)); + deserializedKubernetesVersion.patchVersions = patchVersions; + } else { + reader.skipChildren(); + } + } + + return deserializedKubernetesVersion; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersionCapabilities.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersionCapabilities.java new file mode 100644 index 000000000000..372d6737e747 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersionCapabilities.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Capabilities on this Kubernetes version. + */ +@Fluent +public final class KubernetesVersionCapabilities implements JsonSerializable { + /* + * Kubernetes support plans available for this version. + */ + private List supportPlan; + + /** + * Creates an instance of KubernetesVersionCapabilities class. + */ + public KubernetesVersionCapabilities() { + } + + /** + * Get the supportPlan property: Kubernetes support plans available for this version. + * + * @return the supportPlan value. + */ + public List supportPlan() { + return this.supportPlan; + } + + /** + * Set the supportPlan property: Kubernetes support plans available for this version. + * + * @param supportPlan the supportPlan value to set. + * @return the KubernetesVersionCapabilities object itself. + */ + public KubernetesVersionCapabilities withSupportPlan(List supportPlan) { + this.supportPlan = supportPlan; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("supportPlan", this.supportPlan, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KubernetesVersionCapabilities from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KubernetesVersionCapabilities 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 KubernetesVersionCapabilities. + */ + public static KubernetesVersionCapabilities fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KubernetesVersionCapabilities deserializedKubernetesVersionCapabilities + = new KubernetesVersionCapabilities(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("supportPlan".equals(fieldName)) { + List supportPlan + = reader.readArray(reader1 -> KubernetesSupportPlan.fromString(reader1.getString())); + deserializedKubernetesVersionCapabilities.supportPlan = supportPlan; + } else { + reader.skipChildren(); + } + } + + return deserializedKubernetesVersionCapabilities; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LicenseType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LicenseType.java new file mode 100644 index 000000000000..a4eedd7f5a74 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LicenseType.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The license type to use for Windows VMs. See [Azure Hybrid User + * Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) for more details. + */ +public final class LicenseType extends ExpandableStringEnum { + /** + * Static value None for LicenseType. + */ + public static final LicenseType NONE = fromString("None"); + + /** + * Static value Windows_Server for LicenseType. + */ + public static final LicenseType WINDOWS_SERVER = fromString("Windows_Server"); + + /** + * Creates a new instance of LicenseType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LicenseType() { + } + + /** + * Creates or finds a LicenseType from its string representation. + * + * @param name a name to look for. + * @return the corresponding LicenseType. + */ + public static LicenseType fromString(String name) { + return fromString(name, LicenseType.class); + } + + /** + * Gets known LicenseType values. + * + * @return known LicenseType values. + */ + public static Collection values() { + return values(LicenseType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LinuxOSConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LinuxOSConfig.java new file mode 100644 index 000000000000..05443a23cdb4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LinuxOSConfig.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * OS configurations of Linux agent nodes. See [AKS custom node + * configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. + */ +@Fluent +public final class LinuxOSConfig implements JsonSerializable { + /* + * Sysctl settings for Linux agent nodes. + */ + private SysctlConfig sysctls; + + /* + * Whether transparent hugepages are enabled. Valid values are 'always', 'madvise', and 'never'. The default is + * 'always'. For more information see [Transparent + * Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + */ + private String transparentHugePageEnabled; + + /* + * Whether the kernel should make aggressive use of memory compaction to make more hugepages available. Valid values + * are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information see + * [Transparent + * Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + */ + private String transparentHugePageDefrag; + + /* + * The size in MB of a swap file that will be created on each node. + */ + private Integer swapFileSizeMB; + + /** + * Creates an instance of LinuxOSConfig class. + */ + public LinuxOSConfig() { + } + + /** + * Get the sysctls property: Sysctl settings for Linux agent nodes. + * + * @return the sysctls value. + */ + public SysctlConfig sysctls() { + return this.sysctls; + } + + /** + * Set the sysctls property: Sysctl settings for Linux agent nodes. + * + * @param sysctls the sysctls value to set. + * @return the LinuxOSConfig object itself. + */ + public LinuxOSConfig withSysctls(SysctlConfig sysctls) { + this.sysctls = sysctls; + return this; + } + + /** + * Get the transparentHugePageEnabled property: Whether transparent hugepages are enabled. Valid values are + * 'always', 'madvise', and 'never'. The default is 'always'. For more information see [Transparent + * Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + * + * @return the transparentHugePageEnabled value. + */ + public String transparentHugePageEnabled() { + return this.transparentHugePageEnabled; + } + + /** + * Set the transparentHugePageEnabled property: Whether transparent hugepages are enabled. Valid values are + * 'always', 'madvise', and 'never'. The default is 'always'. For more information see [Transparent + * Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + * + * @param transparentHugePageEnabled the transparentHugePageEnabled value to set. + * @return the LinuxOSConfig object itself. + */ + public LinuxOSConfig withTransparentHugePageEnabled(String transparentHugePageEnabled) { + this.transparentHugePageEnabled = transparentHugePageEnabled; + return this; + } + + /** + * Get the transparentHugePageDefrag property: Whether the kernel should make aggressive use of memory compaction to + * make more hugepages available. Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The + * default is 'madvise'. For more information see [Transparent + * Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + * + * @return the transparentHugePageDefrag value. + */ + public String transparentHugePageDefrag() { + return this.transparentHugePageDefrag; + } + + /** + * Set the transparentHugePageDefrag property: Whether the kernel should make aggressive use of memory compaction to + * make more hugepages available. Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The + * default is 'madvise'. For more information see [Transparent + * Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + * + * @param transparentHugePageDefrag the transparentHugePageDefrag value to set. + * @return the LinuxOSConfig object itself. + */ + public LinuxOSConfig withTransparentHugePageDefrag(String transparentHugePageDefrag) { + this.transparentHugePageDefrag = transparentHugePageDefrag; + return this; + } + + /** + * Get the swapFileSizeMB property: The size in MB of a swap file that will be created on each node. + * + * @return the swapFileSizeMB value. + */ + public Integer swapFileSizeMB() { + return this.swapFileSizeMB; + } + + /** + * Set the swapFileSizeMB property: The size in MB of a swap file that will be created on each node. + * + * @param swapFileSizeMB the swapFileSizeMB value to set. + * @return the LinuxOSConfig object itself. + */ + public LinuxOSConfig withSwapFileSizeMB(Integer swapFileSizeMB) { + this.swapFileSizeMB = swapFileSizeMB; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sysctls() != null) { + sysctls().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("sysctls", this.sysctls); + jsonWriter.writeStringField("transparentHugePageEnabled", this.transparentHugePageEnabled); + jsonWriter.writeStringField("transparentHugePageDefrag", this.transparentHugePageDefrag); + jsonWriter.writeNumberField("swapFileSizeMB", this.swapFileSizeMB); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LinuxOSConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LinuxOSConfig 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 LinuxOSConfig. + */ + public static LinuxOSConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LinuxOSConfig deserializedLinuxOSConfig = new LinuxOSConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sysctls".equals(fieldName)) { + deserializedLinuxOSConfig.sysctls = SysctlConfig.fromJson(reader); + } else if ("transparentHugePageEnabled".equals(fieldName)) { + deserializedLinuxOSConfig.transparentHugePageEnabled = reader.getString(); + } else if ("transparentHugePageDefrag".equals(fieldName)) { + deserializedLinuxOSConfig.transparentHugePageDefrag = reader.getString(); + } else if ("swapFileSizeMB".equals(fieldName)) { + deserializedLinuxOSConfig.swapFileSizeMB = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedLinuxOSConfig; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerSku.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerSku.java new file mode 100644 index 000000000000..65598b886c27 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerSku.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The load balancer sku for the managed cluster. The default is 'standard'. See [Azure Load Balancer + * SKUs](https://docs.microsoft.com/azure/load-balancer/skus) for more information about the differences between load + * balancer SKUs. + */ +public final class LoadBalancerSku extends ExpandableStringEnum { + /** + * Static value standard for LoadBalancerSku. + */ + public static final LoadBalancerSku STANDARD = fromString("standard"); + + /** + * Static value basic for LoadBalancerSku. + */ + public static final LoadBalancerSku BASIC = fromString("basic"); + + /** + * Creates a new instance of LoadBalancerSku value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LoadBalancerSku() { + } + + /** + * Creates or finds a LoadBalancerSku from its string representation. + * + * @param name a name to look for. + * @return the corresponding LoadBalancerSku. + */ + public static LoadBalancerSku fromString(String name) { + return fromString(name, LoadBalancerSku.class); + } + + /** + * Gets known LoadBalancerSku values. + * + * @return known LoadBalancerSku values. + */ + public static Collection values() { + return values(LoadBalancerSku.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardDestination.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardDestination.java new file mode 100644 index 000000000000..39c9a39b739f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardDestination.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Destination server for DNS queries to be forwarded from localDNS. + */ +public final class LocalDnsForwardDestination extends ExpandableStringEnum { + /** + * Static value ClusterCoreDNS for LocalDnsForwardDestination. + */ + public static final LocalDnsForwardDestination CLUSTER_CORE_DNS = fromString("ClusterCoreDNS"); + + /** + * Static value VnetDNS for LocalDnsForwardDestination. + */ + public static final LocalDnsForwardDestination VNET_DNS = fromString("VnetDNS"); + + /** + * Creates a new instance of LocalDnsForwardDestination value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LocalDnsForwardDestination() { + } + + /** + * Creates or finds a LocalDnsForwardDestination from its string representation. + * + * @param name a name to look for. + * @return the corresponding LocalDnsForwardDestination. + */ + public static LocalDnsForwardDestination fromString(String name) { + return fromString(name, LocalDnsForwardDestination.class); + } + + /** + * Gets known LocalDnsForwardDestination values. + * + * @return known LocalDnsForwardDestination values. + */ + public static Collection values() { + return values(LocalDnsForwardDestination.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardPolicy.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardPolicy.java new file mode 100644 index 000000000000..3fd4ced49ccc --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardPolicy.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Forward policy for selecting upstream DNS server. See [forward plugin](https://coredns.io/plugins/forward) for more + * information. + */ +public final class LocalDnsForwardPolicy extends ExpandableStringEnum { + /** + * Static value Sequential for LocalDnsForwardPolicy. + */ + public static final LocalDnsForwardPolicy SEQUENTIAL = fromString("Sequential"); + + /** + * Static value RoundRobin for LocalDnsForwardPolicy. + */ + public static final LocalDnsForwardPolicy ROUND_ROBIN = fromString("RoundRobin"); + + /** + * Static value Random for LocalDnsForwardPolicy. + */ + public static final LocalDnsForwardPolicy RANDOM = fromString("Random"); + + /** + * Creates a new instance of LocalDnsForwardPolicy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LocalDnsForwardPolicy() { + } + + /** + * Creates or finds a LocalDnsForwardPolicy from its string representation. + * + * @param name a name to look for. + * @return the corresponding LocalDnsForwardPolicy. + */ + public static LocalDnsForwardPolicy fromString(String name) { + return fromString(name, LocalDnsForwardPolicy.class); + } + + /** + * Gets known LocalDnsForwardPolicy values. + * + * @return known LocalDnsForwardPolicy values. + */ + public static Collection values() { + return values(LocalDnsForwardPolicy.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsMode.java new file mode 100644 index 000000000000..0d9ae3ad031b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsMode.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Mode of enablement for localDNS. + */ +public final class LocalDnsMode extends ExpandableStringEnum { + /** + * Static value Preferred for LocalDnsMode. + */ + public static final LocalDnsMode PREFERRED = fromString("Preferred"); + + /** + * Static value Required for LocalDnsMode. + */ + public static final LocalDnsMode REQUIRED = fromString("Required"); + + /** + * Static value Disabled for LocalDnsMode. + */ + public static final LocalDnsMode DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of LocalDnsMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LocalDnsMode() { + } + + /** + * Creates or finds a LocalDnsMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding LocalDnsMode. + */ + public static LocalDnsMode fromString(String name) { + return fromString(name, LocalDnsMode.class); + } + + /** + * Gets known LocalDnsMode values. + * + * @return known LocalDnsMode values. + */ + public static Collection values() { + return values(LocalDnsMode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsOverride.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsOverride.java new file mode 100644 index 000000000000..7bd4f379f4ef --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsOverride.java @@ -0,0 +1,305 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Overrides for localDNS profile. + */ +@Fluent +public final class LocalDnsOverride implements JsonSerializable { + /* + * Log level for DNS queries in localDNS. + */ + private LocalDnsQueryLogging queryLogging; + + /* + * Enforce TCP or prefer UDP protocol for connections from localDNS to upstream DNS server. + */ + private LocalDnsProtocol protocol; + + /* + * Destination server for DNS queries to be forwarded from localDNS. + */ + private LocalDnsForwardDestination forwardDestination; + + /* + * Forward policy for selecting upstream DNS server. See [forward plugin](https://coredns.io/plugins/forward) for + * more information. + */ + private LocalDnsForwardPolicy forwardPolicy; + + /* + * Maximum number of concurrent queries. See [forward plugin](https://coredns.io/plugins/forward) for more + * information. + */ + private Integer maxConcurrent; + + /* + * Cache max TTL in seconds. See [cache plugin](https://coredns.io/plugins/cache) for more information. + */ + private Integer cacheDurationInSeconds; + + /* + * Serve stale duration in seconds. See [cache plugin](https://coredns.io/plugins/cache) for more information. + */ + private Integer serveStaleDurationInSeconds; + + /* + * Policy for serving stale data. See [cache plugin](https://coredns.io/plugins/cache) for more information. + */ + private LocalDnsServeStale serveStale; + + /** + * Creates an instance of LocalDnsOverride class. + */ + public LocalDnsOverride() { + } + + /** + * Get the queryLogging property: Log level for DNS queries in localDNS. + * + * @return the queryLogging value. + */ + public LocalDnsQueryLogging queryLogging() { + return this.queryLogging; + } + + /** + * Set the queryLogging property: Log level for DNS queries in localDNS. + * + * @param queryLogging the queryLogging value to set. + * @return the LocalDnsOverride object itself. + */ + public LocalDnsOverride withQueryLogging(LocalDnsQueryLogging queryLogging) { + this.queryLogging = queryLogging; + return this; + } + + /** + * Get the protocol property: Enforce TCP or prefer UDP protocol for connections from localDNS to upstream DNS + * server. + * + * @return the protocol value. + */ + public LocalDnsProtocol protocol() { + return this.protocol; + } + + /** + * Set the protocol property: Enforce TCP or prefer UDP protocol for connections from localDNS to upstream DNS + * server. + * + * @param protocol the protocol value to set. + * @return the LocalDnsOverride object itself. + */ + public LocalDnsOverride withProtocol(LocalDnsProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the forwardDestination property: Destination server for DNS queries to be forwarded from localDNS. + * + * @return the forwardDestination value. + */ + public LocalDnsForwardDestination forwardDestination() { + return this.forwardDestination; + } + + /** + * Set the forwardDestination property: Destination server for DNS queries to be forwarded from localDNS. + * + * @param forwardDestination the forwardDestination value to set. + * @return the LocalDnsOverride object itself. + */ + public LocalDnsOverride withForwardDestination(LocalDnsForwardDestination forwardDestination) { + this.forwardDestination = forwardDestination; + return this; + } + + /** + * Get the forwardPolicy property: Forward policy for selecting upstream DNS server. See [forward + * plugin](https://coredns.io/plugins/forward) for more information. + * + * @return the forwardPolicy value. + */ + public LocalDnsForwardPolicy forwardPolicy() { + return this.forwardPolicy; + } + + /** + * Set the forwardPolicy property: Forward policy for selecting upstream DNS server. See [forward + * plugin](https://coredns.io/plugins/forward) for more information. + * + * @param forwardPolicy the forwardPolicy value to set. + * @return the LocalDnsOverride object itself. + */ + public LocalDnsOverride withForwardPolicy(LocalDnsForwardPolicy forwardPolicy) { + this.forwardPolicy = forwardPolicy; + return this; + } + + /** + * Get the maxConcurrent property: Maximum number of concurrent queries. See [forward + * plugin](https://coredns.io/plugins/forward) for more information. + * + * @return the maxConcurrent value. + */ + public Integer maxConcurrent() { + return this.maxConcurrent; + } + + /** + * Set the maxConcurrent property: Maximum number of concurrent queries. See [forward + * plugin](https://coredns.io/plugins/forward) for more information. + * + * @param maxConcurrent the maxConcurrent value to set. + * @return the LocalDnsOverride object itself. + */ + public LocalDnsOverride withMaxConcurrent(Integer maxConcurrent) { + this.maxConcurrent = maxConcurrent; + return this; + } + + /** + * Get the cacheDurationInSeconds property: Cache max TTL in seconds. See [cache + * plugin](https://coredns.io/plugins/cache) for more information. + * + * @return the cacheDurationInSeconds value. + */ + public Integer cacheDurationInSeconds() { + return this.cacheDurationInSeconds; + } + + /** + * Set the cacheDurationInSeconds property: Cache max TTL in seconds. See [cache + * plugin](https://coredns.io/plugins/cache) for more information. + * + * @param cacheDurationInSeconds the cacheDurationInSeconds value to set. + * @return the LocalDnsOverride object itself. + */ + public LocalDnsOverride withCacheDurationInSeconds(Integer cacheDurationInSeconds) { + this.cacheDurationInSeconds = cacheDurationInSeconds; + return this; + } + + /** + * Get the serveStaleDurationInSeconds property: Serve stale duration in seconds. See [cache + * plugin](https://coredns.io/plugins/cache) for more information. + * + * @return the serveStaleDurationInSeconds value. + */ + public Integer serveStaleDurationInSeconds() { + return this.serveStaleDurationInSeconds; + } + + /** + * Set the serveStaleDurationInSeconds property: Serve stale duration in seconds. See [cache + * plugin](https://coredns.io/plugins/cache) for more information. + * + * @param serveStaleDurationInSeconds the serveStaleDurationInSeconds value to set. + * @return the LocalDnsOverride object itself. + */ + public LocalDnsOverride withServeStaleDurationInSeconds(Integer serveStaleDurationInSeconds) { + this.serveStaleDurationInSeconds = serveStaleDurationInSeconds; + return this; + } + + /** + * Get the serveStale property: Policy for serving stale data. See [cache plugin](https://coredns.io/plugins/cache) + * for more information. + * + * @return the serveStale value. + */ + public LocalDnsServeStale serveStale() { + return this.serveStale; + } + + /** + * Set the serveStale property: Policy for serving stale data. See [cache plugin](https://coredns.io/plugins/cache) + * for more information. + * + * @param serveStale the serveStale value to set. + * @return the LocalDnsOverride object itself. + */ + public LocalDnsOverride withServeStale(LocalDnsServeStale serveStale) { + this.serveStale = serveStale; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("queryLogging", this.queryLogging == null ? null : this.queryLogging.toString()); + jsonWriter.writeStringField("protocol", this.protocol == null ? null : this.protocol.toString()); + jsonWriter.writeStringField("forwardDestination", + this.forwardDestination == null ? null : this.forwardDestination.toString()); + jsonWriter.writeStringField("forwardPolicy", this.forwardPolicy == null ? null : this.forwardPolicy.toString()); + jsonWriter.writeNumberField("maxConcurrent", this.maxConcurrent); + jsonWriter.writeNumberField("cacheDurationInSeconds", this.cacheDurationInSeconds); + jsonWriter.writeNumberField("serveStaleDurationInSeconds", this.serveStaleDurationInSeconds); + jsonWriter.writeStringField("serveStale", this.serveStale == null ? null : this.serveStale.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalDnsOverride from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalDnsOverride 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 LocalDnsOverride. + */ + public static LocalDnsOverride fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalDnsOverride deserializedLocalDnsOverride = new LocalDnsOverride(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("queryLogging".equals(fieldName)) { + deserializedLocalDnsOverride.queryLogging = LocalDnsQueryLogging.fromString(reader.getString()); + } else if ("protocol".equals(fieldName)) { + deserializedLocalDnsOverride.protocol = LocalDnsProtocol.fromString(reader.getString()); + } else if ("forwardDestination".equals(fieldName)) { + deserializedLocalDnsOverride.forwardDestination + = LocalDnsForwardDestination.fromString(reader.getString()); + } else if ("forwardPolicy".equals(fieldName)) { + deserializedLocalDnsOverride.forwardPolicy = LocalDnsForwardPolicy.fromString(reader.getString()); + } else if ("maxConcurrent".equals(fieldName)) { + deserializedLocalDnsOverride.maxConcurrent = reader.getNullable(JsonReader::getInt); + } else if ("cacheDurationInSeconds".equals(fieldName)) { + deserializedLocalDnsOverride.cacheDurationInSeconds = reader.getNullable(JsonReader::getInt); + } else if ("serveStaleDurationInSeconds".equals(fieldName)) { + deserializedLocalDnsOverride.serveStaleDurationInSeconds = reader.getNullable(JsonReader::getInt); + } else if ("serveStale".equals(fieldName)) { + deserializedLocalDnsOverride.serveStale = LocalDnsServeStale.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalDnsOverride; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProfile.java new file mode 100644 index 000000000000..cbbd0d7cb0bf --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProfile.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve performance and + * reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns. + */ +@Fluent +public final class LocalDnsProfile implements JsonSerializable { + /* + * Mode of enablement for localDNS. + */ + private LocalDnsMode mode; + + /* + * System-generated state of localDNS. + */ + private LocalDnsState state; + + /* + * VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default or kubelet (referred to as VnetDNS + * traffic). + */ + private Map vnetDnsOverrides; + + /* + * KubeDNS overrides apply to DNS traffic from pods with dnsPolicy:ClusterFirst (referred to as KubeDNS traffic). + */ + private Map kubeDnsOverrides; + + /** + * Creates an instance of LocalDnsProfile class. + */ + public LocalDnsProfile() { + } + + /** + * Get the mode property: Mode of enablement for localDNS. + * + * @return the mode value. + */ + public LocalDnsMode mode() { + return this.mode; + } + + /** + * Set the mode property: Mode of enablement for localDNS. + * + * @param mode the mode value to set. + * @return the LocalDnsProfile object itself. + */ + public LocalDnsProfile withMode(LocalDnsMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the state property: System-generated state of localDNS. + * + * @return the state value. + */ + public LocalDnsState state() { + return this.state; + } + + /** + * Get the vnetDnsOverrides property: VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default or + * kubelet (referred to as VnetDNS traffic). + * + * @return the vnetDnsOverrides value. + */ + public Map vnetDnsOverrides() { + return this.vnetDnsOverrides; + } + + /** + * Set the vnetDnsOverrides property: VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default or + * kubelet (referred to as VnetDNS traffic). + * + * @param vnetDnsOverrides the vnetDnsOverrides value to set. + * @return the LocalDnsProfile object itself. + */ + public LocalDnsProfile withVnetDnsOverrides(Map vnetDnsOverrides) { + this.vnetDnsOverrides = vnetDnsOverrides; + return this; + } + + /** + * Get the kubeDnsOverrides property: KubeDNS overrides apply to DNS traffic from pods with dnsPolicy:ClusterFirst + * (referred to as KubeDNS traffic). + * + * @return the kubeDnsOverrides value. + */ + public Map kubeDnsOverrides() { + return this.kubeDnsOverrides; + } + + /** + * Set the kubeDnsOverrides property: KubeDNS overrides apply to DNS traffic from pods with dnsPolicy:ClusterFirst + * (referred to as KubeDNS traffic). + * + * @param kubeDnsOverrides the kubeDnsOverrides value to set. + * @return the LocalDnsProfile object itself. + */ + public LocalDnsProfile withKubeDnsOverrides(Map kubeDnsOverrides) { + this.kubeDnsOverrides = kubeDnsOverrides; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (vnetDnsOverrides() != null) { + vnetDnsOverrides().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + if (kubeDnsOverrides() != null) { + kubeDnsOverrides().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeMapField("vnetDNSOverrides", this.vnetDnsOverrides, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeMapField("kubeDNSOverrides", this.kubeDnsOverrides, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalDnsProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalDnsProfile 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 LocalDnsProfile. + */ + public static LocalDnsProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalDnsProfile deserializedLocalDnsProfile = new LocalDnsProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mode".equals(fieldName)) { + deserializedLocalDnsProfile.mode = LocalDnsMode.fromString(reader.getString()); + } else if ("state".equals(fieldName)) { + deserializedLocalDnsProfile.state = LocalDnsState.fromString(reader.getString()); + } else if ("vnetDNSOverrides".equals(fieldName)) { + Map vnetDnsOverrides + = reader.readMap(reader1 -> LocalDnsOverride.fromJson(reader1)); + deserializedLocalDnsProfile.vnetDnsOverrides = vnetDnsOverrides; + } else if ("kubeDNSOverrides".equals(fieldName)) { + Map kubeDnsOverrides + = reader.readMap(reader1 -> LocalDnsOverride.fromJson(reader1)); + deserializedLocalDnsProfile.kubeDnsOverrides = kubeDnsOverrides; + } else { + reader.skipChildren(); + } + } + + return deserializedLocalDnsProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProtocol.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProtocol.java new file mode 100644 index 000000000000..4ff3a5e7194c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProtocol.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enforce TCP or prefer UDP protocol for connections from localDNS to upstream DNS server. + */ +public final class LocalDnsProtocol extends ExpandableStringEnum { + /** + * Static value PreferUDP for LocalDnsProtocol. + */ + public static final LocalDnsProtocol PREFER_UDP = fromString("PreferUDP"); + + /** + * Static value ForceTCP for LocalDnsProtocol. + */ + public static final LocalDnsProtocol FORCE_TCP = fromString("ForceTCP"); + + /** + * Creates a new instance of LocalDnsProtocol value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LocalDnsProtocol() { + } + + /** + * Creates or finds a LocalDnsProtocol from its string representation. + * + * @param name a name to look for. + * @return the corresponding LocalDnsProtocol. + */ + public static LocalDnsProtocol fromString(String name) { + return fromString(name, LocalDnsProtocol.class); + } + + /** + * Gets known LocalDnsProtocol values. + * + * @return known LocalDnsProtocol values. + */ + public static Collection values() { + return values(LocalDnsProtocol.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsQueryLogging.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsQueryLogging.java new file mode 100644 index 000000000000..4c27d9badbe9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsQueryLogging.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Log level for DNS queries in localDNS. + */ +public final class LocalDnsQueryLogging extends ExpandableStringEnum { + /** + * Static value Error for LocalDnsQueryLogging. + */ + public static final LocalDnsQueryLogging ERROR = fromString("Error"); + + /** + * Static value Log for LocalDnsQueryLogging. + */ + public static final LocalDnsQueryLogging LOG = fromString("Log"); + + /** + * Creates a new instance of LocalDnsQueryLogging value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LocalDnsQueryLogging() { + } + + /** + * Creates or finds a LocalDnsQueryLogging from its string representation. + * + * @param name a name to look for. + * @return the corresponding LocalDnsQueryLogging. + */ + public static LocalDnsQueryLogging fromString(String name) { + return fromString(name, LocalDnsQueryLogging.class); + } + + /** + * Gets known LocalDnsQueryLogging values. + * + * @return known LocalDnsQueryLogging values. + */ + public static Collection values() { + return values(LocalDnsQueryLogging.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsServeStale.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsServeStale.java new file mode 100644 index 000000000000..ea1184a977f0 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsServeStale.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Policy for serving stale data. See [cache plugin](https://coredns.io/plugins/cache) for more information. + */ +public final class LocalDnsServeStale extends ExpandableStringEnum { + /** + * Static value Verify for LocalDnsServeStale. + */ + public static final LocalDnsServeStale VERIFY = fromString("Verify"); + + /** + * Static value Immediate for LocalDnsServeStale. + */ + public static final LocalDnsServeStale IMMEDIATE = fromString("Immediate"); + + /** + * Static value Disable for LocalDnsServeStale. + */ + public static final LocalDnsServeStale DISABLE = fromString("Disable"); + + /** + * Creates a new instance of LocalDnsServeStale value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LocalDnsServeStale() { + } + + /** + * Creates or finds a LocalDnsServeStale from its string representation. + * + * @param name a name to look for. + * @return the corresponding LocalDnsServeStale. + */ + public static LocalDnsServeStale fromString(String name) { + return fromString(name, LocalDnsServeStale.class); + } + + /** + * Gets known LocalDnsServeStale values. + * + * @return known LocalDnsServeStale values. + */ + public static Collection values() { + return values(LocalDnsServeStale.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsState.java new file mode 100644 index 000000000000..93b21851689e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * System-generated state of localDNS. + */ +public final class LocalDnsState extends ExpandableStringEnum { + /** + * Static value Enabled for LocalDnsState. + */ + public static final LocalDnsState ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for LocalDnsState. + */ + public static final LocalDnsState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of LocalDnsState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LocalDnsState() { + } + + /** + * Creates or finds a LocalDnsState from its string representation. + * + * @param name a name to look for. + * @return the corresponding LocalDnsState. + */ + public static LocalDnsState fromString(String name) { + return fromString(name, LocalDnsState.class); + } + + /** + * Gets known LocalDnsState values. + * + * @return known LocalDnsState values. + */ + public static Collection values() { + return values(LocalDnsState.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineIpAddress.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineIpAddress.java new file mode 100644 index 000000000000..a6612cb6fcfd --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineIpAddress.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 machine IP address details. + */ +@Immutable +public final class MachineIpAddress implements JsonSerializable { + /* + * To determine if address belongs IPv4 or IPv6 family + */ + private IpFamily family; + + /* + * IPv4 or IPv6 address of the machine + */ + private String ip; + + /** + * Creates an instance of MachineIpAddress class. + */ + public MachineIpAddress() { + } + + /** + * Get the family property: To determine if address belongs IPv4 or IPv6 family. + * + * @return the family value. + */ + public IpFamily family() { + return this.family; + } + + /** + * Get the ip property: IPv4 or IPv6 address of the machine. + * + * @return the ip value. + */ + public String ip() { + return this.ip; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineIpAddress from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineIpAddress 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 MachineIpAddress. + */ + public static MachineIpAddress fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineIpAddress deserializedMachineIpAddress = new MachineIpAddress(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("family".equals(fieldName)) { + deserializedMachineIpAddress.family = IpFamily.fromString(reader.getString()); + } else if ("ip".equals(fieldName)) { + deserializedMachineIpAddress.ip = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineIpAddress; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineListResult.java new file mode 100644 index 000000000000..1c504ea19a37 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineListResult.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.MachineInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a Machine list operation. + */ +@Fluent +public final class MachineListResult implements JsonSerializable { + /* + * The Machine items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of MachineListResult class. + */ + public MachineListResult() { + } + + /** + * Get the value property: The Machine items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The Machine items on this page. + * + * @param value the value value to set. + * @return the MachineListResult object itself. + */ + public MachineListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the MachineListResult object itself. + */ + public MachineListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model MachineListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MachineListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineListResult 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 MachineListResult. + */ + public static MachineListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineListResult deserializedMachineListResult = new MachineListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> MachineInner.fromJson(reader1)); + deserializedMachineListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedMachineListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java new file mode 100644 index 000000000000..5a3c9f305386 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; +import java.util.List; + +/** + * network properties of the machine. + */ +@Immutable +public final class MachineNetworkProperties implements JsonSerializable { + /* + * IPv4, IPv6 addresses of the machine + */ + private List ipAddresses; + + /** + * Creates an instance of MachineNetworkProperties class. + */ + public MachineNetworkProperties() { + } + + /** + * Get the ipAddresses property: IPv4, IPv6 addresses of the machine. + * + * @return the ipAddresses value. + */ + public List ipAddresses() { + return this.ipAddresses; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ipAddresses() != null) { + ipAddresses().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineNetworkProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineNetworkProperties 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 MachineNetworkProperties. + */ + public static MachineNetworkProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineNetworkProperties deserializedMachineNetworkProperties = new MachineNetworkProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipAddresses".equals(fieldName)) { + List ipAddresses + = reader.readArray(reader1 -> MachineIpAddress.fromJson(reader1)); + deserializedMachineNetworkProperties.ipAddresses = ipAddresses; + } else { + reader.skipChildren(); + } + } + + return deserializedMachineNetworkProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java new file mode 100644 index 000000000000..2f167587df26 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 properties of the machine. + */ +@Immutable +public final class MachineProperties implements JsonSerializable { + /* + * network properties of the machine + */ + private MachineNetworkProperties network; + + /* + * Azure resource id of the machine. It can be used to GET underlying VM Instance + */ + private String resourceId; + + /** + * Creates an instance of MachineProperties class. + */ + public MachineProperties() { + } + + /** + * Get the network property: network properties of the machine. + * + * @return the network value. + */ + public MachineNetworkProperties network() { + return this.network; + } + + /** + * Get the resourceId property: Azure resource id of the machine. It can be used to GET underlying VM Instance. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (network() != null) { + network().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineProperties 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 MachineProperties. + */ + public static MachineProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineProperties deserializedMachineProperties = new MachineProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("network".equals(fieldName)) { + deserializedMachineProperties.network = MachineNetworkProperties.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedMachineProperties.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceConfigurationListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceConfigurationListResult.java new file mode 100644 index 000000000000..45db56a2aa5d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceConfigurationListResult.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.MaintenanceConfigurationInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a MaintenanceConfiguration list operation. + */ +@Fluent +public final class MaintenanceConfigurationListResult implements JsonSerializable { + /* + * The MaintenanceConfiguration items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of MaintenanceConfigurationListResult class. + */ + public MaintenanceConfigurationListResult() { + } + + /** + * Get the value property: The MaintenanceConfiguration items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The MaintenanceConfiguration items on this page. + * + * @param value the value value to set. + * @return the MaintenanceConfigurationListResult object itself. + */ + public MaintenanceConfigurationListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the MaintenanceConfigurationListResult object itself. + */ + public MaintenanceConfigurationListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model MaintenanceConfigurationListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MaintenanceConfigurationListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceConfigurationListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceConfigurationListResult 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 MaintenanceConfigurationListResult. + */ + public static MaintenanceConfigurationListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceConfigurationListResult deserializedMaintenanceConfigurationListResult + = new MaintenanceConfigurationListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> MaintenanceConfigurationInner.fromJson(reader1)); + deserializedMaintenanceConfigurationListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedMaintenanceConfigurationListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceConfigurationListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceWindow.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceWindow.java new file mode 100644 index 000000000000..0b6dba6d3575 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceWindow.java @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.List; +import java.util.Objects; + +/** + * Maintenance window used to configure scheduled auto-upgrade for a Managed Cluster. + */ +@Fluent +public final class MaintenanceWindow implements JsonSerializable { + /* + * Recurrence schedule for the maintenance window. + */ + private Schedule schedule; + + /* + * Length of maintenance window range from 4 to 24 hours. + */ + private int durationHours; + + /* + * The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the + * default is '+00:00'. + */ + private String utcOffset; + + /* + * The date the maintenance window activates. If the current date is before this date, the maintenance window is + * inactive and will not be used for upgrades. If not specified, the maintenance window will be active right away. + */ + private LocalDate startDate; + + /* + * The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to + * this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. + */ + private String startTime; + + /* + * Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: + * +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to + * '2023-01-03 22:00' in UTC time. + */ + private List notAllowedDates; + + /** + * Creates an instance of MaintenanceWindow class. + */ + public MaintenanceWindow() { + } + + /** + * Get the schedule property: Recurrence schedule for the maintenance window. + * + * @return the schedule value. + */ + public Schedule schedule() { + return this.schedule; + } + + /** + * Set the schedule property: Recurrence schedule for the maintenance window. + * + * @param schedule the schedule value to set. + * @return the MaintenanceWindow object itself. + */ + public MaintenanceWindow withSchedule(Schedule schedule) { + this.schedule = schedule; + return this; + } + + /** + * Get the durationHours property: Length of maintenance window range from 4 to 24 hours. + * + * @return the durationHours value. + */ + public int durationHours() { + return this.durationHours; + } + + /** + * Set the durationHours property: Length of maintenance window range from 4 to 24 hours. + * + * @param durationHours the durationHours value to set. + * @return the MaintenanceWindow object itself. + */ + public MaintenanceWindow withDurationHours(int durationHours) { + this.durationHours = durationHours; + return this; + } + + /** + * Get the utcOffset property: The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for + * PST. If not specified, the default is '+00:00'. + * + * @return the utcOffset value. + */ + public String utcOffset() { + return this.utcOffset; + } + + /** + * Set the utcOffset property: The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for + * PST. If not specified, the default is '+00:00'. + * + * @param utcOffset the utcOffset value to set. + * @return the MaintenanceWindow object itself. + */ + public MaintenanceWindow withUtcOffset(String utcOffset) { + this.utcOffset = utcOffset; + return this; + } + + /** + * Get the startDate property: The date the maintenance window activates. If the current date is before this date, + * the maintenance window is inactive and will not be used for upgrades. If not specified, the maintenance window + * will be active right away. + * + * @return the startDate value. + */ + public LocalDate startDate() { + return this.startDate; + } + + /** + * Set the startDate property: The date the maintenance window activates. If the current date is before this date, + * the maintenance window is inactive and will not be used for upgrades. If not specified, the maintenance window + * will be active right away. + * + * @param startDate the startDate value to set. + * @return the MaintenanceWindow object itself. + */ + public MaintenanceWindow withStartDate(LocalDate startDate) { + this.startDate = startDate; + return this; + } + + /** + * Get the startTime property: The start time of the maintenance window. Accepted values are from '00:00' to + * '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. + * + * @return the startTime value. + */ + public String startTime() { + return this.startTime; + } + + /** + * Set the startTime property: The start time of the maintenance window. Accepted values are from '00:00' to + * '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. + * + * @param startTime the startTime value to set. + * @return the MaintenanceWindow object itself. + */ + public MaintenanceWindow withStartTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the notAllowedDates property: Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. + * For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be + * blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time. + * + * @return the notAllowedDates value. + */ + public List notAllowedDates() { + return this.notAllowedDates; + } + + /** + * Set the notAllowedDates property: Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. + * For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be + * blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time. + * + * @param notAllowedDates the notAllowedDates value to set. + * @return the MaintenanceWindow object itself. + */ + public MaintenanceWindow withNotAllowedDates(List notAllowedDates) { + this.notAllowedDates = notAllowedDates; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (schedule() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property schedule in model MaintenanceWindow")); + } else { + schedule().validate(); + } + if (startTime() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property startTime in model MaintenanceWindow")); + } + if (notAllowedDates() != null) { + notAllowedDates().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MaintenanceWindow.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("schedule", this.schedule); + jsonWriter.writeIntField("durationHours", this.durationHours); + jsonWriter.writeStringField("startTime", this.startTime); + jsonWriter.writeStringField("utcOffset", this.utcOffset); + jsonWriter.writeStringField("startDate", Objects.toString(this.startDate, null)); + jsonWriter.writeArrayField("notAllowedDates", this.notAllowedDates, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceWindow from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceWindow 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 MaintenanceWindow. + */ + public static MaintenanceWindow fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceWindow deserializedMaintenanceWindow = new MaintenanceWindow(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("schedule".equals(fieldName)) { + deserializedMaintenanceWindow.schedule = Schedule.fromJson(reader); + } else if ("durationHours".equals(fieldName)) { + deserializedMaintenanceWindow.durationHours = reader.getInt(); + } else if ("startTime".equals(fieldName)) { + deserializedMaintenanceWindow.startTime = reader.getString(); + } else if ("utcOffset".equals(fieldName)) { + deserializedMaintenanceWindow.utcOffset = reader.getString(); + } else if ("startDate".equals(fieldName)) { + deserializedMaintenanceWindow.startDate + = reader.getNullable(nonNullReader -> LocalDate.parse(nonNullReader.getString())); + } else if ("notAllowedDates".equals(fieldName)) { + List notAllowedDates = reader.readArray(reader1 -> DateSpan.fromJson(reader1)); + deserializedMaintenanceWindow.notAllowedDates = notAllowedDates; + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceWindow; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAIToolchainOperatorProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAIToolchainOperatorProfile.java new file mode 100644 index 000000000000..5fa694a16e6b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAIToolchainOperatorProfile.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * When enabling the operator, a set of AKS managed CRDs and controllers will be installed in the cluster. The operator + * automates the deployment of OSS models for inference and/or training purposes. It provides a set of preset models and + * enables distributed inference against them. + */ +@Fluent +public final class ManagedClusterAIToolchainOperatorProfile + implements JsonSerializable { + /* + * Whether to enable AI toolchain operator to the cluster. Indicates if AI toolchain operator enabled or not. + */ + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterAIToolchainOperatorProfile class. + */ + public ManagedClusterAIToolchainOperatorProfile() { + } + + /** + * Get the enabled property: Whether to enable AI toolchain operator to the cluster. Indicates if AI toolchain + * operator enabled or not. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable AI toolchain operator to the cluster. Indicates if AI toolchain + * operator enabled or not. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterAIToolchainOperatorProfile object itself. + */ + public ManagedClusterAIToolchainOperatorProfile withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterAIToolchainOperatorProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterAIToolchainOperatorProfile 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 ManagedClusterAIToolchainOperatorProfile. + */ + public static ManagedClusterAIToolchainOperatorProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterAIToolchainOperatorProfile deserializedManagedClusterAIToolchainOperatorProfile + = new ManagedClusterAIToolchainOperatorProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterAIToolchainOperatorProfile.enabled + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterAIToolchainOperatorProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAadProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAadProfile.java new file mode 100644 index 000000000000..9c324beb571c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAadProfile.java @@ -0,0 +1,274 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * AADProfile specifies attributes for Azure Active Directory integration. For more details see [managed AAD on + * AKS](https://docs.microsoft.com/azure/aks/managed-aad). + */ +@Fluent +public final class ManagedClusterAadProfile implements JsonSerializable { + /* + * Whether to enable managed AAD. + */ + private Boolean managed; + + /* + * Whether to enable Azure RBAC for Kubernetes authorization. + */ + private Boolean enableAzureRbac; + + /* + * The list of AAD group object IDs that will have admin role of the cluster. + */ + private List adminGroupObjectIDs; + + /* + * (DEPRECATED) The client AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + */ + private String clientAppId; + + /* + * (DEPRECATED) The server AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + */ + private String serverAppId; + + /* + * (DEPRECATED) The server AAD application secret. Learn more at https://aka.ms/aks/aad-legacy. + */ + private String serverAppSecret; + + /* + * The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment + * subscription. + */ + private String tenantId; + + /** + * Creates an instance of ManagedClusterAadProfile class. + */ + public ManagedClusterAadProfile() { + } + + /** + * Get the managed property: Whether to enable managed AAD. + * + * @return the managed value. + */ + public Boolean managed() { + return this.managed; + } + + /** + * Set the managed property: Whether to enable managed AAD. + * + * @param managed the managed value to set. + * @return the ManagedClusterAadProfile object itself. + */ + public ManagedClusterAadProfile withManaged(Boolean managed) { + this.managed = managed; + return this; + } + + /** + * Get the enableAzureRbac property: Whether to enable Azure RBAC for Kubernetes authorization. + * + * @return the enableAzureRbac value. + */ + public Boolean enableAzureRbac() { + return this.enableAzureRbac; + } + + /** + * Set the enableAzureRbac property: Whether to enable Azure RBAC for Kubernetes authorization. + * + * @param enableAzureRbac the enableAzureRbac value to set. + * @return the ManagedClusterAadProfile object itself. + */ + public ManagedClusterAadProfile withEnableAzureRbac(Boolean enableAzureRbac) { + this.enableAzureRbac = enableAzureRbac; + return this; + } + + /** + * Get the adminGroupObjectIDs property: The list of AAD group object IDs that will have admin role of the cluster. + * + * @return the adminGroupObjectIDs value. + */ + public List adminGroupObjectIDs() { + return this.adminGroupObjectIDs; + } + + /** + * Set the adminGroupObjectIDs property: The list of AAD group object IDs that will have admin role of the cluster. + * + * @param adminGroupObjectIDs the adminGroupObjectIDs value to set. + * @return the ManagedClusterAadProfile object itself. + */ + public ManagedClusterAadProfile withAdminGroupObjectIDs(List adminGroupObjectIDs) { + this.adminGroupObjectIDs = adminGroupObjectIDs; + return this; + } + + /** + * Get the clientAppId property: (DEPRECATED) The client AAD application ID. Learn more at + * https://aka.ms/aks/aad-legacy. + * + * @return the clientAppId value. + */ + public String clientAppId() { + return this.clientAppId; + } + + /** + * Set the clientAppId property: (DEPRECATED) The client AAD application ID. Learn more at + * https://aka.ms/aks/aad-legacy. + * + * @param clientAppId the clientAppId value to set. + * @return the ManagedClusterAadProfile object itself. + */ + public ManagedClusterAadProfile withClientAppId(String clientAppId) { + this.clientAppId = clientAppId; + return this; + } + + /** + * Get the serverAppId property: (DEPRECATED) The server AAD application ID. Learn more at + * https://aka.ms/aks/aad-legacy. + * + * @return the serverAppId value. + */ + public String serverAppId() { + return this.serverAppId; + } + + /** + * Set the serverAppId property: (DEPRECATED) The server AAD application ID. Learn more at + * https://aka.ms/aks/aad-legacy. + * + * @param serverAppId the serverAppId value to set. + * @return the ManagedClusterAadProfile object itself. + */ + public ManagedClusterAadProfile withServerAppId(String serverAppId) { + this.serverAppId = serverAppId; + return this; + } + + /** + * Get the serverAppSecret property: (DEPRECATED) The server AAD application secret. Learn more at + * https://aka.ms/aks/aad-legacy. + * + * @return the serverAppSecret value. + */ + public String serverAppSecret() { + return this.serverAppSecret; + } + + /** + * Set the serverAppSecret property: (DEPRECATED) The server AAD application secret. Learn more at + * https://aka.ms/aks/aad-legacy. + * + * @param serverAppSecret the serverAppSecret value to set. + * @return the ManagedClusterAadProfile object itself. + */ + public ManagedClusterAadProfile withServerAppSecret(String serverAppSecret) { + this.serverAppSecret = serverAppSecret; + return this; + } + + /** + * Get the tenantId property: The AAD tenant ID to use for authentication. If not specified, will use the tenant of + * the deployment subscription. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The AAD tenant ID to use for authentication. If not specified, will use the tenant of + * the deployment subscription. + * + * @param tenantId the tenantId value to set. + * @return the ManagedClusterAadProfile object itself. + */ + public ManagedClusterAadProfile withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("managed", this.managed); + jsonWriter.writeBooleanField("enableAzureRBAC", this.enableAzureRbac); + jsonWriter.writeArrayField("adminGroupObjectIDs", this.adminGroupObjectIDs, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("clientAppID", this.clientAppId); + jsonWriter.writeStringField("serverAppID", this.serverAppId); + jsonWriter.writeStringField("serverAppSecret", this.serverAppSecret); + jsonWriter.writeStringField("tenantID", this.tenantId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterAadProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterAadProfile 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 ManagedClusterAadProfile. + */ + public static ManagedClusterAadProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterAadProfile deserializedManagedClusterAadProfile = new ManagedClusterAadProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("managed".equals(fieldName)) { + deserializedManagedClusterAadProfile.managed = reader.getNullable(JsonReader::getBoolean); + } else if ("enableAzureRBAC".equals(fieldName)) { + deserializedManagedClusterAadProfile.enableAzureRbac = reader.getNullable(JsonReader::getBoolean); + } else if ("adminGroupObjectIDs".equals(fieldName)) { + List adminGroupObjectIDs = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedClusterAadProfile.adminGroupObjectIDs = adminGroupObjectIDs; + } else if ("clientAppID".equals(fieldName)) { + deserializedManagedClusterAadProfile.clientAppId = reader.getString(); + } else if ("serverAppID".equals(fieldName)) { + deserializedManagedClusterAadProfile.serverAppId = reader.getString(); + } else if ("serverAppSecret".equals(fieldName)) { + deserializedManagedClusterAadProfile.serverAppSecret = reader.getString(); + } else if ("tenantID".equals(fieldName)) { + deserializedManagedClusterAadProfile.tenantId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterAadProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfile.java new file mode 100644 index 000000000000..22755bce5f5a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfile.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * A Kubernetes add-on profile for a managed cluster. + */ +@Fluent +public final class ManagedClusterAddonProfile implements JsonSerializable { + /* + * Whether the add-on is enabled or not. + */ + private boolean enabled; + + /* + * Key-value pairs for configuring an add-on. + */ + private Map config; + + /* + * Information of user assigned identity used by this add-on. + */ + private ManagedClusterAddonProfileIdentity identity; + + /** + * Creates an instance of ManagedClusterAddonProfile class. + */ + public ManagedClusterAddonProfile() { + } + + /** + * Get the enabled property: Whether the add-on is enabled or not. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether the add-on is enabled or not. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterAddonProfile object itself. + */ + public ManagedClusterAddonProfile withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the config property: Key-value pairs for configuring an add-on. + * + * @return the config value. + */ + public Map config() { + return this.config; + } + + /** + * Set the config property: Key-value pairs for configuring an add-on. + * + * @param config the config value to set. + * @return the ManagedClusterAddonProfile object itself. + */ + public ManagedClusterAddonProfile withConfig(Map config) { + this.config = config; + return this; + } + + /** + * Get the identity property: Information of user assigned identity used by this add-on. + * + * @return the identity value. + */ + public ManagedClusterAddonProfileIdentity identity() { + return this.identity; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeMapField("config", this.config, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterAddonProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterAddonProfile 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 ManagedClusterAddonProfile. + */ + public static ManagedClusterAddonProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterAddonProfile deserializedManagedClusterAddonProfile = new ManagedClusterAddonProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterAddonProfile.enabled = reader.getBoolean(); + } else if ("config".equals(fieldName)) { + Map config = reader.readMap(reader1 -> reader1.getString()); + deserializedManagedClusterAddonProfile.config = config; + } else if ("identity".equals(fieldName)) { + deserializedManagedClusterAddonProfile.identity + = ManagedClusterAddonProfileIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterAddonProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfileIdentity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfileIdentity.java new file mode 100644 index 000000000000..020e3e92c4a2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfileIdentity.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Information of user assigned identity used by this add-on. + */ +@Fluent +public final class ManagedClusterAddonProfileIdentity extends UserAssignedIdentity { + /** + * Creates an instance of ManagedClusterAddonProfileIdentity class. + */ + public ManagedClusterAddonProfileIdentity() { + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAddonProfileIdentity withResourceId(String resourceId) { + super.withResourceId(resourceId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAddonProfileIdentity withClientId(String clientId) { + super.withClientId(clientId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAddonProfileIdentity withObjectId(String objectId) { + super.withObjectId(objectId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", resourceId()); + jsonWriter.writeStringField("clientId", clientId()); + jsonWriter.writeStringField("objectId", objectId()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterAddonProfileIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterAddonProfileIdentity 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 ManagedClusterAddonProfileIdentity. + */ + public static ManagedClusterAddonProfileIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterAddonProfileIdentity deserializedManagedClusterAddonProfileIdentity + = new ManagedClusterAddonProfileIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedManagedClusterAddonProfileIdentity.withResourceId(reader.getString()); + } else if ("clientId".equals(fieldName)) { + deserializedManagedClusterAddonProfileIdentity.withClientId(reader.getString()); + } else if ("objectId".equals(fieldName)) { + deserializedManagedClusterAddonProfileIdentity.withObjectId(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterAddonProfileIdentity; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java new file mode 100644 index 000000000000..b5b236a5b5cc --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java @@ -0,0 +1,861 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterAgentPoolProfileProperties; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Profile for the container service agent pool. + */ +@Fluent +public final class ManagedClusterAgentPoolProfile extends ManagedClusterAgentPoolProfileProperties { + /* + * Unique name of the agent pool profile in the context of the subscription and resource group. Windows agent pool + * names must be 6 characters or less. + */ + private String name; + + /* + * The current deployment or provisioning state. + */ + private String provisioningState; + + /* + * The version of node image + */ + private String nodeImageVersion; + + /* + * The version of Kubernetes the Agent Pool is running. If orchestratorVersion is a fully specified version + * , this field will be exactly equal to it. If orchestratorVersion is , this field + * will contain the full version being used. + */ + private String currentOrchestratorVersion; + + /* + * Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is + * updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable + * optimistic concurrency per the normal eTag convention. + */ + private String etag; + + /** + * Creates an instance of ManagedClusterAgentPoolProfile class. + */ + public ManagedClusterAgentPoolProfile() { + } + + /** + * Get the name property: Unique name of the agent pool profile in the context of the subscription and resource + * group. Windows agent pool names must be 6 characters or less. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Unique name of the agent pool profile in the context of the subscription and resource + * group. Windows agent pool names must be 6 characters or less. + * + * @param name the name value to set. + * @return the ManagedClusterAgentPoolProfile object itself. + */ + public ManagedClusterAgentPoolProfile withName(String name) { + this.name = name; + return this; + } + + /** + * Get the provisioningState property: The current deployment or provisioning state. + * + * @return the provisioningState value. + */ + @Override + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the nodeImageVersion property: The version of node image. + * + * @return the nodeImageVersion value. + */ + @Override + public String nodeImageVersion() { + return this.nodeImageVersion; + } + + /** + * Get the currentOrchestratorVersion property: The version of Kubernetes the Agent Pool is running. If + * orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to + * it. If orchestratorVersion is <major.minor>, this field will contain the full <major.minor.patch> + * version being used. + * + * @return the currentOrchestratorVersion value. + */ + @Override + public String currentOrchestratorVersion() { + return this.currentOrchestratorVersion; + } + + /** + * Get the etag property: Unique read-only string used to implement optimistic concurrency. The eTag value will + * change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a + * subsequent request to enable optimistic concurrency per the normal eTag convention. + * + * @return the etag value. + */ + @Override + public String etag() { + return this.etag; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withCount(Integer count) { + super.withCount(count); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withVmSize(String vmSize) { + super.withVmSize(vmSize); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withOsDiskSizeGB(Integer osDiskSizeGB) { + super.withOsDiskSizeGB(osDiskSizeGB); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withOsDiskType(OSDiskType osDiskType) { + super.withOsDiskType(osDiskType); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withKubeletDiskType(KubeletDiskType kubeletDiskType) { + super.withKubeletDiskType(kubeletDiskType); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withWorkloadRuntime(WorkloadRuntime workloadRuntime) { + super.withWorkloadRuntime(workloadRuntime); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withMessageOfTheDay(String messageOfTheDay) { + super.withMessageOfTheDay(messageOfTheDay); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withVnetSubnetId(String vnetSubnetId) { + super.withVnetSubnetId(vnetSubnetId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withPodSubnetId(String podSubnetId) { + super.withPodSubnetId(podSubnetId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withPodIpAllocationMode(PodIpAllocationMode podIpAllocationMode) { + super.withPodIpAllocationMode(podIpAllocationMode); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withMaxPods(Integer maxPods) { + super.withMaxPods(maxPods); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withOsType(OSType osType) { + super.withOsType(osType); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withOsSku(OSSku osSku) { + super.withOsSku(osSku); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withMaxCount(Integer maxCount) { + super.withMaxCount(maxCount); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withMinCount(Integer minCount) { + super.withMinCount(minCount); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withEnableAutoScaling(Boolean enableAutoScaling) { + super.withEnableAutoScaling(enableAutoScaling); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withScaleDownMode(ScaleDownMode scaleDownMode) { + super.withScaleDownMode(scaleDownMode); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withType(AgentPoolType type) { + super.withType(type); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withMode(AgentPoolMode mode) { + super.withMode(mode); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withOrchestratorVersion(String orchestratorVersion) { + super.withOrchestratorVersion(orchestratorVersion); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings) { + super.withUpgradeSettings(upgradeSettings); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withPowerState(PowerState powerState) { + super.withPowerState(powerState); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withAvailabilityZones(List availabilityZones) { + super.withAvailabilityZones(availabilityZones); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withEnableNodePublicIp(Boolean enableNodePublicIp) { + super.withEnableNodePublicIp(enableNodePublicIp); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withNodePublicIpPrefixId(String nodePublicIpPrefixId) { + super.withNodePublicIpPrefixId(nodePublicIpPrefixId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withScaleSetPriority(ScaleSetPriority scaleSetPriority) { + super.withScaleSetPriority(scaleSetPriority); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy) { + super.withScaleSetEvictionPolicy(scaleSetEvictionPolicy); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withSpotMaxPrice(Float spotMaxPrice) { + super.withSpotMaxPrice(spotMaxPrice); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withNodeLabels(Map nodeLabels) { + super.withNodeLabels(nodeLabels); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withNodeTaints(List nodeTaints) { + super.withNodeTaints(nodeTaints); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withProximityPlacementGroupId(String proximityPlacementGroupId) { + super.withProximityPlacementGroupId(proximityPlacementGroupId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withKubeletConfig(KubeletConfig kubeletConfig) { + super.withKubeletConfig(kubeletConfig); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withLinuxOSConfig(LinuxOSConfig linuxOSConfig) { + super.withLinuxOSConfig(linuxOSConfig); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withEnableEncryptionAtHost(Boolean enableEncryptionAtHost) { + super.withEnableEncryptionAtHost(enableEncryptionAtHost); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withEnableUltraSsd(Boolean enableUltraSsd) { + super.withEnableUltraSsd(enableUltraSsd); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withEnableFips(Boolean enableFips) { + super.withEnableFips(enableFips); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile) { + super.withGpuInstanceProfile(gpuInstanceProfile); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withCreationData(CreationData creationData) { + super.withCreationData(creationData); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withCapacityReservationGroupId(String capacityReservationGroupId) { + super.withCapacityReservationGroupId(capacityReservationGroupId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withHostGroupId(String hostGroupId) { + super.withHostGroupId(hostGroupId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withNetworkProfile(AgentPoolNetworkProfile networkProfile) { + super.withNetworkProfile(networkProfile); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { + super.withWindowsProfile(windowsProfile); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withSecurityProfile(AgentPoolSecurityProfile securityProfile) { + super.withSecurityProfile(securityProfile); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withGpuProfile(GpuProfile gpuProfile) { + super.withGpuProfile(gpuProfile); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withGatewayProfile(AgentPoolGatewayProfile gatewayProfile) { + super.withGatewayProfile(gatewayProfile); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withVirtualMachinesProfile(VirtualMachinesProfile virtualMachinesProfile) { + super.withVirtualMachinesProfile(virtualMachinesProfile); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile + withVirtualMachineNodesStatus(List virtualMachineNodesStatus) { + super.withVirtualMachineNodesStatus(virtualMachineNodesStatus); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withStatus(AgentPoolStatus status) { + super.withStatus(status); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withLocalDnsProfile(LocalDnsProfile localDnsProfile) { + super.withLocalDnsProfile(localDnsProfile); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property name in model ManagedClusterAgentPoolProfile")); + } + if (upgradeSettings() != null) { + upgradeSettings().validate(); + } + if (powerState() != null) { + powerState().validate(); + } + if (kubeletConfig() != null) { + kubeletConfig().validate(); + } + if (linuxOSConfig() != null) { + linuxOSConfig().validate(); + } + if (creationData() != null) { + creationData().validate(); + } + if (networkProfile() != null) { + networkProfile().validate(); + } + if (windowsProfile() != null) { + windowsProfile().validate(); + } + if (securityProfile() != null) { + securityProfile().validate(); + } + if (gpuProfile() != null) { + gpuProfile().validate(); + } + if (gatewayProfile() != null) { + gatewayProfile().validate(); + } + if (virtualMachinesProfile() != null) { + virtualMachinesProfile().validate(); + } + if (virtualMachineNodesStatus() != null) { + virtualMachineNodesStatus().forEach(e -> e.validate()); + } + if (status() != null) { + status().validate(); + } + if (localDnsProfile() != null) { + localDnsProfile().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterAgentPoolProfile.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("count", count()); + jsonWriter.writeStringField("vmSize", vmSize()); + jsonWriter.writeNumberField("osDiskSizeGB", osDiskSizeGB()); + jsonWriter.writeStringField("osDiskType", osDiskType() == null ? null : osDiskType().toString()); + jsonWriter.writeStringField("kubeletDiskType", kubeletDiskType() == null ? null : kubeletDiskType().toString()); + jsonWriter.writeStringField("workloadRuntime", workloadRuntime() == null ? null : workloadRuntime().toString()); + jsonWriter.writeStringField("messageOfTheDay", messageOfTheDay()); + jsonWriter.writeStringField("vnetSubnetID", vnetSubnetId()); + jsonWriter.writeStringField("podSubnetID", podSubnetId()); + jsonWriter.writeStringField("podIPAllocationMode", + podIpAllocationMode() == null ? null : podIpAllocationMode().toString()); + jsonWriter.writeNumberField("maxPods", maxPods()); + jsonWriter.writeStringField("osType", osType() == null ? null : osType().toString()); + jsonWriter.writeStringField("osSKU", osSku() == null ? null : osSku().toString()); + jsonWriter.writeNumberField("maxCount", maxCount()); + jsonWriter.writeNumberField("minCount", minCount()); + jsonWriter.writeBooleanField("enableAutoScaling", enableAutoScaling()); + jsonWriter.writeStringField("scaleDownMode", scaleDownMode() == null ? null : scaleDownMode().toString()); + jsonWriter.writeStringField("type", type() == null ? null : type().toString()); + jsonWriter.writeStringField("mode", mode() == null ? null : mode().toString()); + jsonWriter.writeStringField("orchestratorVersion", orchestratorVersion()); + jsonWriter.writeJsonField("upgradeSettings", upgradeSettings()); + jsonWriter.writeJsonField("powerState", powerState()); + jsonWriter.writeArrayField("availabilityZones", availabilityZones(), + (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("enableNodePublicIP", enableNodePublicIp()); + jsonWriter.writeStringField("nodePublicIPPrefixID", nodePublicIpPrefixId()); + jsonWriter.writeStringField("scaleSetPriority", + scaleSetPriority() == null ? null : scaleSetPriority().toString()); + jsonWriter.writeStringField("scaleSetEvictionPolicy", + scaleSetEvictionPolicy() == null ? null : scaleSetEvictionPolicy().toString()); + jsonWriter.writeNumberField("spotMaxPrice", spotMaxPrice()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("nodeLabels", nodeLabels(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("nodeTaints", nodeTaints(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("proximityPlacementGroupID", proximityPlacementGroupId()); + jsonWriter.writeJsonField("kubeletConfig", kubeletConfig()); + jsonWriter.writeJsonField("linuxOSConfig", linuxOSConfig()); + jsonWriter.writeBooleanField("enableEncryptionAtHost", enableEncryptionAtHost()); + jsonWriter.writeBooleanField("enableUltraSSD", enableUltraSsd()); + jsonWriter.writeBooleanField("enableFIPS", enableFips()); + jsonWriter.writeStringField("gpuInstanceProfile", + gpuInstanceProfile() == null ? null : gpuInstanceProfile().toString()); + jsonWriter.writeJsonField("creationData", creationData()); + jsonWriter.writeStringField("capacityReservationGroupID", capacityReservationGroupId()); + jsonWriter.writeStringField("hostGroupID", hostGroupId()); + jsonWriter.writeJsonField("networkProfile", networkProfile()); + jsonWriter.writeJsonField("windowsProfile", windowsProfile()); + jsonWriter.writeJsonField("securityProfile", securityProfile()); + jsonWriter.writeJsonField("gpuProfile", gpuProfile()); + jsonWriter.writeJsonField("gatewayProfile", gatewayProfile()); + jsonWriter.writeJsonField("virtualMachinesProfile", virtualMachinesProfile()); + jsonWriter.writeArrayField("virtualMachineNodesStatus", virtualMachineNodesStatus(), + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("status", status()); + jsonWriter.writeJsonField("localDNSProfile", localDnsProfile()); + jsonWriter.writeStringField("name", this.name); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterAgentPoolProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterAgentPoolProfile 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 ManagedClusterAgentPoolProfile. + */ + public static ManagedClusterAgentPoolProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterAgentPoolProfile deserializedManagedClusterAgentPoolProfile + = new ManagedClusterAgentPoolProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("eTag".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.etag = reader.getString(); + } else if ("count".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withCount(reader.getNullable(JsonReader::getInt)); + } else if ("vmSize".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withVmSize(reader.getString()); + } else if ("osDiskSizeGB".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withOsDiskSizeGB(reader.getNullable(JsonReader::getInt)); + } else if ("osDiskType".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withOsDiskType(OSDiskType.fromString(reader.getString())); + } else if ("kubeletDiskType".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withKubeletDiskType(KubeletDiskType.fromString(reader.getString())); + } else if ("workloadRuntime".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withWorkloadRuntime(WorkloadRuntime.fromString(reader.getString())); + } else if ("messageOfTheDay".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withMessageOfTheDay(reader.getString()); + } else if ("vnetSubnetID".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withVnetSubnetId(reader.getString()); + } else if ("podSubnetID".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withPodSubnetId(reader.getString()); + } else if ("podIPAllocationMode".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withPodIpAllocationMode(PodIpAllocationMode.fromString(reader.getString())); + } else if ("maxPods".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withMaxPods(reader.getNullable(JsonReader::getInt)); + } else if ("osType".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withOsType(OSType.fromString(reader.getString())); + } else if ("osSKU".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withOsSku(OSSku.fromString(reader.getString())); + } else if ("maxCount".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withMaxCount(reader.getNullable(JsonReader::getInt)); + } else if ("minCount".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withMinCount(reader.getNullable(JsonReader::getInt)); + } else if ("enableAutoScaling".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withEnableAutoScaling(reader.getNullable(JsonReader::getBoolean)); + } else if ("scaleDownMode".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withScaleDownMode(ScaleDownMode.fromString(reader.getString())); + } else if ("type".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withType(AgentPoolType.fromString(reader.getString())); + } else if ("mode".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withMode(AgentPoolMode.fromString(reader.getString())); + } else if ("orchestratorVersion".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withOrchestratorVersion(reader.getString()); + } else if ("currentOrchestratorVersion".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.currentOrchestratorVersion = reader.getString(); + } else if ("nodeImageVersion".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.nodeImageVersion = reader.getString(); + } else if ("upgradeSettings".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withUpgradeSettings(AgentPoolUpgradeSettings.fromJson(reader)); + } else if ("provisioningState".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.provisioningState = reader.getString(); + } else if ("powerState".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withPowerState(PowerState.fromJson(reader)); + } else if ("availabilityZones".equals(fieldName)) { + List availabilityZones = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedClusterAgentPoolProfile.withAvailabilityZones(availabilityZones); + } else if ("enableNodePublicIP".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withEnableNodePublicIp(reader.getNullable(JsonReader::getBoolean)); + } else if ("nodePublicIPPrefixID".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withNodePublicIpPrefixId(reader.getString()); + } else if ("scaleSetPriority".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withScaleSetPriority(ScaleSetPriority.fromString(reader.getString())); + } else if ("scaleSetEvictionPolicy".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withScaleSetEvictionPolicy(ScaleSetEvictionPolicy.fromString(reader.getString())); + } else if ("spotMaxPrice".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withSpotMaxPrice(reader.getNullable(JsonReader::getFloat)); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedManagedClusterAgentPoolProfile.withTags(tags); + } else if ("nodeLabels".equals(fieldName)) { + Map nodeLabels = reader.readMap(reader1 -> reader1.getString()); + deserializedManagedClusterAgentPoolProfile.withNodeLabels(nodeLabels); + } else if ("nodeTaints".equals(fieldName)) { + List nodeTaints = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedClusterAgentPoolProfile.withNodeTaints(nodeTaints); + } else if ("proximityPlacementGroupID".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withProximityPlacementGroupId(reader.getString()); + } else if ("kubeletConfig".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withKubeletConfig(KubeletConfig.fromJson(reader)); + } else if ("linuxOSConfig".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withLinuxOSConfig(LinuxOSConfig.fromJson(reader)); + } else if ("enableEncryptionAtHost".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withEnableEncryptionAtHost(reader.getNullable(JsonReader::getBoolean)); + } else if ("enableUltraSSD".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withEnableUltraSsd(reader.getNullable(JsonReader::getBoolean)); + } else if ("enableFIPS".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withEnableFips(reader.getNullable(JsonReader::getBoolean)); + } else if ("gpuInstanceProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withGpuInstanceProfile(GpuInstanceProfile.fromString(reader.getString())); + } else if ("creationData".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withCreationData(CreationData.fromJson(reader)); + } else if ("capacityReservationGroupID".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withCapacityReservationGroupId(reader.getString()); + } else if ("hostGroupID".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withHostGroupId(reader.getString()); + } else if ("networkProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withNetworkProfile(AgentPoolNetworkProfile.fromJson(reader)); + } else if ("windowsProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withWindowsProfile(AgentPoolWindowsProfile.fromJson(reader)); + } else if ("securityProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withSecurityProfile(AgentPoolSecurityProfile.fromJson(reader)); + } else if ("gpuProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withGpuProfile(GpuProfile.fromJson(reader)); + } else if ("gatewayProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withGatewayProfile(AgentPoolGatewayProfile.fromJson(reader)); + } else if ("virtualMachinesProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withVirtualMachinesProfile(VirtualMachinesProfile.fromJson(reader)); + } else if ("virtualMachineNodesStatus".equals(fieldName)) { + List virtualMachineNodesStatus + = reader.readArray(reader1 -> VirtualMachineNodes.fromJson(reader1)); + deserializedManagedClusterAgentPoolProfile.withVirtualMachineNodesStatus(virtualMachineNodesStatus); + } else if ("status".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withStatus(AgentPoolStatus.fromJson(reader)); + } else if ("localDNSProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.withLocalDnsProfile(LocalDnsProfile.fromJson(reader)); + } else if ("name".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile.name = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterAgentPoolProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java new file mode 100644 index 000000000000..b1ba9d300a4e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java @@ -0,0 +1,299 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Access profile for managed cluster API server. + */ +@Fluent +public final class ManagedClusterApiServerAccessProfile + implements JsonSerializable { + /* + * The IP ranges authorized to access the Kubernetes API server. IP ranges are specified in CIDR format, e.g. + * 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are + * using a Basic Load Balancer. For more information see [API server authorized IP + * ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). + */ + private List authorizedIpRanges; + + /* + * Whether to create the cluster as a private cluster or not. For more details, see [Creating a private AKS + * cluster](https://docs.microsoft.com/azure/aks/private-clusters). + */ + private Boolean enablePrivateCluster; + + /* + * The private DNS zone mode for the cluster. The default is System. For more details see [configure private DNS + * zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). Allowed values are + * 'system' and 'none'. + */ + private String privateDnsZone; + + /* + * Whether to create additional public FQDN for private cluster or not. + */ + private Boolean enablePrivateClusterPublicFqdn; + + /* + * Whether to disable run command for the cluster or not. + */ + private Boolean disableRunCommand; + + /* + * Whether to enable apiserver vnet integration for the cluster or not. See aka.ms/AksVnetIntegration for more + * details. + */ + private Boolean enableVnetIntegration; + + /* + * The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new cluster with + * BYO Vnet, or when updating an existing cluster to enable apiserver vnet integration. + */ + private String subnetId; + + /** + * Creates an instance of ManagedClusterApiServerAccessProfile class. + */ + public ManagedClusterApiServerAccessProfile() { + } + + /** + * Get the authorizedIpRanges property: The IP ranges authorized to access the Kubernetes API server. IP ranges are + * specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP + * Per Node, or clusters that are using a Basic Load Balancer. For more information see [API server authorized IP + * ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). + * + * @return the authorizedIpRanges value. + */ + public List authorizedIpRanges() { + return this.authorizedIpRanges; + } + + /** + * Set the authorizedIpRanges property: The IP ranges authorized to access the Kubernetes API server. IP ranges are + * specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP + * Per Node, or clusters that are using a Basic Load Balancer. For more information see [API server authorized IP + * ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). + * + * @param authorizedIpRanges the authorizedIpRanges value to set. + * @return the ManagedClusterApiServerAccessProfile object itself. + */ + public ManagedClusterApiServerAccessProfile withAuthorizedIpRanges(List authorizedIpRanges) { + this.authorizedIpRanges = authorizedIpRanges; + return this; + } + + /** + * Get the enablePrivateCluster property: Whether to create the cluster as a private cluster or not. For more + * details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). + * + * @return the enablePrivateCluster value. + */ + public Boolean enablePrivateCluster() { + return this.enablePrivateCluster; + } + + /** + * Set the enablePrivateCluster property: Whether to create the cluster as a private cluster or not. For more + * details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters). + * + * @param enablePrivateCluster the enablePrivateCluster value to set. + * @return the ManagedClusterApiServerAccessProfile object itself. + */ + public ManagedClusterApiServerAccessProfile withEnablePrivateCluster(Boolean enablePrivateCluster) { + this.enablePrivateCluster = enablePrivateCluster; + return this; + } + + /** + * Get the privateDnsZone property: The private DNS zone mode for the cluster. The default is System. For more + * details see [configure private DNS + * zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). Allowed values are + * 'system' and 'none'. + * + * @return the privateDnsZone value. + */ + public String privateDnsZone() { + return this.privateDnsZone; + } + + /** + * Set the privateDnsZone property: The private DNS zone mode for the cluster. The default is System. For more + * details see [configure private DNS + * zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). Allowed values are + * 'system' and 'none'. + * + * @param privateDnsZone the privateDnsZone value to set. + * @return the ManagedClusterApiServerAccessProfile object itself. + */ + public ManagedClusterApiServerAccessProfile withPrivateDnsZone(String privateDnsZone) { + this.privateDnsZone = privateDnsZone; + return this; + } + + /** + * Get the enablePrivateClusterPublicFqdn property: Whether to create additional public FQDN for private cluster or + * not. + * + * @return the enablePrivateClusterPublicFqdn value. + */ + public Boolean enablePrivateClusterPublicFqdn() { + return this.enablePrivateClusterPublicFqdn; + } + + /** + * Set the enablePrivateClusterPublicFqdn property: Whether to create additional public FQDN for private cluster or + * not. + * + * @param enablePrivateClusterPublicFqdn the enablePrivateClusterPublicFqdn value to set. + * @return the ManagedClusterApiServerAccessProfile object itself. + */ + public ManagedClusterApiServerAccessProfile + withEnablePrivateClusterPublicFqdn(Boolean enablePrivateClusterPublicFqdn) { + this.enablePrivateClusterPublicFqdn = enablePrivateClusterPublicFqdn; + return this; + } + + /** + * Get the disableRunCommand property: Whether to disable run command for the cluster or not. + * + * @return the disableRunCommand value. + */ + public Boolean disableRunCommand() { + return this.disableRunCommand; + } + + /** + * Set the disableRunCommand property: Whether to disable run command for the cluster or not. + * + * @param disableRunCommand the disableRunCommand value to set. + * @return the ManagedClusterApiServerAccessProfile object itself. + */ + public ManagedClusterApiServerAccessProfile withDisableRunCommand(Boolean disableRunCommand) { + this.disableRunCommand = disableRunCommand; + return this; + } + + /** + * Get the enableVnetIntegration property: Whether to enable apiserver vnet integration for the cluster or not. See + * aka.ms/AksVnetIntegration for more details. + * + * @return the enableVnetIntegration value. + */ + public Boolean enableVnetIntegration() { + return this.enableVnetIntegration; + } + + /** + * Set the enableVnetIntegration property: Whether to enable apiserver vnet integration for the cluster or not. See + * aka.ms/AksVnetIntegration for more details. + * + * @param enableVnetIntegration the enableVnetIntegration value to set. + * @return the ManagedClusterApiServerAccessProfile object itself. + */ + public ManagedClusterApiServerAccessProfile withEnableVnetIntegration(Boolean enableVnetIntegration) { + this.enableVnetIntegration = enableVnetIntegration; + return this; + } + + /** + * Get the subnetId property: The subnet to be used when apiserver vnet integration is enabled. It is required when + * creating a new cluster with BYO Vnet, or when updating an existing cluster to enable apiserver vnet integration. + * + * @return the subnetId value. + */ + public String subnetId() { + return this.subnetId; + } + + /** + * Set the subnetId property: The subnet to be used when apiserver vnet integration is enabled. It is required when + * creating a new cluster with BYO Vnet, or when updating an existing cluster to enable apiserver vnet integration. + * + * @param subnetId the subnetId value to set. + * @return the ManagedClusterApiServerAccessProfile object itself. + */ + public ManagedClusterApiServerAccessProfile withSubnetId(String subnetId) { + this.subnetId = subnetId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("authorizedIPRanges", this.authorizedIpRanges, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("enablePrivateCluster", this.enablePrivateCluster); + jsonWriter.writeStringField("privateDNSZone", this.privateDnsZone); + jsonWriter.writeBooleanField("enablePrivateClusterPublicFQDN", this.enablePrivateClusterPublicFqdn); + jsonWriter.writeBooleanField("disableRunCommand", this.disableRunCommand); + jsonWriter.writeBooleanField("enableVnetIntegration", this.enableVnetIntegration); + jsonWriter.writeStringField("subnetId", this.subnetId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterApiServerAccessProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterApiServerAccessProfile 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 ManagedClusterApiServerAccessProfile. + */ + public static ManagedClusterApiServerAccessProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterApiServerAccessProfile deserializedManagedClusterApiServerAccessProfile + = new ManagedClusterApiServerAccessProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("authorizedIPRanges".equals(fieldName)) { + List authorizedIpRanges = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedClusterApiServerAccessProfile.authorizedIpRanges = authorizedIpRanges; + } else if ("enablePrivateCluster".equals(fieldName)) { + deserializedManagedClusterApiServerAccessProfile.enablePrivateCluster + = reader.getNullable(JsonReader::getBoolean); + } else if ("privateDNSZone".equals(fieldName)) { + deserializedManagedClusterApiServerAccessProfile.privateDnsZone = reader.getString(); + } else if ("enablePrivateClusterPublicFQDN".equals(fieldName)) { + deserializedManagedClusterApiServerAccessProfile.enablePrivateClusterPublicFqdn + = reader.getNullable(JsonReader::getBoolean); + } else if ("disableRunCommand".equals(fieldName)) { + deserializedManagedClusterApiServerAccessProfile.disableRunCommand + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableVnetIntegration".equals(fieldName)) { + deserializedManagedClusterApiServerAccessProfile.enableVnetIntegration + = reader.getNullable(JsonReader::getBoolean); + } else if ("subnetId".equals(fieldName)) { + deserializedManagedClusterApiServerAccessProfile.subnetId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterApiServerAccessProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java new file mode 100644 index 000000000000..cf6a236cb42e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Auto upgrade profile for a managed cluster. + */ +@Fluent +public final class ManagedClusterAutoUpgradeProfile implements JsonSerializable { + /* + * The upgrade channel for auto upgrade. The default is 'none'. For more information see [setting the AKS cluster + * auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). + */ + private UpgradeChannel upgradeChannel; + + /* + * Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage. + */ + private NodeOSUpgradeChannel nodeOSUpgradeChannel; + + /** + * Creates an instance of ManagedClusterAutoUpgradeProfile class. + */ + public ManagedClusterAutoUpgradeProfile() { + } + + /** + * Get the upgradeChannel property: The upgrade channel for auto upgrade. The default is 'none'. For more + * information see [setting the AKS cluster auto-upgrade + * channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). + * + * @return the upgradeChannel value. + */ + public UpgradeChannel upgradeChannel() { + return this.upgradeChannel; + } + + /** + * Set the upgradeChannel property: The upgrade channel for auto upgrade. The default is 'none'. For more + * information see [setting the AKS cluster auto-upgrade + * channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). + * + * @param upgradeChannel the upgradeChannel value to set. + * @return the ManagedClusterAutoUpgradeProfile object itself. + */ + public ManagedClusterAutoUpgradeProfile withUpgradeChannel(UpgradeChannel upgradeChannel) { + this.upgradeChannel = upgradeChannel; + return this; + } + + /** + * Get the nodeOSUpgradeChannel property: Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. + * The default is NodeImage. + * + * @return the nodeOSUpgradeChannel value. + */ + public NodeOSUpgradeChannel nodeOSUpgradeChannel() { + return this.nodeOSUpgradeChannel; + } + + /** + * Set the nodeOSUpgradeChannel property: Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. + * The default is NodeImage. + * + * @param nodeOSUpgradeChannel the nodeOSUpgradeChannel value to set. + * @return the ManagedClusterAutoUpgradeProfile object itself. + */ + public ManagedClusterAutoUpgradeProfile withNodeOSUpgradeChannel(NodeOSUpgradeChannel nodeOSUpgradeChannel) { + this.nodeOSUpgradeChannel = nodeOSUpgradeChannel; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("upgradeChannel", + this.upgradeChannel == null ? null : this.upgradeChannel.toString()); + jsonWriter.writeStringField("nodeOSUpgradeChannel", + this.nodeOSUpgradeChannel == null ? null : this.nodeOSUpgradeChannel.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterAutoUpgradeProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterAutoUpgradeProfile 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 ManagedClusterAutoUpgradeProfile. + */ + public static ManagedClusterAutoUpgradeProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterAutoUpgradeProfile deserializedManagedClusterAutoUpgradeProfile + = new ManagedClusterAutoUpgradeProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("upgradeChannel".equals(fieldName)) { + deserializedManagedClusterAutoUpgradeProfile.upgradeChannel + = UpgradeChannel.fromString(reader.getString()); + } else if ("nodeOSUpgradeChannel".equals(fieldName)) { + deserializedManagedClusterAutoUpgradeProfile.nodeOSUpgradeChannel + = NodeOSUpgradeChannel.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterAutoUpgradeProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java new file mode 100644 index 000000000000..929046a73d98 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Azure Monitor addon profiles for monitoring the managed cluster. + */ +@Fluent +public final class ManagedClusterAzureMonitorProfile implements JsonSerializable { + /* + * Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes + * infrastructure metrics to send to an Azure Monitor Workspace and configure additional scraping for custom + * targets. See aka.ms/AzureManagedPrometheus for an overview. + */ + private ManagedClusterAzureMonitorProfileMetrics metrics; + + /** + * Creates an instance of ManagedClusterAzureMonitorProfile class. + */ + public ManagedClusterAzureMonitorProfile() { + } + + /** + * Get the metrics property: Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect + * out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace and configure additional + * scraping for custom targets. See aka.ms/AzureManagedPrometheus for an overview. + * + * @return the metrics value. + */ + public ManagedClusterAzureMonitorProfileMetrics metrics() { + return this.metrics; + } + + /** + * Set the metrics property: Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect + * out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace and configure additional + * scraping for custom targets. See aka.ms/AzureManagedPrometheus for an overview. + * + * @param metrics the metrics value to set. + * @return the ManagedClusterAzureMonitorProfile object itself. + */ + public ManagedClusterAzureMonitorProfile withMetrics(ManagedClusterAzureMonitorProfileMetrics metrics) { + this.metrics = metrics; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (metrics() != null) { + metrics().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("metrics", this.metrics); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterAzureMonitorProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterAzureMonitorProfile 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 ManagedClusterAzureMonitorProfile. + */ + public static ManagedClusterAzureMonitorProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterAzureMonitorProfile deserializedManagedClusterAzureMonitorProfile + = new ManagedClusterAzureMonitorProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("metrics".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfile.metrics + = ManagedClusterAzureMonitorProfileMetrics.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterAzureMonitorProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java new file mode 100644 index 000000000000..c6fd51a2703f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the + * kube-state-metrics pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for + * details. + */ +@Fluent +public final class ManagedClusterAzureMonitorProfileKubeStateMetrics + implements JsonSerializable { + /* + * Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric + * (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By default the metric contains only + * resource name and namespace labels. + */ + private String metricLabelsAllowlist; + + /* + * Comma-separated list of Kubernetes annotation keys that will be used in the resource's labels metric (Example: + * 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). By default the metric contains only + * resource name and namespace labels. + */ + private String metricAnnotationsAllowList; + + /** + * Creates an instance of ManagedClusterAzureMonitorProfileKubeStateMetrics class. + */ + public ManagedClusterAzureMonitorProfileKubeStateMetrics() { + } + + /** + * Get the metricLabelsAllowlist property: Comma-separated list of additional Kubernetes label keys that will be + * used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By + * default the metric contains only resource name and namespace labels. + * + * @return the metricLabelsAllowlist value. + */ + public String metricLabelsAllowlist() { + return this.metricLabelsAllowlist; + } + + /** + * Set the metricLabelsAllowlist property: Comma-separated list of additional Kubernetes label keys that will be + * used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By + * default the metric contains only resource name and namespace labels. + * + * @param metricLabelsAllowlist the metricLabelsAllowlist value to set. + * @return the ManagedClusterAzureMonitorProfileKubeStateMetrics object itself. + */ + public ManagedClusterAzureMonitorProfileKubeStateMetrics withMetricLabelsAllowlist(String metricLabelsAllowlist) { + this.metricLabelsAllowlist = metricLabelsAllowlist; + return this; + } + + /** + * Get the metricAnnotationsAllowList property: Comma-separated list of Kubernetes annotation keys that will be used + * in the resource's labels metric (Example: 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). + * By default the metric contains only resource name and namespace labels. + * + * @return the metricAnnotationsAllowList value. + */ + public String metricAnnotationsAllowList() { + return this.metricAnnotationsAllowList; + } + + /** + * Set the metricAnnotationsAllowList property: Comma-separated list of Kubernetes annotation keys that will be used + * in the resource's labels metric (Example: 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). + * By default the metric contains only resource name and namespace labels. + * + * @param metricAnnotationsAllowList the metricAnnotationsAllowList value to set. + * @return the ManagedClusterAzureMonitorProfileKubeStateMetrics object itself. + */ + public ManagedClusterAzureMonitorProfileKubeStateMetrics + withMetricAnnotationsAllowList(String metricAnnotationsAllowList) { + this.metricAnnotationsAllowList = metricAnnotationsAllowList; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("metricLabelsAllowlist", this.metricLabelsAllowlist); + jsonWriter.writeStringField("metricAnnotationsAllowList", this.metricAnnotationsAllowList); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterAzureMonitorProfileKubeStateMetrics from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterAzureMonitorProfileKubeStateMetrics 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 ManagedClusterAzureMonitorProfileKubeStateMetrics. + */ + public static ManagedClusterAzureMonitorProfileKubeStateMetrics fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterAzureMonitorProfileKubeStateMetrics deserializedManagedClusterAzureMonitorProfileKubeStateMetrics + = new ManagedClusterAzureMonitorProfileKubeStateMetrics(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("metricLabelsAllowlist".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileKubeStateMetrics.metricLabelsAllowlist + = reader.getString(); + } else if ("metricAnnotationsAllowList".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileKubeStateMetrics.metricAnnotationsAllowList + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterAzureMonitorProfileKubeStateMetrics; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java new file mode 100644 index 000000000000..c429294b7ad5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes + * infrastructure metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. + * See aka.ms/AzureManagedPrometheus for an overview. + */ +@Fluent +public final class ManagedClusterAzureMonitorProfileMetrics + implements JsonSerializable { + /* + * Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See + * aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling. + */ + private boolean enabled; + + /* + * Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the + * kube-state-metrics pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for + * details. + */ + private ManagedClusterAzureMonitorProfileKubeStateMetrics kubeStateMetrics; + + /** + * Creates an instance of ManagedClusterAzureMonitorProfileMetrics class. + */ + public ManagedClusterAzureMonitorProfileMetrics() { + } + + /** + * Get the enabled property: Whether to enable or disable the Azure Managed Prometheus addon for Prometheus + * monitoring. See aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable or disable the Azure Managed Prometheus addon for Prometheus + * monitoring. See aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterAzureMonitorProfileMetrics object itself. + */ + public ManagedClusterAzureMonitorProfileMetrics withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the kubeStateMetrics property: Kube State Metrics profile for the Azure Managed Prometheus addon. These + * optional settings are for the kube-state-metrics pod that is deployed with the addon. See + * aka.ms/AzureManagedPrometheus-optional-parameters for details. + * + * @return the kubeStateMetrics value. + */ + public ManagedClusterAzureMonitorProfileKubeStateMetrics kubeStateMetrics() { + return this.kubeStateMetrics; + } + + /** + * Set the kubeStateMetrics property: Kube State Metrics profile for the Azure Managed Prometheus addon. These + * optional settings are for the kube-state-metrics pod that is deployed with the addon. See + * aka.ms/AzureManagedPrometheus-optional-parameters for details. + * + * @param kubeStateMetrics the kubeStateMetrics value to set. + * @return the ManagedClusterAzureMonitorProfileMetrics object itself. + */ + public ManagedClusterAzureMonitorProfileMetrics + withKubeStateMetrics(ManagedClusterAzureMonitorProfileKubeStateMetrics kubeStateMetrics) { + this.kubeStateMetrics = kubeStateMetrics; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (kubeStateMetrics() != null) { + kubeStateMetrics().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeJsonField("kubeStateMetrics", this.kubeStateMetrics); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterAzureMonitorProfileMetrics from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterAzureMonitorProfileMetrics 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 ManagedClusterAzureMonitorProfileMetrics. + */ + public static ManagedClusterAzureMonitorProfileMetrics fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterAzureMonitorProfileMetrics deserializedManagedClusterAzureMonitorProfileMetrics + = new ManagedClusterAzureMonitorProfileMetrics(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileMetrics.enabled = reader.getBoolean(); + } else if ("kubeStateMetrics".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileMetrics.kubeStateMetrics + = ManagedClusterAzureMonitorProfileKubeStateMetrics.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterAzureMonitorProfileMetrics; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterBootstrapProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterBootstrapProfile.java new file mode 100644 index 000000000000..eeb903b5db62 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterBootstrapProfile.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 bootstrap profile. + */ +@Fluent +public final class ManagedClusterBootstrapProfile implements JsonSerializable { + /* + * The artifact source. The source where the artifacts are downloaded from. + */ + private ArtifactSource artifactSource; + + /* + * The resource Id of Azure Container Registry. The registry must have private network access, premium SKU and zone + * redundancy. + */ + private String containerRegistryId; + + /** + * Creates an instance of ManagedClusterBootstrapProfile class. + */ + public ManagedClusterBootstrapProfile() { + } + + /** + * Get the artifactSource property: The artifact source. The source where the artifacts are downloaded from. + * + * @return the artifactSource value. + */ + public ArtifactSource artifactSource() { + return this.artifactSource; + } + + /** + * Set the artifactSource property: The artifact source. The source where the artifacts are downloaded from. + * + * @param artifactSource the artifactSource value to set. + * @return the ManagedClusterBootstrapProfile object itself. + */ + public ManagedClusterBootstrapProfile withArtifactSource(ArtifactSource artifactSource) { + this.artifactSource = artifactSource; + return this; + } + + /** + * Get the containerRegistryId property: The resource Id of Azure Container Registry. The registry must have private + * network access, premium SKU and zone redundancy. + * + * @return the containerRegistryId value. + */ + public String containerRegistryId() { + return this.containerRegistryId; + } + + /** + * Set the containerRegistryId property: The resource Id of Azure Container Registry. The registry must have private + * network access, premium SKU and zone redundancy. + * + * @param containerRegistryId the containerRegistryId value to set. + * @return the ManagedClusterBootstrapProfile object itself. + */ + public ManagedClusterBootstrapProfile withContainerRegistryId(String containerRegistryId) { + this.containerRegistryId = containerRegistryId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("artifactSource", + this.artifactSource == null ? null : this.artifactSource.toString()); + jsonWriter.writeStringField("containerRegistryId", this.containerRegistryId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterBootstrapProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterBootstrapProfile 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 ManagedClusterBootstrapProfile. + */ + public static ManagedClusterBootstrapProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterBootstrapProfile deserializedManagedClusterBootstrapProfile + = new ManagedClusterBootstrapProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("artifactSource".equals(fieldName)) { + deserializedManagedClusterBootstrapProfile.artifactSource + = ArtifactSource.fromString(reader.getString()); + } else if ("containerRegistryId".equals(fieldName)) { + deserializedManagedClusterBootstrapProfile.containerRegistryId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterBootstrapProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterCostAnalysis.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterCostAnalysis.java new file mode 100644 index 000000000000..c7c1b0473e7d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterCostAnalysis.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 cost analysis configuration for the cluster. + */ +@Fluent +public final class ManagedClusterCostAnalysis implements JsonSerializable { + /* + * Whether to enable cost analysis. The Managed Cluster sku.tier must be set to 'Standard' or 'Premium' to enable + * this feature. Enabling this will add Kubernetes Namespace and Deployment details to the Cost Analysis views in + * the Azure portal. If not specified, the default is false. For more information see aka.ms/aks/docs/cost-analysis. + */ + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterCostAnalysis class. + */ + public ManagedClusterCostAnalysis() { + } + + /** + * Get the enabled property: Whether to enable cost analysis. The Managed Cluster sku.tier must be set to 'Standard' + * or 'Premium' to enable this feature. Enabling this will add Kubernetes Namespace and Deployment details to the + * Cost Analysis views in the Azure portal. If not specified, the default is false. For more information see + * aka.ms/aks/docs/cost-analysis. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable cost analysis. The Managed Cluster sku.tier must be set to 'Standard' + * or 'Premium' to enable this feature. Enabling this will add Kubernetes Namespace and Deployment details to the + * Cost Analysis views in the Azure portal. If not specified, the default is false. For more information see + * aka.ms/aks/docs/cost-analysis. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterCostAnalysis object itself. + */ + public ManagedClusterCostAnalysis withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterCostAnalysis from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterCostAnalysis 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 ManagedClusterCostAnalysis. + */ + public static ManagedClusterCostAnalysis fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterCostAnalysis deserializedManagedClusterCostAnalysis = new ManagedClusterCostAnalysis(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterCostAnalysis.enabled = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterCostAnalysis; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java new file mode 100644 index 000000000000..24bb81b69756 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Cluster HTTP proxy configuration. + */ +@Fluent +public final class ManagedClusterHttpProxyConfig implements JsonSerializable { + /* + * The HTTP proxy server endpoint to use. + */ + private String httpProxy; + + /* + * The HTTPS proxy server endpoint to use. + */ + private String httpsProxy; + + /* + * The endpoints that should not go through proxy. + */ + private List noProxy; + + /* + * Alternative CA cert to use for connecting to proxy servers. + */ + private String trustedCa; + + /** + * Creates an instance of ManagedClusterHttpProxyConfig class. + */ + public ManagedClusterHttpProxyConfig() { + } + + /** + * Get the httpProxy property: The HTTP proxy server endpoint to use. + * + * @return the httpProxy value. + */ + public String httpProxy() { + return this.httpProxy; + } + + /** + * Set the httpProxy property: The HTTP proxy server endpoint to use. + * + * @param httpProxy the httpProxy value to set. + * @return the ManagedClusterHttpProxyConfig object itself. + */ + public ManagedClusterHttpProxyConfig withHttpProxy(String httpProxy) { + this.httpProxy = httpProxy; + return this; + } + + /** + * Get the httpsProxy property: The HTTPS proxy server endpoint to use. + * + * @return the httpsProxy value. + */ + public String httpsProxy() { + return this.httpsProxy; + } + + /** + * Set the httpsProxy property: The HTTPS proxy server endpoint to use. + * + * @param httpsProxy the httpsProxy value to set. + * @return the ManagedClusterHttpProxyConfig object itself. + */ + public ManagedClusterHttpProxyConfig withHttpsProxy(String httpsProxy) { + this.httpsProxy = httpsProxy; + return this; + } + + /** + * Get the noProxy property: The endpoints that should not go through proxy. + * + * @return the noProxy value. + */ + public List noProxy() { + return this.noProxy; + } + + /** + * Set the noProxy property: The endpoints that should not go through proxy. + * + * @param noProxy the noProxy value to set. + * @return the ManagedClusterHttpProxyConfig object itself. + */ + public ManagedClusterHttpProxyConfig withNoProxy(List noProxy) { + this.noProxy = noProxy; + return this; + } + + /** + * Get the trustedCa property: Alternative CA cert to use for connecting to proxy servers. + * + * @return the trustedCa value. + */ + public String trustedCa() { + return this.trustedCa; + } + + /** + * Set the trustedCa property: Alternative CA cert to use for connecting to proxy servers. + * + * @param trustedCa the trustedCa value to set. + * @return the ManagedClusterHttpProxyConfig object itself. + */ + public ManagedClusterHttpProxyConfig withTrustedCa(String trustedCa) { + this.trustedCa = trustedCa; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("httpProxy", this.httpProxy); + jsonWriter.writeStringField("httpsProxy", this.httpsProxy); + jsonWriter.writeArrayField("noProxy", this.noProxy, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("trustedCa", this.trustedCa); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterHttpProxyConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterHttpProxyConfig 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 ManagedClusterHttpProxyConfig. + */ + public static ManagedClusterHttpProxyConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterHttpProxyConfig deserializedManagedClusterHttpProxyConfig + = new ManagedClusterHttpProxyConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("httpProxy".equals(fieldName)) { + deserializedManagedClusterHttpProxyConfig.httpProxy = reader.getString(); + } else if ("httpsProxy".equals(fieldName)) { + deserializedManagedClusterHttpProxyConfig.httpsProxy = reader.getString(); + } else if ("noProxy".equals(fieldName)) { + List noProxy = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedClusterHttpProxyConfig.noProxy = noProxy; + } else if ("trustedCa".equals(fieldName)) { + deserializedManagedClusterHttpProxyConfig.trustedCa = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterHttpProxyConfig; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIdentity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIdentity.java new file mode 100644 index 000000000000..cef1345cc612 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIdentity.java @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 managed cluster. + */ +@Fluent +public final class ManagedClusterIdentity implements JsonSerializable { + /* + * The principal id of the system assigned identity which is used by master components. + */ + private String principalId; + + /* + * The tenant id of the system assigned identity which is used by master components. + */ + private String tenantId; + + /* + * The type of identity used for the managed cluster. For more information see [use managed identities in + * AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). + */ + private ResourceIdentityType type; + + /* + * The delegated identity resources assigned to this managed cluster. This can only be set by another Azure Resource + * Provider, and managed cluster only accept one delegated identity resource. Internal use only. + */ + private Map delegatedResources; + + /* + * The user identity associated with the managed cluster. This identity will be used in control plane. Only one user + * assigned identity is allowed. The keys must be ARM resource IDs in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/ + * userAssignedIdentities/{identityName}'. + */ + private Map userAssignedIdentities; + + /** + * Creates an instance of ManagedClusterIdentity class. + */ + public ManagedClusterIdentity() { + } + + /** + * Get the principalId property: The principal id of the system assigned identity which is used by master + * components. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the tenantId property: The tenant id of the system assigned identity which is used by master components. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the type property: The type of identity used for the managed cluster. For more information see [use managed + * identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). + * + * @return the type value. + */ + public ResourceIdentityType type() { + return this.type; + } + + /** + * Set the type property: The type of identity used for the managed cluster. For more information see [use managed + * identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). + * + * @param type the type value to set. + * @return the ManagedClusterIdentity object itself. + */ + public ManagedClusterIdentity withType(ResourceIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the delegatedResources property: The delegated identity resources assigned to this managed cluster. This can + * only be set by another Azure Resource Provider, and managed cluster only accept one delegated identity resource. + * Internal use only. + * + * @return the delegatedResources value. + */ + public Map delegatedResources() { + return this.delegatedResources; + } + + /** + * Set the delegatedResources property: The delegated identity resources assigned to this managed cluster. This can + * only be set by another Azure Resource Provider, and managed cluster only accept one delegated identity resource. + * Internal use only. + * + * @param delegatedResources the delegatedResources value to set. + * @return the ManagedClusterIdentity object itself. + */ + public ManagedClusterIdentity withDelegatedResources(Map delegatedResources) { + this.delegatedResources = delegatedResources; + return this; + } + + /** + * Get the userAssignedIdentities property: The user identity associated with the managed cluster. This identity + * will be used in control plane. Only one user assigned identity is allowed. The keys must 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 user identity associated with the managed cluster. This identity + * will be used in control plane. Only one user assigned identity is allowed. The keys must 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 ManagedClusterIdentity object itself. + */ + public ManagedClusterIdentity withUserAssignedIdentities( + Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (delegatedResources() != null) { + delegatedResources().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + if (userAssignedIdentities() != null) { + userAssignedIdentities().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeMapField("delegatedResources", this.delegatedResources, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterIdentity 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 ManagedClusterIdentity. + */ + public static ManagedClusterIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterIdentity deserializedManagedClusterIdentity = new ManagedClusterIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedManagedClusterIdentity.principalId = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedManagedClusterIdentity.tenantId = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedClusterIdentity.type = ResourceIdentityType.fromString(reader.getString()); + } else if ("delegatedResources".equals(fieldName)) { + Map delegatedResources + = reader.readMap(reader1 -> DelegatedResource.fromJson(reader1)); + deserializedManagedClusterIdentity.delegatedResources = delegatedResources; + } else if ("userAssignedIdentities".equals(fieldName)) { + Map userAssignedIdentities = reader + .readMap(reader1 -> ManagedServiceIdentityUserAssignedIdentitiesValue.fromJson(reader1)); + deserializedManagedClusterIdentity.userAssignedIdentities = userAssignedIdentities; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterIdentity; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java new file mode 100644 index 000000000000..ce50126d08fe --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Ingress profile for the container service cluster. + */ +@Fluent +public final class ManagedClusterIngressProfile implements JsonSerializable { + /* + * App Routing settings for the ingress profile. You can find an overview and onboarding guide for this feature at + * https://learn.microsoft.com/en-us/azure/aks/app-routing?tabs=default%2Cdeploy-app-default. + */ + private ManagedClusterIngressProfileWebAppRouting webAppRouting; + + /** + * Creates an instance of ManagedClusterIngressProfile class. + */ + public ManagedClusterIngressProfile() { + } + + /** + * Get the webAppRouting property: App Routing settings for the ingress profile. You can find an overview and + * onboarding guide for this feature at + * https://learn.microsoft.com/en-us/azure/aks/app-routing?tabs=default%2Cdeploy-app-default. + * + * @return the webAppRouting value. + */ + public ManagedClusterIngressProfileWebAppRouting webAppRouting() { + return this.webAppRouting; + } + + /** + * Set the webAppRouting property: App Routing settings for the ingress profile. You can find an overview and + * onboarding guide for this feature at + * https://learn.microsoft.com/en-us/azure/aks/app-routing?tabs=default%2Cdeploy-app-default. + * + * @param webAppRouting the webAppRouting value to set. + * @return the ManagedClusterIngressProfile object itself. + */ + public ManagedClusterIngressProfile withWebAppRouting(ManagedClusterIngressProfileWebAppRouting webAppRouting) { + this.webAppRouting = webAppRouting; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (webAppRouting() != null) { + webAppRouting().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("webAppRouting", this.webAppRouting); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterIngressProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterIngressProfile 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 ManagedClusterIngressProfile. + */ + public static ManagedClusterIngressProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterIngressProfile deserializedManagedClusterIngressProfile = new ManagedClusterIngressProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("webAppRouting".equals(fieldName)) { + deserializedManagedClusterIngressProfile.webAppRouting + = ManagedClusterIngressProfileWebAppRouting.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterIngressProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileNginx.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileNginx.java new file mode 100644 index 000000000000..5090b3a2cc80 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileNginx.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Nginx ingress controller configuration for the managed cluster ingress profile. + */ +@Fluent +public final class ManagedClusterIngressProfileNginx implements JsonSerializable { + /* + * Ingress type for the default NginxIngressController custom resource + */ + private NginxIngressControllerType defaultIngressControllerType; + + /** + * Creates an instance of ManagedClusterIngressProfileNginx class. + */ + public ManagedClusterIngressProfileNginx() { + } + + /** + * Get the defaultIngressControllerType property: Ingress type for the default NginxIngressController custom + * resource. + * + * @return the defaultIngressControllerType value. + */ + public NginxIngressControllerType defaultIngressControllerType() { + return this.defaultIngressControllerType; + } + + /** + * Set the defaultIngressControllerType property: Ingress type for the default NginxIngressController custom + * resource. + * + * @param defaultIngressControllerType the defaultIngressControllerType value to set. + * @return the ManagedClusterIngressProfileNginx object itself. + */ + public ManagedClusterIngressProfileNginx + withDefaultIngressControllerType(NginxIngressControllerType defaultIngressControllerType) { + this.defaultIngressControllerType = defaultIngressControllerType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("defaultIngressControllerType", + this.defaultIngressControllerType == null ? null : this.defaultIngressControllerType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterIngressProfileNginx from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterIngressProfileNginx 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 ManagedClusterIngressProfileNginx. + */ + public static ManagedClusterIngressProfileNginx fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterIngressProfileNginx deserializedManagedClusterIngressProfileNginx + = new ManagedClusterIngressProfileNginx(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("defaultIngressControllerType".equals(fieldName)) { + deserializedManagedClusterIngressProfileNginx.defaultIngressControllerType + = NginxIngressControllerType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterIngressProfileNginx; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java new file mode 100644 index 000000000000..7c7ac44b3702 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Application Routing add-on settings for the ingress profile. + */ +@Fluent +public final class ManagedClusterIngressProfileWebAppRouting + implements JsonSerializable { + /* + * Whether to enable the Application Routing add-on. + */ + private Boolean enabled; + + /* + * Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application + * Routing add-on is enabled. Public and private DNS zones can be in different resource groups, but all public DNS + * zones must be in the same resource group and all private DNS zones must be in the same resource group. + */ + private List dnsZoneResourceIds; + + /* + * Configuration for the default NginxIngressController. See more at + * https://learn.microsoft.com/en-us/azure/aks/app-routing-nginx-configuration#the-default-nginx-ingress-controller. + */ + private ManagedClusterIngressProfileNginx nginx; + + /* + * Managed identity of the Application Routing add-on. This is the identity that should be granted permissions, for + * example, to manage the associated Azure DNS resource and get certificates from Azure Key Vault. See [this + * overview of the add-on](https://learn.microsoft.com/en-us/azure/aks/web-app-routing?tabs=with-osm) for more + * instructions. + */ + private UserAssignedIdentity identity; + + /** + * Creates an instance of ManagedClusterIngressProfileWebAppRouting class. + */ + public ManagedClusterIngressProfileWebAppRouting() { + } + + /** + * Get the enabled property: Whether to enable the Application Routing add-on. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable the Application Routing add-on. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterIngressProfileWebAppRouting object itself. + */ + public ManagedClusterIngressProfileWebAppRouting withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the dnsZoneResourceIds property: Resource IDs of the DNS zones to be associated with the Application Routing + * add-on. Used only when Application Routing add-on is enabled. Public and private DNS zones can be in different + * resource groups, but all public DNS zones must be in the same resource group and all private DNS zones must be in + * the same resource group. + * + * @return the dnsZoneResourceIds value. + */ + public List dnsZoneResourceIds() { + return this.dnsZoneResourceIds; + } + + /** + * Set the dnsZoneResourceIds property: Resource IDs of the DNS zones to be associated with the Application Routing + * add-on. Used only when Application Routing add-on is enabled. Public and private DNS zones can be in different + * resource groups, but all public DNS zones must be in the same resource group and all private DNS zones must be in + * the same resource group. + * + * @param dnsZoneResourceIds the dnsZoneResourceIds value to set. + * @return the ManagedClusterIngressProfileWebAppRouting object itself. + */ + public ManagedClusterIngressProfileWebAppRouting withDnsZoneResourceIds(List dnsZoneResourceIds) { + this.dnsZoneResourceIds = dnsZoneResourceIds; + return this; + } + + /** + * Get the nginx property: Configuration for the default NginxIngressController. See more at + * https://learn.microsoft.com/en-us/azure/aks/app-routing-nginx-configuration#the-default-nginx-ingress-controller. + * + * @return the nginx value. + */ + public ManagedClusterIngressProfileNginx nginx() { + return this.nginx; + } + + /** + * Set the nginx property: Configuration for the default NginxIngressController. See more at + * https://learn.microsoft.com/en-us/azure/aks/app-routing-nginx-configuration#the-default-nginx-ingress-controller. + * + * @param nginx the nginx value to set. + * @return the ManagedClusterIngressProfileWebAppRouting object itself. + */ + public ManagedClusterIngressProfileWebAppRouting withNginx(ManagedClusterIngressProfileNginx nginx) { + this.nginx = nginx; + return this; + } + + /** + * Get the identity property: Managed identity of the Application Routing add-on. This is the identity that should + * be granted permissions, for example, to manage the associated Azure DNS resource and get certificates from Azure + * Key Vault. See [this overview of the + * add-on](https://learn.microsoft.com/en-us/azure/aks/web-app-routing?tabs=with-osm) for more instructions. + * + * @return the identity value. + */ + public UserAssignedIdentity identity() { + return this.identity; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (nginx() != null) { + nginx().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeArrayField("dnsZoneResourceIds", this.dnsZoneResourceIds, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("nginx", this.nginx); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterIngressProfileWebAppRouting from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterIngressProfileWebAppRouting 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 ManagedClusterIngressProfileWebAppRouting. + */ + public static ManagedClusterIngressProfileWebAppRouting fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterIngressProfileWebAppRouting deserializedManagedClusterIngressProfileWebAppRouting + = new ManagedClusterIngressProfileWebAppRouting(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterIngressProfileWebAppRouting.enabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("dnsZoneResourceIds".equals(fieldName)) { + List dnsZoneResourceIds = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedClusterIngressProfileWebAppRouting.dnsZoneResourceIds = dnsZoneResourceIds; + } else if ("nginx".equals(fieldName)) { + deserializedManagedClusterIngressProfileWebAppRouting.nginx + = ManagedClusterIngressProfileNginx.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedManagedClusterIngressProfileWebAppRouting.identity + = UserAssignedIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterIngressProfileWebAppRouting; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterListResult.java new file mode 100644 index 000000000000..82860914b688 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterListResult.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ManagedCluster list operation. + */ +@Fluent +public final class ManagedClusterListResult implements JsonSerializable { + /* + * The ManagedCluster items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ManagedClusterListResult class. + */ + public ManagedClusterListResult() { + } + + /** + * Get the value property: The ManagedCluster items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The ManagedCluster items on this page. + * + * @param value the value value to set. + * @return the ManagedClusterListResult object itself. + */ + public ManagedClusterListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the ManagedClusterListResult object itself. + */ + public ManagedClusterListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ManagedClusterListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterListResult 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 ManagedClusterListResult. + */ + public static ManagedClusterListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterListResult deserializedManagedClusterListResult = new ManagedClusterListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagedClusterInner.fromJson(reader1)); + deserializedManagedClusterListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedClusterListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java new file mode 100644 index 000000000000..b01a7427e97b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java @@ -0,0 +1,312 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Profile of the managed cluster load balancer. + */ +@Fluent +public final class ManagedClusterLoadBalancerProfile implements JsonSerializable { + /* + * Desired managed outbound IPs for the cluster load balancer. + */ + private ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIPs; + + /* + * Desired outbound IP Prefix resources for the cluster load balancer. + */ + private ManagedClusterLoadBalancerProfileOutboundIpPrefixes outboundIpPrefixes; + + /* + * Desired outbound IP resources for the cluster load balancer. + */ + private ManagedClusterLoadBalancerProfileOutboundIPs outboundIPs; + + /* + * The effective outbound IP resources of the cluster load balancer. + */ + private List effectiveOutboundIPs; + + /* + * The desired number of allocated SNAT ports per VM. Allowed values are in the range of 0 to 64000 (inclusive). The + * default value is 0 which results in Azure dynamically allocating ports. + */ + private Integer allocatedOutboundPorts; + + /* + * Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The + * default value is 30 minutes. + */ + private Integer idleTimeoutInMinutes; + + /* + * Enable multiple standard load balancers per AKS cluster or not. + */ + private Boolean enableMultipleStandardLoadBalancers; + + /* + * The type of the managed inbound Load Balancer BackendPool. + */ + private BackendPoolType backendPoolType; + + /** + * Creates an instance of ManagedClusterLoadBalancerProfile class. + */ + public ManagedClusterLoadBalancerProfile() { + } + + /** + * Get the managedOutboundIPs property: Desired managed outbound IPs for the cluster load balancer. + * + * @return the managedOutboundIPs value. + */ + public ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIPs() { + return this.managedOutboundIPs; + } + + /** + * Set the managedOutboundIPs property: Desired managed outbound IPs for the cluster load balancer. + * + * @param managedOutboundIPs the managedOutboundIPs value to set. + * @return the ManagedClusterLoadBalancerProfile object itself. + */ + public ManagedClusterLoadBalancerProfile + withManagedOutboundIPs(ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIPs) { + this.managedOutboundIPs = managedOutboundIPs; + return this; + } + + /** + * Get the outboundIpPrefixes property: Desired outbound IP Prefix resources for the cluster load balancer. + * + * @return the outboundIpPrefixes value. + */ + public ManagedClusterLoadBalancerProfileOutboundIpPrefixes outboundIpPrefixes() { + return this.outboundIpPrefixes; + } + + /** + * Set the outboundIpPrefixes property: Desired outbound IP Prefix resources for the cluster load balancer. + * + * @param outboundIpPrefixes the outboundIpPrefixes value to set. + * @return the ManagedClusterLoadBalancerProfile object itself. + */ + public ManagedClusterLoadBalancerProfile + withOutboundIpPrefixes(ManagedClusterLoadBalancerProfileOutboundIpPrefixes outboundIpPrefixes) { + this.outboundIpPrefixes = outboundIpPrefixes; + return this; + } + + /** + * Get the outboundIPs property: Desired outbound IP resources for the cluster load balancer. + * + * @return the outboundIPs value. + */ + public ManagedClusterLoadBalancerProfileOutboundIPs outboundIPs() { + return this.outboundIPs; + } + + /** + * Set the outboundIPs property: Desired outbound IP resources for the cluster load balancer. + * + * @param outboundIPs the outboundIPs value to set. + * @return the ManagedClusterLoadBalancerProfile object itself. + */ + public ManagedClusterLoadBalancerProfile withOutboundIPs(ManagedClusterLoadBalancerProfileOutboundIPs outboundIPs) { + this.outboundIPs = outboundIPs; + return this; + } + + /** + * Get the effectiveOutboundIPs property: The effective outbound IP resources of the cluster load balancer. + * + * @return the effectiveOutboundIPs value. + */ + public List effectiveOutboundIPs() { + return this.effectiveOutboundIPs; + } + + /** + * Get the allocatedOutboundPorts property: The desired number of allocated SNAT ports per VM. Allowed values are in + * the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports. + * + * @return the allocatedOutboundPorts value. + */ + public Integer allocatedOutboundPorts() { + return this.allocatedOutboundPorts; + } + + /** + * Set the allocatedOutboundPorts property: The desired number of allocated SNAT ports per VM. Allowed values are in + * the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports. + * + * @param allocatedOutboundPorts the allocatedOutboundPorts value to set. + * @return the ManagedClusterLoadBalancerProfile object itself. + */ + public ManagedClusterLoadBalancerProfile withAllocatedOutboundPorts(Integer allocatedOutboundPorts) { + this.allocatedOutboundPorts = allocatedOutboundPorts; + return this; + } + + /** + * Get the idleTimeoutInMinutes property: Desired outbound flow idle timeout in minutes. Allowed values are in the + * range of 4 to 120 (inclusive). The default value is 30 minutes. + * + * @return the idleTimeoutInMinutes value. + */ + public Integer idleTimeoutInMinutes() { + return this.idleTimeoutInMinutes; + } + + /** + * Set the idleTimeoutInMinutes property: Desired outbound flow idle timeout in minutes. Allowed values are in the + * range of 4 to 120 (inclusive). The default value is 30 minutes. + * + * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set. + * @return the ManagedClusterLoadBalancerProfile object itself. + */ + public ManagedClusterLoadBalancerProfile withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes) { + this.idleTimeoutInMinutes = idleTimeoutInMinutes; + return this; + } + + /** + * Get the enableMultipleStandardLoadBalancers property: Enable multiple standard load balancers per AKS cluster or + * not. + * + * @return the enableMultipleStandardLoadBalancers value. + */ + public Boolean enableMultipleStandardLoadBalancers() { + return this.enableMultipleStandardLoadBalancers; + } + + /** + * Set the enableMultipleStandardLoadBalancers property: Enable multiple standard load balancers per AKS cluster or + * not. + * + * @param enableMultipleStandardLoadBalancers the enableMultipleStandardLoadBalancers value to set. + * @return the ManagedClusterLoadBalancerProfile object itself. + */ + public ManagedClusterLoadBalancerProfile + withEnableMultipleStandardLoadBalancers(Boolean enableMultipleStandardLoadBalancers) { + this.enableMultipleStandardLoadBalancers = enableMultipleStandardLoadBalancers; + return this; + } + + /** + * Get the backendPoolType property: The type of the managed inbound Load Balancer BackendPool. + * + * @return the backendPoolType value. + */ + public BackendPoolType backendPoolType() { + return this.backendPoolType; + } + + /** + * Set the backendPoolType property: The type of the managed inbound Load Balancer BackendPool. + * + * @param backendPoolType the backendPoolType value to set. + * @return the ManagedClusterLoadBalancerProfile object itself. + */ + public ManagedClusterLoadBalancerProfile withBackendPoolType(BackendPoolType backendPoolType) { + this.backendPoolType = backendPoolType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (managedOutboundIPs() != null) { + managedOutboundIPs().validate(); + } + if (outboundIpPrefixes() != null) { + outboundIpPrefixes().validate(); + } + if (outboundIPs() != null) { + outboundIPs().validate(); + } + if (effectiveOutboundIPs() != null) { + effectiveOutboundIPs().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("managedOutboundIPs", this.managedOutboundIPs); + jsonWriter.writeJsonField("outboundIPPrefixes", this.outboundIpPrefixes); + jsonWriter.writeJsonField("outboundIPs", this.outboundIPs); + jsonWriter.writeNumberField("allocatedOutboundPorts", this.allocatedOutboundPorts); + jsonWriter.writeNumberField("idleTimeoutInMinutes", this.idleTimeoutInMinutes); + jsonWriter.writeBooleanField("enableMultipleStandardLoadBalancers", this.enableMultipleStandardLoadBalancers); + jsonWriter.writeStringField("backendPoolType", + this.backendPoolType == null ? null : this.backendPoolType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterLoadBalancerProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterLoadBalancerProfile 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 ManagedClusterLoadBalancerProfile. + */ + public static ManagedClusterLoadBalancerProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterLoadBalancerProfile deserializedManagedClusterLoadBalancerProfile + = new ManagedClusterLoadBalancerProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("managedOutboundIPs".equals(fieldName)) { + deserializedManagedClusterLoadBalancerProfile.managedOutboundIPs + = ManagedClusterLoadBalancerProfileManagedOutboundIPs.fromJson(reader); + } else if ("outboundIPPrefixes".equals(fieldName)) { + deserializedManagedClusterLoadBalancerProfile.outboundIpPrefixes + = ManagedClusterLoadBalancerProfileOutboundIpPrefixes.fromJson(reader); + } else if ("outboundIPs".equals(fieldName)) { + deserializedManagedClusterLoadBalancerProfile.outboundIPs + = ManagedClusterLoadBalancerProfileOutboundIPs.fromJson(reader); + } else if ("effectiveOutboundIPs".equals(fieldName)) { + List effectiveOutboundIPs + = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); + deserializedManagedClusterLoadBalancerProfile.effectiveOutboundIPs = effectiveOutboundIPs; + } else if ("allocatedOutboundPorts".equals(fieldName)) { + deserializedManagedClusterLoadBalancerProfile.allocatedOutboundPorts + = reader.getNullable(JsonReader::getInt); + } else if ("idleTimeoutInMinutes".equals(fieldName)) { + deserializedManagedClusterLoadBalancerProfile.idleTimeoutInMinutes + = reader.getNullable(JsonReader::getInt); + } else if ("enableMultipleStandardLoadBalancers".equals(fieldName)) { + deserializedManagedClusterLoadBalancerProfile.enableMultipleStandardLoadBalancers + = reader.getNullable(JsonReader::getBoolean); + } else if ("backendPoolType".equals(fieldName)) { + deserializedManagedClusterLoadBalancerProfile.backendPoolType + = BackendPoolType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterLoadBalancerProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java new file mode 100644 index 000000000000..6b059301fd54 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Desired managed outbound IPs for the cluster load balancer. + */ +@Fluent +public final class ManagedClusterLoadBalancerProfileManagedOutboundIPs + implements JsonSerializable { + /* + * The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values + * must be in the range of 1 to 100 (inclusive). The default value is 1. + */ + private Integer count; + + /* + * The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values + * must be in the range of 1 to 100 (inclusive). The default value is 0 for single-stack and 1 for dual-stack. + */ + private Integer countIPv6; + + /** + * Creates an instance of ManagedClusterLoadBalancerProfileManagedOutboundIPs class. + */ + public ManagedClusterLoadBalancerProfileManagedOutboundIPs() { + } + + /** + * Get the count property: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load + * balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. + * + * @return the count value. + */ + public Integer count() { + return this.count; + } + + /** + * Set the count property: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load + * balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. + * + * @param count the count value to set. + * @return the ManagedClusterLoadBalancerProfileManagedOutboundIPs object itself. + */ + public ManagedClusterLoadBalancerProfileManagedOutboundIPs withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get the countIPv6 property: The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load + * balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 0 for single-stack + * and 1 for dual-stack. + * + * @return the countIPv6 value. + */ + public Integer countIPv6() { + return this.countIPv6; + } + + /** + * Set the countIPv6 property: The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load + * balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 0 for single-stack + * and 1 for dual-stack. + * + * @param countIPv6 the countIPv6 value to set. + * @return the ManagedClusterLoadBalancerProfileManagedOutboundIPs object itself. + */ + public ManagedClusterLoadBalancerProfileManagedOutboundIPs withCountIPv6(Integer countIPv6) { + this.countIPv6 = countIPv6; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeNumberField("countIPv6", this.countIPv6); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterLoadBalancerProfileManagedOutboundIPs from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterLoadBalancerProfileManagedOutboundIPs 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 ManagedClusterLoadBalancerProfileManagedOutboundIPs. + */ + public static ManagedClusterLoadBalancerProfileManagedOutboundIPs fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterLoadBalancerProfileManagedOutboundIPs deserializedManagedClusterLoadBalancerProfileManagedOutboundIPs + = new ManagedClusterLoadBalancerProfileManagedOutboundIPs(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("count".equals(fieldName)) { + deserializedManagedClusterLoadBalancerProfileManagedOutboundIPs.count + = reader.getNullable(JsonReader::getInt); + } else if ("countIPv6".equals(fieldName)) { + deserializedManagedClusterLoadBalancerProfileManagedOutboundIPs.countIPv6 + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterLoadBalancerProfileManagedOutboundIPs; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIPs.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIPs.java new file mode 100644 index 000000000000..dad12a301e4e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIPs.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Desired outbound IP resources for the cluster load balancer. + */ +@Fluent +public final class ManagedClusterLoadBalancerProfileOutboundIPs + implements JsonSerializable { + /* + * A list of public IP resources. + */ + private List publicIPs; + + /** + * Creates an instance of ManagedClusterLoadBalancerProfileOutboundIPs class. + */ + public ManagedClusterLoadBalancerProfileOutboundIPs() { + } + + /** + * Get the publicIPs property: A list of public IP resources. + * + * @return the publicIPs value. + */ + public List publicIPs() { + return this.publicIPs; + } + + /** + * Set the publicIPs property: A list of public IP resources. + * + * @param publicIPs the publicIPs value to set. + * @return the ManagedClusterLoadBalancerProfileOutboundIPs object itself. + */ + public ManagedClusterLoadBalancerProfileOutboundIPs withPublicIPs(List publicIPs) { + this.publicIPs = publicIPs; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (publicIPs() != null) { + publicIPs().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("publicIPs", this.publicIPs, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterLoadBalancerProfileOutboundIPs from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterLoadBalancerProfileOutboundIPs 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 ManagedClusterLoadBalancerProfileOutboundIPs. + */ + public static ManagedClusterLoadBalancerProfileOutboundIPs fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterLoadBalancerProfileOutboundIPs deserializedManagedClusterLoadBalancerProfileOutboundIPs + = new ManagedClusterLoadBalancerProfileOutboundIPs(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("publicIPs".equals(fieldName)) { + List publicIPs + = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); + deserializedManagedClusterLoadBalancerProfileOutboundIPs.publicIPs = publicIPs; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterLoadBalancerProfileOutboundIPs; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java new file mode 100644 index 000000000000..f28ebf921629 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Desired outbound IP Prefix resources for the cluster load balancer. + */ +@Fluent +public final class ManagedClusterLoadBalancerProfileOutboundIpPrefixes + implements JsonSerializable { + /* + * A list of public IP prefix resources. + */ + private List publicIpPrefixes; + + /** + * Creates an instance of ManagedClusterLoadBalancerProfileOutboundIpPrefixes class. + */ + public ManagedClusterLoadBalancerProfileOutboundIpPrefixes() { + } + + /** + * Get the publicIpPrefixes property: A list of public IP prefix resources. + * + * @return the publicIpPrefixes value. + */ + public List publicIpPrefixes() { + return this.publicIpPrefixes; + } + + /** + * Set the publicIpPrefixes property: A list of public IP prefix resources. + * + * @param publicIpPrefixes the publicIpPrefixes value to set. + * @return the ManagedClusterLoadBalancerProfileOutboundIpPrefixes object itself. + */ + public ManagedClusterLoadBalancerProfileOutboundIpPrefixes + withPublicIpPrefixes(List publicIpPrefixes) { + this.publicIpPrefixes = publicIpPrefixes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (publicIpPrefixes() != null) { + publicIpPrefixes().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("publicIPPrefixes", this.publicIpPrefixes, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterLoadBalancerProfileOutboundIpPrefixes from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterLoadBalancerProfileOutboundIpPrefixes 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 ManagedClusterLoadBalancerProfileOutboundIpPrefixes. + */ + public static ManagedClusterLoadBalancerProfileOutboundIpPrefixes fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterLoadBalancerProfileOutboundIpPrefixes deserializedManagedClusterLoadBalancerProfileOutboundIpPrefixes + = new ManagedClusterLoadBalancerProfileOutboundIpPrefixes(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("publicIPPrefixes".equals(fieldName)) { + List publicIpPrefixes + = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); + deserializedManagedClusterLoadBalancerProfileOutboundIpPrefixes.publicIpPrefixes = publicIpPrefixes; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterLoadBalancerProfileOutboundIpPrefixes; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterManagedOutboundIpProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterManagedOutboundIpProfile.java new file mode 100644 index 000000000000..916a45258c47 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterManagedOutboundIpProfile.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 of the managed outbound IP resources of the managed cluster. + */ +@Fluent +public final class ManagedClusterManagedOutboundIpProfile + implements JsonSerializable { + /* + * The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 + * (inclusive). The default value is 1. + */ + private Integer count; + + /** + * Creates an instance of ManagedClusterManagedOutboundIpProfile class. + */ + public ManagedClusterManagedOutboundIpProfile() { + } + + /** + * Get the count property: The desired number of outbound IPs created/managed by Azure. Allowed values must be in + * the range of 1 to 16 (inclusive). The default value is 1. + * + * @return the count value. + */ + public Integer count() { + return this.count; + } + + /** + * Set the count property: The desired number of outbound IPs created/managed by Azure. Allowed values must be in + * the range of 1 to 16 (inclusive). The default value is 1. + * + * @param count the count value to set. + * @return the ManagedClusterManagedOutboundIpProfile object itself. + */ + public ManagedClusterManagedOutboundIpProfile withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("count", this.count); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterManagedOutboundIpProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterManagedOutboundIpProfile 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 ManagedClusterManagedOutboundIpProfile. + */ + public static ManagedClusterManagedOutboundIpProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterManagedOutboundIpProfile deserializedManagedClusterManagedOutboundIpProfile + = new ManagedClusterManagedOutboundIpProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("count".equals(fieldName)) { + deserializedManagedClusterManagedOutboundIpProfile.count = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterManagedOutboundIpProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterMetricsProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterMetricsProfile.java new file mode 100644 index 000000000000..dd2199d93948 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterMetricsProfile.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 metrics profile for the ManagedCluster. + */ +@Fluent +public final class ManagedClusterMetricsProfile implements JsonSerializable { + /* + * The configuration for detailed per-Kubernetes resource cost analysis. + */ + private ManagedClusterCostAnalysis costAnalysis; + + /** + * Creates an instance of ManagedClusterMetricsProfile class. + */ + public ManagedClusterMetricsProfile() { + } + + /** + * Get the costAnalysis property: The configuration for detailed per-Kubernetes resource cost analysis. + * + * @return the costAnalysis value. + */ + public ManagedClusterCostAnalysis costAnalysis() { + return this.costAnalysis; + } + + /** + * Set the costAnalysis property: The configuration for detailed per-Kubernetes resource cost analysis. + * + * @param costAnalysis the costAnalysis value to set. + * @return the ManagedClusterMetricsProfile object itself. + */ + public ManagedClusterMetricsProfile withCostAnalysis(ManagedClusterCostAnalysis costAnalysis) { + this.costAnalysis = costAnalysis; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (costAnalysis() != null) { + costAnalysis().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("costAnalysis", this.costAnalysis); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterMetricsProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterMetricsProfile 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 ManagedClusterMetricsProfile. + */ + public static ManagedClusterMetricsProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterMetricsProfile deserializedManagedClusterMetricsProfile = new ManagedClusterMetricsProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("costAnalysis".equals(fieldName)) { + deserializedManagedClusterMetricsProfile.costAnalysis = ManagedClusterCostAnalysis.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterMetricsProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNatGatewayProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNatGatewayProfile.java new file mode 100644 index 000000000000..3a466a995ba3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNatGatewayProfile.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Profile of the managed cluster NAT gateway. + */ +@Fluent +public final class ManagedClusterNatGatewayProfile implements JsonSerializable { + /* + * Profile of the managed outbound IP resources of the cluster NAT gateway. + */ + private ManagedClusterManagedOutboundIpProfile managedOutboundIpProfile; + + /* + * The effective outbound IP resources of the cluster NAT gateway. + */ + private List effectiveOutboundIPs; + + /* + * Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The + * default value is 4 minutes. + */ + private Integer idleTimeoutInMinutes; + + /** + * Creates an instance of ManagedClusterNatGatewayProfile class. + */ + public ManagedClusterNatGatewayProfile() { + } + + /** + * Get the managedOutboundIpProfile property: Profile of the managed outbound IP resources of the cluster NAT + * gateway. + * + * @return the managedOutboundIpProfile value. + */ + public ManagedClusterManagedOutboundIpProfile managedOutboundIpProfile() { + return this.managedOutboundIpProfile; + } + + /** + * Set the managedOutboundIpProfile property: Profile of the managed outbound IP resources of the cluster NAT + * gateway. + * + * @param managedOutboundIpProfile the managedOutboundIpProfile value to set. + * @return the ManagedClusterNatGatewayProfile object itself. + */ + public ManagedClusterNatGatewayProfile + withManagedOutboundIpProfile(ManagedClusterManagedOutboundIpProfile managedOutboundIpProfile) { + this.managedOutboundIpProfile = managedOutboundIpProfile; + return this; + } + + /** + * Get the effectiveOutboundIPs property: The effective outbound IP resources of the cluster NAT gateway. + * + * @return the effectiveOutboundIPs value. + */ + public List effectiveOutboundIPs() { + return this.effectiveOutboundIPs; + } + + /** + * Get the idleTimeoutInMinutes property: Desired outbound flow idle timeout in minutes. Allowed values are in the + * range of 4 to 120 (inclusive). The default value is 4 minutes. + * + * @return the idleTimeoutInMinutes value. + */ + public Integer idleTimeoutInMinutes() { + return this.idleTimeoutInMinutes; + } + + /** + * Set the idleTimeoutInMinutes property: Desired outbound flow idle timeout in minutes. Allowed values are in the + * range of 4 to 120 (inclusive). The default value is 4 minutes. + * + * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set. + * @return the ManagedClusterNatGatewayProfile object itself. + */ + public ManagedClusterNatGatewayProfile withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes) { + this.idleTimeoutInMinutes = idleTimeoutInMinutes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (managedOutboundIpProfile() != null) { + managedOutboundIpProfile().validate(); + } + if (effectiveOutboundIPs() != null) { + effectiveOutboundIPs().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("managedOutboundIPProfile", this.managedOutboundIpProfile); + jsonWriter.writeNumberField("idleTimeoutInMinutes", this.idleTimeoutInMinutes); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterNatGatewayProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterNatGatewayProfile 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 ManagedClusterNatGatewayProfile. + */ + public static ManagedClusterNatGatewayProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterNatGatewayProfile deserializedManagedClusterNatGatewayProfile + = new ManagedClusterNatGatewayProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("managedOutboundIPProfile".equals(fieldName)) { + deserializedManagedClusterNatGatewayProfile.managedOutboundIpProfile + = ManagedClusterManagedOutboundIpProfile.fromJson(reader); + } else if ("effectiveOutboundIPs".equals(fieldName)) { + List effectiveOutboundIPs + = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); + deserializedManagedClusterNatGatewayProfile.effectiveOutboundIPs = effectiveOutboundIPs; + } else if ("idleTimeoutInMinutes".equals(fieldName)) { + deserializedManagedClusterNatGatewayProfile.idleTimeoutInMinutes + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterNatGatewayProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeProvisioningProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeProvisioningProfile.java new file mode 100644 index 000000000000..517674eb18a4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeProvisioningProfile.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Node provisioning profile for the managed cluster. + */ +@Fluent +public final class ManagedClusterNodeProvisioningProfile + implements JsonSerializable { + /* + * The node provisioning mode. If not specified, the default is Manual. + */ + private NodeProvisioningMode mode; + + /* + * The set of default Karpenter NodePools (CRDs) configured for node provisioning. This field has no effect unless + * mode is 'Auto'. Warning: Changing this from Auto to None on an existing cluster will cause the default Karpenter + * NodePools to be deleted, which will drain and delete the nodes associated with those pools. It is strongly + * recommended to not do this unless there are idle nodes ready to take the pods evicted by that action. If not + * specified, the default is Auto. For more information see aka.ms/aks/nap#node-pools. + */ + private NodeProvisioningDefaultNodePools defaultNodePools; + + /** + * Creates an instance of ManagedClusterNodeProvisioningProfile class. + */ + public ManagedClusterNodeProvisioningProfile() { + } + + /** + * Get the mode property: The node provisioning mode. If not specified, the default is Manual. + * + * @return the mode value. + */ + public NodeProvisioningMode mode() { + return this.mode; + } + + /** + * Set the mode property: The node provisioning mode. If not specified, the default is Manual. + * + * @param mode the mode value to set. + * @return the ManagedClusterNodeProvisioningProfile object itself. + */ + public ManagedClusterNodeProvisioningProfile withMode(NodeProvisioningMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the defaultNodePools property: The set of default Karpenter NodePools (CRDs) configured for node + * provisioning. This field has no effect unless mode is 'Auto'. Warning: Changing this from Auto to None on an + * existing cluster will cause the default Karpenter NodePools to be deleted, which will drain and delete the nodes + * associated with those pools. It is strongly recommended to not do this unless there are idle nodes ready to take + * the pods evicted by that action. If not specified, the default is Auto. For more information see + * aka.ms/aks/nap#node-pools. + * + * @return the defaultNodePools value. + */ + public NodeProvisioningDefaultNodePools defaultNodePools() { + return this.defaultNodePools; + } + + /** + * Set the defaultNodePools property: The set of default Karpenter NodePools (CRDs) configured for node + * provisioning. This field has no effect unless mode is 'Auto'. Warning: Changing this from Auto to None on an + * existing cluster will cause the default Karpenter NodePools to be deleted, which will drain and delete the nodes + * associated with those pools. It is strongly recommended to not do this unless there are idle nodes ready to take + * the pods evicted by that action. If not specified, the default is Auto. For more information see + * aka.ms/aks/nap#node-pools. + * + * @param defaultNodePools the defaultNodePools value to set. + * @return the ManagedClusterNodeProvisioningProfile object itself. + */ + public ManagedClusterNodeProvisioningProfile + withDefaultNodePools(NodeProvisioningDefaultNodePools defaultNodePools) { + this.defaultNodePools = defaultNodePools; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeStringField("defaultNodePools", + this.defaultNodePools == null ? null : this.defaultNodePools.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterNodeProvisioningProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterNodeProvisioningProfile 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 ManagedClusterNodeProvisioningProfile. + */ + public static ManagedClusterNodeProvisioningProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterNodeProvisioningProfile deserializedManagedClusterNodeProvisioningProfile + = new ManagedClusterNodeProvisioningProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mode".equals(fieldName)) { + deserializedManagedClusterNodeProvisioningProfile.mode + = NodeProvisioningMode.fromString(reader.getString()); + } else if ("defaultNodePools".equals(fieldName)) { + deserializedManagedClusterNodeProvisioningProfile.defaultNodePools + = NodeProvisioningDefaultNodePools.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterNodeProvisioningProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java new file mode 100644 index 000000000000..e3485eccdee3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Node resource group lockdown profile for a managed cluster. + */ +@Fluent +public final class ManagedClusterNodeResourceGroupProfile + implements JsonSerializable { + /* + * The restriction level applied to the cluster's node resource group. If not specified, the default is + * 'Unrestricted' + */ + private RestrictionLevel restrictionLevel; + + /** + * Creates an instance of ManagedClusterNodeResourceGroupProfile class. + */ + public ManagedClusterNodeResourceGroupProfile() { + } + + /** + * Get the restrictionLevel property: The restriction level applied to the cluster's node resource group. If not + * specified, the default is 'Unrestricted'. + * + * @return the restrictionLevel value. + */ + public RestrictionLevel restrictionLevel() { + return this.restrictionLevel; + } + + /** + * Set the restrictionLevel property: The restriction level applied to the cluster's node resource group. If not + * specified, the default is 'Unrestricted'. + * + * @param restrictionLevel the restrictionLevel value to set. + * @return the ManagedClusterNodeResourceGroupProfile object itself. + */ + public ManagedClusterNodeResourceGroupProfile withRestrictionLevel(RestrictionLevel restrictionLevel) { + this.restrictionLevel = restrictionLevel; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("restrictionLevel", + this.restrictionLevel == null ? null : this.restrictionLevel.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterNodeResourceGroupProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterNodeResourceGroupProfile 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 ManagedClusterNodeResourceGroupProfile. + */ + public static ManagedClusterNodeResourceGroupProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterNodeResourceGroupProfile deserializedManagedClusterNodeResourceGroupProfile + = new ManagedClusterNodeResourceGroupProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("restrictionLevel".equals(fieldName)) { + deserializedManagedClusterNodeResourceGroupProfile.restrictionLevel + = RestrictionLevel.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterNodeResourceGroupProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterOidcIssuerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterOidcIssuerProfile.java new file mode 100644 index 000000000000..b8b9da10b000 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterOidcIssuerProfile.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 OIDC issuer profile of the Managed Cluster. + */ +@Fluent +public final class ManagedClusterOidcIssuerProfile implements JsonSerializable { + /* + * The OIDC issuer url of the Managed Cluster. + */ + private String issuerUrl; + + /* + * Whether the OIDC issuer is enabled. + */ + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterOidcIssuerProfile class. + */ + public ManagedClusterOidcIssuerProfile() { + } + + /** + * Get the issuerUrl property: The OIDC issuer url of the Managed Cluster. + * + * @return the issuerUrl value. + */ + public String issuerUrl() { + return this.issuerUrl; + } + + /** + * Get the enabled property: Whether the OIDC issuer is enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether the OIDC issuer is enabled. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterOidcIssuerProfile object itself. + */ + public ManagedClusterOidcIssuerProfile withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterOidcIssuerProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterOidcIssuerProfile 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 ManagedClusterOidcIssuerProfile. + */ + public static ManagedClusterOidcIssuerProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterOidcIssuerProfile deserializedManagedClusterOidcIssuerProfile + = new ManagedClusterOidcIssuerProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("issuerURL".equals(fieldName)) { + deserializedManagedClusterOidcIssuerProfile.issuerUrl = reader.getString(); + } else if ("enabled".equals(fieldName)) { + deserializedManagedClusterOidcIssuerProfile.enabled = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterOidcIssuerProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentity.java new file mode 100644 index 000000000000..5c44d97dcc1f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentity.java @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Details about the pod identity assigned to the Managed Cluster. + */ +@Fluent +public final class ManagedClusterPodIdentity implements JsonSerializable { + /* + * The name of the pod identity. + */ + private String name; + + /* + * The namespace of the pod identity. + */ + private String namespace; + + /* + * The binding selector to use for the AzureIdentityBinding resource. + */ + private String bindingSelector; + + /* + * The user assigned identity details. + */ + private UserAssignedIdentity identity; + + /* + * The current provisioning state of the pod identity. + */ + private ManagedClusterPodIdentityProvisioningState provisioningState; + + /* + * The provisioning information for the pod identity. + */ + private ManagedClusterPodIdentityProvisioningInfo provisioningInfo; + + /** + * Creates an instance of ManagedClusterPodIdentity class. + */ + public ManagedClusterPodIdentity() { + } + + /** + * Get the name property: The name of the pod identity. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the pod identity. + * + * @param name the name value to set. + * @return the ManagedClusterPodIdentity object itself. + */ + public ManagedClusterPodIdentity withName(String name) { + this.name = name; + return this; + } + + /** + * Get the namespace property: The namespace of the pod identity. + * + * @return the namespace value. + */ + public String namespace() { + return this.namespace; + } + + /** + * Set the namespace property: The namespace of the pod identity. + * + * @param namespace the namespace value to set. + * @return the ManagedClusterPodIdentity object itself. + */ + public ManagedClusterPodIdentity withNamespace(String namespace) { + this.namespace = namespace; + return this; + } + + /** + * Get the bindingSelector property: The binding selector to use for the AzureIdentityBinding resource. + * + * @return the bindingSelector value. + */ + public String bindingSelector() { + return this.bindingSelector; + } + + /** + * Set the bindingSelector property: The binding selector to use for the AzureIdentityBinding resource. + * + * @param bindingSelector the bindingSelector value to set. + * @return the ManagedClusterPodIdentity object itself. + */ + public ManagedClusterPodIdentity withBindingSelector(String bindingSelector) { + this.bindingSelector = bindingSelector; + return this; + } + + /** + * Get the identity property: The user assigned identity details. + * + * @return the identity value. + */ + public UserAssignedIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The user assigned identity details. + * + * @param identity the identity value to set. + * @return the ManagedClusterPodIdentity object itself. + */ + public ManagedClusterPodIdentity withIdentity(UserAssignedIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the provisioningState property: The current provisioning state of the pod identity. + * + * @return the provisioningState value. + */ + public ManagedClusterPodIdentityProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the provisioningInfo property: The provisioning information for the pod identity. + * + * @return the provisioningInfo value. + */ + public ManagedClusterPodIdentityProvisioningInfo provisioningInfo() { + return this.provisioningInfo; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model ManagedClusterPodIdentity")); + } + if (namespace() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property namespace in model ManagedClusterPodIdentity")); + } + if (identity() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property identity in model ManagedClusterPodIdentity")); + } else { + identity().validate(); + } + if (provisioningInfo() != null) { + provisioningInfo().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterPodIdentity.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("namespace", this.namespace); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("bindingSelector", this.bindingSelector); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterPodIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterPodIdentity 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 ManagedClusterPodIdentity. + */ + public static ManagedClusterPodIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterPodIdentity deserializedManagedClusterPodIdentity = new ManagedClusterPodIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedManagedClusterPodIdentity.name = reader.getString(); + } else if ("namespace".equals(fieldName)) { + deserializedManagedClusterPodIdentity.namespace = reader.getString(); + } else if ("identity".equals(fieldName)) { + deserializedManagedClusterPodIdentity.identity = UserAssignedIdentity.fromJson(reader); + } else if ("bindingSelector".equals(fieldName)) { + deserializedManagedClusterPodIdentity.bindingSelector = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedManagedClusterPodIdentity.provisioningState + = ManagedClusterPodIdentityProvisioningState.fromString(reader.getString()); + } else if ("provisioningInfo".equals(fieldName)) { + deserializedManagedClusterPodIdentity.provisioningInfo + = ManagedClusterPodIdentityProvisioningInfo.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterPodIdentity; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityException.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityException.java new file mode 100644 index 000000000000..100cdff0b894 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityException.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +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; + +/** + * A pod identity exception, which allows pods with certain labels to access the Azure Instance Metadata Service (IMDS) + * endpoint without being intercepted by the node-managed identity (NMI) server. See [disable AAD Pod Identity for a + * specific Pod/Application](https://azure.github.io/aad-pod-identity/docs/configure/application_exception/) for more + * details. + */ +@Fluent +public final class ManagedClusterPodIdentityException implements JsonSerializable { + /* + * The name of the pod identity exception. + */ + private String name; + + /* + * The namespace of the pod identity exception. + */ + private String namespace; + + /* + * The pod labels to match. + */ + private Map podLabels; + + /** + * Creates an instance of ManagedClusterPodIdentityException class. + */ + public ManagedClusterPodIdentityException() { + } + + /** + * Get the name property: The name of the pod identity exception. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the pod identity exception. + * + * @param name the name value to set. + * @return the ManagedClusterPodIdentityException object itself. + */ + public ManagedClusterPodIdentityException withName(String name) { + this.name = name; + return this; + } + + /** + * Get the namespace property: The namespace of the pod identity exception. + * + * @return the namespace value. + */ + public String namespace() { + return this.namespace; + } + + /** + * Set the namespace property: The namespace of the pod identity exception. + * + * @param namespace the namespace value to set. + * @return the ManagedClusterPodIdentityException object itself. + */ + public ManagedClusterPodIdentityException withNamespace(String namespace) { + this.namespace = namespace; + return this; + } + + /** + * Get the podLabels property: The pod labels to match. + * + * @return the podLabels value. + */ + public Map podLabels() { + return this.podLabels; + } + + /** + * Set the podLabels property: The pod labels to match. + * + * @param podLabels the podLabels value to set. + * @return the ManagedClusterPodIdentityException object itself. + */ + public ManagedClusterPodIdentityException withPodLabels(Map podLabels) { + this.podLabels = podLabels; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property name in model ManagedClusterPodIdentityException")); + } + if (namespace() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property namespace in model ManagedClusterPodIdentityException")); + } + if (podLabels() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property podLabels in model ManagedClusterPodIdentityException")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterPodIdentityException.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("namespace", this.namespace); + jsonWriter.writeMapField("podLabels", this.podLabels, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterPodIdentityException from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterPodIdentityException 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 ManagedClusterPodIdentityException. + */ + public static ManagedClusterPodIdentityException fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterPodIdentityException deserializedManagedClusterPodIdentityException + = new ManagedClusterPodIdentityException(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedManagedClusterPodIdentityException.name = reader.getString(); + } else if ("namespace".equals(fieldName)) { + deserializedManagedClusterPodIdentityException.namespace = reader.getString(); + } else if ("podLabels".equals(fieldName)) { + Map podLabels = reader.readMap(reader1 -> reader1.getString()); + deserializedManagedClusterPodIdentityException.podLabels = podLabels; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterPodIdentityException; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProfile.java new file mode 100644 index 000000000000..0a7c6c40a30f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProfile.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 pod identity profile of the Managed Cluster. See [use AAD pod + * identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on pod identity + * integration. + */ +@Fluent +public final class ManagedClusterPodIdentityProfile implements JsonSerializable { + /* + * Whether the pod identity addon is enabled. + */ + private Boolean enabled; + + /* + * Whether pod identity is allowed to run on clusters with Kubenet networking. Running in Kubenet is disabled by + * default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. See [using Kubenet + * network plugin with AAD Pod + * Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure- + * active-directory-pod-managed-identities) for more information. + */ + private Boolean allowNetworkPluginKubenet; + + /* + * The pod identities to use in the cluster. + */ + private List userAssignedIdentities; + + /* + * The pod identity exceptions to allow. + */ + private List userAssignedIdentityExceptions; + + /** + * Creates an instance of ManagedClusterPodIdentityProfile class. + */ + public ManagedClusterPodIdentityProfile() { + } + + /** + * Get the enabled property: Whether the pod identity addon is enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether the pod identity addon is enabled. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterPodIdentityProfile object itself. + */ + public ManagedClusterPodIdentityProfile withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the allowNetworkPluginKubenet property: Whether pod identity is allowed to run on clusters with Kubenet + * networking. Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and + * the risks of IP spoofing. See [using Kubenet network plugin with AAD Pod + * Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) + * for more information. + * + * @return the allowNetworkPluginKubenet value. + */ + public Boolean allowNetworkPluginKubenet() { + return this.allowNetworkPluginKubenet; + } + + /** + * Set the allowNetworkPluginKubenet property: Whether pod identity is allowed to run on clusters with Kubenet + * networking. Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and + * the risks of IP spoofing. See [using Kubenet network plugin with AAD Pod + * Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) + * for more information. + * + * @param allowNetworkPluginKubenet the allowNetworkPluginKubenet value to set. + * @return the ManagedClusterPodIdentityProfile object itself. + */ + public ManagedClusterPodIdentityProfile withAllowNetworkPluginKubenet(Boolean allowNetworkPluginKubenet) { + this.allowNetworkPluginKubenet = allowNetworkPluginKubenet; + return this; + } + + /** + * Get the userAssignedIdentities property: The pod identities to use in the cluster. + * + * @return the userAssignedIdentities value. + */ + public List userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: The pod identities to use in the cluster. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the ManagedClusterPodIdentityProfile object itself. + */ + public ManagedClusterPodIdentityProfile + withUserAssignedIdentities(List userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + + /** + * Get the userAssignedIdentityExceptions property: The pod identity exceptions to allow. + * + * @return the userAssignedIdentityExceptions value. + */ + public List userAssignedIdentityExceptions() { + return this.userAssignedIdentityExceptions; + } + + /** + * Set the userAssignedIdentityExceptions property: The pod identity exceptions to allow. + * + * @param userAssignedIdentityExceptions the userAssignedIdentityExceptions value to set. + * @return the ManagedClusterPodIdentityProfile object itself. + */ + public ManagedClusterPodIdentityProfile + withUserAssignedIdentityExceptions(List userAssignedIdentityExceptions) { + this.userAssignedIdentityExceptions = userAssignedIdentityExceptions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (userAssignedIdentities() != null) { + userAssignedIdentities().forEach(e -> e.validate()); + } + if (userAssignedIdentityExceptions() != null) { + userAssignedIdentityExceptions().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeBooleanField("allowNetworkPluginKubenet", this.allowNetworkPluginKubenet); + jsonWriter.writeArrayField("userAssignedIdentities", this.userAssignedIdentities, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("userAssignedIdentityExceptions", this.userAssignedIdentityExceptions, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterPodIdentityProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterPodIdentityProfile 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 ManagedClusterPodIdentityProfile. + */ + public static ManagedClusterPodIdentityProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterPodIdentityProfile deserializedManagedClusterPodIdentityProfile + = new ManagedClusterPodIdentityProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterPodIdentityProfile.enabled = reader.getNullable(JsonReader::getBoolean); + } else if ("allowNetworkPluginKubenet".equals(fieldName)) { + deserializedManagedClusterPodIdentityProfile.allowNetworkPluginKubenet + = reader.getNullable(JsonReader::getBoolean); + } else if ("userAssignedIdentities".equals(fieldName)) { + List userAssignedIdentities + = reader.readArray(reader1 -> ManagedClusterPodIdentity.fromJson(reader1)); + deserializedManagedClusterPodIdentityProfile.userAssignedIdentities = userAssignedIdentities; + } else if ("userAssignedIdentityExceptions".equals(fieldName)) { + List userAssignedIdentityExceptions + = reader.readArray(reader1 -> ManagedClusterPodIdentityException.fromJson(reader1)); + deserializedManagedClusterPodIdentityProfile.userAssignedIdentityExceptions + = userAssignedIdentityExceptions; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterPodIdentityProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningError.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningError.java new file mode 100644 index 000000000000..e9077e1475ca --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningError.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * An error response from the pod identity provisioning. + */ +@Fluent +public final class ManagedClusterPodIdentityProvisioningError + implements JsonSerializable { + /* + * Details about the error. + */ + private ManagedClusterPodIdentityProvisioningErrorBody error; + + /** + * Creates an instance of ManagedClusterPodIdentityProvisioningError class. + */ + public ManagedClusterPodIdentityProvisioningError() { + } + + /** + * Get the error property: Details about the error. + * + * @return the error value. + */ + public ManagedClusterPodIdentityProvisioningErrorBody error() { + return this.error; + } + + /** + * Set the error property: Details about the error. + * + * @param error the error value to set. + * @return the ManagedClusterPodIdentityProvisioningError object itself. + */ + public ManagedClusterPodIdentityProvisioningError withError(ManagedClusterPodIdentityProvisioningErrorBody error) { + this.error = error; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (error() != null) { + error().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterPodIdentityProvisioningError from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterPodIdentityProvisioningError 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 ManagedClusterPodIdentityProvisioningError. + */ + public static ManagedClusterPodIdentityProvisioningError fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterPodIdentityProvisioningError deserializedManagedClusterPodIdentityProvisioningError + = new ManagedClusterPodIdentityProvisioningError(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("error".equals(fieldName)) { + deserializedManagedClusterPodIdentityProvisioningError.error + = ManagedClusterPodIdentityProvisioningErrorBody.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterPodIdentityProvisioningError; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningErrorBody.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningErrorBody.java new file mode 100644 index 000000000000..bb3ef75fa8cf --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningErrorBody.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * An error response from the pod identity provisioning. + */ +@Fluent +public final class ManagedClusterPodIdentityProvisioningErrorBody + implements JsonSerializable { + /* + * An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + */ + private String code; + + /* + * A message describing the error, intended to be suitable for display in a user interface. + */ + private String message; + + /* + * The target of the particular error. For example, the name of the property in error. + */ + private String target; + + /* + * A list of additional details about the error. + */ + private List details; + + /** + * Creates an instance of ManagedClusterPodIdentityProvisioningErrorBody class. + */ + public ManagedClusterPodIdentityProvisioningErrorBody() { + } + + /** + * Get the code property: An identifier for the error. Codes are invariant and are intended to be consumed + * programmatically. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Set the code property: An identifier for the error. Codes are invariant and are intended to be consumed + * programmatically. + * + * @param code the code value to set. + * @return the ManagedClusterPodIdentityProvisioningErrorBody object itself. + */ + public ManagedClusterPodIdentityProvisioningErrorBody withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the message property: A message describing the error, intended to be suitable for display in a user + * interface. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: A message describing the error, intended to be suitable for display in a user + * interface. + * + * @param message the message value to set. + * @return the ManagedClusterPodIdentityProvisioningErrorBody object itself. + */ + public ManagedClusterPodIdentityProvisioningErrorBody withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the target property: The target of the particular error. For example, the name of the property in error. + * + * @return the target value. + */ + public String target() { + return this.target; + } + + /** + * Set the target property: The target of the particular error. For example, the name of the property in error. + * + * @param target the target value to set. + * @return the ManagedClusterPodIdentityProvisioningErrorBody object itself. + */ + public ManagedClusterPodIdentityProvisioningErrorBody withTarget(String target) { + this.target = target; + return this; + } + + /** + * Get the details property: A list of additional details about the error. + * + * @return the details value. + */ + public List details() { + return this.details; + } + + /** + * Set the details property: A list of additional details about the error. + * + * @param details the details value to set. + * @return the ManagedClusterPodIdentityProvisioningErrorBody object itself. + */ + public ManagedClusterPodIdentityProvisioningErrorBody + withDetails(List details) { + this.details = details; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (details() != null) { + details().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("code", this.code); + jsonWriter.writeStringField("message", this.message); + jsonWriter.writeStringField("target", this.target); + jsonWriter.writeArrayField("details", this.details, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterPodIdentityProvisioningErrorBody from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterPodIdentityProvisioningErrorBody 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 ManagedClusterPodIdentityProvisioningErrorBody. + */ + public static ManagedClusterPodIdentityProvisioningErrorBody fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterPodIdentityProvisioningErrorBody deserializedManagedClusterPodIdentityProvisioningErrorBody + = new ManagedClusterPodIdentityProvisioningErrorBody(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("code".equals(fieldName)) { + deserializedManagedClusterPodIdentityProvisioningErrorBody.code = reader.getString(); + } else if ("message".equals(fieldName)) { + deserializedManagedClusterPodIdentityProvisioningErrorBody.message = reader.getString(); + } else if ("target".equals(fieldName)) { + deserializedManagedClusterPodIdentityProvisioningErrorBody.target = reader.getString(); + } else if ("details".equals(fieldName)) { + List details + = reader.readArray(reader1 -> ManagedClusterPodIdentityProvisioningErrorBody.fromJson(reader1)); + deserializedManagedClusterPodIdentityProvisioningErrorBody.details = details; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterPodIdentityProvisioningErrorBody; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningInfo.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningInfo.java new file mode 100644 index 000000000000..7545bf5770c9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningInfo.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Pod identity provisioning information. + */ +@Fluent +public final class ManagedClusterPodIdentityProvisioningInfo + implements JsonSerializable { + /* + * Pod identity assignment error (if any). + */ + private ManagedClusterPodIdentityProvisioningError error; + + /** + * Creates an instance of ManagedClusterPodIdentityProvisioningInfo class. + */ + public ManagedClusterPodIdentityProvisioningInfo() { + } + + /** + * Get the error property: Pod identity assignment error (if any). + * + * @return the error value. + */ + public ManagedClusterPodIdentityProvisioningError error() { + return this.error; + } + + /** + * Set the error property: Pod identity assignment error (if any). + * + * @param error the error value to set. + * @return the ManagedClusterPodIdentityProvisioningInfo object itself. + */ + public ManagedClusterPodIdentityProvisioningInfo withError(ManagedClusterPodIdentityProvisioningError error) { + this.error = error; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (error() != null) { + error().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterPodIdentityProvisioningInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterPodIdentityProvisioningInfo 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 ManagedClusterPodIdentityProvisioningInfo. + */ + public static ManagedClusterPodIdentityProvisioningInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterPodIdentityProvisioningInfo deserializedManagedClusterPodIdentityProvisioningInfo + = new ManagedClusterPodIdentityProvisioningInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("error".equals(fieldName)) { + deserializedManagedClusterPodIdentityProvisioningInfo.error + = ManagedClusterPodIdentityProvisioningError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterPodIdentityProvisioningInfo; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningState.java new file mode 100644 index 000000000000..546e97059df1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningState.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The current provisioning state of the pod identity. + */ +public final class ManagedClusterPodIdentityProvisioningState + extends ExpandableStringEnum { + /** + * Static value Assigned for ManagedClusterPodIdentityProvisioningState. + */ + public static final ManagedClusterPodIdentityProvisioningState ASSIGNED = fromString("Assigned"); + + /** + * Static value Canceled for ManagedClusterPodIdentityProvisioningState. + */ + public static final ManagedClusterPodIdentityProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Deleting for ManagedClusterPodIdentityProvisioningState. + */ + public static final ManagedClusterPodIdentityProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Failed for ManagedClusterPodIdentityProvisioningState. + */ + public static final ManagedClusterPodIdentityProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Succeeded for ManagedClusterPodIdentityProvisioningState. + */ + public static final ManagedClusterPodIdentityProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Updating for ManagedClusterPodIdentityProvisioningState. + */ + public static final ManagedClusterPodIdentityProvisioningState UPDATING = fromString("Updating"); + + /** + * Creates a new instance of ManagedClusterPodIdentityProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedClusterPodIdentityProvisioningState() { + } + + /** + * Creates or finds a ManagedClusterPodIdentityProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedClusterPodIdentityProvisioningState. + */ + public static ManagedClusterPodIdentityProvisioningState fromString(String name) { + return fromString(name, ManagedClusterPodIdentityProvisioningState.class); + } + + /** + * Gets known ManagedClusterPodIdentityProvisioningState values. + * + * @return known ManagedClusterPodIdentityProvisioningState values. + */ + public static Collection values() { + return values(ManagedClusterPodIdentityProvisioningState.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java new file mode 100644 index 000000000000..cf748f44a4a2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +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 list of available upgrade versions. + */ +@Fluent +public final class ManagedClusterPoolUpgradeProfile implements JsonSerializable { + /* + * The Kubernetes version (major.minor.patch). + */ + private String kubernetesVersion; + + /* + * The Agent Pool name. + */ + private String name; + + /* + * The operating system type. The default is Linux. + */ + private OSType osType; + + /* + * List of orchestrator types and versions available for upgrade. + */ + private List upgrades; + + /** + * Creates an instance of ManagedClusterPoolUpgradeProfile class. + */ + public ManagedClusterPoolUpgradeProfile() { + } + + /** + * Get the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @param kubernetesVersion the kubernetesVersion value to set. + * @return the ManagedClusterPoolUpgradeProfile object itself. + */ + public ManagedClusterPoolUpgradeProfile withKubernetesVersion(String kubernetesVersion) { + this.kubernetesVersion = kubernetesVersion; + return this; + } + + /** + * Get the name property: The Agent Pool name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The Agent Pool name. + * + * @param name the name value to set. + * @return the ManagedClusterPoolUpgradeProfile object itself. + */ + public ManagedClusterPoolUpgradeProfile withName(String name) { + this.name = name; + return this; + } + + /** + * Get the osType property: The operating system type. The default is Linux. + * + * @return the osType value. + */ + public OSType osType() { + return this.osType; + } + + /** + * Set the osType property: The operating system type. The default is Linux. + * + * @param osType the osType value to set. + * @return the ManagedClusterPoolUpgradeProfile object itself. + */ + public ManagedClusterPoolUpgradeProfile withOsType(OSType osType) { + this.osType = osType; + return this; + } + + /** + * Get the upgrades property: List of orchestrator types and versions available for upgrade. + * + * @return the upgrades value. + */ + public List upgrades() { + return this.upgrades; + } + + /** + * Set the upgrades property: List of orchestrator types and versions available for upgrade. + * + * @param upgrades the upgrades value to set. + * @return the ManagedClusterPoolUpgradeProfile object itself. + */ + public ManagedClusterPoolUpgradeProfile withUpgrades(List upgrades) { + this.upgrades = upgrades; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (kubernetesVersion() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property kubernetesVersion in model ManagedClusterPoolUpgradeProfile")); + } + if (osType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property osType in model ManagedClusterPoolUpgradeProfile")); + } + if (upgrades() != null) { + upgrades().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterPoolUpgradeProfile.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); + jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeArrayField("upgrades", this.upgrades, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterPoolUpgradeProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterPoolUpgradeProfile 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 ManagedClusterPoolUpgradeProfile. + */ + public static ManagedClusterPoolUpgradeProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterPoolUpgradeProfile deserializedManagedClusterPoolUpgradeProfile + = new ManagedClusterPoolUpgradeProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kubernetesVersion".equals(fieldName)) { + deserializedManagedClusterPoolUpgradeProfile.kubernetesVersion = reader.getString(); + } else if ("osType".equals(fieldName)) { + deserializedManagedClusterPoolUpgradeProfile.osType = OSType.fromString(reader.getString()); + } else if ("name".equals(fieldName)) { + deserializedManagedClusterPoolUpgradeProfile.name = reader.getString(); + } else if ("upgrades".equals(fieldName)) { + List upgrades + = reader.readArray(reader1 -> ManagedClusterPoolUpgradeProfileUpgradesItem.fromJson(reader1)); + deserializedManagedClusterPoolUpgradeProfile.upgrades = upgrades; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterPoolUpgradeProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java new file mode 100644 index 000000000000..f67331554f6d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Available upgrades for an AgentPool. + */ +@Fluent +public final class ManagedClusterPoolUpgradeProfileUpgradesItem + implements JsonSerializable { + /* + * The Kubernetes version (major.minor.patch). + */ + private String kubernetesVersion; + + /* + * Whether the Kubernetes version is currently in preview. + */ + private Boolean isPreview; + + /** + * Creates an instance of ManagedClusterPoolUpgradeProfileUpgradesItem class. + */ + public ManagedClusterPoolUpgradeProfileUpgradesItem() { + } + + /** + * Get the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @param kubernetesVersion the kubernetesVersion value to set. + * @return the ManagedClusterPoolUpgradeProfileUpgradesItem object itself. + */ + public ManagedClusterPoolUpgradeProfileUpgradesItem withKubernetesVersion(String kubernetesVersion) { + this.kubernetesVersion = kubernetesVersion; + return this; + } + + /** + * Get the isPreview property: Whether the Kubernetes version is currently in preview. + * + * @return the isPreview value. + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Set the isPreview property: Whether the Kubernetes version is currently in preview. + * + * @param isPreview the isPreview value to set. + * @return the ManagedClusterPoolUpgradeProfileUpgradesItem object itself. + */ + public ManagedClusterPoolUpgradeProfileUpgradesItem withIsPreview(Boolean isPreview) { + this.isPreview = isPreview; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); + jsonWriter.writeBooleanField("isPreview", this.isPreview); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterPoolUpgradeProfileUpgradesItem from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterPoolUpgradeProfileUpgradesItem 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 ManagedClusterPoolUpgradeProfileUpgradesItem. + */ + public static ManagedClusterPoolUpgradeProfileUpgradesItem fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterPoolUpgradeProfileUpgradesItem deserializedManagedClusterPoolUpgradeProfileUpgradesItem + = new ManagedClusterPoolUpgradeProfileUpgradesItem(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kubernetesVersion".equals(fieldName)) { + deserializedManagedClusterPoolUpgradeProfileUpgradesItem.kubernetesVersion = reader.getString(); + } else if ("isPreview".equals(fieldName)) { + deserializedManagedClusterPoolUpgradeProfileUpgradesItem.isPreview + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterPoolUpgradeProfileUpgradesItem; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java new file mode 100644 index 000000000000..b4e194a1ef21 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java @@ -0,0 +1,735 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Parameters to be applied to the cluster-autoscaler when enabled. + */ +@Fluent +public final class ManagedClusterPropertiesAutoScalerProfile + implements JsonSerializable { + /* + * Detects similar node pools and balances the number of nodes between them. Valid values are 'true' and 'false' + */ + private String balanceSimilarNodeGroups; + + /* + * DaemonSet pods will be gracefully terminated from empty nodes. If set to true, all daemonset pods on empty nodes + * will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen + * for scaling. If set to false, the node will be deleted without ensuring that daemonset pods are deleted or + * evicted. + */ + private Boolean daemonsetEvictionForEmptyNodes; + + /* + * DaemonSet pods will be gracefully terminated from non-empty nodes. If set to true, all daemonset pods on occupied + * nodes will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be + * chosen for scaling. If set to false, the node will be deleted without ensuring that daemonset pods are deleted or + * evicted. + */ + private Boolean daemonsetEvictionForOccupiedNodes; + + /* + * Should CA ignore DaemonSet pods when calculating resource utilization for scaling down. If set to true, the + * resources used by daemonset will be taken into account when making scaling down decisions. + */ + private Boolean ignoreDaemonsetsUtilization; + + /* + * The expander to use when scaling up. If not specified, the default is 'random'. See + * [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) + * for more information. + */ + private Expander expander; + + /* + * The maximum number of empty nodes that can be deleted at the same time. This must be a positive integer. The + * default is 10. + */ + private String maxEmptyBulkDelete; + + /* + * The maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node. + * The default is 600. + */ + private String maxGracefulTerminationSec; + + /* + * The maximum time the autoscaler waits for a node to be provisioned. The default is '15m'. Values must be an + * integer followed by an 'm'. No unit of time other than minutes (m) is supported. + */ + private String maxNodeProvisionTime; + + /* + * The maximum percentage of unready nodes in the cluster. After this percentage is exceeded, cluster autoscaler + * halts operations. The default is 45. The maximum is 100 and the minimum is 0. + */ + private String maxTotalUnreadyPercentage; + + /* + * Ignore unscheduled pods before they're a certain age. For scenarios like burst/batch scale where you don't want + * CA to act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods + * before they're a certain age. The default is '0s'. Values must be an integer followed by a unit ('s' for seconds, + * 'm' for minutes, 'h' for hours, etc). + */ + private String newPodScaleUpDelay; + + /* + * The number of allowed unready nodes, irrespective of max-total-unready-percentage. This must be an integer. The + * default is 3. + */ + private String okTotalUnreadyCount; + + /* + * How often cluster is reevaluated for scale up or down. The default is '10'. Values must be an integer number of + * seconds. + */ + private String scanInterval; + + /* + * How long after scale up that scale down evaluation resumes. The default is '10m'. Values must be an integer + * followed by an 'm'. No unit of time other than minutes (m) is supported. + */ + private String scaleDownDelayAfterAdd; + + /* + * How long after node deletion that scale down evaluation resumes. The default is the scan-interval. Values must be + * an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + */ + private String scaleDownDelayAfterDelete; + + /* + * How long after scale down failure that scale down evaluation resumes. The default is '3m'. Values must be an + * integer followed by an 'm'. No unit of time other than minutes (m) is supported. + */ + private String scaleDownDelayAfterFailure; + + /* + * How long a node should be unneeded before it is eligible for scale down. The default is '10m'. Values must be an + * integer followed by an 'm'. No unit of time other than minutes (m) is supported. + */ + private String scaleDownUnneededTime; + + /* + * How long an unready node should be unneeded before it is eligible for scale down. The default is '20m'. Values + * must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + */ + private String scaleDownUnreadyTime; + + /* + * Node utilization level, defined as sum of requested resources divided by capacity, below which a node can be + * considered for scale down. The default is '0.5'. + */ + private String scaleDownUtilizationThreshold; + + /* + * If cluster autoscaler will skip deleting nodes with pods with local storage, for example, EmptyDir or HostPath. + * The default is true. + */ + private String skipNodesWithLocalStorage; + + /* + * If cluster autoscaler will skip deleting nodes with pods from kube-system (except for DaemonSet or mirror pods). + * The default is true. + */ + private String skipNodesWithSystemPods; + + /** + * Creates an instance of ManagedClusterPropertiesAutoScalerProfile class. + */ + public ManagedClusterPropertiesAutoScalerProfile() { + } + + /** + * Get the balanceSimilarNodeGroups property: Detects similar node pools and balances the number of nodes between + * them. Valid values are 'true' and 'false'. + * + * @return the balanceSimilarNodeGroups value. + */ + public String balanceSimilarNodeGroups() { + return this.balanceSimilarNodeGroups; + } + + /** + * Set the balanceSimilarNodeGroups property: Detects similar node pools and balances the number of nodes between + * them. Valid values are 'true' and 'false'. + * + * @param balanceSimilarNodeGroups the balanceSimilarNodeGroups value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withBalanceSimilarNodeGroups(String balanceSimilarNodeGroups) { + this.balanceSimilarNodeGroups = balanceSimilarNodeGroups; + return this; + } + + /** + * Get the daemonsetEvictionForEmptyNodes property: DaemonSet pods will be gracefully terminated from empty nodes. + * If set to true, all daemonset pods on empty nodes will be evicted before deletion of the node. If the daemonset + * pod cannot be evicted another node will be chosen for scaling. If set to false, the node will be deleted without + * ensuring that daemonset pods are deleted or evicted. + * + * @return the daemonsetEvictionForEmptyNodes value. + */ + public Boolean daemonsetEvictionForEmptyNodes() { + return this.daemonsetEvictionForEmptyNodes; + } + + /** + * Set the daemonsetEvictionForEmptyNodes property: DaemonSet pods will be gracefully terminated from empty nodes. + * If set to true, all daemonset pods on empty nodes will be evicted before deletion of the node. If the daemonset + * pod cannot be evicted another node will be chosen for scaling. If set to false, the node will be deleted without + * ensuring that daemonset pods are deleted or evicted. + * + * @param daemonsetEvictionForEmptyNodes the daemonsetEvictionForEmptyNodes value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile + withDaemonsetEvictionForEmptyNodes(Boolean daemonsetEvictionForEmptyNodes) { + this.daemonsetEvictionForEmptyNodes = daemonsetEvictionForEmptyNodes; + return this; + } + + /** + * Get the daemonsetEvictionForOccupiedNodes property: DaemonSet pods will be gracefully terminated from non-empty + * nodes. If set to true, all daemonset pods on occupied nodes will be evicted before deletion of the node. If the + * daemonset pod cannot be evicted another node will be chosen for scaling. If set to false, the node will be + * deleted without ensuring that daemonset pods are deleted or evicted. + * + * @return the daemonsetEvictionForOccupiedNodes value. + */ + public Boolean daemonsetEvictionForOccupiedNodes() { + return this.daemonsetEvictionForOccupiedNodes; + } + + /** + * Set the daemonsetEvictionForOccupiedNodes property: DaemonSet pods will be gracefully terminated from non-empty + * nodes. If set to true, all daemonset pods on occupied nodes will be evicted before deletion of the node. If the + * daemonset pod cannot be evicted another node will be chosen for scaling. If set to false, the node will be + * deleted without ensuring that daemonset pods are deleted or evicted. + * + * @param daemonsetEvictionForOccupiedNodes the daemonsetEvictionForOccupiedNodes value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile + withDaemonsetEvictionForOccupiedNodes(Boolean daemonsetEvictionForOccupiedNodes) { + this.daemonsetEvictionForOccupiedNodes = daemonsetEvictionForOccupiedNodes; + return this; + } + + /** + * Get the ignoreDaemonsetsUtilization property: Should CA ignore DaemonSet pods when calculating resource + * utilization for scaling down. If set to true, the resources used by daemonset will be taken into account when + * making scaling down decisions. + * + * @return the ignoreDaemonsetsUtilization value. + */ + public Boolean ignoreDaemonsetsUtilization() { + return this.ignoreDaemonsetsUtilization; + } + + /** + * Set the ignoreDaemonsetsUtilization property: Should CA ignore DaemonSet pods when calculating resource + * utilization for scaling down. If set to true, the resources used by daemonset will be taken into account when + * making scaling down decisions. + * + * @param ignoreDaemonsetsUtilization the ignoreDaemonsetsUtilization value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile + withIgnoreDaemonsetsUtilization(Boolean ignoreDaemonsetsUtilization) { + this.ignoreDaemonsetsUtilization = ignoreDaemonsetsUtilization; + return this; + } + + /** + * Get the expander property: The expander to use when scaling up. If not specified, the default is 'random'. See + * [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) + * for more information. + * + * @return the expander value. + */ + public Expander expander() { + return this.expander; + } + + /** + * Set the expander property: The expander to use when scaling up. If not specified, the default is 'random'. See + * [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) + * for more information. + * + * @param expander the expander value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withExpander(Expander expander) { + this.expander = expander; + return this; + } + + /** + * Get the maxEmptyBulkDelete property: The maximum number of empty nodes that can be deleted at the same time. This + * must be a positive integer. The default is 10. + * + * @return the maxEmptyBulkDelete value. + */ + public String maxEmptyBulkDelete() { + return this.maxEmptyBulkDelete; + } + + /** + * Set the maxEmptyBulkDelete property: The maximum number of empty nodes that can be deleted at the same time. This + * must be a positive integer. The default is 10. + * + * @param maxEmptyBulkDelete the maxEmptyBulkDelete value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withMaxEmptyBulkDelete(String maxEmptyBulkDelete) { + this.maxEmptyBulkDelete = maxEmptyBulkDelete; + return this; + } + + /** + * Get the maxGracefulTerminationSec property: The maximum number of seconds the cluster autoscaler waits for pod + * termination when trying to scale down a node. The default is 600. + * + * @return the maxGracefulTerminationSec value. + */ + public String maxGracefulTerminationSec() { + return this.maxGracefulTerminationSec; + } + + /** + * Set the maxGracefulTerminationSec property: The maximum number of seconds the cluster autoscaler waits for pod + * termination when trying to scale down a node. The default is 600. + * + * @param maxGracefulTerminationSec the maxGracefulTerminationSec value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withMaxGracefulTerminationSec(String maxGracefulTerminationSec) { + this.maxGracefulTerminationSec = maxGracefulTerminationSec; + return this; + } + + /** + * Get the maxNodeProvisionTime property: The maximum time the autoscaler waits for a node to be provisioned. The + * default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is + * supported. + * + * @return the maxNodeProvisionTime value. + */ + public String maxNodeProvisionTime() { + return this.maxNodeProvisionTime; + } + + /** + * Set the maxNodeProvisionTime property: The maximum time the autoscaler waits for a node to be provisioned. The + * default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is + * supported. + * + * @param maxNodeProvisionTime the maxNodeProvisionTime value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withMaxNodeProvisionTime(String maxNodeProvisionTime) { + this.maxNodeProvisionTime = maxNodeProvisionTime; + return this; + } + + /** + * Get the maxTotalUnreadyPercentage property: The maximum percentage of unready nodes in the cluster. After this + * percentage is exceeded, cluster autoscaler halts operations. The default is 45. The maximum is 100 and the + * minimum is 0. + * + * @return the maxTotalUnreadyPercentage value. + */ + public String maxTotalUnreadyPercentage() { + return this.maxTotalUnreadyPercentage; + } + + /** + * Set the maxTotalUnreadyPercentage property: The maximum percentage of unready nodes in the cluster. After this + * percentage is exceeded, cluster autoscaler halts operations. The default is 45. The maximum is 100 and the + * minimum is 0. + * + * @param maxTotalUnreadyPercentage the maxTotalUnreadyPercentage value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withMaxTotalUnreadyPercentage(String maxTotalUnreadyPercentage) { + this.maxTotalUnreadyPercentage = maxTotalUnreadyPercentage; + return this; + } + + /** + * Get the newPodScaleUpDelay property: Ignore unscheduled pods before they're a certain age. For scenarios like + * burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all the pods, you + * can tell CA to ignore unscheduled pods before they're a certain age. The default is '0s'. Values must be an + * integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). + * + * @return the newPodScaleUpDelay value. + */ + public String newPodScaleUpDelay() { + return this.newPodScaleUpDelay; + } + + /** + * Set the newPodScaleUpDelay property: Ignore unscheduled pods before they're a certain age. For scenarios like + * burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all the pods, you + * can tell CA to ignore unscheduled pods before they're a certain age. The default is '0s'. Values must be an + * integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). + * + * @param newPodScaleUpDelay the newPodScaleUpDelay value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withNewPodScaleUpDelay(String newPodScaleUpDelay) { + this.newPodScaleUpDelay = newPodScaleUpDelay; + return this; + } + + /** + * Get the okTotalUnreadyCount property: The number of allowed unready nodes, irrespective of + * max-total-unready-percentage. This must be an integer. The default is 3. + * + * @return the okTotalUnreadyCount value. + */ + public String okTotalUnreadyCount() { + return this.okTotalUnreadyCount; + } + + /** + * Set the okTotalUnreadyCount property: The number of allowed unready nodes, irrespective of + * max-total-unready-percentage. This must be an integer. The default is 3. + * + * @param okTotalUnreadyCount the okTotalUnreadyCount value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withOkTotalUnreadyCount(String okTotalUnreadyCount) { + this.okTotalUnreadyCount = okTotalUnreadyCount; + return this; + } + + /** + * Get the scanInterval property: How often cluster is reevaluated for scale up or down. The default is '10'. Values + * must be an integer number of seconds. + * + * @return the scanInterval value. + */ + public String scanInterval() { + return this.scanInterval; + } + + /** + * Set the scanInterval property: How often cluster is reevaluated for scale up or down. The default is '10'. Values + * must be an integer number of seconds. + * + * @param scanInterval the scanInterval value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withScanInterval(String scanInterval) { + this.scanInterval = scanInterval; + return this; + } + + /** + * Get the scaleDownDelayAfterAdd property: How long after scale up that scale down evaluation resumes. The default + * is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + * + * @return the scaleDownDelayAfterAdd value. + */ + public String scaleDownDelayAfterAdd() { + return this.scaleDownDelayAfterAdd; + } + + /** + * Set the scaleDownDelayAfterAdd property: How long after scale up that scale down evaluation resumes. The default + * is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + * + * @param scaleDownDelayAfterAdd the scaleDownDelayAfterAdd value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withScaleDownDelayAfterAdd(String scaleDownDelayAfterAdd) { + this.scaleDownDelayAfterAdd = scaleDownDelayAfterAdd; + return this; + } + + /** + * Get the scaleDownDelayAfterDelete property: How long after node deletion that scale down evaluation resumes. The + * default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes + * (m) is supported. + * + * @return the scaleDownDelayAfterDelete value. + */ + public String scaleDownDelayAfterDelete() { + return this.scaleDownDelayAfterDelete; + } + + /** + * Set the scaleDownDelayAfterDelete property: How long after node deletion that scale down evaluation resumes. The + * default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes + * (m) is supported. + * + * @param scaleDownDelayAfterDelete the scaleDownDelayAfterDelete value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withScaleDownDelayAfterDelete(String scaleDownDelayAfterDelete) { + this.scaleDownDelayAfterDelete = scaleDownDelayAfterDelete; + return this; + } + + /** + * Get the scaleDownDelayAfterFailure property: How long after scale down failure that scale down evaluation + * resumes. The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes + * (m) is supported. + * + * @return the scaleDownDelayAfterFailure value. + */ + public String scaleDownDelayAfterFailure() { + return this.scaleDownDelayAfterFailure; + } + + /** + * Set the scaleDownDelayAfterFailure property: How long after scale down failure that scale down evaluation + * resumes. The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes + * (m) is supported. + * + * @param scaleDownDelayAfterFailure the scaleDownDelayAfterFailure value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withScaleDownDelayAfterFailure(String scaleDownDelayAfterFailure) { + this.scaleDownDelayAfterFailure = scaleDownDelayAfterFailure; + return this; + } + + /** + * Get the scaleDownUnneededTime property: How long a node should be unneeded before it is eligible for scale down. + * The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is + * supported. + * + * @return the scaleDownUnneededTime value. + */ + public String scaleDownUnneededTime() { + return this.scaleDownUnneededTime; + } + + /** + * Set the scaleDownUnneededTime property: How long a node should be unneeded before it is eligible for scale down. + * The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is + * supported. + * + * @param scaleDownUnneededTime the scaleDownUnneededTime value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withScaleDownUnneededTime(String scaleDownUnneededTime) { + this.scaleDownUnneededTime = scaleDownUnneededTime; + return this; + } + + /** + * Get the scaleDownUnreadyTime property: How long an unready node should be unneeded before it is eligible for + * scale down. The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than + * minutes (m) is supported. + * + * @return the scaleDownUnreadyTime value. + */ + public String scaleDownUnreadyTime() { + return this.scaleDownUnreadyTime; + } + + /** + * Set the scaleDownUnreadyTime property: How long an unready node should be unneeded before it is eligible for + * scale down. The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than + * minutes (m) is supported. + * + * @param scaleDownUnreadyTime the scaleDownUnreadyTime value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withScaleDownUnreadyTime(String scaleDownUnreadyTime) { + this.scaleDownUnreadyTime = scaleDownUnreadyTime; + return this; + } + + /** + * Get the scaleDownUtilizationThreshold property: Node utilization level, defined as sum of requested resources + * divided by capacity, below which a node can be considered for scale down. The default is '0.5'. + * + * @return the scaleDownUtilizationThreshold value. + */ + public String scaleDownUtilizationThreshold() { + return this.scaleDownUtilizationThreshold; + } + + /** + * Set the scaleDownUtilizationThreshold property: Node utilization level, defined as sum of requested resources + * divided by capacity, below which a node can be considered for scale down. The default is '0.5'. + * + * @param scaleDownUtilizationThreshold the scaleDownUtilizationThreshold value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile + withScaleDownUtilizationThreshold(String scaleDownUtilizationThreshold) { + this.scaleDownUtilizationThreshold = scaleDownUtilizationThreshold; + return this; + } + + /** + * Get the skipNodesWithLocalStorage property: If cluster autoscaler will skip deleting nodes with pods with local + * storage, for example, EmptyDir or HostPath. The default is true. + * + * @return the skipNodesWithLocalStorage value. + */ + public String skipNodesWithLocalStorage() { + return this.skipNodesWithLocalStorage; + } + + /** + * Set the skipNodesWithLocalStorage property: If cluster autoscaler will skip deleting nodes with pods with local + * storage, for example, EmptyDir or HostPath. The default is true. + * + * @param skipNodesWithLocalStorage the skipNodesWithLocalStorage value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withSkipNodesWithLocalStorage(String skipNodesWithLocalStorage) { + this.skipNodesWithLocalStorage = skipNodesWithLocalStorage; + return this; + } + + /** + * Get the skipNodesWithSystemPods property: If cluster autoscaler will skip deleting nodes with pods from + * kube-system (except for DaemonSet or mirror pods). The default is true. + * + * @return the skipNodesWithSystemPods value. + */ + public String skipNodesWithSystemPods() { + return this.skipNodesWithSystemPods; + } + + /** + * Set the skipNodesWithSystemPods property: If cluster autoscaler will skip deleting nodes with pods from + * kube-system (except for DaemonSet or mirror pods). The default is true. + * + * @param skipNodesWithSystemPods the skipNodesWithSystemPods value to set. + * @return the ManagedClusterPropertiesAutoScalerProfile object itself. + */ + public ManagedClusterPropertiesAutoScalerProfile withSkipNodesWithSystemPods(String skipNodesWithSystemPods) { + this.skipNodesWithSystemPods = skipNodesWithSystemPods; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("balance-similar-node-groups", this.balanceSimilarNodeGroups); + jsonWriter.writeBooleanField("daemonset-eviction-for-empty-nodes", this.daemonsetEvictionForEmptyNodes); + jsonWriter.writeBooleanField("daemonset-eviction-for-occupied-nodes", this.daemonsetEvictionForOccupiedNodes); + jsonWriter.writeBooleanField("ignore-daemonsets-utilization", this.ignoreDaemonsetsUtilization); + jsonWriter.writeStringField("expander", this.expander == null ? null : this.expander.toString()); + jsonWriter.writeStringField("max-empty-bulk-delete", this.maxEmptyBulkDelete); + jsonWriter.writeStringField("max-graceful-termination-sec", this.maxGracefulTerminationSec); + jsonWriter.writeStringField("max-node-provision-time", this.maxNodeProvisionTime); + jsonWriter.writeStringField("max-total-unready-percentage", this.maxTotalUnreadyPercentage); + jsonWriter.writeStringField("new-pod-scale-up-delay", this.newPodScaleUpDelay); + jsonWriter.writeStringField("ok-total-unready-count", this.okTotalUnreadyCount); + jsonWriter.writeStringField("scan-interval", this.scanInterval); + jsonWriter.writeStringField("scale-down-delay-after-add", this.scaleDownDelayAfterAdd); + jsonWriter.writeStringField("scale-down-delay-after-delete", this.scaleDownDelayAfterDelete); + jsonWriter.writeStringField("scale-down-delay-after-failure", this.scaleDownDelayAfterFailure); + jsonWriter.writeStringField("scale-down-unneeded-time", this.scaleDownUnneededTime); + jsonWriter.writeStringField("scale-down-unready-time", this.scaleDownUnreadyTime); + jsonWriter.writeStringField("scale-down-utilization-threshold", this.scaleDownUtilizationThreshold); + jsonWriter.writeStringField("skip-nodes-with-local-storage", this.skipNodesWithLocalStorage); + jsonWriter.writeStringField("skip-nodes-with-system-pods", this.skipNodesWithSystemPods); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterPropertiesAutoScalerProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterPropertiesAutoScalerProfile 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 ManagedClusterPropertiesAutoScalerProfile. + */ + public static ManagedClusterPropertiesAutoScalerProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterPropertiesAutoScalerProfile deserializedManagedClusterPropertiesAutoScalerProfile + = new ManagedClusterPropertiesAutoScalerProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("balance-similar-node-groups".equals(fieldName)) { + deserializedManagedClusterPropertiesAutoScalerProfile.balanceSimilarNodeGroups = reader.getString(); + } else if ("daemonset-eviction-for-empty-nodes".equals(fieldName)) { + deserializedManagedClusterPropertiesAutoScalerProfile.daemonsetEvictionForEmptyNodes + = reader.getNullable(JsonReader::getBoolean); + } else if ("daemonset-eviction-for-occupied-nodes".equals(fieldName)) { + deserializedManagedClusterPropertiesAutoScalerProfile.daemonsetEvictionForOccupiedNodes + = reader.getNullable(JsonReader::getBoolean); + } else if ("ignore-daemonsets-utilization".equals(fieldName)) { + deserializedManagedClusterPropertiesAutoScalerProfile.ignoreDaemonsetsUtilization + = reader.getNullable(JsonReader::getBoolean); + } else if ("expander".equals(fieldName)) { + deserializedManagedClusterPropertiesAutoScalerProfile.expander + = Expander.fromString(reader.getString()); + } else if ("max-empty-bulk-delete".equals(fieldName)) { + deserializedManagedClusterPropertiesAutoScalerProfile.maxEmptyBulkDelete = reader.getString(); + } else if ("max-graceful-termination-sec".equals(fieldName)) { + deserializedManagedClusterPropertiesAutoScalerProfile.maxGracefulTerminationSec + = reader.getString(); + } else if ("max-node-provision-time".equals(fieldName)) { + deserializedManagedClusterPropertiesAutoScalerProfile.maxNodeProvisionTime = reader.getString(); + } else if ("max-total-unready-percentage".equals(fieldName)) { + deserializedManagedClusterPropertiesAutoScalerProfile.maxTotalUnreadyPercentage + = reader.getString(); + } else if ("new-pod-scale-up-delay".equals(fieldName)) { + deserializedManagedClusterPropertiesAutoScalerProfile.newPodScaleUpDelay = reader.getString(); + } else if ("ok-total-unready-count".equals(fieldName)) { + deserializedManagedClusterPropertiesAutoScalerProfile.okTotalUnreadyCount = reader.getString(); + } else if ("scan-interval".equals(fieldName)) { + deserializedManagedClusterPropertiesAutoScalerProfile.scanInterval = reader.getString(); + } else if ("scale-down-delay-after-add".equals(fieldName)) { + deserializedManagedClusterPropertiesAutoScalerProfile.scaleDownDelayAfterAdd = reader.getString(); + } else if ("scale-down-delay-after-delete".equals(fieldName)) { + deserializedManagedClusterPropertiesAutoScalerProfile.scaleDownDelayAfterDelete + = reader.getString(); + } else if ("scale-down-delay-after-failure".equals(fieldName)) { + deserializedManagedClusterPropertiesAutoScalerProfile.scaleDownDelayAfterFailure + = reader.getString(); + } else if ("scale-down-unneeded-time".equals(fieldName)) { + deserializedManagedClusterPropertiesAutoScalerProfile.scaleDownUnneededTime = reader.getString(); + } else if ("scale-down-unready-time".equals(fieldName)) { + deserializedManagedClusterPropertiesAutoScalerProfile.scaleDownUnreadyTime = reader.getString(); + } else if ("scale-down-utilization-threshold".equals(fieldName)) { + deserializedManagedClusterPropertiesAutoScalerProfile.scaleDownUtilizationThreshold + = reader.getString(); + } else if ("skip-nodes-with-local-storage".equals(fieldName)) { + deserializedManagedClusterPropertiesAutoScalerProfile.skipNodesWithLocalStorage + = reader.getString(); + } else if ("skip-nodes-with-system-pods".equals(fieldName)) { + deserializedManagedClusterPropertiesAutoScalerProfile.skipNodesWithSystemPods = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterPropertiesAutoScalerProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java new file mode 100644 index 000000000000..014323f743dc --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Security profile for the container service cluster. + */ +@Fluent +public final class ManagedClusterSecurityProfile implements JsonSerializable { + /* + * Microsoft Defender settings for the security profile. + */ + private ManagedClusterSecurityProfileDefender defender; + + /* + * Azure Key Vault [key management service](https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/) + * settings for the security profile. + */ + private AzureKeyVaultKms azureKeyVaultKms; + + /* + * Workload identity settings for the security profile. Workload identity enables Kubernetes applications to access + * Azure cloud resources securely with Azure AD. See https://aka.ms/aks/wi for more details. + */ + private ManagedClusterSecurityProfileWorkloadIdentity workloadIdentity; + + /* + * Image Cleaner settings for the security profile. + */ + private ManagedClusterSecurityProfileImageCleaner imageCleaner; + + /* + * A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more + * information see [Custom CA Trust + * Certificates](https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority). + */ + private List customCATrustCertificates; + + /** + * Creates an instance of ManagedClusterSecurityProfile class. + */ + public ManagedClusterSecurityProfile() { + } + + /** + * Get the defender property: Microsoft Defender settings for the security profile. + * + * @return the defender value. + */ + public ManagedClusterSecurityProfileDefender defender() { + return this.defender; + } + + /** + * Set the defender property: Microsoft Defender settings for the security profile. + * + * @param defender the defender value to set. + * @return the ManagedClusterSecurityProfile object itself. + */ + public ManagedClusterSecurityProfile withDefender(ManagedClusterSecurityProfileDefender defender) { + this.defender = defender; + return this; + } + + /** + * Get the azureKeyVaultKms property: Azure Key Vault [key management + * service](https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/) settings for the security profile. + * + * @return the azureKeyVaultKms value. + */ + public AzureKeyVaultKms azureKeyVaultKms() { + return this.azureKeyVaultKms; + } + + /** + * Set the azureKeyVaultKms property: Azure Key Vault [key management + * service](https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/) settings for the security profile. + * + * @param azureKeyVaultKms the azureKeyVaultKms value to set. + * @return the ManagedClusterSecurityProfile object itself. + */ + public ManagedClusterSecurityProfile withAzureKeyVaultKms(AzureKeyVaultKms azureKeyVaultKms) { + this.azureKeyVaultKms = azureKeyVaultKms; + return this; + } + + /** + * Get the workloadIdentity property: Workload identity settings for the security profile. Workload identity enables + * Kubernetes applications to access Azure cloud resources securely with Azure AD. See https://aka.ms/aks/wi for + * more details. + * + * @return the workloadIdentity value. + */ + public ManagedClusterSecurityProfileWorkloadIdentity workloadIdentity() { + return this.workloadIdentity; + } + + /** + * Set the workloadIdentity property: Workload identity settings for the security profile. Workload identity enables + * Kubernetes applications to access Azure cloud resources securely with Azure AD. See https://aka.ms/aks/wi for + * more details. + * + * @param workloadIdentity the workloadIdentity value to set. + * @return the ManagedClusterSecurityProfile object itself. + */ + public ManagedClusterSecurityProfile + withWorkloadIdentity(ManagedClusterSecurityProfileWorkloadIdentity workloadIdentity) { + this.workloadIdentity = workloadIdentity; + return this; + } + + /** + * Get the imageCleaner property: Image Cleaner settings for the security profile. + * + * @return the imageCleaner value. + */ + public ManagedClusterSecurityProfileImageCleaner imageCleaner() { + return this.imageCleaner; + } + + /** + * Set the imageCleaner property: Image Cleaner settings for the security profile. + * + * @param imageCleaner the imageCleaner value to set. + * @return the ManagedClusterSecurityProfile object itself. + */ + public ManagedClusterSecurityProfile withImageCleaner(ManagedClusterSecurityProfileImageCleaner imageCleaner) { + this.imageCleaner = imageCleaner; + return this; + } + + /** + * Get the customCATrustCertificates property: A list of up to 10 base64 encoded CAs that will be added to the trust + * store on all nodes in the cluster. For more information see [Custom CA Trust + * Certificates](https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority). + * + * @return the customCATrustCertificates value. + */ + public List customCATrustCertificates() { + return this.customCATrustCertificates; + } + + /** + * Set the customCATrustCertificates property: A list of up to 10 base64 encoded CAs that will be added to the trust + * store on all nodes in the cluster. For more information see [Custom CA Trust + * Certificates](https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority). + * + * @param customCATrustCertificates the customCATrustCertificates value to set. + * @return the ManagedClusterSecurityProfile object itself. + */ + public ManagedClusterSecurityProfile withCustomCATrustCertificates(List customCATrustCertificates) { + this.customCATrustCertificates = customCATrustCertificates; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (defender() != null) { + defender().validate(); + } + if (azureKeyVaultKms() != null) { + azureKeyVaultKms().validate(); + } + if (workloadIdentity() != null) { + workloadIdentity().validate(); + } + if (imageCleaner() != null) { + imageCleaner().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("defender", this.defender); + jsonWriter.writeJsonField("azureKeyVaultKms", this.azureKeyVaultKms); + jsonWriter.writeJsonField("workloadIdentity", this.workloadIdentity); + jsonWriter.writeJsonField("imageCleaner", this.imageCleaner); + jsonWriter.writeArrayField("customCATrustCertificates", this.customCATrustCertificates, + (writer, element) -> writer.writeBinary(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSecurityProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSecurityProfile 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 ManagedClusterSecurityProfile. + */ + public static ManagedClusterSecurityProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSecurityProfile deserializedManagedClusterSecurityProfile + = new ManagedClusterSecurityProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("defender".equals(fieldName)) { + deserializedManagedClusterSecurityProfile.defender + = ManagedClusterSecurityProfileDefender.fromJson(reader); + } else if ("azureKeyVaultKms".equals(fieldName)) { + deserializedManagedClusterSecurityProfile.azureKeyVaultKms = AzureKeyVaultKms.fromJson(reader); + } else if ("workloadIdentity".equals(fieldName)) { + deserializedManagedClusterSecurityProfile.workloadIdentity + = ManagedClusterSecurityProfileWorkloadIdentity.fromJson(reader); + } else if ("imageCleaner".equals(fieldName)) { + deserializedManagedClusterSecurityProfile.imageCleaner + = ManagedClusterSecurityProfileImageCleaner.fromJson(reader); + } else if ("customCATrustCertificates".equals(fieldName)) { + List customCATrustCertificates = reader.readArray(reader1 -> reader1.getBinary()); + deserializedManagedClusterSecurityProfile.customCATrustCertificates = customCATrustCertificates; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSecurityProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java new file mode 100644 index 000000000000..78e8613b9bdb --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Microsoft Defender settings for the security profile. + */ +@Fluent +public final class ManagedClusterSecurityProfileDefender + implements JsonSerializable { + /* + * Resource ID of the Log Analytics workspace to be associated with Microsoft Defender. When Microsoft Defender is + * enabled, this field is required and must be a valid workspace resource ID. When Microsoft Defender is disabled, + * leave the field empty. + */ + private String logAnalyticsWorkspaceResourceId; + + /* + * Microsoft Defender threat detection for Cloud settings for the security profile. + */ + private ManagedClusterSecurityProfileDefenderSecurityMonitoring securityMonitoring; + + /** + * Creates an instance of ManagedClusterSecurityProfileDefender class. + */ + public ManagedClusterSecurityProfileDefender() { + } + + /** + * Get the logAnalyticsWorkspaceResourceId property: Resource ID of the Log Analytics workspace to be associated + * with Microsoft Defender. When Microsoft Defender is enabled, this field is required and must be a valid workspace + * resource ID. When Microsoft Defender is disabled, leave the field empty. + * + * @return the logAnalyticsWorkspaceResourceId value. + */ + public String logAnalyticsWorkspaceResourceId() { + return this.logAnalyticsWorkspaceResourceId; + } + + /** + * Set the logAnalyticsWorkspaceResourceId property: Resource ID of the Log Analytics workspace to be associated + * with Microsoft Defender. When Microsoft Defender is enabled, this field is required and must be a valid workspace + * resource ID. When Microsoft Defender is disabled, leave the field empty. + * + * @param logAnalyticsWorkspaceResourceId the logAnalyticsWorkspaceResourceId value to set. + * @return the ManagedClusterSecurityProfileDefender object itself. + */ + public ManagedClusterSecurityProfileDefender + withLogAnalyticsWorkspaceResourceId(String logAnalyticsWorkspaceResourceId) { + this.logAnalyticsWorkspaceResourceId = logAnalyticsWorkspaceResourceId; + return this; + } + + /** + * Get the securityMonitoring property: Microsoft Defender threat detection for Cloud settings for the security + * profile. + * + * @return the securityMonitoring value. + */ + public ManagedClusterSecurityProfileDefenderSecurityMonitoring securityMonitoring() { + return this.securityMonitoring; + } + + /** + * Set the securityMonitoring property: Microsoft Defender threat detection for Cloud settings for the security + * profile. + * + * @param securityMonitoring the securityMonitoring value to set. + * @return the ManagedClusterSecurityProfileDefender object itself. + */ + public ManagedClusterSecurityProfileDefender + withSecurityMonitoring(ManagedClusterSecurityProfileDefenderSecurityMonitoring securityMonitoring) { + this.securityMonitoring = securityMonitoring; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (securityMonitoring() != null) { + securityMonitoring().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("logAnalyticsWorkspaceResourceId", this.logAnalyticsWorkspaceResourceId); + jsonWriter.writeJsonField("securityMonitoring", this.securityMonitoring); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSecurityProfileDefender from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSecurityProfileDefender 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 ManagedClusterSecurityProfileDefender. + */ + public static ManagedClusterSecurityProfileDefender fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSecurityProfileDefender deserializedManagedClusterSecurityProfileDefender + = new ManagedClusterSecurityProfileDefender(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("logAnalyticsWorkspaceResourceId".equals(fieldName)) { + deserializedManagedClusterSecurityProfileDefender.logAnalyticsWorkspaceResourceId + = reader.getString(); + } else if ("securityMonitoring".equals(fieldName)) { + deserializedManagedClusterSecurityProfileDefender.securityMonitoring + = ManagedClusterSecurityProfileDefenderSecurityMonitoring.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSecurityProfileDefender; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java new file mode 100644 index 000000000000..d0da2997534e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Microsoft Defender settings for the security profile threat detection. + */ +@Fluent +public final class ManagedClusterSecurityProfileDefenderSecurityMonitoring + implements JsonSerializable { + /* + * Whether to enable Defender threat detection + */ + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterSecurityProfileDefenderSecurityMonitoring class. + */ + public ManagedClusterSecurityProfileDefenderSecurityMonitoring() { + } + + /** + * Get the enabled property: Whether to enable Defender threat detection. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Defender threat detection. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterSecurityProfileDefenderSecurityMonitoring object itself. + */ + public ManagedClusterSecurityProfileDefenderSecurityMonitoring withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSecurityProfileDefenderSecurityMonitoring from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSecurityProfileDefenderSecurityMonitoring 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 ManagedClusterSecurityProfileDefenderSecurityMonitoring. + */ + public static ManagedClusterSecurityProfileDefenderSecurityMonitoring fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSecurityProfileDefenderSecurityMonitoring deserializedManagedClusterSecurityProfileDefenderSecurityMonitoring + = new ManagedClusterSecurityProfileDefenderSecurityMonitoring(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterSecurityProfileDefenderSecurityMonitoring.enabled + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSecurityProfileDefenderSecurityMonitoring; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageCleaner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageCleaner.java new file mode 100644 index 000000000000..700820e65270 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageCleaner.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Image Cleaner removes unused images from nodes, freeing up disk space and helping to reduce attack surface area. Here + * are settings for the security profile. + */ +@Fluent +public final class ManagedClusterSecurityProfileImageCleaner + implements JsonSerializable { + /* + * Whether to enable Image Cleaner on AKS cluster. + */ + private Boolean enabled; + + /* + * Image Cleaner scanning interval in hours. + */ + private Integer intervalHours; + + /** + * Creates an instance of ManagedClusterSecurityProfileImageCleaner class. + */ + public ManagedClusterSecurityProfileImageCleaner() { + } + + /** + * Get the enabled property: Whether to enable Image Cleaner on AKS cluster. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Image Cleaner on AKS cluster. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterSecurityProfileImageCleaner object itself. + */ + public ManagedClusterSecurityProfileImageCleaner withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the intervalHours property: Image Cleaner scanning interval in hours. + * + * @return the intervalHours value. + */ + public Integer intervalHours() { + return this.intervalHours; + } + + /** + * Set the intervalHours property: Image Cleaner scanning interval in hours. + * + * @param intervalHours the intervalHours value to set. + * @return the ManagedClusterSecurityProfileImageCleaner object itself. + */ + public ManagedClusterSecurityProfileImageCleaner withIntervalHours(Integer intervalHours) { + this.intervalHours = intervalHours; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeNumberField("intervalHours", this.intervalHours); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSecurityProfileImageCleaner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSecurityProfileImageCleaner 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 ManagedClusterSecurityProfileImageCleaner. + */ + public static ManagedClusterSecurityProfileImageCleaner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSecurityProfileImageCleaner deserializedManagedClusterSecurityProfileImageCleaner + = new ManagedClusterSecurityProfileImageCleaner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterSecurityProfileImageCleaner.enabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("intervalHours".equals(fieldName)) { + deserializedManagedClusterSecurityProfileImageCleaner.intervalHours + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSecurityProfileImageCleaner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileWorkloadIdentity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileWorkloadIdentity.java new file mode 100644 index 000000000000..cc7af8f1f25a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileWorkloadIdentity.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Workload identity settings for the security profile. + */ +@Fluent +public final class ManagedClusterSecurityProfileWorkloadIdentity + implements JsonSerializable { + /* + * Whether to enable workload identity. + */ + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterSecurityProfileWorkloadIdentity class. + */ + public ManagedClusterSecurityProfileWorkloadIdentity() { + } + + /** + * Get the enabled property: Whether to enable workload identity. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable workload identity. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterSecurityProfileWorkloadIdentity object itself. + */ + public ManagedClusterSecurityProfileWorkloadIdentity withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSecurityProfileWorkloadIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSecurityProfileWorkloadIdentity 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 ManagedClusterSecurityProfileWorkloadIdentity. + */ + public static ManagedClusterSecurityProfileWorkloadIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSecurityProfileWorkloadIdentity deserializedManagedClusterSecurityProfileWorkloadIdentity + = new ManagedClusterSecurityProfileWorkloadIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterSecurityProfileWorkloadIdentity.enabled + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSecurityProfileWorkloadIdentity; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterServicePrincipalProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterServicePrincipalProfile.java new file mode 100644 index 000000000000..6f82f9aed391 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterServicePrincipalProfile.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Information about a service principal identity for the cluster to use for manipulating Azure APIs. + */ +@Fluent +public final class ManagedClusterServicePrincipalProfile + implements JsonSerializable { + /* + * The ID for the service principal. + */ + private String clientId; + + /* + * The secret password associated with the service principal in plain text. + */ + private String secret; + + /** + * Creates an instance of ManagedClusterServicePrincipalProfile class. + */ + public ManagedClusterServicePrincipalProfile() { + } + + /** + * Get the clientId property: The ID for the service principal. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The ID for the service principal. + * + * @param clientId the clientId value to set. + * @return the ManagedClusterServicePrincipalProfile object itself. + */ + public ManagedClusterServicePrincipalProfile withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the secret property: The secret password associated with the service principal in plain text. + * + * @return the secret value. + */ + public String secret() { + return this.secret; + } + + /** + * Set the secret property: The secret password associated with the service principal in plain text. + * + * @param secret the secret value to set. + * @return the ManagedClusterServicePrincipalProfile object itself. + */ + public ManagedClusterServicePrincipalProfile withSecret(String secret) { + this.secret = secret; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (clientId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property clientId in model ManagedClusterServicePrincipalProfile")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterServicePrincipalProfile.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("clientId", this.clientId); + jsonWriter.writeStringField("secret", this.secret); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterServicePrincipalProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterServicePrincipalProfile 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 ManagedClusterServicePrincipalProfile. + */ + public static ManagedClusterServicePrincipalProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterServicePrincipalProfile deserializedManagedClusterServicePrincipalProfile + = new ManagedClusterServicePrincipalProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("clientId".equals(fieldName)) { + deserializedManagedClusterServicePrincipalProfile.clientId = reader.getString(); + } else if ("secret".equals(fieldName)) { + deserializedManagedClusterServicePrincipalProfile.secret = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterServicePrincipalProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSku.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSku.java new file mode 100644 index 000000000000..25b666b9f8d7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSku.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 SKU of a Managed Cluster. + */ +@Fluent +public final class ManagedClusterSku implements JsonSerializable { + /* + * The name of a managed cluster SKU. + */ + private ManagedClusterSkuName name; + + /* + * The tier of a managed cluster SKU. If not specified, the default is 'Free'. See [AKS Pricing + * Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) for more details. + */ + private ManagedClusterSkuTier tier; + + /** + * Creates an instance of ManagedClusterSku class. + */ + public ManagedClusterSku() { + } + + /** + * Get the name property: The name of a managed cluster SKU. + * + * @return the name value. + */ + public ManagedClusterSkuName name() { + return this.name; + } + + /** + * Set the name property: The name of a managed cluster SKU. + * + * @param name the name value to set. + * @return the ManagedClusterSku object itself. + */ + public ManagedClusterSku withName(ManagedClusterSkuName name) { + this.name = name; + return this; + } + + /** + * Get the tier property: The tier of a managed cluster SKU. If not specified, the default is 'Free'. See [AKS + * Pricing Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) for more details. + * + * @return the tier value. + */ + public ManagedClusterSkuTier tier() { + return this.tier; + } + + /** + * Set the tier property: The tier of a managed cluster SKU. If not specified, the default is 'Free'. See [AKS + * Pricing Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) for more details. + * + * @param tier the tier value to set. + * @return the ManagedClusterSku object itself. + */ + public ManagedClusterSku withTier(ManagedClusterSkuTier tier) { + this.tier = tier; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@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 ManagedClusterSku from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSku 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 ManagedClusterSku. + */ + public static ManagedClusterSku fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSku deserializedManagedClusterSku = new ManagedClusterSku(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedManagedClusterSku.name = ManagedClusterSkuName.fromString(reader.getString()); + } else if ("tier".equals(fieldName)) { + deserializedManagedClusterSku.tier = ManagedClusterSkuTier.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSku; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuName.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuName.java new file mode 100644 index 000000000000..306cf49fc131 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuName.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The name of a managed cluster SKU. + */ +public final class ManagedClusterSkuName extends ExpandableStringEnum { + /** + * Static value Base for ManagedClusterSkuName. + */ + public static final ManagedClusterSkuName BASE = fromString("Base"); + + /** + * Static value Automatic for ManagedClusterSkuName. + */ + public static final ManagedClusterSkuName AUTOMATIC = fromString("Automatic"); + + /** + * Creates a new instance of ManagedClusterSkuName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedClusterSkuName() { + } + + /** + * Creates or finds a ManagedClusterSkuName from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedClusterSkuName. + */ + public static ManagedClusterSkuName fromString(String name) { + return fromString(name, ManagedClusterSkuName.class); + } + + /** + * Gets known ManagedClusterSkuName values. + * + * @return known ManagedClusterSkuName values. + */ + public static Collection values() { + return values(ManagedClusterSkuName.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuTier.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuTier.java new file mode 100644 index 000000000000..dda63fccb506 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuTier.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The tier of a managed cluster SKU. If not specified, the default is 'Free'. See [AKS Pricing + * Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) for more details. + */ +public final class ManagedClusterSkuTier extends ExpandableStringEnum { + /** + * Static value Premium for ManagedClusterSkuTier. + */ + public static final ManagedClusterSkuTier PREMIUM = fromString("Premium"); + + /** + * Static value Standard for ManagedClusterSkuTier. + */ + public static final ManagedClusterSkuTier STANDARD = fromString("Standard"); + + /** + * Static value Free for ManagedClusterSkuTier. + */ + public static final ManagedClusterSkuTier FREE = fromString("Free"); + + /** + * Creates a new instance of ManagedClusterSkuTier value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedClusterSkuTier() { + } + + /** + * Creates or finds a ManagedClusterSkuTier from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedClusterSkuTier. + */ + public static ManagedClusterSkuTier fromString(String name) { + return fromString(name, ManagedClusterSkuTier.class); + } + + /** + * Gets known ManagedClusterSkuTier values. + * + * @return known ManagedClusterSkuTier values. + */ + public static Collection values() { + return values(ManagedClusterSkuTier.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStaticEgressGatewayProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStaticEgressGatewayProfile.java new file mode 100644 index 000000000000..c75598f87142 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStaticEgressGatewayProfile.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 Static Egress Gateway addon configuration for the cluster. + */ +@Fluent +public final class ManagedClusterStaticEgressGatewayProfile + implements JsonSerializable { + /* + * Enable Static Egress Gateway addon. Indicates if Static Egress Gateway addon is enabled or not. + */ + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterStaticEgressGatewayProfile class. + */ + public ManagedClusterStaticEgressGatewayProfile() { + } + + /** + * Get the enabled property: Enable Static Egress Gateway addon. Indicates if Static Egress Gateway addon is enabled + * or not. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Enable Static Egress Gateway addon. Indicates if Static Egress Gateway addon is enabled + * or not. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterStaticEgressGatewayProfile object itself. + */ + public ManagedClusterStaticEgressGatewayProfile withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterStaticEgressGatewayProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterStaticEgressGatewayProfile 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 ManagedClusterStaticEgressGatewayProfile. + */ + public static ManagedClusterStaticEgressGatewayProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterStaticEgressGatewayProfile deserializedManagedClusterStaticEgressGatewayProfile + = new ManagedClusterStaticEgressGatewayProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterStaticEgressGatewayProfile.enabled + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterStaticEgressGatewayProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStatus.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStatus.java new file mode 100644 index 000000000000..753a202164b9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStatus.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +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 read-only information about the Managed Cluster. + */ +@Immutable +public final class ManagedClusterStatus implements JsonSerializable { + /* + * The error details information of the managed cluster. Preserves the detailed info of failure. If there was no + * error, this field is omitted. + */ + private ManagementError provisioningError; + + /** + * Creates an instance of ManagedClusterStatus class. + */ + public ManagedClusterStatus() { + } + + /** + * Get the provisioningError property: The error details information of the managed cluster. Preserves the detailed + * info of failure. If there was no error, this field is omitted. + * + * @return the provisioningError value. + */ + public ManagementError provisioningError() { + return this.provisioningError; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterStatus 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 ManagedClusterStatus. + */ + public static ManagedClusterStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterStatus deserializedManagedClusterStatus = new ManagedClusterStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningError".equals(fieldName)) { + deserializedManagedClusterStatus.provisioningError = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterStatus; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfile.java new file mode 100644 index 000000000000..4597f55159a4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfile.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Storage profile for the container service cluster. + */ +@Fluent +public final class ManagedClusterStorageProfile implements JsonSerializable { + /* + * AzureDisk CSI Driver settings for the storage profile. + */ + private ManagedClusterStorageProfileDiskCsiDriver diskCsiDriver; + + /* + * AzureFile CSI Driver settings for the storage profile. + */ + private ManagedClusterStorageProfileFileCsiDriver fileCsiDriver; + + /* + * Snapshot Controller settings for the storage profile. + */ + private ManagedClusterStorageProfileSnapshotController snapshotController; + + /* + * AzureBlob CSI Driver settings for the storage profile. + */ + private ManagedClusterStorageProfileBlobCsiDriver blobCsiDriver; + + /** + * Creates an instance of ManagedClusterStorageProfile class. + */ + public ManagedClusterStorageProfile() { + } + + /** + * Get the diskCsiDriver property: AzureDisk CSI Driver settings for the storage profile. + * + * @return the diskCsiDriver value. + */ + public ManagedClusterStorageProfileDiskCsiDriver diskCsiDriver() { + return this.diskCsiDriver; + } + + /** + * Set the diskCsiDriver property: AzureDisk CSI Driver settings for the storage profile. + * + * @param diskCsiDriver the diskCsiDriver value to set. + * @return the ManagedClusterStorageProfile object itself. + */ + public ManagedClusterStorageProfile withDiskCsiDriver(ManagedClusterStorageProfileDiskCsiDriver diskCsiDriver) { + this.diskCsiDriver = diskCsiDriver; + return this; + } + + /** + * Get the fileCsiDriver property: AzureFile CSI Driver settings for the storage profile. + * + * @return the fileCsiDriver value. + */ + public ManagedClusterStorageProfileFileCsiDriver fileCsiDriver() { + return this.fileCsiDriver; + } + + /** + * Set the fileCsiDriver property: AzureFile CSI Driver settings for the storage profile. + * + * @param fileCsiDriver the fileCsiDriver value to set. + * @return the ManagedClusterStorageProfile object itself. + */ + public ManagedClusterStorageProfile withFileCsiDriver(ManagedClusterStorageProfileFileCsiDriver fileCsiDriver) { + this.fileCsiDriver = fileCsiDriver; + return this; + } + + /** + * Get the snapshotController property: Snapshot Controller settings for the storage profile. + * + * @return the snapshotController value. + */ + public ManagedClusterStorageProfileSnapshotController snapshotController() { + return this.snapshotController; + } + + /** + * Set the snapshotController property: Snapshot Controller settings for the storage profile. + * + * @param snapshotController the snapshotController value to set. + * @return the ManagedClusterStorageProfile object itself. + */ + public ManagedClusterStorageProfile + withSnapshotController(ManagedClusterStorageProfileSnapshotController snapshotController) { + this.snapshotController = snapshotController; + return this; + } + + /** + * Get the blobCsiDriver property: AzureBlob CSI Driver settings for the storage profile. + * + * @return the blobCsiDriver value. + */ + public ManagedClusterStorageProfileBlobCsiDriver blobCsiDriver() { + return this.blobCsiDriver; + } + + /** + * Set the blobCsiDriver property: AzureBlob CSI Driver settings for the storage profile. + * + * @param blobCsiDriver the blobCsiDriver value to set. + * @return the ManagedClusterStorageProfile object itself. + */ + public ManagedClusterStorageProfile withBlobCsiDriver(ManagedClusterStorageProfileBlobCsiDriver blobCsiDriver) { + this.blobCsiDriver = blobCsiDriver; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (diskCsiDriver() != null) { + diskCsiDriver().validate(); + } + if (fileCsiDriver() != null) { + fileCsiDriver().validate(); + } + if (snapshotController() != null) { + snapshotController().validate(); + } + if (blobCsiDriver() != null) { + blobCsiDriver().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("diskCSIDriver", this.diskCsiDriver); + jsonWriter.writeJsonField("fileCSIDriver", this.fileCsiDriver); + jsonWriter.writeJsonField("snapshotController", this.snapshotController); + jsonWriter.writeJsonField("blobCSIDriver", this.blobCsiDriver); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterStorageProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterStorageProfile 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 ManagedClusterStorageProfile. + */ + public static ManagedClusterStorageProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterStorageProfile deserializedManagedClusterStorageProfile = new ManagedClusterStorageProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("diskCSIDriver".equals(fieldName)) { + deserializedManagedClusterStorageProfile.diskCsiDriver + = ManagedClusterStorageProfileDiskCsiDriver.fromJson(reader); + } else if ("fileCSIDriver".equals(fieldName)) { + deserializedManagedClusterStorageProfile.fileCsiDriver + = ManagedClusterStorageProfileFileCsiDriver.fromJson(reader); + } else if ("snapshotController".equals(fieldName)) { + deserializedManagedClusterStorageProfile.snapshotController + = ManagedClusterStorageProfileSnapshotController.fromJson(reader); + } else if ("blobCSIDriver".equals(fieldName)) { + deserializedManagedClusterStorageProfile.blobCsiDriver + = ManagedClusterStorageProfileBlobCsiDriver.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterStorageProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileBlobCsiDriver.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileBlobCsiDriver.java new file mode 100644 index 000000000000..b0cd41ff4c82 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileBlobCsiDriver.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * AzureBlob CSI Driver settings for the storage profile. + */ +@Fluent +public final class ManagedClusterStorageProfileBlobCsiDriver + implements JsonSerializable { + /* + * Whether to enable AzureBlob CSI Driver. The default value is false. + */ + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterStorageProfileBlobCsiDriver class. + */ + public ManagedClusterStorageProfileBlobCsiDriver() { + } + + /** + * Get the enabled property: Whether to enable AzureBlob CSI Driver. The default value is false. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable AzureBlob CSI Driver. The default value is false. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterStorageProfileBlobCsiDriver object itself. + */ + public ManagedClusterStorageProfileBlobCsiDriver withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterStorageProfileBlobCsiDriver from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterStorageProfileBlobCsiDriver 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 ManagedClusterStorageProfileBlobCsiDriver. + */ + public static ManagedClusterStorageProfileBlobCsiDriver fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterStorageProfileBlobCsiDriver deserializedManagedClusterStorageProfileBlobCsiDriver + = new ManagedClusterStorageProfileBlobCsiDriver(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterStorageProfileBlobCsiDriver.enabled + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterStorageProfileBlobCsiDriver; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java new file mode 100644 index 000000000000..7a94fabab0c8 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * AzureDisk CSI Driver settings for the storage profile. + */ +@Fluent +public final class ManagedClusterStorageProfileDiskCsiDriver + implements JsonSerializable { + /* + * Whether to enable AzureDisk CSI Driver. The default value is true. + */ + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterStorageProfileDiskCsiDriver class. + */ + public ManagedClusterStorageProfileDiskCsiDriver() { + } + + /** + * Get the enabled property: Whether to enable AzureDisk CSI Driver. The default value is true. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable AzureDisk CSI Driver. The default value is true. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterStorageProfileDiskCsiDriver object itself. + */ + public ManagedClusterStorageProfileDiskCsiDriver withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterStorageProfileDiskCsiDriver from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterStorageProfileDiskCsiDriver 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 ManagedClusterStorageProfileDiskCsiDriver. + */ + public static ManagedClusterStorageProfileDiskCsiDriver fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterStorageProfileDiskCsiDriver deserializedManagedClusterStorageProfileDiskCsiDriver + = new ManagedClusterStorageProfileDiskCsiDriver(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterStorageProfileDiskCsiDriver.enabled + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterStorageProfileDiskCsiDriver; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileFileCsiDriver.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileFileCsiDriver.java new file mode 100644 index 000000000000..73233e8c6dae --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileFileCsiDriver.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * AzureFile CSI Driver settings for the storage profile. + */ +@Fluent +public final class ManagedClusterStorageProfileFileCsiDriver + implements JsonSerializable { + /* + * Whether to enable AzureFile CSI Driver. The default value is true. + */ + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterStorageProfileFileCsiDriver class. + */ + public ManagedClusterStorageProfileFileCsiDriver() { + } + + /** + * Get the enabled property: Whether to enable AzureFile CSI Driver. The default value is true. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable AzureFile CSI Driver. The default value is true. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterStorageProfileFileCsiDriver object itself. + */ + public ManagedClusterStorageProfileFileCsiDriver withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterStorageProfileFileCsiDriver from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterStorageProfileFileCsiDriver 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 ManagedClusterStorageProfileFileCsiDriver. + */ + public static ManagedClusterStorageProfileFileCsiDriver fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterStorageProfileFileCsiDriver deserializedManagedClusterStorageProfileFileCsiDriver + = new ManagedClusterStorageProfileFileCsiDriver(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterStorageProfileFileCsiDriver.enabled + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterStorageProfileFileCsiDriver; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileSnapshotController.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileSnapshotController.java new file mode 100644 index 000000000000..3f4f4e3b0522 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileSnapshotController.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Snapshot Controller settings for the storage profile. + */ +@Fluent +public final class ManagedClusterStorageProfileSnapshotController + implements JsonSerializable { + /* + * Whether to enable Snapshot Controller. The default value is true. + */ + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterStorageProfileSnapshotController class. + */ + public ManagedClusterStorageProfileSnapshotController() { + } + + /** + * Get the enabled property: Whether to enable Snapshot Controller. The default value is true. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Snapshot Controller. The default value is true. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterStorageProfileSnapshotController object itself. + */ + public ManagedClusterStorageProfileSnapshotController withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterStorageProfileSnapshotController from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterStorageProfileSnapshotController 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 ManagedClusterStorageProfileSnapshotController. + */ + public static ManagedClusterStorageProfileSnapshotController fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterStorageProfileSnapshotController deserializedManagedClusterStorageProfileSnapshotController + = new ManagedClusterStorageProfileSnapshotController(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterStorageProfileSnapshotController.enabled + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterStorageProfileSnapshotController; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWindowsProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWindowsProfile.java new file mode 100644 index 000000000000..06c292e83565 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWindowsProfile.java @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +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 Windows VMs in the managed cluster. + */ +@Fluent +public final class ManagedClusterWindowsProfile implements JsonSerializable { + /* + * Specifies the name of the administrator account.

**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:** 1 character

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

**Minimum-length:** 8 characters

+ * **Max-length:** 123 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!" + */ + private String adminPassword; + + /* + * The license type to use for Windows VMs. See [Azure Hybrid User + * Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) for more details. + */ + private LicenseType licenseType; + + /* + * Whether to enable CSI proxy. For more details on CSI proxy, see the [CSI proxy GitHub + * repo](https://github.com/kubernetes-csi/csi-proxy). + */ + private Boolean enableCsiProxy; + + /* + * The Windows gMSA Profile in the Managed Cluster. + */ + private WindowsGmsaProfile gmsaProfile; + + /** + * Creates an instance of ManagedClusterWindowsProfile class. + */ + public ManagedClusterWindowsProfile() { + } + + /** + * Get the adminUsername property: Specifies the name of the administrator account. <br><br> + * **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:** 1 character + * <br><br> **Max-length:** 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> + * **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:** 1 character + * <br><br> **Max-length:** 20 characters. + * + * @param adminUsername the adminUsername value to set. + * @return the ManagedClusterWindowsProfile object itself. + */ + public ManagedClusterWindowsProfile withAdminUsername(String adminUsername) { + this.adminUsername = adminUsername; + return this; + } + + /** + * Get the adminPassword property: Specifies the password of the administrator account. <br><br> + * **Minimum-length:** 8 characters <br><br> **Max-length:** 123 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!". + * + * @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:** 8 characters <br><br> **Max-length:** 123 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!". + * + * @param adminPassword the adminPassword value to set. + * @return the ManagedClusterWindowsProfile object itself. + */ + public ManagedClusterWindowsProfile withAdminPassword(String adminPassword) { + this.adminPassword = adminPassword; + return this; + } + + /** + * Get the licenseType property: The license type to use for Windows VMs. See [Azure Hybrid User + * Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) for more details. + * + * @return the licenseType value. + */ + public LicenseType licenseType() { + return this.licenseType; + } + + /** + * Set the licenseType property: The license type to use for Windows VMs. See [Azure Hybrid User + * Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) for more details. + * + * @param licenseType the licenseType value to set. + * @return the ManagedClusterWindowsProfile object itself. + */ + public ManagedClusterWindowsProfile withLicenseType(LicenseType licenseType) { + this.licenseType = licenseType; + return this; + } + + /** + * Get the enableCsiProxy property: Whether to enable CSI proxy. For more details on CSI proxy, see the [CSI proxy + * GitHub repo](https://github.com/kubernetes-csi/csi-proxy). + * + * @return the enableCsiProxy value. + */ + public Boolean enableCsiProxy() { + return this.enableCsiProxy; + } + + /** + * Set the enableCsiProxy property: Whether to enable CSI proxy. For more details on CSI proxy, see the [CSI proxy + * GitHub repo](https://github.com/kubernetes-csi/csi-proxy). + * + * @param enableCsiProxy the enableCsiProxy value to set. + * @return the ManagedClusterWindowsProfile object itself. + */ + public ManagedClusterWindowsProfile withEnableCsiProxy(Boolean enableCsiProxy) { + this.enableCsiProxy = enableCsiProxy; + return this; + } + + /** + * Get the gmsaProfile property: The Windows gMSA Profile in the Managed Cluster. + * + * @return the gmsaProfile value. + */ + public WindowsGmsaProfile gmsaProfile() { + return this.gmsaProfile; + } + + /** + * Set the gmsaProfile property: The Windows gMSA Profile in the Managed Cluster. + * + * @param gmsaProfile the gmsaProfile value to set. + * @return the ManagedClusterWindowsProfile object itself. + */ + public ManagedClusterWindowsProfile withGmsaProfile(WindowsGmsaProfile gmsaProfile) { + this.gmsaProfile = gmsaProfile; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (adminUsername() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property adminUsername in model ManagedClusterWindowsProfile")); + } + if (gmsaProfile() != null) { + gmsaProfile().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterWindowsProfile.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("adminUsername", this.adminUsername); + jsonWriter.writeStringField("adminPassword", this.adminPassword); + jsonWriter.writeStringField("licenseType", this.licenseType == null ? null : this.licenseType.toString()); + jsonWriter.writeBooleanField("enableCSIProxy", this.enableCsiProxy); + jsonWriter.writeJsonField("gmsaProfile", this.gmsaProfile); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterWindowsProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterWindowsProfile 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 ManagedClusterWindowsProfile. + */ + public static ManagedClusterWindowsProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterWindowsProfile deserializedManagedClusterWindowsProfile = new ManagedClusterWindowsProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("adminUsername".equals(fieldName)) { + deserializedManagedClusterWindowsProfile.adminUsername = reader.getString(); + } else if ("adminPassword".equals(fieldName)) { + deserializedManagedClusterWindowsProfile.adminPassword = reader.getString(); + } else if ("licenseType".equals(fieldName)) { + deserializedManagedClusterWindowsProfile.licenseType = LicenseType.fromString(reader.getString()); + } else if ("enableCSIProxy".equals(fieldName)) { + deserializedManagedClusterWindowsProfile.enableCsiProxy + = reader.getNullable(JsonReader::getBoolean); + } else if ("gmsaProfile".equals(fieldName)) { + deserializedManagedClusterWindowsProfile.gmsaProfile = WindowsGmsaProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterWindowsProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfile.java new file mode 100644 index 000000000000..c8824d320110 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfile.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Workload Auto-scaler profile for the managed cluster. + */ +@Fluent +public final class ManagedClusterWorkloadAutoScalerProfile + implements JsonSerializable { + /* + * KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. + */ + private ManagedClusterWorkloadAutoScalerProfileKeda keda; + + /* + * VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. + */ + private ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler verticalPodAutoscaler; + + /** + * Creates an instance of ManagedClusterWorkloadAutoScalerProfile class. + */ + public ManagedClusterWorkloadAutoScalerProfile() { + } + + /** + * Get the keda property: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. + * + * @return the keda value. + */ + public ManagedClusterWorkloadAutoScalerProfileKeda keda() { + return this.keda; + } + + /** + * Set the keda property: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. + * + * @param keda the keda value to set. + * @return the ManagedClusterWorkloadAutoScalerProfile object itself. + */ + public ManagedClusterWorkloadAutoScalerProfile withKeda(ManagedClusterWorkloadAutoScalerProfileKeda keda) { + this.keda = keda; + return this; + } + + /** + * Get the verticalPodAutoscaler property: VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler + * profile. + * + * @return the verticalPodAutoscaler value. + */ + public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler verticalPodAutoscaler() { + return this.verticalPodAutoscaler; + } + + /** + * Set the verticalPodAutoscaler property: VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler + * profile. + * + * @param verticalPodAutoscaler the verticalPodAutoscaler value to set. + * @return the ManagedClusterWorkloadAutoScalerProfile object itself. + */ + public ManagedClusterWorkloadAutoScalerProfile + withVerticalPodAutoscaler(ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler verticalPodAutoscaler) { + this.verticalPodAutoscaler = verticalPodAutoscaler; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keda() != null) { + keda().validate(); + } + if (verticalPodAutoscaler() != null) { + verticalPodAutoscaler().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("keda", this.keda); + jsonWriter.writeJsonField("verticalPodAutoscaler", this.verticalPodAutoscaler); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterWorkloadAutoScalerProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterWorkloadAutoScalerProfile 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 ManagedClusterWorkloadAutoScalerProfile. + */ + public static ManagedClusterWorkloadAutoScalerProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterWorkloadAutoScalerProfile deserializedManagedClusterWorkloadAutoScalerProfile + = new ManagedClusterWorkloadAutoScalerProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keda".equals(fieldName)) { + deserializedManagedClusterWorkloadAutoScalerProfile.keda + = ManagedClusterWorkloadAutoScalerProfileKeda.fromJson(reader); + } else if ("verticalPodAutoscaler".equals(fieldName)) { + deserializedManagedClusterWorkloadAutoScalerProfile.verticalPodAutoscaler + = ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterWorkloadAutoScalerProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileKeda.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileKeda.java new file mode 100644 index 000000000000..471caebbf88e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileKeda.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. + */ +@Fluent +public final class ManagedClusterWorkloadAutoScalerProfileKeda + implements JsonSerializable { + /* + * Whether to enable KEDA. + */ + private boolean enabled; + + /** + * Creates an instance of ManagedClusterWorkloadAutoScalerProfileKeda class. + */ + public ManagedClusterWorkloadAutoScalerProfileKeda() { + } + + /** + * Get the enabled property: Whether to enable KEDA. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable KEDA. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterWorkloadAutoScalerProfileKeda object itself. + */ + public ManagedClusterWorkloadAutoScalerProfileKeda withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterWorkloadAutoScalerProfileKeda from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterWorkloadAutoScalerProfileKeda 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 ManagedClusterWorkloadAutoScalerProfileKeda. + */ + public static ManagedClusterWorkloadAutoScalerProfileKeda fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterWorkloadAutoScalerProfileKeda deserializedManagedClusterWorkloadAutoScalerProfileKeda + = new ManagedClusterWorkloadAutoScalerProfileKeda(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterWorkloadAutoScalerProfileKeda.enabled = reader.getBoolean(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterWorkloadAutoScalerProfileKeda; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java new file mode 100644 index 000000000000..391810a872f1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. + */ +@Fluent +public final class ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler + implements JsonSerializable { + /* + * Whether to enable VPA. Default value is false. + */ + private boolean enabled; + + /** + * Creates an instance of ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler class. + */ + public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler() { + } + + /** + * Get the enabled property: Whether to enable VPA. Default value is false. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable VPA. Default value is false. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler object itself. + */ + public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler 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 + * ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler. + */ + public static ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler deserializedManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler + = new ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.enabled + = reader.getBoolean(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultHeaders.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultHeaders.java new file mode 100644 index 000000000000..cdbca2aa05c3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultHeaders.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; + +/** + * The ManagedClustersGetCommandResultHeaders model. + */ +@Fluent +public final class ManagedClustersGetCommandResultHeaders { + /* + * The location property. + */ + private String location; + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ManagedClustersGetCommandResultHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ManagedClustersGetCommandResultHeaders(HttpHeaders rawHeaders) { + this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); + } + + /** + * Get the location property: The location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The location property. + * + * @param location the location value to set. + * @return the ManagedClustersGetCommandResultHeaders object itself. + */ + public ManagedClustersGetCommandResultHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultResponse.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultResponse.java new file mode 100644 index 000000000000..eb663da3cc0e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultResponse.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.containerservice.fluent.models.RunCommandResultInner; + +/** + * Contains all response data for the getCommandResult operation. + */ +public final class ManagedClustersGetCommandResultResponse + extends ResponseBase { + /** + * Creates an instance of ManagedClustersGetCommandResultResponse. + * + * @param request the request which resulted in this ManagedClustersGetCommandResultResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public ManagedClustersGetCommandResultResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, + RunCommandResultInner value, ManagedClustersGetCommandResultHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ + @Override + public RunCommandResultInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedNamespaceListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedNamespaceListResult.java new file mode 100644 index 000000000000..dbaa571c52a7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedNamespaceListResult.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.ManagedNamespaceInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ManagedNamespace list operation. + */ +@Fluent +public final class ManagedNamespaceListResult implements JsonSerializable { + /* + * The ManagedNamespace items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ManagedNamespaceListResult class. + */ + public ManagedNamespaceListResult() { + } + + /** + * Get the value property: The ManagedNamespace items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The ManagedNamespace items on this page. + * + * @param value the value value to set. + * @return the ManagedNamespaceListResult object itself. + */ + public ManagedNamespaceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the ManagedNamespaceListResult object itself. + */ + public ManagedNamespaceListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ManagedNamespaceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedNamespaceListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedNamespaceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedNamespaceListResult 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 ManagedNamespaceListResult. + */ + public static ManagedNamespaceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedNamespaceListResult deserializedManagedNamespaceListResult = new ManagedNamespaceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagedNamespaceInner.fromJson(reader1)); + deserializedManagedNamespaceListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedNamespaceListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedNamespaceListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedServiceIdentityUserAssignedIdentitiesValue.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedServiceIdentityUserAssignedIdentitiesValue.java new file mode 100644 index 000000000000..b664b65ef6a6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedServiceIdentityUserAssignedIdentitiesValue.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * User assigned identity properties. + */ +@Immutable +public final class ManagedServiceIdentityUserAssignedIdentitiesValue + 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 ManagedServiceIdentityUserAssignedIdentitiesValue class. + */ + public ManagedServiceIdentityUserAssignedIdentitiesValue() { + } + + /** + * 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedServiceIdentityUserAssignedIdentitiesValue from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedServiceIdentityUserAssignedIdentitiesValue 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 ManagedServiceIdentityUserAssignedIdentitiesValue. + */ + public static ManagedServiceIdentityUserAssignedIdentitiesValue fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedServiceIdentityUserAssignedIdentitiesValue deserializedManagedServiceIdentityUserAssignedIdentitiesValue + = new ManagedServiceIdentityUserAssignedIdentitiesValue(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedManagedServiceIdentityUserAssignedIdentitiesValue.principalId = reader.getString(); + } else if ("clientId".equals(fieldName)) { + deserializedManagedServiceIdentityUserAssignedIdentitiesValue.clientId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedServiceIdentityUserAssignedIdentitiesValue; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManualScaleProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManualScaleProfile.java new file mode 100644 index 000000000000..4bf360185d67 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManualScaleProfile.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Specifications on number of machines. + */ +@Fluent +public final class ManualScaleProfile implements JsonSerializable { + /* + * VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', 'Standard_E16s_v3' or + * 'Standard_D16s_v5'. + */ + private String size; + + /* + * Number of nodes. + */ + private Integer count; + + /** + * Creates an instance of ManualScaleProfile class. + */ + public ManualScaleProfile() { + } + + /** + * Get the size property: VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', + * 'Standard_E16s_v3' or 'Standard_D16s_v5'. + * + * @return the size value. + */ + public String size() { + return this.size; + } + + /** + * Set the size property: VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', + * 'Standard_E16s_v3' or 'Standard_D16s_v5'. + * + * @param size the size value to set. + * @return the ManualScaleProfile object itself. + */ + public ManualScaleProfile withSize(String size) { + this.size = size; + return this; + } + + /** + * Get the count property: Number of nodes. + * + * @return the count value. + */ + public Integer count() { + return this.count; + } + + /** + * Set the count property: Number of nodes. + * + * @param count the count value to set. + * @return the ManualScaleProfile object itself. + */ + public ManualScaleProfile withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("size", this.size); + jsonWriter.writeNumberField("count", this.count); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManualScaleProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManualScaleProfile 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 ManualScaleProfile. + */ + public static ManualScaleProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManualScaleProfile deserializedManualScaleProfile = new ManualScaleProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("size".equals(fieldName)) { + deserializedManualScaleProfile.size = reader.getString(); + } else if ("count".equals(fieldName)) { + deserializedManualScaleProfile.count = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedManualScaleProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevision.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevision.java new file mode 100644 index 000000000000..486f88627e9a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevision.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Holds information on upgrades and compatibility for given major.minor mesh release. + */ +@Fluent +public class MeshRevision implements JsonSerializable { + /* + * The revision of the mesh release. + */ + private String revision; + + /* + * List of revisions available for upgrade of a specific mesh revision + */ + private List upgrades; + + /* + * List of items this revision of service mesh is compatible with, and their associated versions. + */ + private List compatibleWith; + + /** + * Creates an instance of MeshRevision class. + */ + public MeshRevision() { + } + + /** + * Get the revision property: The revision of the mesh release. + * + * @return the revision value. + */ + public String revision() { + return this.revision; + } + + /** + * Set the revision property: The revision of the mesh release. + * + * @param revision the revision value to set. + * @return the MeshRevision object itself. + */ + public MeshRevision withRevision(String revision) { + this.revision = revision; + return this; + } + + /** + * Get the upgrades property: List of revisions available for upgrade of a specific mesh revision. + * + * @return the upgrades value. + */ + public List upgrades() { + return this.upgrades; + } + + /** + * Set the upgrades property: List of revisions available for upgrade of a specific mesh revision. + * + * @param upgrades the upgrades value to set. + * @return the MeshRevision object itself. + */ + public MeshRevision withUpgrades(List upgrades) { + this.upgrades = upgrades; + return this; + } + + /** + * Get the compatibleWith property: List of items this revision of service mesh is compatible with, and their + * associated versions. + * + * @return the compatibleWith value. + */ + public List compatibleWith() { + return this.compatibleWith; + } + + /** + * Set the compatibleWith property: List of items this revision of service mesh is compatible with, and their + * associated versions. + * + * @param compatibleWith the compatibleWith value to set. + * @return the MeshRevision object itself. + */ + public MeshRevision withCompatibleWith(List compatibleWith) { + this.compatibleWith = compatibleWith; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (compatibleWith() != null) { + compatibleWith().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("revision", this.revision); + jsonWriter.writeArrayField("upgrades", this.upgrades, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("compatibleWith", this.compatibleWith, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MeshRevision from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MeshRevision 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 MeshRevision. + */ + public static MeshRevision fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MeshRevision deserializedMeshRevision = new MeshRevision(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("revision".equals(fieldName)) { + deserializedMeshRevision.revision = reader.getString(); + } else if ("upgrades".equals(fieldName)) { + List upgrades = reader.readArray(reader1 -> reader1.getString()); + deserializedMeshRevision.upgrades = upgrades; + } else if ("compatibleWith".equals(fieldName)) { + List compatibleWith + = reader.readArray(reader1 -> CompatibleVersions.fromJson(reader1)); + deserializedMeshRevision.compatibleWith = compatibleWith; + } else { + reader.skipChildren(); + } + } + + return deserializedMeshRevision; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileList.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileList.java new file mode 100644 index 000000000000..bb0f9033d503 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileList.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.MeshRevisionProfileInner; +import java.io.IOException; +import java.util.List; + +/** + * Holds an array of MeshRevisionsProfiles. + */ +@Fluent +public final class MeshRevisionProfileList implements JsonSerializable { + /* + * The MeshRevisionProfile items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of MeshRevisionProfileList class. + */ + public MeshRevisionProfileList() { + } + + /** + * Get the value property: The MeshRevisionProfile items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The MeshRevisionProfile items on this page. + * + * @param value the value value to set. + * @return the MeshRevisionProfileList object itself. + */ + public MeshRevisionProfileList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the MeshRevisionProfileList object itself. + */ + public MeshRevisionProfileList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model MeshRevisionProfileList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MeshRevisionProfileList.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MeshRevisionProfileList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MeshRevisionProfileList 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 MeshRevisionProfileList. + */ + public static MeshRevisionProfileList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MeshRevisionProfileList deserializedMeshRevisionProfileList = new MeshRevisionProfileList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> MeshRevisionProfileInner.fromJson(reader1)); + deserializedMeshRevisionProfileList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedMeshRevisionProfileList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMeshRevisionProfileList; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileProperties.java new file mode 100644 index 000000000000..2276a2a34925 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileProperties.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Mesh revision profile properties for a mesh. + */ +@Fluent +public final class MeshRevisionProfileProperties implements JsonSerializable { + /* + * Available mesh revisions. + */ + private List meshRevisions; + + /** + * Creates an instance of MeshRevisionProfileProperties class. + */ + public MeshRevisionProfileProperties() { + } + + /** + * Get the meshRevisions property: Available mesh revisions. + * + * @return the meshRevisions value. + */ + public List meshRevisions() { + return this.meshRevisions; + } + + /** + * Set the meshRevisions property: Available mesh revisions. + * + * @param meshRevisions the meshRevisions value to set. + * @return the MeshRevisionProfileProperties object itself. + */ + public MeshRevisionProfileProperties withMeshRevisions(List meshRevisions) { + this.meshRevisions = meshRevisions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (meshRevisions() != null) { + meshRevisions().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("meshRevisions", this.meshRevisions, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MeshRevisionProfileProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MeshRevisionProfileProperties 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 MeshRevisionProfileProperties. + */ + public static MeshRevisionProfileProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MeshRevisionProfileProperties deserializedMeshRevisionProfileProperties + = new MeshRevisionProfileProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("meshRevisions".equals(fieldName)) { + List meshRevisions = reader.readArray(reader1 -> MeshRevision.fromJson(reader1)); + deserializedMeshRevisionProfileProperties.meshRevisions = meshRevisions; + } else { + reader.skipChildren(); + } + } + + return deserializedMeshRevisionProfileProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileList.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileList.java new file mode 100644 index 000000000000..578dc0841f93 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileList.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.MeshUpgradeProfileInner; +import java.io.IOException; +import java.util.List; + +/** + * Holds an array of MeshUpgradeProfiles. + */ +@Fluent +public final class MeshUpgradeProfileList implements JsonSerializable { + /* + * The MeshUpgradeProfile items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of MeshUpgradeProfileList class. + */ + public MeshUpgradeProfileList() { + } + + /** + * Get the value property: The MeshUpgradeProfile items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The MeshUpgradeProfile items on this page. + * + * @param value the value value to set. + * @return the MeshUpgradeProfileList object itself. + */ + public MeshUpgradeProfileList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the MeshUpgradeProfileList object itself. + */ + public MeshUpgradeProfileList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model MeshUpgradeProfileList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MeshUpgradeProfileList.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MeshUpgradeProfileList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MeshUpgradeProfileList 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 MeshUpgradeProfileList. + */ + public static MeshUpgradeProfileList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MeshUpgradeProfileList deserializedMeshUpgradeProfileList = new MeshUpgradeProfileList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> MeshUpgradeProfileInner.fromJson(reader1)); + deserializedMeshUpgradeProfileList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedMeshUpgradeProfileList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMeshUpgradeProfileList; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileProperties.java new file mode 100644 index 000000000000..82eb185db101 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileProperties.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Mesh upgrade profile properties for a major.minor release. + */ +@Fluent +public final class MeshUpgradeProfileProperties extends MeshRevision { + /** + * Creates an instance of MeshUpgradeProfileProperties class. + */ + public MeshUpgradeProfileProperties() { + } + + /** + * {@inheritDoc} + */ + @Override + public MeshUpgradeProfileProperties withRevision(String revision) { + super.withRevision(revision); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public MeshUpgradeProfileProperties withUpgrades(List upgrades) { + super.withUpgrades(upgrades); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public MeshUpgradeProfileProperties withCompatibleWith(List compatibleWith) { + super.withCompatibleWith(compatibleWith); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (compatibleWith() != null) { + compatibleWith().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("revision", revision()); + jsonWriter.writeArrayField("upgrades", upgrades(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("compatibleWith", compatibleWith(), (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MeshUpgradeProfileProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MeshUpgradeProfileProperties 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 MeshUpgradeProfileProperties. + */ + public static MeshUpgradeProfileProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MeshUpgradeProfileProperties deserializedMeshUpgradeProfileProperties = new MeshUpgradeProfileProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("revision".equals(fieldName)) { + deserializedMeshUpgradeProfileProperties.withRevision(reader.getString()); + } else if ("upgrades".equals(fieldName)) { + List upgrades = reader.readArray(reader1 -> reader1.getString()); + deserializedMeshUpgradeProfileProperties.withUpgrades(upgrades); + } else if ("compatibleWith".equals(fieldName)) { + List compatibleWith + = reader.readArray(reader1 -> CompatibleVersions.fromJson(reader1)); + deserializedMeshUpgradeProfileProperties.withCompatibleWith(compatibleWith); + } else { + reader.skipChildren(); + } + } + + return deserializedMeshUpgradeProfileProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProperties.java new file mode 100644 index 000000000000..4abf775728e9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProperties.java @@ -0,0 +1,299 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Properties of a namespace managed by ARM. + */ +@Fluent +public final class NamespaceProperties implements JsonSerializable { + /* + * The current provisioning state of the namespace. + */ + private NamespaceProvisioningState provisioningState; + + /* + * The labels of managed namespace. + */ + private Map labels; + + /* + * The annotations of managed namespace. + */ + private Map annotations; + + /* + * The special FQDN used by the Azure Portal to access the Managed Cluster. This FQDN is for use only by the Azure + * Portal and should not be used by other clients. The Azure Portal requires certain Cross-Origin Resource Sharing + * (CORS) headers to be sent in some responses, which Kubernetes APIServer doesn't handle by default. This special + * FQDN supports CORS, allowing the Azure Portal to function properly. + */ + private String portalFqdn; + + /* + * The default resource quota enforced upon the namespace. Customers can have other Kubernetes resource quota + * objects under the namespace. Resource quotas are additive; if multiple resource quotas are applied to a given + * namespace, then the effective limit will be one such that all quotas on the namespace can be satisfied. + */ + private ResourceQuota defaultResourceQuota; + + /* + * The default network policy enforced upon the namespace. Customers can have other Kubernetes network policy + * objects under the namespace. Network policies are additive; if a policy or policies apply to a given pod for a + * given direction, the connections allowed in that direction for the pod is the union of what all applicable + * policies allow. + */ + private NetworkPolicies defaultNetworkPolicy; + + /* + * Action if Kubernetes namespace with same name already exists. + */ + private AdoptionPolicy adoptionPolicy; + + /* + * Delete options of a namespace. + */ + private DeletePolicy deletePolicy; + + /** + * Creates an instance of NamespaceProperties class. + */ + public NamespaceProperties() { + } + + /** + * Get the provisioningState property: The current provisioning state of the namespace. + * + * @return the provisioningState value. + */ + public NamespaceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the labels property: The labels of managed namespace. + * + * @return the labels value. + */ + public Map labels() { + return this.labels; + } + + /** + * Set the labels property: The labels of managed namespace. + * + * @param labels the labels value to set. + * @return the NamespaceProperties object itself. + */ + public NamespaceProperties withLabels(Map labels) { + this.labels = labels; + return this; + } + + /** + * Get the annotations property: The annotations of managed namespace. + * + * @return the annotations value. + */ + public Map annotations() { + return this.annotations; + } + + /** + * Set the annotations property: The annotations of managed namespace. + * + * @param annotations the annotations value to set. + * @return the NamespaceProperties object itself. + */ + public NamespaceProperties withAnnotations(Map annotations) { + this.annotations = annotations; + return this; + } + + /** + * Get the portalFqdn property: The special FQDN used by the Azure Portal to access the Managed Cluster. This FQDN + * is for use only by the Azure Portal and should not be used by other clients. The Azure Portal requires certain + * Cross-Origin Resource Sharing (CORS) headers to be sent in some responses, which Kubernetes APIServer doesn't + * handle by default. This special FQDN supports CORS, allowing the Azure Portal to function properly. + * + * @return the portalFqdn value. + */ + public String portalFqdn() { + return this.portalFqdn; + } + + /** + * Get the defaultResourceQuota property: The default resource quota enforced upon the namespace. Customers can have + * other Kubernetes resource quota objects under the namespace. Resource quotas are additive; if multiple resource + * quotas are applied to a given namespace, then the effective limit will be one such that all quotas on the + * namespace can be satisfied. + * + * @return the defaultResourceQuota value. + */ + public ResourceQuota defaultResourceQuota() { + return this.defaultResourceQuota; + } + + /** + * Set the defaultResourceQuota property: The default resource quota enforced upon the namespace. Customers can have + * other Kubernetes resource quota objects under the namespace. Resource quotas are additive; if multiple resource + * quotas are applied to a given namespace, then the effective limit will be one such that all quotas on the + * namespace can be satisfied. + * + * @param defaultResourceQuota the defaultResourceQuota value to set. + * @return the NamespaceProperties object itself. + */ + public NamespaceProperties withDefaultResourceQuota(ResourceQuota defaultResourceQuota) { + this.defaultResourceQuota = defaultResourceQuota; + return this; + } + + /** + * Get the defaultNetworkPolicy property: The default network policy enforced upon the namespace. Customers can have + * other Kubernetes network policy objects under the namespace. Network policies are additive; if a policy or + * policies apply to a given pod for a given direction, the connections allowed in that direction for the pod is the + * union of what all applicable policies allow. + * + * @return the defaultNetworkPolicy value. + */ + public NetworkPolicies defaultNetworkPolicy() { + return this.defaultNetworkPolicy; + } + + /** + * Set the defaultNetworkPolicy property: The default network policy enforced upon the namespace. Customers can have + * other Kubernetes network policy objects under the namespace. Network policies are additive; if a policy or + * policies apply to a given pod for a given direction, the connections allowed in that direction for the pod is the + * union of what all applicable policies allow. + * + * @param defaultNetworkPolicy the defaultNetworkPolicy value to set. + * @return the NamespaceProperties object itself. + */ + public NamespaceProperties withDefaultNetworkPolicy(NetworkPolicies defaultNetworkPolicy) { + this.defaultNetworkPolicy = defaultNetworkPolicy; + return this; + } + + /** + * Get the adoptionPolicy property: Action if Kubernetes namespace with same name already exists. + * + * @return the adoptionPolicy value. + */ + public AdoptionPolicy adoptionPolicy() { + return this.adoptionPolicy; + } + + /** + * Set the adoptionPolicy property: Action if Kubernetes namespace with same name already exists. + * + * @param adoptionPolicy the adoptionPolicy value to set. + * @return the NamespaceProperties object itself. + */ + public NamespaceProperties withAdoptionPolicy(AdoptionPolicy adoptionPolicy) { + this.adoptionPolicy = adoptionPolicy; + return this; + } + + /** + * Get the deletePolicy property: Delete options of a namespace. + * + * @return the deletePolicy value. + */ + public DeletePolicy deletePolicy() { + return this.deletePolicy; + } + + /** + * Set the deletePolicy property: Delete options of a namespace. + * + * @param deletePolicy the deletePolicy value to set. + * @return the NamespaceProperties object itself. + */ + public NamespaceProperties withDeletePolicy(DeletePolicy deletePolicy) { + this.deletePolicy = deletePolicy; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (defaultResourceQuota() != null) { + defaultResourceQuota().validate(); + } + if (defaultNetworkPolicy() != null) { + defaultNetworkPolicy().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("labels", this.labels, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("annotations", this.annotations, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("defaultResourceQuota", this.defaultResourceQuota); + jsonWriter.writeJsonField("defaultNetworkPolicy", this.defaultNetworkPolicy); + jsonWriter.writeStringField("adoptionPolicy", + this.adoptionPolicy == null ? null : this.adoptionPolicy.toString()); + jsonWriter.writeStringField("deletePolicy", this.deletePolicy == null ? null : this.deletePolicy.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NamespaceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NamespaceProperties 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 NamespaceProperties. + */ + public static NamespaceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NamespaceProperties deserializedNamespaceProperties = new NamespaceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedNamespaceProperties.provisioningState + = NamespaceProvisioningState.fromString(reader.getString()); + } else if ("labels".equals(fieldName)) { + Map labels = reader.readMap(reader1 -> reader1.getString()); + deserializedNamespaceProperties.labels = labels; + } else if ("annotations".equals(fieldName)) { + Map annotations = reader.readMap(reader1 -> reader1.getString()); + deserializedNamespaceProperties.annotations = annotations; + } else if ("portalFqdn".equals(fieldName)) { + deserializedNamespaceProperties.portalFqdn = reader.getString(); + } else if ("defaultResourceQuota".equals(fieldName)) { + deserializedNamespaceProperties.defaultResourceQuota = ResourceQuota.fromJson(reader); + } else if ("defaultNetworkPolicy".equals(fieldName)) { + deserializedNamespaceProperties.defaultNetworkPolicy = NetworkPolicies.fromJson(reader); + } else if ("adoptionPolicy".equals(fieldName)) { + deserializedNamespaceProperties.adoptionPolicy = AdoptionPolicy.fromString(reader.getString()); + } else if ("deletePolicy".equals(fieldName)) { + deserializedNamespaceProperties.deletePolicy = DeletePolicy.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNamespaceProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProvisioningState.java new file mode 100644 index 000000000000..c52c72d0eefd --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProvisioningState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The current provisioning state of the namespace. + */ +public final class NamespaceProvisioningState extends ExpandableStringEnum { + /** + * Static value Updating for NamespaceProvisioningState. + */ + public static final NamespaceProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Deleting for NamespaceProvisioningState. + */ + public static final NamespaceProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Creating for NamespaceProvisioningState. + */ + public static final NamespaceProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Succeeded for NamespaceProvisioningState. + */ + public static final NamespaceProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for NamespaceProvisioningState. + */ + public static final NamespaceProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for NamespaceProvisioningState. + */ + public static final NamespaceProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of NamespaceProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NamespaceProvisioningState() { + } + + /** + * Creates or finds a NamespaceProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding NamespaceProvisioningState. + */ + public static NamespaceProvisioningState fromString(String name) { + return fromString(name, NamespaceProvisioningState.class); + } + + /** + * Gets known NamespaceProvisioningState values. + * + * @return known NamespaceProvisioningState values. + */ + public static Collection values() { + return values(NamespaceProvisioningState.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkDataplane.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkDataplane.java new file mode 100644 index 000000000000..aba8540b5e7e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkDataplane.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Network dataplane used in the Kubernetes cluster. + */ +public final class NetworkDataplane extends ExpandableStringEnum { + /** + * Static value azure for NetworkDataplane. + */ + public static final NetworkDataplane AZURE = fromString("azure"); + + /** + * Static value cilium for NetworkDataplane. + */ + public static final NetworkDataplane CILIUM = fromString("cilium"); + + /** + * Creates a new instance of NetworkDataplane value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NetworkDataplane() { + } + + /** + * Creates or finds a NetworkDataplane from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkDataplane. + */ + public static NetworkDataplane fromString(String name) { + return fromString(name, NetworkDataplane.class); + } + + /** + * Gets known NetworkDataplane values. + * + * @return known NetworkDataplane values. + */ + public static Collection values() { + return values(NetworkDataplane.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkMode.java new file mode 100644 index 000000000000..d6fb206936a3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkMode.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The network mode Azure CNI is configured with. This cannot be specified if networkPlugin is anything other than + * 'azure'. + */ +public final class NetworkMode extends ExpandableStringEnum { + /** + * Static value transparent for NetworkMode. + */ + public static final NetworkMode TRANSPARENT = fromString("transparent"); + + /** + * Static value bridge for NetworkMode. + */ + public static final NetworkMode BRIDGE = fromString("bridge"); + + /** + * Creates a new instance of NetworkMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NetworkMode() { + } + + /** + * Creates or finds a NetworkMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkMode. + */ + public static NetworkMode fromString(String name) { + return fromString(name, NetworkMode.class); + } + + /** + * Gets known NetworkMode values. + * + * @return known NetworkMode values. + */ + public static Collection values() { + return values(NetworkMode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPlugin.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPlugin.java new file mode 100644 index 000000000000..ac78ed293a37 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPlugin.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Network plugin used for building the Kubernetes network. + */ +public final class NetworkPlugin extends ExpandableStringEnum { + /** + * Static value azure for NetworkPlugin. + */ + public static final NetworkPlugin AZURE = fromString("azure"); + + /** + * Static value kubenet for NetworkPlugin. + */ + public static final NetworkPlugin KUBENET = fromString("kubenet"); + + /** + * Static value none for NetworkPlugin. + */ + public static final NetworkPlugin NONE = fromString("none"); + + /** + * Creates a new instance of NetworkPlugin value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NetworkPlugin() { + } + + /** + * Creates or finds a NetworkPlugin from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkPlugin. + */ + public static NetworkPlugin fromString(String name) { + return fromString(name, NetworkPlugin.class); + } + + /** + * Gets known NetworkPlugin values. + * + * @return known NetworkPlugin values. + */ + public static Collection values() { + return values(NetworkPlugin.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPluginMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPluginMode.java new file mode 100644 index 000000000000..eee6c3486d77 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPluginMode.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The mode the network plugin should use. + */ +public final class NetworkPluginMode extends ExpandableStringEnum { + /** + * Static value overlay for NetworkPluginMode. + */ + public static final NetworkPluginMode OVERLAY = fromString("overlay"); + + /** + * Creates a new instance of NetworkPluginMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NetworkPluginMode() { + } + + /** + * Creates or finds a NetworkPluginMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkPluginMode. + */ + public static NetworkPluginMode fromString(String name) { + return fromString(name, NetworkPluginMode.class); + } + + /** + * Gets known NetworkPluginMode values. + * + * @return known NetworkPluginMode values. + */ + public static Collection values() { + return values(NetworkPluginMode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicies.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicies.java new file mode 100644 index 000000000000..f1bd59a6f87f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicies.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Default network policy of the namespace, specifying ingress and egress rules. + */ +@Fluent +public final class NetworkPolicies implements JsonSerializable { + /* + * Enum representing different network policy rules. + */ + private PolicyRule ingress; + + /* + * Enum representing different network policy rules. + */ + private PolicyRule egress; + + /** + * Creates an instance of NetworkPolicies class. + */ + public NetworkPolicies() { + } + + /** + * Get the ingress property: Enum representing different network policy rules. + * + * @return the ingress value. + */ + public PolicyRule ingress() { + return this.ingress; + } + + /** + * Set the ingress property: Enum representing different network policy rules. + * + * @param ingress the ingress value to set. + * @return the NetworkPolicies object itself. + */ + public NetworkPolicies withIngress(PolicyRule ingress) { + this.ingress = ingress; + return this; + } + + /** + * Get the egress property: Enum representing different network policy rules. + * + * @return the egress value. + */ + public PolicyRule egress() { + return this.egress; + } + + /** + * Set the egress property: Enum representing different network policy rules. + * + * @param egress the egress value to set. + * @return the NetworkPolicies object itself. + */ + public NetworkPolicies withEgress(PolicyRule egress) { + this.egress = egress; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ingress", this.ingress == null ? null : this.ingress.toString()); + jsonWriter.writeStringField("egress", this.egress == null ? null : this.egress.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkPolicies from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkPolicies 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 NetworkPolicies. + */ + public static NetworkPolicies fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkPolicies deserializedNetworkPolicies = new NetworkPolicies(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ingress".equals(fieldName)) { + deserializedNetworkPolicies.ingress = PolicyRule.fromString(reader.getString()); + } else if ("egress".equals(fieldName)) { + deserializedNetworkPolicies.egress = PolicyRule.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkPolicies; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicy.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicy.java new file mode 100644 index 000000000000..7841e4178e79 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicy.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Network policy used for building the Kubernetes network. + */ +public final class NetworkPolicy extends ExpandableStringEnum { + /** + * Static value none for NetworkPolicy. + */ + public static final NetworkPolicy NONE = fromString("none"); + + /** + * Static value calico for NetworkPolicy. + */ + public static final NetworkPolicy CALICO = fromString("calico"); + + /** + * Static value azure for NetworkPolicy. + */ + public static final NetworkPolicy AZURE = fromString("azure"); + + /** + * Static value cilium for NetworkPolicy. + */ + public static final NetworkPolicy CILIUM = fromString("cilium"); + + /** + * Creates a new instance of NetworkPolicy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NetworkPolicy() { + } + + /** + * Creates or finds a NetworkPolicy from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkPolicy. + */ + public static NetworkPolicy fromString(String name) { + return fromString(name, NetworkPolicy.class); + } + + /** + * Gets known NetworkPolicy values. + * + * @return known NetworkPolicy values. + */ + public static Collection values() { + return values(NetworkPolicy.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NginxIngressControllerType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NginxIngressControllerType.java new file mode 100644 index 000000000000..ec0dd92c299c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NginxIngressControllerType.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Ingress type for the default NginxIngressController custom resource. + */ +public final class NginxIngressControllerType extends ExpandableStringEnum { + /** + * Static value AnnotationControlled for NginxIngressControllerType. + */ + public static final NginxIngressControllerType ANNOTATION_CONTROLLED = fromString("AnnotationControlled"); + + /** + * Static value External for NginxIngressControllerType. + */ + public static final NginxIngressControllerType EXTERNAL = fromString("External"); + + /** + * Static value Internal for NginxIngressControllerType. + */ + public static final NginxIngressControllerType INTERNAL = fromString("Internal"); + + /** + * Static value None for NginxIngressControllerType. + */ + public static final NginxIngressControllerType NONE = fromString("None"); + + /** + * Creates a new instance of NginxIngressControllerType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NginxIngressControllerType() { + } + + /** + * Creates or finds a NginxIngressControllerType from its string representation. + * + * @param name a name to look for. + * @return the corresponding NginxIngressControllerType. + */ + public static NginxIngressControllerType fromString(String name) { + return fromString(name, NginxIngressControllerType.class); + } + + /** + * Gets known NginxIngressControllerType values. + * + * @return known NginxIngressControllerType values. + */ + public static Collection values() { + return values(NginxIngressControllerType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java new file mode 100644 index 000000000000..8f9de197ee22 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage. + */ +public final class NodeOSUpgradeChannel extends ExpandableStringEnum { + /** + * Static value None for NodeOSUpgradeChannel. + */ + public static final NodeOSUpgradeChannel NONE = fromString("None"); + + /** + * Static value Unmanaged for NodeOSUpgradeChannel. + */ + public static final NodeOSUpgradeChannel UNMANAGED = fromString("Unmanaged"); + + /** + * Static value NodeImage for NodeOSUpgradeChannel. + */ + public static final NodeOSUpgradeChannel NODE_IMAGE = fromString("NodeImage"); + + /** + * Static value SecurityPatch for NodeOSUpgradeChannel. + */ + public static final NodeOSUpgradeChannel SECURITY_PATCH = fromString("SecurityPatch"); + + /** + * Creates a new instance of NodeOSUpgradeChannel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NodeOSUpgradeChannel() { + } + + /** + * Creates or finds a NodeOSUpgradeChannel from its string representation. + * + * @param name a name to look for. + * @return the corresponding NodeOSUpgradeChannel. + */ + public static NodeOSUpgradeChannel fromString(String name) { + return fromString(name, NodeOSUpgradeChannel.class); + } + + /** + * Gets known NodeOSUpgradeChannel values. + * + * @return known NodeOSUpgradeChannel values. + */ + public static Collection values() { + return values(NodeOSUpgradeChannel.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningDefaultNodePools.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningDefaultNodePools.java new file mode 100644 index 000000000000..e9eb4ca1aea5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningDefaultNodePools.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The set of default Karpenter NodePools (CRDs) configured for node provisioning. This field has no effect unless mode + * is 'Auto'. Warning: Changing this from Auto to None on an existing cluster will cause the default Karpenter NodePools + * to be deleted, which will drain and delete the nodes associated with those pools. It is strongly recommended to not + * do this unless there are idle nodes ready to take the pods evicted by that action. If not specified, the default is + * Auto. For more information see aka.ms/aks/nap#node-pools. + */ +public final class NodeProvisioningDefaultNodePools extends ExpandableStringEnum { + /** + * Static value None for NodeProvisioningDefaultNodePools. + */ + public static final NodeProvisioningDefaultNodePools NONE = fromString("None"); + + /** + * Static value Auto for NodeProvisioningDefaultNodePools. + */ + public static final NodeProvisioningDefaultNodePools AUTO = fromString("Auto"); + + /** + * Creates a new instance of NodeProvisioningDefaultNodePools value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NodeProvisioningDefaultNodePools() { + } + + /** + * Creates or finds a NodeProvisioningDefaultNodePools from its string representation. + * + * @param name a name to look for. + * @return the corresponding NodeProvisioningDefaultNodePools. + */ + public static NodeProvisioningDefaultNodePools fromString(String name) { + return fromString(name, NodeProvisioningDefaultNodePools.class); + } + + /** + * Gets known NodeProvisioningDefaultNodePools values. + * + * @return known NodeProvisioningDefaultNodePools values. + */ + public static Collection values() { + return values(NodeProvisioningDefaultNodePools.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningMode.java new file mode 100644 index 000000000000..18a2c360e7fe --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningMode.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The node provisioning mode. If not specified, the default is Manual. + */ +public final class NodeProvisioningMode extends ExpandableStringEnum { + /** + * Static value Manual for NodeProvisioningMode. + */ + public static final NodeProvisioningMode MANUAL = fromString("Manual"); + + /** + * Static value Auto for NodeProvisioningMode. + */ + public static final NodeProvisioningMode AUTO = fromString("Auto"); + + /** + * Creates a new instance of NodeProvisioningMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NodeProvisioningMode() { + } + + /** + * Creates or finds a NodeProvisioningMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding NodeProvisioningMode. + */ + public static NodeProvisioningMode fromString(String name) { + return fromString(name, NodeProvisioningMode.class); + } + + /** + * Gets known NodeProvisioningMode values. + * + * @return known NodeProvisioningMode values. + */ + public static Collection values() { + return values(NodeProvisioningMode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSDiskType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSDiskType.java new file mode 100644 index 000000000000..cea6111635cd --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSDiskType.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the VM supports it and has + * a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after + * creation. For more information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + */ +public final class OSDiskType extends ExpandableStringEnum { + /** + * Static value Managed for OSDiskType. + */ + public static final OSDiskType MANAGED = fromString("Managed"); + + /** + * Static value Ephemeral for OSDiskType. + */ + public static final OSDiskType EPHEMERAL = fromString("Ephemeral"); + + /** + * Creates a new instance of OSDiskType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OSDiskType() { + } + + /** + * Creates or finds a OSDiskType from its string representation. + * + * @param name a name to look for. + * @return the corresponding OSDiskType. + */ + public static OSDiskType fromString(String name) { + return fromString(name, OSDiskType.class); + } + + /** + * Gets known OSDiskType values. + * + * @return known OSDiskType values. + */ + public static Collection values() { + return values(OSDiskType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java new file mode 100644 index 000000000000..988675bd21e2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 + * when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + */ +public final class OSSku extends ExpandableStringEnum { + /** + * Static value Ubuntu for OSSku. + */ + public static final OSSku UBUNTU = fromString("Ubuntu"); + + /** + * Static value AzureLinux for OSSku. + */ + public static final OSSku AZURE_LINUX = fromString("AzureLinux"); + + /** + * Static value AzureLinux3 for OSSku. + */ + public static final OSSku AZURE_LINUX3 = fromString("AzureLinux3"); + + /** + * Static value CBLMariner for OSSku. + */ + public static final OSSku CBLMARINER = fromString("CBLMariner"); + + /** + * Static value Windows2019 for OSSku. + */ + public static final OSSku WINDOWS2019 = fromString("Windows2019"); + + /** + * Static value Windows2022 for OSSku. + */ + public static final OSSku WINDOWS2022 = fromString("Windows2022"); + + /** + * Static value Ubuntu2204 for OSSku. + */ + public static final OSSku UBUNTU2204 = fromString("Ubuntu2204"); + + /** + * Static value Ubuntu2404 for OSSku. + */ + public static final OSSku UBUNTU2404 = fromString("Ubuntu2404"); + + /** + * Creates a new instance of OSSku value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OSSku() { + } + + /** + * Creates or finds a OSSku from its string representation. + * + * @param name a name to look for. + * @return the corresponding OSSku. + */ + public static OSSku fromString(String name) { + return fromString(name, OSSku.class); + } + + /** + * Gets known OSSku values. + * + * @return known OSSku values. + */ + public static Collection values() { + return values(OSSku.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSType.java index 2a466b6172c1..7fecc4a5ef8e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSType.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Deprecated generated code +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -8,7 +8,7 @@ import java.util.Collection; /** - * OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * The operating system type. The default is Linux. */ public final class OSType extends ExpandableStringEnum { /** diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OperationListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OperationListResult.java new file mode 100644 index 000000000000..200a14a1e163 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OperationListResult.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.OperationValueInner; +import java.io.IOException; +import java.util.List; + +/** + * The List Operation response. + */ +@Fluent +public final class OperationListResult implements JsonSerializable { + /* + * The list of operations + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of OperationListResult class. + */ + public OperationListResult() { + } + + /** + * Get the value property: The list of operations. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of operations. + * + * @param value the value value to set. + * @return the OperationListResult object itself. + */ + public OperationListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the OperationListResult object itself. + */ + public OperationListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model OperationListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OperationListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationListResult 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 OperationListResult. + */ + public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationListResult deserializedOperationListResult = new OperationListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> OperationValueInner.fromJson(reader1)); + deserializedOperationListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedOperationListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundEnvironmentEndpointCollection.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundEnvironmentEndpointCollection.java new file mode 100644 index 000000000000..4195870fa019 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundEnvironmentEndpointCollection.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.OutboundEnvironmentEndpointInner; +import java.io.IOException; +import java.util.List; + +/** + * Collection of OutboundEnvironmentEndpoint. + */ +@Fluent +public final class OutboundEnvironmentEndpointCollection + implements JsonSerializable { + /* + * The OutboundEnvironmentEndpoint items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of OutboundEnvironmentEndpointCollection class. + */ + public OutboundEnvironmentEndpointCollection() { + } + + /** + * Get the value property: The OutboundEnvironmentEndpoint items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The OutboundEnvironmentEndpoint items on this page. + * + * @param value the value value to set. + * @return the OutboundEnvironmentEndpointCollection object itself. + */ + public OutboundEnvironmentEndpointCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the OutboundEnvironmentEndpointCollection object itself. + */ + public OutboundEnvironmentEndpointCollection withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model OutboundEnvironmentEndpointCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OutboundEnvironmentEndpointCollection.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OutboundEnvironmentEndpointCollection from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OutboundEnvironmentEndpointCollection 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 OutboundEnvironmentEndpointCollection. + */ + public static OutboundEnvironmentEndpointCollection fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OutboundEnvironmentEndpointCollection deserializedOutboundEnvironmentEndpointCollection + = new OutboundEnvironmentEndpointCollection(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> OutboundEnvironmentEndpointInner.fromJson(reader1)); + deserializedOutboundEnvironmentEndpointCollection.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedOutboundEnvironmentEndpointCollection.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOutboundEnvironmentEndpointCollection; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundType.java new file mode 100644 index 000000000000..c4415e9f4e44 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundType.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The outbound (egress) routing method. This can only be set at cluster creation time and cannot be changed later. For + * more information see [egress outbound type](https://docs.microsoft.com/azure/aks/egress-outboundtype). + */ +public final class OutboundType extends ExpandableStringEnum { + /** + * Static value loadBalancer for OutboundType. + */ + public static final OutboundType LOAD_BALANCER = fromString("loadBalancer"); + + /** + * Static value userDefinedRouting for OutboundType. + */ + public static final OutboundType USER_DEFINED_ROUTING = fromString("userDefinedRouting"); + + /** + * Static value managedNATGateway for OutboundType. + */ + public static final OutboundType MANAGED_NATGATEWAY = fromString("managedNATGateway"); + + /** + * Static value userAssignedNATGateway for OutboundType. + */ + public static final OutboundType USER_ASSIGNED_NATGATEWAY = fromString("userAssignedNATGateway"); + + /** + * Static value none for OutboundType. + */ + public static final OutboundType NONE = fromString("none"); + + /** + * Creates a new instance of OutboundType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OutboundType() { + } + + /** + * Creates or finds a OutboundType from its string representation. + * + * @param name a name to look for. + * @return the corresponding OutboundType. + */ + public static OutboundType fromString(String name) { + return fromString(name, OutboundType.class); + } + + /** + * Gets known OutboundType values. + * + * @return known OutboundType values. + */ + public static Collection values() { + return values(OutboundType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodIpAllocationMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodIpAllocationMode.java new file mode 100644 index 000000000000..f04f79bc76d1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodIpAllocationMode.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default + * is 'DynamicIndividual'. + */ +public final class PodIpAllocationMode extends ExpandableStringEnum { + /** + * Static value DynamicIndividual for PodIpAllocationMode. + */ + public static final PodIpAllocationMode DYNAMIC_INDIVIDUAL = fromString("DynamicIndividual"); + + /** + * Static value StaticBlock for PodIpAllocationMode. + */ + public static final PodIpAllocationMode STATIC_BLOCK = fromString("StaticBlock"); + + /** + * Creates a new instance of PodIpAllocationMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PodIpAllocationMode() { + } + + /** + * Creates or finds a PodIpAllocationMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding PodIpAllocationMode. + */ + public static PodIpAllocationMode fromString(String name) { + return fromString(name, PodIpAllocationMode.class); + } + + /** + * Gets known PodIpAllocationMode values. + * + * @return known PodIpAllocationMode values. + */ + public static Collection values() { + return values(PodIpAllocationMode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PolicyRule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PolicyRule.java new file mode 100644 index 000000000000..e0be3112b570 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PolicyRule.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enum representing different network policy rules. + */ +public final class PolicyRule extends ExpandableStringEnum { + /** + * Static value DenyAll for PolicyRule. + */ + public static final PolicyRule DENY_ALL = fromString("DenyAll"); + + /** + * Static value AllowAll for PolicyRule. + */ + public static final PolicyRule ALLOW_ALL = fromString("AllowAll"); + + /** + * Static value AllowSameNamespace for PolicyRule. + */ + public static final PolicyRule ALLOW_SAME_NAMESPACE = fromString("AllowSameNamespace"); + + /** + * Creates a new instance of PolicyRule value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PolicyRule() { + } + + /** + * Creates or finds a PolicyRule from its string representation. + * + * @param name a name to look for. + * @return the corresponding PolicyRule. + */ + public static PolicyRule fromString(String name) { + return fromString(name, PolicyRule.class); + } + + /** + * Gets known PolicyRule values. + * + * @return known PolicyRule values. + */ + public static Collection values() { + return values(PolicyRule.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PortRange.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PortRange.java new file mode 100644 index 000000000000..4747a3ebbaaf --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PortRange.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 port range. + */ +@Fluent +public final class PortRange implements JsonSerializable { + /* + * The minimum port that is included in the range. It should be ranged from 1 to 65535, and be less than or equal to + * portEnd. + */ + private Integer portStart; + + /* + * The maximum port that is included in the range. It should be ranged from 1 to 65535, and be greater than or equal + * to portStart. + */ + private Integer portEnd; + + /* + * The network protocol of the port. + */ + private Protocol protocol; + + /** + * Creates an instance of PortRange class. + */ + public PortRange() { + } + + /** + * Get the portStart property: The minimum port that is included in the range. It should be ranged from 1 to 65535, + * and be less than or equal to portEnd. + * + * @return the portStart value. + */ + public Integer portStart() { + return this.portStart; + } + + /** + * Set the portStart property: The minimum port that is included in the range. It should be ranged from 1 to 65535, + * and be less than or equal to portEnd. + * + * @param portStart the portStart value to set. + * @return the PortRange object itself. + */ + public PortRange withPortStart(Integer portStart) { + this.portStart = portStart; + return this; + } + + /** + * Get the portEnd property: The maximum port that is included in the range. It should be ranged from 1 to 65535, + * and be greater than or equal to portStart. + * + * @return the portEnd value. + */ + public Integer portEnd() { + return this.portEnd; + } + + /** + * Set the portEnd property: The maximum port that is included in the range. It should be ranged from 1 to 65535, + * and be greater than or equal to portStart. + * + * @param portEnd the portEnd value to set. + * @return the PortRange object itself. + */ + public PortRange withPortEnd(Integer portEnd) { + this.portEnd = portEnd; + return this; + } + + /** + * Get the protocol property: The network protocol of the port. + * + * @return the protocol value. + */ + public Protocol protocol() { + return this.protocol; + } + + /** + * Set the protocol property: The network protocol of the port. + * + * @param protocol the protocol value to set. + * @return the PortRange object itself. + */ + public PortRange withProtocol(Protocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("portStart", this.portStart); + jsonWriter.writeNumberField("portEnd", this.portEnd); + jsonWriter.writeStringField("protocol", this.protocol == null ? null : this.protocol.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PortRange from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PortRange 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 PortRange. + */ + public static PortRange fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PortRange deserializedPortRange = new PortRange(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("portStart".equals(fieldName)) { + deserializedPortRange.portStart = reader.getNullable(JsonReader::getInt); + } else if ("portEnd".equals(fieldName)) { + deserializedPortRange.portEnd = reader.getNullable(JsonReader::getInt); + } else if ("protocol".equals(fieldName)) { + deserializedPortRange.protocol = Protocol.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPortRange; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PowerState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PowerState.java new file mode 100644 index 000000000000..0343811403b8 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PowerState.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 Power State of the cluster. + */ +@Fluent +public final class PowerState implements JsonSerializable { + /* + * Tells whether the cluster is Running or Stopped + */ + private Code code; + + /** + * Creates an instance of PowerState class. + */ + public PowerState() { + } + + /** + * Get the code property: Tells whether the cluster is Running or Stopped. + * + * @return the code value. + */ + public Code code() { + return this.code; + } + + /** + * Set the code property: Tells whether the cluster is Running or Stopped. + * + * @param code the code value to set. + * @return the PowerState object itself. + */ + public PowerState withCode(Code code) { + this.code = code; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("code", this.code == null ? null : this.code.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PowerState from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PowerState 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 PowerState. + */ + public static PowerState fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PowerState deserializedPowerState = new PowerState(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("code".equals(fieldName)) { + deserializedPowerState.code = Code.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPowerState; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpoint.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpoint.java new file mode 100644 index 000000000000..727c95cdda56 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpoint.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Private endpoint which a connection belongs to. + */ +@Fluent +public final class PrivateEndpoint implements JsonSerializable { + /* + * The resource ID of the private endpoint + */ + private String id; + + /** + * Creates an instance of PrivateEndpoint class. + */ + public PrivateEndpoint() { + } + + /** + * Get the id property: The resource ID of the private endpoint. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The resource ID of the private endpoint. + * + * @param id the id value to set. + * @return the PrivateEndpoint object itself. + */ + public PrivateEndpoint withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpoint from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpoint 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 PrivateEndpoint. + */ + public static PrivateEndpoint fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpoint deserializedPrivateEndpoint = new PrivateEndpoint(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateEndpoint.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpoint; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpointConnectionProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpointConnectionProvisioningState.java new file mode 100644 index 000000000000..5c68c55a7c6a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpointConnectionProvisioningState.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The current provisioning state. + */ +public final class PrivateEndpointConnectionProvisioningState + extends ExpandableStringEnum { + /** + * Static value Canceled for PrivateEndpointConnectionProvisioningState. + */ + public static final PrivateEndpointConnectionProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Creating for PrivateEndpointConnectionProvisioningState. + */ + public static final PrivateEndpointConnectionProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Deleting for PrivateEndpointConnectionProvisioningState. + */ + public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Failed for PrivateEndpointConnectionProvisioningState. + */ + public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Succeeded for PrivateEndpointConnectionProvisioningState. + */ + public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Creates a new instance of PrivateEndpointConnectionProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrivateEndpointConnectionProvisioningState() { + } + + /** + * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding PrivateEndpointConnectionProvisioningState. + */ + public static PrivateEndpointConnectionProvisioningState fromString(String name) { + return fromString(name, PrivateEndpointConnectionProvisioningState.class); + } + + /** + * Gets known PrivateEndpointConnectionProvisioningState values. + * + * @return known PrivateEndpointConnectionProvisioningState values. + */ + public static Collection values() { + return values(PrivateEndpointConnectionProvisioningState.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateLinkServiceConnectionState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateLinkServiceConnectionState.java new file mode 100644 index 000000000000..372d754fa982 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateLinkServiceConnectionState.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 state of a private link service connection. + */ +@Fluent +public final class PrivateLinkServiceConnectionState implements JsonSerializable { + /* + * The private link service connection status. + */ + private ConnectionStatus status; + + /* + * The private link service connection description. + */ + private String description; + + /** + * Creates an instance of PrivateLinkServiceConnectionState class. + */ + public PrivateLinkServiceConnectionState() { + } + + /** + * Get the status property: The private link service connection status. + * + * @return the status value. + */ + public ConnectionStatus status() { + return this.status; + } + + /** + * Set the status property: The private link service connection status. + * + * @param status the status value to set. + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withStatus(ConnectionStatus status) { + this.status = status; + return this; + } + + /** + * Get the description property: The private link service connection description. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The private link service connection description. + * + * @param description the description value to set. + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkServiceConnectionState from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkServiceConnectionState 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 PrivateLinkServiceConnectionState. + */ + public static PrivateLinkServiceConnectionState fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkServiceConnectionState deserializedPrivateLinkServiceConnectionState + = new PrivateLinkServiceConnectionState(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedPrivateLinkServiceConnectionState.status + = ConnectionStatus.fromString(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedPrivateLinkServiceConnectionState.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkServiceConnectionState; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Protocol.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Protocol.java new file mode 100644 index 000000000000..6254a5bf8b22 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Protocol.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The network protocol of the port. + */ +public final class Protocol extends ExpandableStringEnum { + /** + * Static value TCP for Protocol. + */ + public static final Protocol TCP = fromString("TCP"); + + /** + * Static value UDP for Protocol. + */ + public static final Protocol UDP = fromString("UDP"); + + /** + * Creates a new instance of Protocol value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Protocol() { + } + + /** + * Creates or finds a Protocol from its string representation. + * + * @param name a name to look for. + * @return the corresponding Protocol. + */ + public static Protocol fromString(String name) { + return fromString(name, Protocol.class); + } + + /** + * Gets known Protocol values. + * + * @return known Protocol values. + */ + public static Collection values() { + return values(Protocol.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java new file mode 100644 index 000000000000..fbe44e756c02 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * PublicNetworkAccess of the managedCluster. Allow or deny public network access for AKS. + */ +public final class PublicNetworkAccess extends ExpandableStringEnum { + /** + * Static value Enabled for PublicNetworkAccess. + */ + public static final PublicNetworkAccess ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for PublicNetworkAccess. + */ + public static final PublicNetworkAccess DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of PublicNetworkAccess value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PublicNetworkAccess() { + } + + /** + * Creates or finds a PublicNetworkAccess from its string representation. + * + * @param name a name to look for. + * @return the corresponding PublicNetworkAccess. + */ + public static PublicNetworkAccess fromString(String name) { + return fromString(name, PublicNetworkAccess.class); + } + + /** + * Gets known PublicNetworkAccess values. + * + * @return known PublicNetworkAccess values. + */ + public static Collection values() { + return values(PublicNetworkAccess.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java new file mode 100644 index 000000000000..aa8addd1d0cf --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. + */ +@Fluent +public final class RelativeMonthlySchedule implements JsonSerializable { + /* + * Specifies the number of months between each set of occurrences. + */ + private int intervalMonths; + + /* + * The week index. Specifies on which week of the month the dayOfWeek applies. + */ + private Type weekIndex; + + /* + * Specifies on which day of the week the maintenance occurs. + */ + private WeekDay dayOfWeek; + + /** + * Creates an instance of RelativeMonthlySchedule class. + */ + public RelativeMonthlySchedule() { + } + + /** + * Get the intervalMonths property: Specifies the number of months between each set of occurrences. + * + * @return the intervalMonths value. + */ + public int intervalMonths() { + return this.intervalMonths; + } + + /** + * Set the intervalMonths property: Specifies the number of months between each set of occurrences. + * + * @param intervalMonths the intervalMonths value to set. + * @return the RelativeMonthlySchedule object itself. + */ + public RelativeMonthlySchedule withIntervalMonths(int intervalMonths) { + this.intervalMonths = intervalMonths; + return this; + } + + /** + * Get the weekIndex property: The week index. Specifies on which week of the month the dayOfWeek applies. + * + * @return the weekIndex value. + */ + public Type weekIndex() { + return this.weekIndex; + } + + /** + * Set the weekIndex property: The week index. Specifies on which week of the month the dayOfWeek applies. + * + * @param weekIndex the weekIndex value to set. + * @return the RelativeMonthlySchedule object itself. + */ + public RelativeMonthlySchedule withWeekIndex(Type weekIndex) { + this.weekIndex = weekIndex; + return this; + } + + /** + * Get the dayOfWeek property: Specifies on which day of the week the maintenance occurs. + * + * @return the dayOfWeek value. + */ + public WeekDay dayOfWeek() { + return this.dayOfWeek; + } + + /** + * Set the dayOfWeek property: Specifies on which day of the week the maintenance occurs. + * + * @param dayOfWeek the dayOfWeek value to set. + * @return the RelativeMonthlySchedule object itself. + */ + public RelativeMonthlySchedule withDayOfWeek(WeekDay dayOfWeek) { + this.dayOfWeek = dayOfWeek; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (weekIndex() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property weekIndex in model RelativeMonthlySchedule")); + } + if (dayOfWeek() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property dayOfWeek in model RelativeMonthlySchedule")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RelativeMonthlySchedule.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("intervalMonths", this.intervalMonths); + jsonWriter.writeStringField("weekIndex", this.weekIndex == null ? null : this.weekIndex.toString()); + jsonWriter.writeStringField("dayOfWeek", this.dayOfWeek == null ? null : this.dayOfWeek.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RelativeMonthlySchedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RelativeMonthlySchedule 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 RelativeMonthlySchedule. + */ + public static RelativeMonthlySchedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RelativeMonthlySchedule deserializedRelativeMonthlySchedule = new RelativeMonthlySchedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("intervalMonths".equals(fieldName)) { + deserializedRelativeMonthlySchedule.intervalMonths = reader.getInt(); + } else if ("weekIndex".equals(fieldName)) { + deserializedRelativeMonthlySchedule.weekIndex = Type.fromString(reader.getString()); + } else if ("dayOfWeek".equals(fieldName)) { + deserializedRelativeMonthlySchedule.dayOfWeek = WeekDay.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedRelativeMonthlySchedule; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceIdentityType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceIdentityType.java new file mode 100644 index 000000000000..1899d9067344 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceIdentityType.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of identity used for the managed cluster. For more information see [use managed identities in + * AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). + */ +public final class ResourceIdentityType extends ExpandableStringEnum { + /** + * Static value SystemAssigned for ResourceIdentityType. + */ + public static final ResourceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); + + /** + * Static value UserAssigned for ResourceIdentityType. + */ + public static final ResourceIdentityType USER_ASSIGNED = fromString("UserAssigned"); + + /** + * Static value None for ResourceIdentityType. + */ + public static final ResourceIdentityType NONE = fromString("None"); + + /** + * Creates a new instance of ResourceIdentityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResourceIdentityType() { + } + + /** + * Creates or finds a ResourceIdentityType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceIdentityType. + */ + public static ResourceIdentityType fromString(String name) { + return fromString(name, ResourceIdentityType.class); + } + + /** + * Gets known ResourceIdentityType values. + * + * @return known ResourceIdentityType values. + */ + public static Collection values() { + return values(ResourceIdentityType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceQuota.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceQuota.java new file mode 100644 index 000000000000..0864b9f04fc2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceQuota.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Resource quota for the namespace. + */ +@Fluent +public final class ResourceQuota implements JsonSerializable { + /* + * CPU request of the namespace in one-thousandth CPU form. See [CPU resource + * units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu) for more + * details. + */ + private String cpuRequest; + + /* + * CPU limit of the namespace in one-thousandth CPU form. See [CPU resource + * units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu) for more + * details. + */ + private String cpuLimit; + + /* + * Memory request of the namespace in the power-of-two equivalents form: Ei, Pi, Ti, Gi, Mi, Ki. See [Memory + * resource units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory) + * for more details. + */ + private String memoryRequest; + + /* + * Memory limit of the namespace in the power-of-two equivalents form: Ei, Pi, Ti, Gi, Mi, Ki. See [Memory resource + * units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory) for more + * details. + */ + private String memoryLimit; + + /** + * Creates an instance of ResourceQuota class. + */ + public ResourceQuota() { + } + + /** + * Get the cpuRequest property: CPU request of the namespace in one-thousandth CPU form. See [CPU resource + * units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu) for more + * details. + * + * @return the cpuRequest value. + */ + public String cpuRequest() { + return this.cpuRequest; + } + + /** + * Set the cpuRequest property: CPU request of the namespace in one-thousandth CPU form. See [CPU resource + * units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu) for more + * details. + * + * @param cpuRequest the cpuRequest value to set. + * @return the ResourceQuota object itself. + */ + public ResourceQuota withCpuRequest(String cpuRequest) { + this.cpuRequest = cpuRequest; + return this; + } + + /** + * Get the cpuLimit property: CPU limit of the namespace in one-thousandth CPU form. See [CPU resource + * units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu) for more + * details. + * + * @return the cpuLimit value. + */ + public String cpuLimit() { + return this.cpuLimit; + } + + /** + * Set the cpuLimit property: CPU limit of the namespace in one-thousandth CPU form. See [CPU resource + * units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu) for more + * details. + * + * @param cpuLimit the cpuLimit value to set. + * @return the ResourceQuota object itself. + */ + public ResourceQuota withCpuLimit(String cpuLimit) { + this.cpuLimit = cpuLimit; + return this; + } + + /** + * Get the memoryRequest property: Memory request of the namespace in the power-of-two equivalents form: Ei, Pi, Ti, + * Gi, Mi, Ki. See [Memory resource + * units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory) for more + * details. + * + * @return the memoryRequest value. + */ + public String memoryRequest() { + return this.memoryRequest; + } + + /** + * Set the memoryRequest property: Memory request of the namespace in the power-of-two equivalents form: Ei, Pi, Ti, + * Gi, Mi, Ki. See [Memory resource + * units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory) for more + * details. + * + * @param memoryRequest the memoryRequest value to set. + * @return the ResourceQuota object itself. + */ + public ResourceQuota withMemoryRequest(String memoryRequest) { + this.memoryRequest = memoryRequest; + return this; + } + + /** + * Get the memoryLimit property: Memory limit of the namespace in the power-of-two equivalents form: Ei, Pi, Ti, Gi, + * Mi, Ki. See [Memory resource + * units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory) for more + * details. + * + * @return the memoryLimit value. + */ + public String memoryLimit() { + return this.memoryLimit; + } + + /** + * Set the memoryLimit property: Memory limit of the namespace in the power-of-two equivalents form: Ei, Pi, Ti, Gi, + * Mi, Ki. See [Memory resource + * units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory) for more + * details. + * + * @param memoryLimit the memoryLimit value to set. + * @return the ResourceQuota object itself. + */ + public ResourceQuota withMemoryLimit(String memoryLimit) { + this.memoryLimit = memoryLimit; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("cpuRequest", this.cpuRequest); + jsonWriter.writeStringField("cpuLimit", this.cpuLimit); + jsonWriter.writeStringField("memoryRequest", this.memoryRequest); + jsonWriter.writeStringField("memoryLimit", this.memoryLimit); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceQuota from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceQuota 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 ResourceQuota. + */ + public static ResourceQuota fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceQuota deserializedResourceQuota = new ResourceQuota(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("cpuRequest".equals(fieldName)) { + deserializedResourceQuota.cpuRequest = reader.getString(); + } else if ("cpuLimit".equals(fieldName)) { + deserializedResourceQuota.cpuLimit = reader.getString(); + } else if ("memoryRequest".equals(fieldName)) { + deserializedResourceQuota.memoryRequest = reader.getString(); + } else if ("memoryLimit".equals(fieldName)) { + deserializedResourceQuota.memoryLimit = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceQuota; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceReference.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceReference.java new file mode 100644 index 000000000000..85d638939747 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceReference.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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 reference to an Azure resource. + */ +@Fluent +public final class ResourceReference implements JsonSerializable { + /* + * The fully qualified Azure resource id. + */ + private String id; + + /** + * Creates an instance of ResourceReference class. + */ + public ResourceReference() { + } + + /** + * Get the id property: The fully qualified Azure resource id. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The fully qualified Azure resource id. + * + * @param id the id value to set. + * @return the ResourceReference object itself. + */ + public ResourceReference withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceReference 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 ResourceReference. + */ + public static ResourceReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceReference deserializedResourceReference = new ResourceReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedResourceReference.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceReference; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java new file mode 100644 index 000000000000..70664c2e4cac --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The restriction level applied to the cluster's node resource group. If not specified, the default is 'Unrestricted'. + */ +public final class RestrictionLevel extends ExpandableStringEnum { + /** + * Static value Unrestricted for RestrictionLevel. + */ + public static final RestrictionLevel UNRESTRICTED = fromString("Unrestricted"); + + /** + * Static value ReadOnly for RestrictionLevel. + */ + public static final RestrictionLevel READ_ONLY = fromString("ReadOnly"); + + /** + * Creates a new instance of RestrictionLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RestrictionLevel() { + } + + /** + * Creates or finds a RestrictionLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding RestrictionLevel. + */ + public static RestrictionLevel fromString(String name) { + return fromString(name, RestrictionLevel.class); + } + + /** + * Gets known RestrictionLevel values. + * + * @return known RestrictionLevel values. + */ + public static Collection values() { + return values(RestrictionLevel.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RunCommandRequest.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RunCommandRequest.java new file mode 100644 index 000000000000..ff3faecec4df --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RunCommandRequest.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +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 run command request. + */ +@Fluent +public final class RunCommandRequest implements JsonSerializable { + /* + * The command to run. + */ + private String command; + + /* + * A base64 encoded zip file containing the files required by the command. + */ + private String context; + + /* + * AuthToken issued for AKS AAD Server App. + */ + private String clusterToken; + + /** + * Creates an instance of RunCommandRequest class. + */ + public RunCommandRequest() { + } + + /** + * Get the command property: The command to run. + * + * @return the command value. + */ + public String command() { + return this.command; + } + + /** + * Set the command property: The command to run. + * + * @param command the command value to set. + * @return the RunCommandRequest object itself. + */ + public RunCommandRequest withCommand(String command) { + this.command = command; + return this; + } + + /** + * Get the context property: A base64 encoded zip file containing the files required by the command. + * + * @return the context value. + */ + public String context() { + return this.context; + } + + /** + * Set the context property: A base64 encoded zip file containing the files required by the command. + * + * @param context the context value to set. + * @return the RunCommandRequest object itself. + */ + public RunCommandRequest withContext(String context) { + this.context = context; + return this; + } + + /** + * Get the clusterToken property: AuthToken issued for AKS AAD Server App. + * + * @return the clusterToken value. + */ + public String clusterToken() { + return this.clusterToken; + } + + /** + * Set the clusterToken property: AuthToken issued for AKS AAD Server App. + * + * @param clusterToken the clusterToken value to set. + * @return the RunCommandRequest object itself. + */ + public RunCommandRequest withClusterToken(String clusterToken) { + this.clusterToken = clusterToken; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (command() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property command in model RunCommandRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RunCommandRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("command", this.command); + jsonWriter.writeStringField("context", this.context); + jsonWriter.writeStringField("clusterToken", this.clusterToken); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RunCommandRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RunCommandRequest 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 RunCommandRequest. + */ + public static RunCommandRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RunCommandRequest deserializedRunCommandRequest = new RunCommandRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("command".equals(fieldName)) { + deserializedRunCommandRequest.command = reader.getString(); + } else if ("context".equals(fieldName)) { + deserializedRunCommandRequest.context = reader.getString(); + } else if ("clusterToken".equals(fieldName)) { + deserializedRunCommandRequest.clusterToken = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRunCommandRequest; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleDownMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleDownMode.java new file mode 100644 index 000000000000..94132cc69826 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleDownMode.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Describes how VMs are added to or removed from Agent Pools. See [billing + * states](https://docs.microsoft.com/azure/virtual-machines/states-billing). + */ +public final class ScaleDownMode extends ExpandableStringEnum { + /** + * Static value Delete for ScaleDownMode. + */ + public static final ScaleDownMode DELETE = fromString("Delete"); + + /** + * Static value Deallocate for ScaleDownMode. + */ + public static final ScaleDownMode DEALLOCATE = fromString("Deallocate"); + + /** + * Creates a new instance of ScaleDownMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScaleDownMode() { + } + + /** + * Creates or finds a ScaleDownMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScaleDownMode. + */ + public static ScaleDownMode fromString(String name) { + return fromString(name, ScaleDownMode.class); + } + + /** + * Gets known ScaleDownMode values. + * + * @return known ScaleDownMode values. + */ + public static Collection values() { + return values(ScaleDownMode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java new file mode 100644 index 000000000000..1796156c2698 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Specifications on how to scale a VirtualMachines agent pool. + */ +@Fluent +public final class ScaleProfile implements JsonSerializable { + /* + * Specifications on how to scale the VirtualMachines agent pool to a fixed size. + */ + private List manual; + + /** + * Creates an instance of ScaleProfile class. + */ + public ScaleProfile() { + } + + /** + * Get the manual property: Specifications on how to scale the VirtualMachines agent pool to a fixed size. + * + * @return the manual value. + */ + public List manual() { + return this.manual; + } + + /** + * Set the manual property: Specifications on how to scale the VirtualMachines agent pool to a fixed size. + * + * @param manual the manual value to set. + * @return the ScaleProfile object itself. + */ + public ScaleProfile withManual(List manual) { + this.manual = manual; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (manual() != null) { + manual().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("manual", this.manual, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScaleProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScaleProfile 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 ScaleProfile. + */ + public static ScaleProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScaleProfile deserializedScaleProfile = new ScaleProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("manual".equals(fieldName)) { + List manual = reader.readArray(reader1 -> ManualScaleProfile.fromJson(reader1)); + deserializedScaleProfile.manual = manual; + } else { + reader.skipChildren(); + } + } + + return deserializedScaleProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetEvictionPolicy.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetEvictionPolicy.java new file mode 100644 index 000000000000..741e98374bbd --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetEvictionPolicy.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The Virtual Machine Scale Set eviction policy. The eviction policy specifies what to do with the VM when it is + * evicted. The default is Delete. For more information about eviction see [spot + * VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms). + */ +public final class ScaleSetEvictionPolicy extends ExpandableStringEnum { + /** + * Static value Delete for ScaleSetEvictionPolicy. + */ + public static final ScaleSetEvictionPolicy DELETE = fromString("Delete"); + + /** + * Static value Deallocate for ScaleSetEvictionPolicy. + */ + public static final ScaleSetEvictionPolicy DEALLOCATE = fromString("Deallocate"); + + /** + * Creates a new instance of ScaleSetEvictionPolicy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScaleSetEvictionPolicy() { + } + + /** + * Creates or finds a ScaleSetEvictionPolicy from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScaleSetEvictionPolicy. + */ + public static ScaleSetEvictionPolicy fromString(String name) { + return fromString(name, ScaleSetEvictionPolicy.class); + } + + /** + * Gets known ScaleSetEvictionPolicy values. + * + * @return known ScaleSetEvictionPolicy values. + */ + public static Collection values() { + return values(ScaleSetEvictionPolicy.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetPriority.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetPriority.java new file mode 100644 index 000000000000..05fc6bce3ab4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetPriority.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The Virtual Machine Scale Set priority. + */ +public final class ScaleSetPriority extends ExpandableStringEnum { + /** + * Static value Spot for ScaleSetPriority. + */ + public static final ScaleSetPriority SPOT = fromString("Spot"); + + /** + * Static value Regular for ScaleSetPriority. + */ + public static final ScaleSetPriority REGULAR = fromString("Regular"); + + /** + * Creates a new instance of ScaleSetPriority value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScaleSetPriority() { + } + + /** + * Creates or finds a ScaleSetPriority from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScaleSetPriority. + */ + public static ScaleSetPriority fromString(String name) { + return fromString(name, ScaleSetPriority.class); + } + + /** + * Gets known ScaleSetPriority values. + * + * @return known ScaleSetPriority values. + */ + public static Collection values() { + return values(ScaleSetPriority.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Schedule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Schedule.java new file mode 100644 index 000000000000..777d7a00dbcb --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Schedule.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * One and only one of the schedule types should be specified. Choose either 'daily', 'weekly', 'absoluteMonthly' or + * 'relativeMonthly' for your maintenance schedule. + */ +@Fluent +public final class Schedule implements JsonSerializable { + /* + * For schedules like: 'recur every day' or 'recur every 3 days'. + */ + private DailySchedule daily; + + /* + * For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. + */ + private WeeklySchedule weekly; + + /* + * For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. + */ + private AbsoluteMonthlySchedule absoluteMonthly; + + /* + * For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. + */ + private RelativeMonthlySchedule relativeMonthly; + + /** + * Creates an instance of Schedule class. + */ + public Schedule() { + } + + /** + * Get the daily property: For schedules like: 'recur every day' or 'recur every 3 days'. + * + * @return the daily value. + */ + public DailySchedule daily() { + return this.daily; + } + + /** + * Set the daily property: For schedules like: 'recur every day' or 'recur every 3 days'. + * + * @param daily the daily value to set. + * @return the Schedule object itself. + */ + public Schedule withDaily(DailySchedule daily) { + this.daily = daily; + return this; + } + + /** + * Get the weekly property: For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. + * + * @return the weekly value. + */ + public WeeklySchedule weekly() { + return this.weekly; + } + + /** + * Set the weekly property: For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. + * + * @param weekly the weekly value to set. + * @return the Schedule object itself. + */ + public Schedule withWeekly(WeeklySchedule weekly) { + this.weekly = weekly; + return this; + } + + /** + * Get the absoluteMonthly property: For schedules like: 'recur every month on the 15th' or 'recur every 3 months on + * the 20th'. + * + * @return the absoluteMonthly value. + */ + public AbsoluteMonthlySchedule absoluteMonthly() { + return this.absoluteMonthly; + } + + /** + * Set the absoluteMonthly property: For schedules like: 'recur every month on the 15th' or 'recur every 3 months on + * the 20th'. + * + * @param absoluteMonthly the absoluteMonthly value to set. + * @return the Schedule object itself. + */ + public Schedule withAbsoluteMonthly(AbsoluteMonthlySchedule absoluteMonthly) { + this.absoluteMonthly = absoluteMonthly; + return this; + } + + /** + * Get the relativeMonthly property: For schedules like: 'recur every month on the first Monday' or 'recur every 3 + * months on last Friday'. + * + * @return the relativeMonthly value. + */ + public RelativeMonthlySchedule relativeMonthly() { + return this.relativeMonthly; + } + + /** + * Set the relativeMonthly property: For schedules like: 'recur every month on the first Monday' or 'recur every 3 + * months on last Friday'. + * + * @param relativeMonthly the relativeMonthly value to set. + * @return the Schedule object itself. + */ + public Schedule withRelativeMonthly(RelativeMonthlySchedule relativeMonthly) { + this.relativeMonthly = relativeMonthly; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (daily() != null) { + daily().validate(); + } + if (weekly() != null) { + weekly().validate(); + } + if (absoluteMonthly() != null) { + absoluteMonthly().validate(); + } + if (relativeMonthly() != null) { + relativeMonthly().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("daily", this.daily); + jsonWriter.writeJsonField("weekly", this.weekly); + jsonWriter.writeJsonField("absoluteMonthly", this.absoluteMonthly); + jsonWriter.writeJsonField("relativeMonthly", this.relativeMonthly); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Schedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Schedule 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 Schedule. + */ + public static Schedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Schedule deserializedSchedule = new Schedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("daily".equals(fieldName)) { + deserializedSchedule.daily = DailySchedule.fromJson(reader); + } else if ("weekly".equals(fieldName)) { + deserializedSchedule.weekly = WeeklySchedule.fromJson(reader); + } else if ("absoluteMonthly".equals(fieldName)) { + deserializedSchedule.absoluteMonthly = AbsoluteMonthlySchedule.fromJson(reader); + } else if ("relativeMonthly".equals(fieldName)) { + deserializedSchedule.relativeMonthly = RelativeMonthlySchedule.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSchedule; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshMode.java new file mode 100644 index 000000000000..1f586d09055c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshMode.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Mode of the service mesh. + */ +public final class ServiceMeshMode extends ExpandableStringEnum { + /** + * Static value Istio for ServiceMeshMode. + */ + public static final ServiceMeshMode ISTIO = fromString("Istio"); + + /** + * Static value Disabled for ServiceMeshMode. + */ + public static final ServiceMeshMode DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ServiceMeshMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ServiceMeshMode() { + } + + /** + * Creates or finds a ServiceMeshMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding ServiceMeshMode. + */ + public static ServiceMeshMode fromString(String name) { + return fromString(name, ServiceMeshMode.class); + } + + /** + * Gets known ServiceMeshMode values. + * + * @return known ServiceMeshMode values. + */ + public static Collection values() { + return values(ServiceMeshMode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshProfile.java new file mode 100644 index 000000000000..f66122abba02 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshProfile.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Service mesh profile for a managed cluster. + */ +@Fluent +public final class ServiceMeshProfile implements JsonSerializable { + /* + * Mode of the service mesh. + */ + private ServiceMeshMode mode; + + /* + * Istio service mesh configuration. + */ + private IstioServiceMesh istio; + + /** + * Creates an instance of ServiceMeshProfile class. + */ + public ServiceMeshProfile() { + } + + /** + * Get the mode property: Mode of the service mesh. + * + * @return the mode value. + */ + public ServiceMeshMode mode() { + return this.mode; + } + + /** + * Set the mode property: Mode of the service mesh. + * + * @param mode the mode value to set. + * @return the ServiceMeshProfile object itself. + */ + public ServiceMeshProfile withMode(ServiceMeshMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the istio property: Istio service mesh configuration. + * + * @return the istio value. + */ + public IstioServiceMesh istio() { + return this.istio; + } + + /** + * Set the istio property: Istio service mesh configuration. + * + * @param istio the istio value to set. + * @return the ServiceMeshProfile object itself. + */ + public ServiceMeshProfile withIstio(IstioServiceMesh istio) { + this.istio = istio; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (mode() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property mode in model ServiceMeshProfile")); + } + if (istio() != null) { + istio().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ServiceMeshProfile.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeJsonField("istio", this.istio); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceMeshProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceMeshProfile 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 ServiceMeshProfile. + */ + public static ServiceMeshProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceMeshProfile deserializedServiceMeshProfile = new ServiceMeshProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mode".equals(fieldName)) { + deserializedServiceMeshProfile.mode = ServiceMeshMode.fromString(reader.getString()); + } else if ("istio".equals(fieldName)) { + deserializedServiceMeshProfile.istio = IstioServiceMesh.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServiceMeshProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotListResult.java new file mode 100644 index 000000000000..2a010224fff4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotListResult.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.SnapshotInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a Snapshot list operation. + */ +@Fluent +public final class SnapshotListResult implements JsonSerializable { + /* + * The Snapshot items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of SnapshotListResult class. + */ + public SnapshotListResult() { + } + + /** + * Get the value property: The Snapshot items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The Snapshot items on this page. + * + * @param value the value value to set. + * @return the SnapshotListResult object itself. + */ + public SnapshotListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the SnapshotListResult object itself. + */ + public SnapshotListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model SnapshotListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SnapshotListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SnapshotListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SnapshotListResult 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 SnapshotListResult. + */ + public static SnapshotListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SnapshotListResult deserializedSnapshotListResult = new SnapshotListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> SnapshotInner.fromJson(reader1)); + deserializedSnapshotListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSnapshotListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSnapshotListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java new file mode 100644 index 000000000000..f538d165b648 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of a snapshot. The default is NodePool. + */ +public final class SnapshotType extends ExpandableStringEnum { + /** + * Static value NodePool for SnapshotType. + */ + public static final SnapshotType NODE_POOL = fromString("NodePool"); + + /** + * Creates a new instance of SnapshotType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SnapshotType() { + } + + /** + * Creates or finds a SnapshotType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SnapshotType. + */ + public static SnapshotType fromString(String name) { + return fromString(name, SnapshotType.class); + } + + /** + * Gets known SnapshotType values. + * + * @return known SnapshotType values. + */ + public static Collection values() { + return values(SnapshotType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SysctlConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SysctlConfig.java new file mode 100644 index 000000000000..54dd49cd01f0 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SysctlConfig.java @@ -0,0 +1,849 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Sysctl settings for Linux agent nodes. + */ +@Fluent +public final class SysctlConfig implements JsonSerializable { + /* + * Sysctl setting net.core.somaxconn. + */ + private Integer netCoreSomaxconn; + + /* + * Sysctl setting net.core.netdev_max_backlog. + */ + private Integer netCoreNetdevMaxBacklog; + + /* + * Sysctl setting net.core.rmem_default. + */ + private Integer netCoreRmemDefault; + + /* + * Sysctl setting net.core.rmem_max. + */ + private Integer netCoreRmemMax; + + /* + * Sysctl setting net.core.wmem_default. + */ + private Integer netCoreWmemDefault; + + /* + * Sysctl setting net.core.wmem_max. + */ + private Integer netCoreWmemMax; + + /* + * Sysctl setting net.core.optmem_max. + */ + private Integer netCoreOptmemMax; + + /* + * Sysctl setting net.ipv4.tcp_max_syn_backlog. + */ + private Integer netIpv4TcpMaxSynBacklog; + + /* + * Sysctl setting net.ipv4.tcp_max_tw_buckets. + */ + private Integer netIpv4TcpMaxTwBuckets; + + /* + * Sysctl setting net.ipv4.tcp_fin_timeout. + */ + private Integer netIpv4TcpFinTimeout; + + /* + * Sysctl setting net.ipv4.tcp_keepalive_time. + */ + private Integer netIpv4TcpKeepaliveTime; + + /* + * Sysctl setting net.ipv4.tcp_keepalive_probes. + */ + private Integer netIpv4TcpKeepaliveProbes; + + /* + * Sysctl setting net.ipv4.tcp_keepalive_intvl. + */ + private Integer netIpv4TcpkeepaliveIntvl; + + /* + * Sysctl setting net.ipv4.tcp_tw_reuse. + */ + private Boolean netIpv4TcpTwReuse; + + /* + * Sysctl setting net.ipv4.ip_local_port_range. + */ + private String netIpv4IpLocalPortRange; + + /* + * Sysctl setting net.ipv4.neigh.default.gc_thresh1. + */ + private Integer netIpv4NeighDefaultGcThresh1; + + /* + * Sysctl setting net.ipv4.neigh.default.gc_thresh2. + */ + private Integer netIpv4NeighDefaultGcThresh2; + + /* + * Sysctl setting net.ipv4.neigh.default.gc_thresh3. + */ + private Integer netIpv4NeighDefaultGcThresh3; + + /* + * Sysctl setting net.netfilter.nf_conntrack_max. + */ + private Integer netNetfilterNfConntrackMax; + + /* + * Sysctl setting net.netfilter.nf_conntrack_buckets. + */ + private Integer netNetfilterNfConntrackBuckets; + + /* + * Sysctl setting fs.inotify.max_user_watches. + */ + private Integer fsInotifyMaxUserWatches; + + /* + * Sysctl setting fs.file-max. + */ + private Integer fsFileMax; + + /* + * Sysctl setting fs.aio-max-nr. + */ + private Integer fsAioMaxNr; + + /* + * Sysctl setting fs.nr_open. + */ + private Integer fsNrOpen; + + /* + * Sysctl setting kernel.threads-max. + */ + private Integer kernelThreadsMax; + + /* + * Sysctl setting vm.max_map_count. + */ + private Integer vmMaxMapCount; + + /* + * Sysctl setting vm.swappiness. + */ + private Integer vmSwappiness; + + /* + * Sysctl setting vm.vfs_cache_pressure. + */ + private Integer vmVfsCachePressure; + + /** + * Creates an instance of SysctlConfig class. + */ + public SysctlConfig() { + } + + /** + * Get the netCoreSomaxconn property: Sysctl setting net.core.somaxconn. + * + * @return the netCoreSomaxconn value. + */ + public Integer netCoreSomaxconn() { + return this.netCoreSomaxconn; + } + + /** + * Set the netCoreSomaxconn property: Sysctl setting net.core.somaxconn. + * + * @param netCoreSomaxconn the netCoreSomaxconn value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetCoreSomaxconn(Integer netCoreSomaxconn) { + this.netCoreSomaxconn = netCoreSomaxconn; + return this; + } + + /** + * Get the netCoreNetdevMaxBacklog property: Sysctl setting net.core.netdev_max_backlog. + * + * @return the netCoreNetdevMaxBacklog value. + */ + public Integer netCoreNetdevMaxBacklog() { + return this.netCoreNetdevMaxBacklog; + } + + /** + * Set the netCoreNetdevMaxBacklog property: Sysctl setting net.core.netdev_max_backlog. + * + * @param netCoreNetdevMaxBacklog the netCoreNetdevMaxBacklog value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetCoreNetdevMaxBacklog(Integer netCoreNetdevMaxBacklog) { + this.netCoreNetdevMaxBacklog = netCoreNetdevMaxBacklog; + return this; + } + + /** + * Get the netCoreRmemDefault property: Sysctl setting net.core.rmem_default. + * + * @return the netCoreRmemDefault value. + */ + public Integer netCoreRmemDefault() { + return this.netCoreRmemDefault; + } + + /** + * Set the netCoreRmemDefault property: Sysctl setting net.core.rmem_default. + * + * @param netCoreRmemDefault the netCoreRmemDefault value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetCoreRmemDefault(Integer netCoreRmemDefault) { + this.netCoreRmemDefault = netCoreRmemDefault; + return this; + } + + /** + * Get the netCoreRmemMax property: Sysctl setting net.core.rmem_max. + * + * @return the netCoreRmemMax value. + */ + public Integer netCoreRmemMax() { + return this.netCoreRmemMax; + } + + /** + * Set the netCoreRmemMax property: Sysctl setting net.core.rmem_max. + * + * @param netCoreRmemMax the netCoreRmemMax value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetCoreRmemMax(Integer netCoreRmemMax) { + this.netCoreRmemMax = netCoreRmemMax; + return this; + } + + /** + * Get the netCoreWmemDefault property: Sysctl setting net.core.wmem_default. + * + * @return the netCoreWmemDefault value. + */ + public Integer netCoreWmemDefault() { + return this.netCoreWmemDefault; + } + + /** + * Set the netCoreWmemDefault property: Sysctl setting net.core.wmem_default. + * + * @param netCoreWmemDefault the netCoreWmemDefault value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetCoreWmemDefault(Integer netCoreWmemDefault) { + this.netCoreWmemDefault = netCoreWmemDefault; + return this; + } + + /** + * Get the netCoreWmemMax property: Sysctl setting net.core.wmem_max. + * + * @return the netCoreWmemMax value. + */ + public Integer netCoreWmemMax() { + return this.netCoreWmemMax; + } + + /** + * Set the netCoreWmemMax property: Sysctl setting net.core.wmem_max. + * + * @param netCoreWmemMax the netCoreWmemMax value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetCoreWmemMax(Integer netCoreWmemMax) { + this.netCoreWmemMax = netCoreWmemMax; + return this; + } + + /** + * Get the netCoreOptmemMax property: Sysctl setting net.core.optmem_max. + * + * @return the netCoreOptmemMax value. + */ + public Integer netCoreOptmemMax() { + return this.netCoreOptmemMax; + } + + /** + * Set the netCoreOptmemMax property: Sysctl setting net.core.optmem_max. + * + * @param netCoreOptmemMax the netCoreOptmemMax value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetCoreOptmemMax(Integer netCoreOptmemMax) { + this.netCoreOptmemMax = netCoreOptmemMax; + return this; + } + + /** + * Get the netIpv4TcpMaxSynBacklog property: Sysctl setting net.ipv4.tcp_max_syn_backlog. + * + * @return the netIpv4TcpMaxSynBacklog value. + */ + public Integer netIpv4TcpMaxSynBacklog() { + return this.netIpv4TcpMaxSynBacklog; + } + + /** + * Set the netIpv4TcpMaxSynBacklog property: Sysctl setting net.ipv4.tcp_max_syn_backlog. + * + * @param netIpv4TcpMaxSynBacklog the netIpv4TcpMaxSynBacklog value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetIpv4TcpMaxSynBacklog(Integer netIpv4TcpMaxSynBacklog) { + this.netIpv4TcpMaxSynBacklog = netIpv4TcpMaxSynBacklog; + return this; + } + + /** + * Get the netIpv4TcpMaxTwBuckets property: Sysctl setting net.ipv4.tcp_max_tw_buckets. + * + * @return the netIpv4TcpMaxTwBuckets value. + */ + public Integer netIpv4TcpMaxTwBuckets() { + return this.netIpv4TcpMaxTwBuckets; + } + + /** + * Set the netIpv4TcpMaxTwBuckets property: Sysctl setting net.ipv4.tcp_max_tw_buckets. + * + * @param netIpv4TcpMaxTwBuckets the netIpv4TcpMaxTwBuckets value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetIpv4TcpMaxTwBuckets(Integer netIpv4TcpMaxTwBuckets) { + this.netIpv4TcpMaxTwBuckets = netIpv4TcpMaxTwBuckets; + return this; + } + + /** + * Get the netIpv4TcpFinTimeout property: Sysctl setting net.ipv4.tcp_fin_timeout. + * + * @return the netIpv4TcpFinTimeout value. + */ + public Integer netIpv4TcpFinTimeout() { + return this.netIpv4TcpFinTimeout; + } + + /** + * Set the netIpv4TcpFinTimeout property: Sysctl setting net.ipv4.tcp_fin_timeout. + * + * @param netIpv4TcpFinTimeout the netIpv4TcpFinTimeout value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetIpv4TcpFinTimeout(Integer netIpv4TcpFinTimeout) { + this.netIpv4TcpFinTimeout = netIpv4TcpFinTimeout; + return this; + } + + /** + * Get the netIpv4TcpKeepaliveTime property: Sysctl setting net.ipv4.tcp_keepalive_time. + * + * @return the netIpv4TcpKeepaliveTime value. + */ + public Integer netIpv4TcpKeepaliveTime() { + return this.netIpv4TcpKeepaliveTime; + } + + /** + * Set the netIpv4TcpKeepaliveTime property: Sysctl setting net.ipv4.tcp_keepalive_time. + * + * @param netIpv4TcpKeepaliveTime the netIpv4TcpKeepaliveTime value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetIpv4TcpKeepaliveTime(Integer netIpv4TcpKeepaliveTime) { + this.netIpv4TcpKeepaliveTime = netIpv4TcpKeepaliveTime; + return this; + } + + /** + * Get the netIpv4TcpKeepaliveProbes property: Sysctl setting net.ipv4.tcp_keepalive_probes. + * + * @return the netIpv4TcpKeepaliveProbes value. + */ + public Integer netIpv4TcpKeepaliveProbes() { + return this.netIpv4TcpKeepaliveProbes; + } + + /** + * Set the netIpv4TcpKeepaliveProbes property: Sysctl setting net.ipv4.tcp_keepalive_probes. + * + * @param netIpv4TcpKeepaliveProbes the netIpv4TcpKeepaliveProbes value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetIpv4TcpKeepaliveProbes(Integer netIpv4TcpKeepaliveProbes) { + this.netIpv4TcpKeepaliveProbes = netIpv4TcpKeepaliveProbes; + return this; + } + + /** + * Get the netIpv4TcpkeepaliveIntvl property: Sysctl setting net.ipv4.tcp_keepalive_intvl. + * + * @return the netIpv4TcpkeepaliveIntvl value. + */ + public Integer netIpv4TcpkeepaliveIntvl() { + return this.netIpv4TcpkeepaliveIntvl; + } + + /** + * Set the netIpv4TcpkeepaliveIntvl property: Sysctl setting net.ipv4.tcp_keepalive_intvl. + * + * @param netIpv4TcpkeepaliveIntvl the netIpv4TcpkeepaliveIntvl value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetIpv4TcpkeepaliveIntvl(Integer netIpv4TcpkeepaliveIntvl) { + this.netIpv4TcpkeepaliveIntvl = netIpv4TcpkeepaliveIntvl; + return this; + } + + /** + * Get the netIpv4TcpTwReuse property: Sysctl setting net.ipv4.tcp_tw_reuse. + * + * @return the netIpv4TcpTwReuse value. + */ + public Boolean netIpv4TcpTwReuse() { + return this.netIpv4TcpTwReuse; + } + + /** + * Set the netIpv4TcpTwReuse property: Sysctl setting net.ipv4.tcp_tw_reuse. + * + * @param netIpv4TcpTwReuse the netIpv4TcpTwReuse value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetIpv4TcpTwReuse(Boolean netIpv4TcpTwReuse) { + this.netIpv4TcpTwReuse = netIpv4TcpTwReuse; + return this; + } + + /** + * Get the netIpv4IpLocalPortRange property: Sysctl setting net.ipv4.ip_local_port_range. + * + * @return the netIpv4IpLocalPortRange value. + */ + public String netIpv4IpLocalPortRange() { + return this.netIpv4IpLocalPortRange; + } + + /** + * Set the netIpv4IpLocalPortRange property: Sysctl setting net.ipv4.ip_local_port_range. + * + * @param netIpv4IpLocalPortRange the netIpv4IpLocalPortRange value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetIpv4IpLocalPortRange(String netIpv4IpLocalPortRange) { + this.netIpv4IpLocalPortRange = netIpv4IpLocalPortRange; + return this; + } + + /** + * Get the netIpv4NeighDefaultGcThresh1 property: Sysctl setting net.ipv4.neigh.default.gc_thresh1. + * + * @return the netIpv4NeighDefaultGcThresh1 value. + */ + public Integer netIpv4NeighDefaultGcThresh1() { + return this.netIpv4NeighDefaultGcThresh1; + } + + /** + * Set the netIpv4NeighDefaultGcThresh1 property: Sysctl setting net.ipv4.neigh.default.gc_thresh1. + * + * @param netIpv4NeighDefaultGcThresh1 the netIpv4NeighDefaultGcThresh1 value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetIpv4NeighDefaultGcThresh1(Integer netIpv4NeighDefaultGcThresh1) { + this.netIpv4NeighDefaultGcThresh1 = netIpv4NeighDefaultGcThresh1; + return this; + } + + /** + * Get the netIpv4NeighDefaultGcThresh2 property: Sysctl setting net.ipv4.neigh.default.gc_thresh2. + * + * @return the netIpv4NeighDefaultGcThresh2 value. + */ + public Integer netIpv4NeighDefaultGcThresh2() { + return this.netIpv4NeighDefaultGcThresh2; + } + + /** + * Set the netIpv4NeighDefaultGcThresh2 property: Sysctl setting net.ipv4.neigh.default.gc_thresh2. + * + * @param netIpv4NeighDefaultGcThresh2 the netIpv4NeighDefaultGcThresh2 value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetIpv4NeighDefaultGcThresh2(Integer netIpv4NeighDefaultGcThresh2) { + this.netIpv4NeighDefaultGcThresh2 = netIpv4NeighDefaultGcThresh2; + return this; + } + + /** + * Get the netIpv4NeighDefaultGcThresh3 property: Sysctl setting net.ipv4.neigh.default.gc_thresh3. + * + * @return the netIpv4NeighDefaultGcThresh3 value. + */ + public Integer netIpv4NeighDefaultGcThresh3() { + return this.netIpv4NeighDefaultGcThresh3; + } + + /** + * Set the netIpv4NeighDefaultGcThresh3 property: Sysctl setting net.ipv4.neigh.default.gc_thresh3. + * + * @param netIpv4NeighDefaultGcThresh3 the netIpv4NeighDefaultGcThresh3 value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetIpv4NeighDefaultGcThresh3(Integer netIpv4NeighDefaultGcThresh3) { + this.netIpv4NeighDefaultGcThresh3 = netIpv4NeighDefaultGcThresh3; + return this; + } + + /** + * Get the netNetfilterNfConntrackMax property: Sysctl setting net.netfilter.nf_conntrack_max. + * + * @return the netNetfilterNfConntrackMax value. + */ + public Integer netNetfilterNfConntrackMax() { + return this.netNetfilterNfConntrackMax; + } + + /** + * Set the netNetfilterNfConntrackMax property: Sysctl setting net.netfilter.nf_conntrack_max. + * + * @param netNetfilterNfConntrackMax the netNetfilterNfConntrackMax value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetNetfilterNfConntrackMax(Integer netNetfilterNfConntrackMax) { + this.netNetfilterNfConntrackMax = netNetfilterNfConntrackMax; + return this; + } + + /** + * Get the netNetfilterNfConntrackBuckets property: Sysctl setting net.netfilter.nf_conntrack_buckets. + * + * @return the netNetfilterNfConntrackBuckets value. + */ + public Integer netNetfilterNfConntrackBuckets() { + return this.netNetfilterNfConntrackBuckets; + } + + /** + * Set the netNetfilterNfConntrackBuckets property: Sysctl setting net.netfilter.nf_conntrack_buckets. + * + * @param netNetfilterNfConntrackBuckets the netNetfilterNfConntrackBuckets value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withNetNetfilterNfConntrackBuckets(Integer netNetfilterNfConntrackBuckets) { + this.netNetfilterNfConntrackBuckets = netNetfilterNfConntrackBuckets; + return this; + } + + /** + * Get the fsInotifyMaxUserWatches property: Sysctl setting fs.inotify.max_user_watches. + * + * @return the fsInotifyMaxUserWatches value. + */ + public Integer fsInotifyMaxUserWatches() { + return this.fsInotifyMaxUserWatches; + } + + /** + * Set the fsInotifyMaxUserWatches property: Sysctl setting fs.inotify.max_user_watches. + * + * @param fsInotifyMaxUserWatches the fsInotifyMaxUserWatches value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withFsInotifyMaxUserWatches(Integer fsInotifyMaxUserWatches) { + this.fsInotifyMaxUserWatches = fsInotifyMaxUserWatches; + return this; + } + + /** + * Get the fsFileMax property: Sysctl setting fs.file-max. + * + * @return the fsFileMax value. + */ + public Integer fsFileMax() { + return this.fsFileMax; + } + + /** + * Set the fsFileMax property: Sysctl setting fs.file-max. + * + * @param fsFileMax the fsFileMax value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withFsFileMax(Integer fsFileMax) { + this.fsFileMax = fsFileMax; + return this; + } + + /** + * Get the fsAioMaxNr property: Sysctl setting fs.aio-max-nr. + * + * @return the fsAioMaxNr value. + */ + public Integer fsAioMaxNr() { + return this.fsAioMaxNr; + } + + /** + * Set the fsAioMaxNr property: Sysctl setting fs.aio-max-nr. + * + * @param fsAioMaxNr the fsAioMaxNr value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withFsAioMaxNr(Integer fsAioMaxNr) { + this.fsAioMaxNr = fsAioMaxNr; + return this; + } + + /** + * Get the fsNrOpen property: Sysctl setting fs.nr_open. + * + * @return the fsNrOpen value. + */ + public Integer fsNrOpen() { + return this.fsNrOpen; + } + + /** + * Set the fsNrOpen property: Sysctl setting fs.nr_open. + * + * @param fsNrOpen the fsNrOpen value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withFsNrOpen(Integer fsNrOpen) { + this.fsNrOpen = fsNrOpen; + return this; + } + + /** + * Get the kernelThreadsMax property: Sysctl setting kernel.threads-max. + * + * @return the kernelThreadsMax value. + */ + public Integer kernelThreadsMax() { + return this.kernelThreadsMax; + } + + /** + * Set the kernelThreadsMax property: Sysctl setting kernel.threads-max. + * + * @param kernelThreadsMax the kernelThreadsMax value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withKernelThreadsMax(Integer kernelThreadsMax) { + this.kernelThreadsMax = kernelThreadsMax; + return this; + } + + /** + * Get the vmMaxMapCount property: Sysctl setting vm.max_map_count. + * + * @return the vmMaxMapCount value. + */ + public Integer vmMaxMapCount() { + return this.vmMaxMapCount; + } + + /** + * Set the vmMaxMapCount property: Sysctl setting vm.max_map_count. + * + * @param vmMaxMapCount the vmMaxMapCount value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withVmMaxMapCount(Integer vmMaxMapCount) { + this.vmMaxMapCount = vmMaxMapCount; + return this; + } + + /** + * Get the vmSwappiness property: Sysctl setting vm.swappiness. + * + * @return the vmSwappiness value. + */ + public Integer vmSwappiness() { + return this.vmSwappiness; + } + + /** + * Set the vmSwappiness property: Sysctl setting vm.swappiness. + * + * @param vmSwappiness the vmSwappiness value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withVmSwappiness(Integer vmSwappiness) { + this.vmSwappiness = vmSwappiness; + return this; + } + + /** + * Get the vmVfsCachePressure property: Sysctl setting vm.vfs_cache_pressure. + * + * @return the vmVfsCachePressure value. + */ + public Integer vmVfsCachePressure() { + return this.vmVfsCachePressure; + } + + /** + * Set the vmVfsCachePressure property: Sysctl setting vm.vfs_cache_pressure. + * + * @param vmVfsCachePressure the vmVfsCachePressure value to set. + * @return the SysctlConfig object itself. + */ + public SysctlConfig withVmVfsCachePressure(Integer vmVfsCachePressure) { + this.vmVfsCachePressure = vmVfsCachePressure; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("netCoreSomaxconn", this.netCoreSomaxconn); + jsonWriter.writeNumberField("netCoreNetdevMaxBacklog", this.netCoreNetdevMaxBacklog); + jsonWriter.writeNumberField("netCoreRmemDefault", this.netCoreRmemDefault); + jsonWriter.writeNumberField("netCoreRmemMax", this.netCoreRmemMax); + jsonWriter.writeNumberField("netCoreWmemDefault", this.netCoreWmemDefault); + jsonWriter.writeNumberField("netCoreWmemMax", this.netCoreWmemMax); + jsonWriter.writeNumberField("netCoreOptmemMax", this.netCoreOptmemMax); + jsonWriter.writeNumberField("netIpv4TcpMaxSynBacklog", this.netIpv4TcpMaxSynBacklog); + jsonWriter.writeNumberField("netIpv4TcpMaxTwBuckets", this.netIpv4TcpMaxTwBuckets); + jsonWriter.writeNumberField("netIpv4TcpFinTimeout", this.netIpv4TcpFinTimeout); + jsonWriter.writeNumberField("netIpv4TcpKeepaliveTime", this.netIpv4TcpKeepaliveTime); + jsonWriter.writeNumberField("netIpv4TcpKeepaliveProbes", this.netIpv4TcpKeepaliveProbes); + jsonWriter.writeNumberField("netIpv4TcpkeepaliveIntvl", this.netIpv4TcpkeepaliveIntvl); + jsonWriter.writeBooleanField("netIpv4TcpTwReuse", this.netIpv4TcpTwReuse); + jsonWriter.writeStringField("netIpv4IpLocalPortRange", this.netIpv4IpLocalPortRange); + jsonWriter.writeNumberField("netIpv4NeighDefaultGcThresh1", this.netIpv4NeighDefaultGcThresh1); + jsonWriter.writeNumberField("netIpv4NeighDefaultGcThresh2", this.netIpv4NeighDefaultGcThresh2); + jsonWriter.writeNumberField("netIpv4NeighDefaultGcThresh3", this.netIpv4NeighDefaultGcThresh3); + jsonWriter.writeNumberField("netNetfilterNfConntrackMax", this.netNetfilterNfConntrackMax); + jsonWriter.writeNumberField("netNetfilterNfConntrackBuckets", this.netNetfilterNfConntrackBuckets); + jsonWriter.writeNumberField("fsInotifyMaxUserWatches", this.fsInotifyMaxUserWatches); + jsonWriter.writeNumberField("fsFileMax", this.fsFileMax); + jsonWriter.writeNumberField("fsAioMaxNr", this.fsAioMaxNr); + jsonWriter.writeNumberField("fsNrOpen", this.fsNrOpen); + jsonWriter.writeNumberField("kernelThreadsMax", this.kernelThreadsMax); + jsonWriter.writeNumberField("vmMaxMapCount", this.vmMaxMapCount); + jsonWriter.writeNumberField("vmSwappiness", this.vmSwappiness); + jsonWriter.writeNumberField("vmVfsCachePressure", this.vmVfsCachePressure); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SysctlConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SysctlConfig 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 SysctlConfig. + */ + public static SysctlConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SysctlConfig deserializedSysctlConfig = new SysctlConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("netCoreSomaxconn".equals(fieldName)) { + deserializedSysctlConfig.netCoreSomaxconn = reader.getNullable(JsonReader::getInt); + } else if ("netCoreNetdevMaxBacklog".equals(fieldName)) { + deserializedSysctlConfig.netCoreNetdevMaxBacklog = reader.getNullable(JsonReader::getInt); + } else if ("netCoreRmemDefault".equals(fieldName)) { + deserializedSysctlConfig.netCoreRmemDefault = reader.getNullable(JsonReader::getInt); + } else if ("netCoreRmemMax".equals(fieldName)) { + deserializedSysctlConfig.netCoreRmemMax = reader.getNullable(JsonReader::getInt); + } else if ("netCoreWmemDefault".equals(fieldName)) { + deserializedSysctlConfig.netCoreWmemDefault = reader.getNullable(JsonReader::getInt); + } else if ("netCoreWmemMax".equals(fieldName)) { + deserializedSysctlConfig.netCoreWmemMax = reader.getNullable(JsonReader::getInt); + } else if ("netCoreOptmemMax".equals(fieldName)) { + deserializedSysctlConfig.netCoreOptmemMax = reader.getNullable(JsonReader::getInt); + } else if ("netIpv4TcpMaxSynBacklog".equals(fieldName)) { + deserializedSysctlConfig.netIpv4TcpMaxSynBacklog = reader.getNullable(JsonReader::getInt); + } else if ("netIpv4TcpMaxTwBuckets".equals(fieldName)) { + deserializedSysctlConfig.netIpv4TcpMaxTwBuckets = reader.getNullable(JsonReader::getInt); + } else if ("netIpv4TcpFinTimeout".equals(fieldName)) { + deserializedSysctlConfig.netIpv4TcpFinTimeout = reader.getNullable(JsonReader::getInt); + } else if ("netIpv4TcpKeepaliveTime".equals(fieldName)) { + deserializedSysctlConfig.netIpv4TcpKeepaliveTime = reader.getNullable(JsonReader::getInt); + } else if ("netIpv4TcpKeepaliveProbes".equals(fieldName)) { + deserializedSysctlConfig.netIpv4TcpKeepaliveProbes = reader.getNullable(JsonReader::getInt); + } else if ("netIpv4TcpkeepaliveIntvl".equals(fieldName)) { + deserializedSysctlConfig.netIpv4TcpkeepaliveIntvl = reader.getNullable(JsonReader::getInt); + } else if ("netIpv4TcpTwReuse".equals(fieldName)) { + deserializedSysctlConfig.netIpv4TcpTwReuse = reader.getNullable(JsonReader::getBoolean); + } else if ("netIpv4IpLocalPortRange".equals(fieldName)) { + deserializedSysctlConfig.netIpv4IpLocalPortRange = reader.getString(); + } else if ("netIpv4NeighDefaultGcThresh1".equals(fieldName)) { + deserializedSysctlConfig.netIpv4NeighDefaultGcThresh1 = reader.getNullable(JsonReader::getInt); + } else if ("netIpv4NeighDefaultGcThresh2".equals(fieldName)) { + deserializedSysctlConfig.netIpv4NeighDefaultGcThresh2 = reader.getNullable(JsonReader::getInt); + } else if ("netIpv4NeighDefaultGcThresh3".equals(fieldName)) { + deserializedSysctlConfig.netIpv4NeighDefaultGcThresh3 = reader.getNullable(JsonReader::getInt); + } else if ("netNetfilterNfConntrackMax".equals(fieldName)) { + deserializedSysctlConfig.netNetfilterNfConntrackMax = reader.getNullable(JsonReader::getInt); + } else if ("netNetfilterNfConntrackBuckets".equals(fieldName)) { + deserializedSysctlConfig.netNetfilterNfConntrackBuckets = reader.getNullable(JsonReader::getInt); + } else if ("fsInotifyMaxUserWatches".equals(fieldName)) { + deserializedSysctlConfig.fsInotifyMaxUserWatches = reader.getNullable(JsonReader::getInt); + } else if ("fsFileMax".equals(fieldName)) { + deserializedSysctlConfig.fsFileMax = reader.getNullable(JsonReader::getInt); + } else if ("fsAioMaxNr".equals(fieldName)) { + deserializedSysctlConfig.fsAioMaxNr = reader.getNullable(JsonReader::getInt); + } else if ("fsNrOpen".equals(fieldName)) { + deserializedSysctlConfig.fsNrOpen = reader.getNullable(JsonReader::getInt); + } else if ("kernelThreadsMax".equals(fieldName)) { + deserializedSysctlConfig.kernelThreadsMax = reader.getNullable(JsonReader::getInt); + } else if ("vmMaxMapCount".equals(fieldName)) { + deserializedSysctlConfig.vmMaxMapCount = reader.getNullable(JsonReader::getInt); + } else if ("vmSwappiness".equals(fieldName)) { + deserializedSysctlConfig.vmSwappiness = reader.getNullable(JsonReader::getInt); + } else if ("vmVfsCachePressure".equals(fieldName)) { + deserializedSysctlConfig.vmVfsCachePressure = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedSysctlConfig; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TagsObject.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TagsObject.java index 4419154bea52..02794c06addb 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TagsObject.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TagsObject.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Deprecated generated code +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeInWeek.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeInWeek.java new file mode 100644 index 000000000000..f4a9a9081f29 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeInWeek.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Time in a week. + */ +@Fluent +public final class TimeInWeek implements JsonSerializable { + /* + * The day of the week. + */ + private WeekDay day; + + /* + * A list of hours in the day used to identify a time range. Each integer hour represents a time range beginning at + * 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 + * UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. + */ + private List hourSlots; + + /** + * Creates an instance of TimeInWeek class. + */ + public TimeInWeek() { + } + + /** + * Get the day property: The day of the week. + * + * @return the day value. + */ + public WeekDay day() { + return this.day; + } + + /** + * Set the day property: The day of the week. + * + * @param day the day value to set. + * @return the TimeInWeek object itself. + */ + public TimeInWeek withDay(WeekDay day) { + this.day = day; + return this; + } + + /** + * Get the hourSlots property: A list of hours in the day used to identify a time range. Each integer hour + * represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to + * 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. + * + * @return the hourSlots value. + */ + public List hourSlots() { + return this.hourSlots; + } + + /** + * Set the hourSlots property: A list of hours in the day used to identify a time range. Each integer hour + * represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to + * 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. + * + * @param hourSlots the hourSlots value to set. + * @return the TimeInWeek object itself. + */ + public TimeInWeek withHourSlots(List hourSlots) { + this.hourSlots = hourSlots; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("day", this.day == null ? null : this.day.toString()); + jsonWriter.writeArrayField("hourSlots", this.hourSlots, (writer, element) -> writer.writeInt(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TimeInWeek from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TimeInWeek 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 TimeInWeek. + */ + public static TimeInWeek fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TimeInWeek deserializedTimeInWeek = new TimeInWeek(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("day".equals(fieldName)) { + deserializedTimeInWeek.day = WeekDay.fromString(reader.getString()); + } else if ("hourSlots".equals(fieldName)) { + List hourSlots = reader.readArray(reader1 -> reader1.getInt()); + deserializedTimeInWeek.hourSlots = hourSlots; + } else { + reader.skipChildren(); + } + } + + return deserializedTimeInWeek; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeSpan.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeSpan.java new file mode 100644 index 000000000000..3da892c49cd7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeSpan.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * A time range. For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. + */ +@Fluent +public final class TimeSpan implements JsonSerializable { + /* + * The start of a time span + */ + private OffsetDateTime start; + + /* + * The end of a time span + */ + private OffsetDateTime end; + + /** + * Creates an instance of TimeSpan class. + */ + public TimeSpan() { + } + + /** + * Get the start property: The start of a time span. + * + * @return the start value. + */ + public OffsetDateTime start() { + return this.start; + } + + /** + * Set the start property: The start of a time span. + * + * @param start the start value to set. + * @return the TimeSpan object itself. + */ + public TimeSpan withStart(OffsetDateTime start) { + this.start = start; + return this; + } + + /** + * Get the end property: The end of a time span. + * + * @return the end value. + */ + public OffsetDateTime end() { + return this.end; + } + + /** + * Set the end property: The end of a time span. + * + * @param end the end value to set. + * @return the TimeSpan object itself. + */ + public TimeSpan withEnd(OffsetDateTime end) { + this.end = end; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("start", + this.start == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.start)); + jsonWriter.writeStringField("end", + this.end == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.end)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TimeSpan from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TimeSpan 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 TimeSpan. + */ + public static TimeSpan fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TimeSpan deserializedTimeSpan = new TimeSpan(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("start".equals(fieldName)) { + deserializedTimeSpan.start = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("end".equals(fieldName)) { + deserializedTimeSpan.end = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedTimeSpan; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingListResult.java new file mode 100644 index 000000000000..b4a87c09f7b4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingListResult.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.TrustedAccessRoleBindingInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a TrustedAccessRoleBinding list operation. + */ +@Fluent +public final class TrustedAccessRoleBindingListResult implements JsonSerializable { + /* + * The TrustedAccessRoleBinding items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of TrustedAccessRoleBindingListResult class. + */ + public TrustedAccessRoleBindingListResult() { + } + + /** + * Get the value property: The TrustedAccessRoleBinding items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The TrustedAccessRoleBinding items on this page. + * + * @param value the value value to set. + * @return the TrustedAccessRoleBindingListResult object itself. + */ + public TrustedAccessRoleBindingListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the TrustedAccessRoleBindingListResult object itself. + */ + public TrustedAccessRoleBindingListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model TrustedAccessRoleBindingListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TrustedAccessRoleBindingListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrustedAccessRoleBindingListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrustedAccessRoleBindingListResult 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 TrustedAccessRoleBindingListResult. + */ + public static TrustedAccessRoleBindingListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrustedAccessRoleBindingListResult deserializedTrustedAccessRoleBindingListResult + = new TrustedAccessRoleBindingListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> TrustedAccessRoleBindingInner.fromJson(reader1)); + deserializedTrustedAccessRoleBindingListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedTrustedAccessRoleBindingListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTrustedAccessRoleBindingListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingProvisioningState.java new file mode 100644 index 000000000000..ca55418c59ed --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingProvisioningState.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The current provisioning state of trusted access role binding. + */ +public final class TrustedAccessRoleBindingProvisioningState + extends ExpandableStringEnum { + /** + * Static value Canceled for TrustedAccessRoleBindingProvisioningState. + */ + public static final TrustedAccessRoleBindingProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Deleting for TrustedAccessRoleBindingProvisioningState. + */ + public static final TrustedAccessRoleBindingProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Failed for TrustedAccessRoleBindingProvisioningState. + */ + public static final TrustedAccessRoleBindingProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Succeeded for TrustedAccessRoleBindingProvisioningState. + */ + public static final TrustedAccessRoleBindingProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Updating for TrustedAccessRoleBindingProvisioningState. + */ + public static final TrustedAccessRoleBindingProvisioningState UPDATING = fromString("Updating"); + + /** + * Creates a new instance of TrustedAccessRoleBindingProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TrustedAccessRoleBindingProvisioningState() { + } + + /** + * Creates or finds a TrustedAccessRoleBindingProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding TrustedAccessRoleBindingProvisioningState. + */ + public static TrustedAccessRoleBindingProvisioningState fromString(String name) { + return fromString(name, TrustedAccessRoleBindingProvisioningState.class); + } + + /** + * Gets known TrustedAccessRoleBindingProvisioningState values. + * + * @return known TrustedAccessRoleBindingProvisioningState values. + */ + public static Collection values() { + return values(TrustedAccessRoleBindingProvisioningState.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleListResult.java new file mode 100644 index 000000000000..0d9053385b4c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleListResult.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.TrustedAccessRoleInner; +import java.io.IOException; +import java.util.List; + +/** + * List of trusted access roles. + */ +@Fluent +public final class TrustedAccessRoleListResult implements JsonSerializable { + /* + * The TrustedAccessRole items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of TrustedAccessRoleListResult class. + */ + public TrustedAccessRoleListResult() { + } + + /** + * Get the value property: The TrustedAccessRole items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The TrustedAccessRole items on this page. + * + * @param value the value value to set. + * @return the TrustedAccessRoleListResult object itself. + */ + public TrustedAccessRoleListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the TrustedAccessRoleListResult object itself. + */ + public TrustedAccessRoleListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model TrustedAccessRoleListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TrustedAccessRoleListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrustedAccessRoleListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrustedAccessRoleListResult 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 TrustedAccessRoleListResult. + */ + public static TrustedAccessRoleListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrustedAccessRoleListResult deserializedTrustedAccessRoleListResult = new TrustedAccessRoleListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> TrustedAccessRoleInner.fromJson(reader1)); + deserializedTrustedAccessRoleListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedTrustedAccessRoleListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTrustedAccessRoleListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleRule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleRule.java new file mode 100644 index 000000000000..dc33e53e3b71 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleRule.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; +import java.util.List; + +/** + * Rule for trusted access role. + */ +@Immutable +public final class TrustedAccessRoleRule implements JsonSerializable { + /* + * List of allowed verbs + */ + private List verbs; + + /* + * List of allowed apiGroups + */ + private List apiGroups; + + /* + * List of allowed resources + */ + private List resources; + + /* + * List of allowed names + */ + private List resourceNames; + + /* + * List of allowed nonResourceURLs + */ + private List nonResourceUrls; + + /** + * Creates an instance of TrustedAccessRoleRule class. + */ + public TrustedAccessRoleRule() { + } + + /** + * Get the verbs property: List of allowed verbs. + * + * @return the verbs value. + */ + public List verbs() { + return this.verbs; + } + + /** + * Get the apiGroups property: List of allowed apiGroups. + * + * @return the apiGroups value. + */ + public List apiGroups() { + return this.apiGroups; + } + + /** + * Get the resources property: List of allowed resources. + * + * @return the resources value. + */ + public List resources() { + return this.resources; + } + + /** + * Get the resourceNames property: List of allowed names. + * + * @return the resourceNames value. + */ + public List resourceNames() { + return this.resourceNames; + } + + /** + * Get the nonResourceUrls property: List of allowed nonResourceURLs. + * + * @return the nonResourceUrls value. + */ + public List nonResourceUrls() { + return this.nonResourceUrls; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrustedAccessRoleRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrustedAccessRoleRule 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 TrustedAccessRoleRule. + */ + public static TrustedAccessRoleRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrustedAccessRoleRule deserializedTrustedAccessRoleRule = new TrustedAccessRoleRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("verbs".equals(fieldName)) { + List verbs = reader.readArray(reader1 -> reader1.getString()); + deserializedTrustedAccessRoleRule.verbs = verbs; + } else if ("apiGroups".equals(fieldName)) { + List apiGroups = reader.readArray(reader1 -> reader1.getString()); + deserializedTrustedAccessRoleRule.apiGroups = apiGroups; + } else if ("resources".equals(fieldName)) { + List resources = reader.readArray(reader1 -> reader1.getString()); + deserializedTrustedAccessRoleRule.resources = resources; + } else if ("resourceNames".equals(fieldName)) { + List resourceNames = reader.readArray(reader1 -> reader1.getString()); + deserializedTrustedAccessRoleRule.resourceNames = resourceNames; + } else if ("nonResourceURLs".equals(fieldName)) { + List nonResourceUrls = reader.readArray(reader1 -> reader1.getString()); + deserializedTrustedAccessRoleRule.nonResourceUrls = nonResourceUrls; + } else { + reader.skipChildren(); + } + } + + return deserializedTrustedAccessRoleRule; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Type.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Type.java new file mode 100644 index 000000000000..04ff14100e65 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Type.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The week index. Specifies on which week of the month the dayOfWeek applies. + */ +public final class Type extends ExpandableStringEnum { + /** + * Static value First for Type. + */ + public static final Type FIRST = fromString("First"); + + /** + * Static value Second for Type. + */ + public static final Type SECOND = fromString("Second"); + + /** + * Static value Third for Type. + */ + public static final Type THIRD = fromString("Third"); + + /** + * Static value Fourth for Type. + */ + public static final Type FOURTH = fromString("Fourth"); + + /** + * Static value Last for Type. + */ + public static final Type LAST = fromString("Last"); + + /** + * Creates a new instance of Type value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Type() { + } + + /** + * Creates or finds a Type from its string representation. + * + * @param name a name to look for. + * @return the corresponding Type. + */ + public static Type fromString(String name) { + return fromString(name, Type.class); + } + + /** + * Gets known Type values. + * + * @return known Type values. + */ + public static Collection values() { + return values(Type.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UndrainableNodeBehavior.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UndrainableNodeBehavior.java new file mode 100644 index 000000000000..979e48929968 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UndrainableNodeBehavior.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod + * Disruption Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the remaining per-node + * drain timeout or pod is still being in a running state, can also cause undrainable nodes. + */ +public final class UndrainableNodeBehavior extends ExpandableStringEnum { + /** + * Static value Cordon for UndrainableNodeBehavior. + */ + public static final UndrainableNodeBehavior CORDON = fromString("Cordon"); + + /** + * Static value Schedule for UndrainableNodeBehavior. + */ + public static final UndrainableNodeBehavior SCHEDULE = fromString("Schedule"); + + /** + * Creates a new instance of UndrainableNodeBehavior value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public UndrainableNodeBehavior() { + } + + /** + * Creates or finds a UndrainableNodeBehavior from its string representation. + * + * @param name a name to look for. + * @return the corresponding UndrainableNodeBehavior. + */ + public static UndrainableNodeBehavior fromString(String name) { + return fromString(name, UndrainableNodeBehavior.class); + } + + /** + * Gets known UndrainableNodeBehavior values. + * + * @return known UndrainableNodeBehavior values. + */ + public static Collection values() { + return values(UndrainableNodeBehavior.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeChannel.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeChannel.java new file mode 100644 index 000000000000..5132dbf5f0d9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeChannel.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The upgrade channel for auto upgrade. The default is 'none'. For more information see [setting the AKS cluster + * auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). + */ +public final class UpgradeChannel extends ExpandableStringEnum { + /** + * Static value rapid for UpgradeChannel. + */ + public static final UpgradeChannel RAPID = fromString("rapid"); + + /** + * Static value stable for UpgradeChannel. + */ + public static final UpgradeChannel STABLE = fromString("stable"); + + /** + * Static value patch for UpgradeChannel. + */ + public static final UpgradeChannel PATCH = fromString("patch"); + + /** + * Static value node-image for UpgradeChannel. + */ + public static final UpgradeChannel NODE_IMAGE = fromString("node-image"); + + /** + * Static value none for UpgradeChannel. + */ + public static final UpgradeChannel NONE = fromString("none"); + + /** + * Creates a new instance of UpgradeChannel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public UpgradeChannel() { + } + + /** + * Creates or finds a UpgradeChannel from its string representation. + * + * @param name a name to look for. + * @return the corresponding UpgradeChannel. + */ + public static UpgradeChannel fromString(String name) { + return fromString(name, UpgradeChannel.class); + } + + /** + * Gets known UpgradeChannel values. + * + * @return known UpgradeChannel values. + */ + public static Collection values() { + return values(UpgradeChannel.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeOverrideSettings.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeOverrideSettings.java new file mode 100644 index 000000000000..67d3dbaf8e85 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeOverrideSettings.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * Settings for overrides when upgrading a cluster. + */ +@Fluent +public final class UpgradeOverrideSettings implements JsonSerializable { + /* + * Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade + * protections such as checking for deprecated API usage. Enable this option only with caution. + */ + private Boolean forceUpgrade; + + /* + * Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the + * effectiveness won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is + * not set by default. It must be set for the overrides to take effect. + */ + private OffsetDateTime until; + + /** + * Creates an instance of UpgradeOverrideSettings class. + */ + public UpgradeOverrideSettings() { + } + + /** + * Get the forceUpgrade property: Whether to force upgrade the cluster. Note that this option instructs upgrade + * operation to bypass upgrade protections such as checking for deprecated API usage. Enable this option only with + * caution. + * + * @return the forceUpgrade value. + */ + public Boolean forceUpgrade() { + return this.forceUpgrade; + } + + /** + * Set the forceUpgrade property: Whether to force upgrade the cluster. Note that this option instructs upgrade + * operation to bypass upgrade protections such as checking for deprecated API usage. Enable this option only with + * caution. + * + * @param forceUpgrade the forceUpgrade value to set. + * @return the UpgradeOverrideSettings object itself. + */ + public UpgradeOverrideSettings withForceUpgrade(Boolean forceUpgrade) { + this.forceUpgrade = forceUpgrade; + return this; + } + + /** + * Get the until property: Until when the overrides are effective. Note that this only matches the start time of an + * upgrade, and the effectiveness won't change once an upgrade starts even if the `until` expires as upgrade + * proceeds. This field is not set by default. It must be set for the overrides to take effect. + * + * @return the until value. + */ + public OffsetDateTime until() { + return this.until; + } + + /** + * Set the until property: Until when the overrides are effective. Note that this only matches the start time of an + * upgrade, and the effectiveness won't change once an upgrade starts even if the `until` expires as upgrade + * proceeds. This field is not set by default. It must be set for the overrides to take effect. + * + * @param until the until value to set. + * @return the UpgradeOverrideSettings object itself. + */ + public UpgradeOverrideSettings withUntil(OffsetDateTime until) { + this.until = until; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("forceUpgrade", this.forceUpgrade); + jsonWriter.writeStringField("until", + this.until == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.until)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UpgradeOverrideSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UpgradeOverrideSettings 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 UpgradeOverrideSettings. + */ + public static UpgradeOverrideSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UpgradeOverrideSettings deserializedUpgradeOverrideSettings = new UpgradeOverrideSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("forceUpgrade".equals(fieldName)) { + deserializedUpgradeOverrideSettings.forceUpgrade = reader.getNullable(JsonReader::getBoolean); + } else if ("until".equals(fieldName)) { + deserializedUpgradeOverrideSettings.until = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedUpgradeOverrideSettings; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UserAssignedIdentity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UserAssignedIdentity.java new file mode 100644 index 000000000000..83dd93d2e7d5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UserAssignedIdentity.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Details about a user assigned identity. + */ +@Fluent +public class UserAssignedIdentity implements JsonSerializable { + /* + * The resource ID of the user assigned identity. + */ + private String resourceId; + + /* + * The client ID of the user assigned identity. + */ + private String clientId; + + /* + * The object ID of the user assigned identity. + */ + private String objectId; + + /** + * Creates an instance of UserAssignedIdentity class. + */ + public UserAssignedIdentity() { + } + + /** + * Get the resourceId property: The resource ID of the user assigned identity. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The resource ID of the user assigned identity. + * + * @param resourceId the resourceId value to set. + * @return the UserAssignedIdentity object itself. + */ + public UserAssignedIdentity withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the clientId property: The client ID of the user assigned identity. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The client ID of the user assigned identity. + * + * @param clientId the clientId value to set. + * @return the UserAssignedIdentity object itself. + */ + public UserAssignedIdentity withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the objectId property: The object ID of the user assigned identity. + * + * @return the objectId value. + */ + public String objectId() { + return this.objectId; + } + + /** + * Set the objectId property: The object ID of the user assigned identity. + * + * @param objectId the objectId value to set. + * @return the UserAssignedIdentity object itself. + */ + public UserAssignedIdentity withObjectId(String objectId) { + this.objectId = objectId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + jsonWriter.writeStringField("clientId", this.clientId); + jsonWriter.writeStringField("objectId", this.objectId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserAssignedIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserAssignedIdentity 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 UserAssignedIdentity. + */ + public static UserAssignedIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserAssignedIdentity deserializedUserAssignedIdentity = new UserAssignedIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedUserAssignedIdentity.resourceId = reader.getString(); + } else if ("clientId".equals(fieldName)) { + deserializedUserAssignedIdentity.clientId = reader.getString(); + } else if ("objectId".equals(fieldName)) { + deserializedUserAssignedIdentity.objectId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedUserAssignedIdentity; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachineNodes.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachineNodes.java new file mode 100644 index 000000000000..45f1918e4829 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachineNodes.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Current status on a group of nodes of the same vm size. + */ +@Fluent +public final class VirtualMachineNodes implements JsonSerializable { + /* + * The VM size of the agents used to host this group of nodes. + */ + private String size; + + /* + * Number of nodes. + */ + private Integer count; + + /** + * Creates an instance of VirtualMachineNodes class. + */ + public VirtualMachineNodes() { + } + + /** + * Get the size property: The VM size of the agents used to host this group of nodes. + * + * @return the size value. + */ + public String size() { + return this.size; + } + + /** + * Set the size property: The VM size of the agents used to host this group of nodes. + * + * @param size the size value to set. + * @return the VirtualMachineNodes object itself. + */ + public VirtualMachineNodes withSize(String size) { + this.size = size; + return this; + } + + /** + * Get the count property: Number of nodes. + * + * @return the count value. + */ + public Integer count() { + return this.count; + } + + /** + * Set the count property: Number of nodes. + * + * @param count the count value to set. + * @return the VirtualMachineNodes object itself. + */ + public VirtualMachineNodes withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("size", this.size); + jsonWriter.writeNumberField("count", this.count); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualMachineNodes from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualMachineNodes 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 VirtualMachineNodes. + */ + public static VirtualMachineNodes fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualMachineNodes deserializedVirtualMachineNodes = new VirtualMachineNodes(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("size".equals(fieldName)) { + deserializedVirtualMachineNodes.size = reader.getString(); + } else if ("count".equals(fieldName)) { + deserializedVirtualMachineNodes.count = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualMachineNodes; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachinesProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachinesProfile.java new file mode 100644 index 000000000000..c4468e5d41ab --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachinesProfile.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Specifications on VirtualMachines agent pool. + */ +@Fluent +public final class VirtualMachinesProfile implements JsonSerializable { + /* + * Specifications on how to scale a VirtualMachines agent pool. + */ + private ScaleProfile scale; + + /** + * Creates an instance of VirtualMachinesProfile class. + */ + public VirtualMachinesProfile() { + } + + /** + * Get the scale property: Specifications on how to scale a VirtualMachines agent pool. + * + * @return the scale value. + */ + public ScaleProfile scale() { + return this.scale; + } + + /** + * Set the scale property: Specifications on how to scale a VirtualMachines agent pool. + * + * @param scale the scale value to set. + * @return the VirtualMachinesProfile object itself. + */ + public VirtualMachinesProfile withScale(ScaleProfile scale) { + this.scale = scale; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (scale() != null) { + scale().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("scale", this.scale); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualMachinesProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualMachinesProfile 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 VirtualMachinesProfile. + */ + public static VirtualMachinesProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualMachinesProfile deserializedVirtualMachinesProfile = new VirtualMachinesProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("scale".equals(fieldName)) { + deserializedVirtualMachinesProfile.scale = ScaleProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualMachinesProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeekDay.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeekDay.java new file mode 100644 index 000000000000..b70d6cc8b94c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeekDay.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The weekday enum. + */ +public final class WeekDay extends ExpandableStringEnum { + /** + * Static value Sunday for WeekDay. + */ + public static final WeekDay SUNDAY = fromString("Sunday"); + + /** + * Static value Monday for WeekDay. + */ + public static final WeekDay MONDAY = fromString("Monday"); + + /** + * Static value Tuesday for WeekDay. + */ + public static final WeekDay TUESDAY = fromString("Tuesday"); + + /** + * Static value Wednesday for WeekDay. + */ + public static final WeekDay WEDNESDAY = fromString("Wednesday"); + + /** + * Static value Thursday for WeekDay. + */ + public static final WeekDay THURSDAY = fromString("Thursday"); + + /** + * Static value Friday for WeekDay. + */ + public static final WeekDay FRIDAY = fromString("Friday"); + + /** + * Static value Saturday for WeekDay. + */ + public static final WeekDay SATURDAY = fromString("Saturday"); + + /** + * Creates a new instance of WeekDay value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public WeekDay() { + } + + /** + * Creates or finds a WeekDay from its string representation. + * + * @param name a name to look for. + * @return the corresponding WeekDay. + */ + public static WeekDay fromString(String name) { + return fromString(name, WeekDay.class); + } + + /** + * Gets known WeekDay values. + * + * @return known WeekDay values. + */ + public static Collection values() { + return values(WeekDay.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeeklySchedule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeeklySchedule.java new file mode 100644 index 000000000000..4ac454d7716d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeeklySchedule.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. + */ +@Fluent +public final class WeeklySchedule implements JsonSerializable { + /* + * Specifies the number of weeks between each set of occurrences. + */ + private int intervalWeeks; + + /* + * Specifies on which day of the week the maintenance occurs. + */ + private WeekDay dayOfWeek; + + /** + * Creates an instance of WeeklySchedule class. + */ + public WeeklySchedule() { + } + + /** + * Get the intervalWeeks property: Specifies the number of weeks between each set of occurrences. + * + * @return the intervalWeeks value. + */ + public int intervalWeeks() { + return this.intervalWeeks; + } + + /** + * Set the intervalWeeks property: Specifies the number of weeks between each set of occurrences. + * + * @param intervalWeeks the intervalWeeks value to set. + * @return the WeeklySchedule object itself. + */ + public WeeklySchedule withIntervalWeeks(int intervalWeeks) { + this.intervalWeeks = intervalWeeks; + return this; + } + + /** + * Get the dayOfWeek property: Specifies on which day of the week the maintenance occurs. + * + * @return the dayOfWeek value. + */ + public WeekDay dayOfWeek() { + return this.dayOfWeek; + } + + /** + * Set the dayOfWeek property: Specifies on which day of the week the maintenance occurs. + * + * @param dayOfWeek the dayOfWeek value to set. + * @return the WeeklySchedule object itself. + */ + public WeeklySchedule withDayOfWeek(WeekDay dayOfWeek) { + this.dayOfWeek = dayOfWeek; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dayOfWeek() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property dayOfWeek in model WeeklySchedule")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WeeklySchedule.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("intervalWeeks", this.intervalWeeks); + jsonWriter.writeStringField("dayOfWeek", this.dayOfWeek == null ? null : this.dayOfWeek.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WeeklySchedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WeeklySchedule 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 WeeklySchedule. + */ + public static WeeklySchedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WeeklySchedule deserializedWeeklySchedule = new WeeklySchedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("intervalWeeks".equals(fieldName)) { + deserializedWeeklySchedule.intervalWeeks = reader.getInt(); + } else if ("dayOfWeek".equals(fieldName)) { + deserializedWeeklySchedule.dayOfWeek = WeekDay.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedWeeklySchedule; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WindowsGmsaProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WindowsGmsaProfile.java new file mode 100644 index 000000000000..f0d2dfb1cb07 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WindowsGmsaProfile.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.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; + +/** + * Windows gMSA Profile in the managed cluster. + */ +@Fluent +public final class WindowsGmsaProfile implements JsonSerializable { + /* + * Whether to enable Windows gMSA. Specifies whether to enable Windows gMSA in the managed cluster. + */ + private Boolean enabled; + + /* + * Specifies the DNS server for Windows gMSA.

Set it to empty if you have configured the DNS server in the + * vnet which is used to create the managed cluster. + */ + private String dnsServer; + + /* + * Specifies the root domain name for Windows gMSA.

Set it to empty if you have configured the DNS server + * in the vnet which is used to create the managed cluster. + */ + private String rootDomainName; + + /** + * Creates an instance of WindowsGmsaProfile class. + */ + public WindowsGmsaProfile() { + } + + /** + * Get the enabled property: Whether to enable Windows gMSA. Specifies whether to enable Windows gMSA in the managed + * cluster. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Windows gMSA. Specifies whether to enable Windows gMSA in the managed + * cluster. + * + * @param enabled the enabled value to set. + * @return the WindowsGmsaProfile object itself. + */ + public WindowsGmsaProfile withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the dnsServer property: Specifies the DNS server for Windows gMSA. <br><br> Set it to empty if + * you have configured the DNS server in the vnet which is used to create the managed cluster. + * + * @return the dnsServer value. + */ + public String dnsServer() { + return this.dnsServer; + } + + /** + * Set the dnsServer property: Specifies the DNS server for Windows gMSA. <br><br> Set it to empty if + * you have configured the DNS server in the vnet which is used to create the managed cluster. + * + * @param dnsServer the dnsServer value to set. + * @return the WindowsGmsaProfile object itself. + */ + public WindowsGmsaProfile withDnsServer(String dnsServer) { + this.dnsServer = dnsServer; + return this; + } + + /** + * Get the rootDomainName property: Specifies the root domain name for Windows gMSA. <br><br> Set it to + * empty if you have configured the DNS server in the vnet which is used to create the managed cluster. + * + * @return the rootDomainName value. + */ + public String rootDomainName() { + return this.rootDomainName; + } + + /** + * Set the rootDomainName property: Specifies the root domain name for Windows gMSA. <br><br> Set it to + * empty if you have configured the DNS server in the vnet which is used to create the managed cluster. + * + * @param rootDomainName the rootDomainName value to set. + * @return the WindowsGmsaProfile object itself. + */ + public WindowsGmsaProfile withRootDomainName(String rootDomainName) { + this.rootDomainName = rootDomainName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("dnsServer", this.dnsServer); + jsonWriter.writeStringField("rootDomainName", this.rootDomainName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WindowsGmsaProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WindowsGmsaProfile 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 WindowsGmsaProfile. + */ + public static WindowsGmsaProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WindowsGmsaProfile deserializedWindowsGmsaProfile = new WindowsGmsaProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedWindowsGmsaProfile.enabled = reader.getNullable(JsonReader::getBoolean); + } else if ("dnsServer".equals(fieldName)) { + deserializedWindowsGmsaProfile.dnsServer = reader.getString(); + } else if ("rootDomainName".equals(fieldName)) { + deserializedWindowsGmsaProfile.rootDomainName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWindowsGmsaProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java new file mode 100644 index 000000000000..c87728fe2b08 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Determines the type of workload a node can run. + */ +public final class WorkloadRuntime extends ExpandableStringEnum { + /** + * Static value OCIContainer for WorkloadRuntime. + */ + public static final WorkloadRuntime OCICONTAINER = fromString("OCIContainer"); + + /** + * Static value WasmWasi for WorkloadRuntime. + */ + public static final WorkloadRuntime WASM_WASI = fromString("WasmWasi"); + + /** + * Static value KataVmIsolation for WorkloadRuntime. + */ + public static final WorkloadRuntime KATA_VM_ISOLATION = fromString("KataVmIsolation"); + + /** + * Creates a new instance of WorkloadRuntime value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public WorkloadRuntime() { + } + + /** + * Creates or finds a WorkloadRuntime from its string representation. + * + * @param name a name to look for. + * @return the corresponding WorkloadRuntime. + */ + public static WorkloadRuntime fromString(String name) { + return fromString(name, WorkloadRuntime.class); + } + + /** + * Gets known WorkloadRuntime values. + * + * @return known WorkloadRuntime values. + */ + public static Collection values() { + return values(WorkloadRuntime.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java index da3663f3ba9a..c6aca495bc2a 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Deprecated generated code +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for OrchestratorManagementClient. - * Orchestrator Client. + * Package containing the data models for ContainerServiceManagementClient. + * Container Service Client. */ package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/package-info.java index 5d4586f6ebd5..430f80b01e1c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/package-info.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Deprecated generated code +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the classes for OrchestratorManagementClient. - * Orchestrator Client. + * Package containing the classes for ContainerServiceManagementClient. + * Container Service Client. */ package com.azure.resourcemanager.containerservice; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json index 61cf8f85fd5c..cf725a0f4c44 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.containerservice.implementation.ContainerServicesClientImpl$ContainerServicesService"]] \ No newline at end of file +[["com.azure.resourcemanager.containerservice.implementation.AgentPoolsClientImpl$AgentPoolsService"],["com.azure.resourcemanager.containerservice.implementation.MachinesClientImpl$MachinesService"],["com.azure.resourcemanager.containerservice.implementation.MaintenanceConfigurationsClientImpl$MaintenanceConfigurationsService"],["com.azure.resourcemanager.containerservice.implementation.ManagedClustersClientImpl$ManagedClustersService"],["com.azure.resourcemanager.containerservice.implementation.ManagedNamespacesClientImpl$ManagedNamespacesService"],["com.azure.resourcemanager.containerservice.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.containerservice.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.containerservice.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.containerservice.implementation.ResolvePrivateLinkServiceIdsClientImpl$ResolvePrivateLinkServiceIdsService"],["com.azure.resourcemanager.containerservice.implementation.SnapshotsClientImpl$SnapshotsService"],["com.azure.resourcemanager.containerservice.implementation.TrustedAccessRoleBindingsClientImpl$TrustedAccessRoleBindingsService"],["com.azure.resourcemanager.containerservice.implementation.TrustedAccessRolesClientImpl$TrustedAccessRolesService"]] \ No newline at end of file diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsAbortLatestOperationSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsAbortLatestOperationSamples.java new file mode 100644 index 000000000000..efe712e2c47b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsAbortLatestOperationSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for AgentPools AbortLatestOperation. + */ +public final class AgentPoolsAbortLatestOperationSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsAbortOperation.json + */ + /** + * Sample code: Abort operation on agent pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + abortOperationOnAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .abortLatestOperation("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..57089a5352b5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCreateOrUpdateSamples.java @@ -0,0 +1,589 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner; +import com.azure.resourcemanager.containerservice.models.AgentPoolMode; +import com.azure.resourcemanager.containerservice.models.AgentPoolType; +import com.azure.resourcemanager.containerservice.models.AgentPoolWindowsProfile; +import com.azure.resourcemanager.containerservice.models.Code; +import com.azure.resourcemanager.containerservice.models.CreationData; +import com.azure.resourcemanager.containerservice.models.GpuInstanceProfile; +import com.azure.resourcemanager.containerservice.models.KubeletConfig; +import com.azure.resourcemanager.containerservice.models.LinuxOSConfig; +import com.azure.resourcemanager.containerservice.models.ManualScaleProfile; +import com.azure.resourcemanager.containerservice.models.OSDiskType; +import com.azure.resourcemanager.containerservice.models.OSSku; +import com.azure.resourcemanager.containerservice.models.OSType; +import com.azure.resourcemanager.containerservice.models.PowerState; +import com.azure.resourcemanager.containerservice.models.ScaleProfile; +import com.azure.resourcemanager.containerservice.models.ScaleSetEvictionPolicy; +import com.azure.resourcemanager.containerservice.models.ScaleSetPriority; +import com.azure.resourcemanager.containerservice.models.SysctlConfig; +import com.azure.resourcemanager.containerservice.models.VirtualMachinesProfile; +import com.azure.resourcemanager.containerservice.models.WorkloadRuntime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for AgentPools CreateOrUpdate. + */ +public final class AgentPoolsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsCreate_EnableFIPS.json + */ + /** + * Sample code: Create Agent Pool with FIPS enabled OS. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createAgentPoolWithFIPSEnabledOS(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", + new AgentPoolInner().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withEnableFips(true), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPools_Update.json + */ + /** + * Sample code: Update Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updateAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", + new AgentPoolInner().withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withMaxCount(2) + .withMinCount(2) + .withEnableAutoScaling(true) + .withOrchestratorVersion("") + .withScaleSetPriority(ScaleSetPriority.SPOT) + .withScaleSetEvictionPolicy(ScaleSetEvictionPolicy.DELETE) + .withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsCreate_GPUMIG.json + */ + /** + * Sample code: Create Agent Pool with GPUMIG. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createAgentPoolWithGPUMIG(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", + new AgentPoolInner().withCount(3) + .withVmSize("Standard_ND96asr_v4") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withKubeletConfig(new KubeletConfig().withCpuManagerPolicy("static") + .withCpuCfsQuota(true) + .withCpuCfsQuotaPeriod("200ms") + .withImageGcHighThreshold(90) + .withImageGcLowThreshold(70) + .withTopologyManagerPolicy("best-effort") + .withAllowedUnsafeSysctls(Arrays.asList("kernel.msg*", "net.core.somaxconn")) + .withFailSwapOn(false)) + .withLinuxOSConfig(new LinuxOSConfig() + .withSysctls(new SysctlConfig().withNetCoreWmemDefault(12345) + .withNetIpv4TcpTwReuse(true) + .withNetIpv4IpLocalPortRange("20000 60000") + .withKernelThreadsMax(99999)) + .withTransparentHugePageEnabled("always") + .withTransparentHugePageDefrag("madvise") + .withSwapFileSizeMB(1500)) + .withGpuInstanceProfile(GpuInstanceProfile.MIG2G), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsCreate_WindowsOSSKU.json + */ + /** + * Sample code: Create Agent Pool with Windows OSSKU. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createAgentPoolWithWindowsOSSKU(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "wnp2", + new AgentPoolInner().withCount(3) + .withVmSize("Standard_D4s_v3") + .withOsType(OSType.WINDOWS) + .withOsSku(OSSku.WINDOWS2022) + .withOrchestratorVersion("1.23.3"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsCreate_DedicatedHostGroup.json + */ + /** + * Sample code: Create Agent Pool with Dedicated Host Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithDedicatedHostGroup( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", new AgentPoolInner().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withHostGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsCreate_Update.json + */ + /** + * Sample code: Create/Update Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createUpdateAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", + new AgentPoolInner().withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withMode(AgentPoolMode.USER) + .withOrchestratorVersion("") + .withScaleSetPriority(ScaleSetPriority.SPOT) + .withScaleSetEvictionPolicy(ScaleSetEvictionPolicy.DELETE) + .withTags(mapOf("name1", "val1")) + .withNodeLabels(mapOf("key1", "fakeTokenPlaceholder")) + .withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsCreate_WindowsDisableOutboundNAT.json + */ + /** + * Sample code: Create Windows Agent Pool with disabling OutboundNAT. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createWindowsAgentPoolWithDisablingOutboundNAT( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "wnp2", + new AgentPoolInner().withCount(3) + .withVmSize("Standard_D4s_v3") + .withOsType(OSType.WINDOWS) + .withOsSku(OSSku.WINDOWS2022) + .withOrchestratorVersion("1.23.8") + .withWindowsProfile(new AgentPoolWindowsProfile().withDisableOutboundNat(true)), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPools_Start.json + */ + /** + * Sample code: Start Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void startAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", + new AgentPoolInner().withPowerState(new PowerState().withCode(Code.RUNNING)), null, null, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsCreate_Spot.json + */ + /** + * Sample code: Create Spot Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createSpotAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", + new AgentPoolInner().withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withScaleSetPriority(ScaleSetPriority.SPOT) + .withScaleSetEvictionPolicy(ScaleSetEvictionPolicy.DELETE) + .withTags(mapOf("name1", "val1")) + .withNodeLabels(mapOf("key1", "fakeTokenPlaceholder")) + .withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsCreate_Ephemeral.json + */ + /** + * Sample code: Create Agent Pool with Ephemeral OS Disk. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createAgentPoolWithEphemeralOSDisk(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", + new AgentPoolInner().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsDiskSizeGB(64) + .withOsDiskType(OSDiskType.EPHEMERAL) + .withOsType(OSType.LINUX) + .withOrchestratorVersion(""), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsCreate_EnableEncryptionAtHost.json + */ + /** + * Sample code: Create Agent Pool with EncryptionAtHost enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithEncryptionAtHostEnabled( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", + new AgentPoolInner().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withEnableEncryptionAtHost(true), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsCreate_EnableUltraSSD.json + */ + /** + * Sample code: Create Agent Pool with UltraSSD enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createAgentPoolWithUltraSSDEnabled(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", + new AgentPoolInner().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withEnableUltraSsd(true), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsCreate_WasmWasi.json + */ + /** + * Sample code: Create Agent Pool with Krustlet and the WASI runtime. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithKrustletAndTheWASIRuntime( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", + new AgentPoolInner().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsDiskSizeGB(64) + .withWorkloadRuntime(WorkloadRuntime.WASM_WASI) + .withOsType(OSType.LINUX) + .withMode(AgentPoolMode.USER) + .withOrchestratorVersion(""), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsCreate_Snapshot.json + */ + /** + * Sample code: Create Agent Pool using an agent pool snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolUsingAnAgentPoolSnapshot( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", new AgentPoolInner().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withEnableFips(true) + .withCreationData(new CreationData().withSourceResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1")), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsCreate_PPG.json + */ + /** + * Sample code: Create Agent Pool with PPG. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createAgentPoolWithPPG(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", new AgentPoolInner().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withProximityPlacementGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsCreate_CustomNodeConfig.json + */ + /** + * Sample code: Create Agent Pool with KubeletConfig and LinuxOSConfig. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithKubeletConfigAndLinuxOSConfig( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", + new AgentPoolInner().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withKubeletConfig(new KubeletConfig().withCpuManagerPolicy("static") + .withCpuCfsQuota(true) + .withCpuCfsQuotaPeriod("200ms") + .withImageGcHighThreshold(90) + .withImageGcLowThreshold(70) + .withTopologyManagerPolicy("best-effort") + .withAllowedUnsafeSysctls(Arrays.asList("kernel.msg*", "net.core.somaxconn")) + .withFailSwapOn(false)) + .withLinuxOSConfig(new LinuxOSConfig() + .withSysctls(new SysctlConfig().withNetCoreWmemDefault(12345) + .withNetIpv4TcpTwReuse(true) + .withNetIpv4IpLocalPortRange("20000 60000") + .withKernelThreadsMax(99999)) + .withTransparentHugePageEnabled("always") + .withTransparentHugePageDefrag("madvise") + .withSwapFileSizeMB(1500)), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPools_Stop.json + */ + /** + * Sample code: Stop Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void stopAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", + new AgentPoolInner().withPowerState(new PowerState().withCode(Code.STOPPED)), null, null, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsCreate_MessageOfTheDay.json + */ + /** + * Sample code: Create Agent Pool with Message of the Day. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createAgentPoolWithMessageOfTheDay(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", + new AgentPoolInner().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsDiskSizeGB(64) + .withMessageOfTheDay("Zm9vCg==") + .withOsType(OSType.LINUX) + .withMode(AgentPoolMode.USER) + .withOrchestratorVersion(""), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsCreate_CRG.json + */ + /** + * Sample code: Create Agent Pool with Capacity Reservation Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithCapacityReservationGroup( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", new AgentPoolInner().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withCapacityReservationGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsCreate_OSSKU.json + */ + /** + * Sample code: Create Agent Pool with OSSKU. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createAgentPoolWithOSSKU(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", + new AgentPoolInner().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOsSku(OSSku.AZURE_LINUX) + .withOrchestratorVersion("") + .withKubeletConfig(new KubeletConfig().withCpuManagerPolicy("static") + .withCpuCfsQuota(true) + .withCpuCfsQuotaPeriod("200ms") + .withImageGcHighThreshold(90) + .withImageGcLowThreshold(70) + .withTopologyManagerPolicy("best-effort") + .withAllowedUnsafeSysctls(Arrays.asList("kernel.msg*", "net.core.somaxconn")) + .withFailSwapOn(false)) + .withLinuxOSConfig(new LinuxOSConfig() + .withSysctls(new SysctlConfig().withNetCoreWmemDefault(12345) + .withNetIpv4TcpTwReuse(true) + .withNetIpv4IpLocalPortRange("20000 60000") + .withKernelThreadsMax(99999)) + .withTransparentHugePageEnabled("always") + .withTransparentHugePageDefrag("madvise") + .withSwapFileSizeMB(1500)), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsCreate_TypeVirtualMachines.json + */ + /** + * Sample code: Create Agent Pool with VirtualMachines pool type. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithVirtualMachinesPoolType( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", + new AgentPoolInner().withOsType(OSType.LINUX) + .withTypePropertiesType(AgentPoolType.VIRTUAL_MACHINES) + .withOrchestratorVersion("1.9.6") + .withTags(mapOf("name1", "val1")) + .withNodeLabels(mapOf("key1", "fakeTokenPlaceholder")) + .withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")) + .withVirtualMachinesProfile(new VirtualMachinesProfile().withScale(new ScaleProfile() + .withManual(Arrays.asList(new ManualScaleProfile().withSize("Standard_D2_v2").withCount(3), + new ManualScaleProfile().withSize("Standard_D2_v3").withCount(2))))), + null, null, 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/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteMachinesSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteMachinesSamples.java new file mode 100644 index 000000000000..784c31ed2dc6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteMachinesSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.models.AgentPoolDeleteMachinesParameter; +import java.util.Arrays; + +/** + * Samples for AgentPools DeleteMachines. + */ +public final class AgentPoolsDeleteMachinesSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsDeleteMachines.json + */ + /** + * Sample code: Delete Specific Machines in an Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteSpecificMachinesInAnAgentPool( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .deleteMachines("rg1", "clustername1", "agentpool1", + new AgentPoolDeleteMachinesParameter().withMachineNames( + Arrays.asList("aks-nodepool1-42263519-vmss00000a", "aks-nodepool1-42263519-vmss00000b")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteSamples.java new file mode 100644 index 000000000000..637809f50520 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for AgentPools Delete. + */ +public final class AgentPoolsDeleteSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsDelete.json + */ + /** + * Sample code: Delete Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .delete("rg1", "clustername1", "agentpool1", null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetAvailableAgentPoolVersionsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetAvailableAgentPoolVersionsSamples.java new file mode 100644 index 000000000000..0bcf72f77c48 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetAvailableAgentPoolVersionsSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for AgentPools GetAvailableAgentPoolVersions. + */ +public final class AgentPoolsGetAvailableAgentPoolVersionsSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsGetAgentPoolAvailableVersions.json + */ + /** + * Sample code: Get available versions for agent pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + getAvailableVersionsForAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .getAvailableAgentPoolVersionsWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetSamples.java new file mode 100644 index 000000000000..53517b5e15b7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for AgentPools Get. + */ +public final class AgentPoolsGetSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsGet.json + */ + /** + * Sample code: Get Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .getWithResponse("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetUpgradeProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetUpgradeProfileSamples.java new file mode 100644 index 000000000000..fa384fb1f487 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetUpgradeProfileSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for AgentPools GetUpgradeProfile. + */ +public final class AgentPoolsGetUpgradeProfileSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsGetUpgradeProfile.json + */ + /** + * Sample code: Get Upgrade Profile for Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + getUpgradeProfileForAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .getUpgradeProfileWithResponse("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListSamples.java new file mode 100644 index 000000000000..f457ae7c0170 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for AgentPools List. + */ +public final class AgentPoolsListSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsList.json + */ + /** + * Sample code: List Agent Pools by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + listAgentPoolsByManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient().getAgentPools().list("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpgradeNodeImageVersionSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpgradeNodeImageVersionSamples.java new file mode 100644 index 000000000000..755e17b47a26 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpgradeNodeImageVersionSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for AgentPools UpgradeNodeImageVersion. + */ +public final class AgentPoolsUpgradeNodeImageVersionSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * AgentPoolsUpgradeNodeImageVersion.json + */ + /** + * Sample code: Upgrade Agent Pool Node Image Version. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + upgradeAgentPoolNodeImageVersion(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .upgradeNodeImageVersion("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesGetSamples.java new file mode 100644 index 000000000000..4bf631ba9a82 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesGetSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for Machines Get. + */ +public final class MachinesGetSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * MachineGet.json + */ + /** + * Sample code: Get a Machine in an Agent Pools by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getAMachineInAnAgentPoolsByManagedCluster( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMachines() + .getWithResponse("rg1", "clustername1", "agentpool1", "aks-nodepool1-42263519-vmss00000t", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesListSamples.java new file mode 100644 index 000000000000..f2bd504ca65e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesListSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for Machines List. + */ +public final class MachinesListSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * MachineList.json + */ + /** + * Sample code: List Machines in an Agentpool by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listMachinesInAnAgentpoolByManagedCluster( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMachines() + .list("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..fcbafe00abb7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsCreateOrUpdateSamples.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.fluent.models.MaintenanceConfigurationInner; +import com.azure.resourcemanager.containerservice.models.DateSpan; +import com.azure.resourcemanager.containerservice.models.MaintenanceWindow; +import com.azure.resourcemanager.containerservice.models.RelativeMonthlySchedule; +import com.azure.resourcemanager.containerservice.models.Schedule; +import com.azure.resourcemanager.containerservice.models.Type; +import com.azure.resourcemanager.containerservice.models.WeekDay; +import java.time.LocalDate; +import java.util.Arrays; + +/** + * Samples for MaintenanceConfigurations CreateOrUpdate. + */ +public final class MaintenanceConfigurationsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json + */ + /** + * Sample code: Create/Update Maintenance Configuration with Maintenance Window. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateMaintenanceConfigurationWithMaintenanceWindow( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMaintenanceConfigurations() + .createOrUpdateWithResponse("rg1", "clustername1", "aksManagedAutoUpgradeSchedule", + new MaintenanceConfigurationInner().withMaintenanceWindow(new MaintenanceWindow() + .withSchedule(new Schedule().withRelativeMonthly(new RelativeMonthlySchedule().withIntervalMonths(3) + .withWeekIndex(Type.FIRST) + .withDayOfWeek(WeekDay.MONDAY))) + .withDurationHours(10) + .withUtcOffset("+05:30") + .withStartDate(LocalDate.parse("2023-01-01")) + .withStartTime("08:30") + .withNotAllowedDates(Arrays.asList( + new DateSpan().withStart(LocalDate.parse("2023-02-18")).withEnd(LocalDate.parse("2023-02-25")), + new DateSpan().withStart(LocalDate.parse("2023-12-23")) + .withEnd(LocalDate.parse("2024-01-05"))))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsDeleteSamples.java new file mode 100644 index 000000000000..c3a38dd379db --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsDeleteSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for MaintenanceConfigurations Delete. + */ +public final class MaintenanceConfigurationsDeleteSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * MaintenanceConfigurationsDelete_MaintenanceWindow.json + */ + /** + * Sample code: Delete Maintenance Configuration For Node OS Upgrade. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteMaintenanceConfigurationForNodeOSUpgrade( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMaintenanceConfigurations() + .deleteWithResponse("rg1", "clustername1", "aksManagedNodeOSUpgradeSchedule", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsGetSamples.java new file mode 100644 index 000000000000..1b39abf4cd60 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsGetSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for MaintenanceConfigurations Get. + */ +public final class MaintenanceConfigurationsGetSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * MaintenanceConfigurationsGet_MaintenanceWindow.json + */ + /** + * Sample code: Get Maintenance Configuration Configured With Maintenance Window. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getMaintenanceConfigurationConfiguredWithMaintenanceWindow( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMaintenanceConfigurations() + .getWithResponse("rg1", "clustername1", "aksManagedNodeOSUpgradeSchedule", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsListByManagedClusterSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsListByManagedClusterSamples.java new file mode 100644 index 000000000000..0322fbdb9a52 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsListByManagedClusterSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for MaintenanceConfigurations ListByManagedCluster. + */ +public final class MaintenanceConfigurationsListByManagedClusterSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * MaintenanceConfigurationsList_MaintenanceWindow.json + */ + /** + * Sample code: List maintenance configurations configured with maintenance window by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listMaintenanceConfigurationsConfiguredWithMaintenanceWindowByManagedCluster( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMaintenanceConfigurations() + .listByManagedCluster("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersAbortLatestOperationSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersAbortLatestOperationSamples.java new file mode 100644 index 000000000000..d3bd2ad072d3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersAbortLatestOperationSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters AbortLatestOperation. + */ +public final class ManagedClustersAbortLatestOperationSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersAbortOperation.json + */ + /** + * Sample code: Abort operation on managed cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + abortOperationOnManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .abortLatestOperation("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersCreateOrUpdateSamples.java new file mode 100644 index 000000000000..72d520ed96b3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersCreateOrUpdateSamples.java @@ -0,0 +1,1494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterInner; +import com.azure.resourcemanager.containerservice.models.AgentPoolMode; +import com.azure.resourcemanager.containerservice.models.AgentPoolType; +import com.azure.resourcemanager.containerservice.models.ClusterUpgradeSettings; +import com.azure.resourcemanager.containerservice.models.ContainerServiceLinuxProfile; +import com.azure.resourcemanager.containerservice.models.ContainerServiceNetworkProfile; +import com.azure.resourcemanager.containerservice.models.ContainerServiceSshConfiguration; +import com.azure.resourcemanager.containerservice.models.ContainerServiceSshPublicKey; +import com.azure.resourcemanager.containerservice.models.CreationData; +import com.azure.resourcemanager.containerservice.models.Expander; +import com.azure.resourcemanager.containerservice.models.GpuInstanceProfile; +import com.azure.resourcemanager.containerservice.models.IpFamily; +import com.azure.resourcemanager.containerservice.models.IstioCertificateAuthority; +import com.azure.resourcemanager.containerservice.models.IstioComponents; +import com.azure.resourcemanager.containerservice.models.IstioEgressGateway; +import com.azure.resourcemanager.containerservice.models.IstioIngressGateway; +import com.azure.resourcemanager.containerservice.models.IstioIngressGatewayMode; +import com.azure.resourcemanager.containerservice.models.IstioPluginCertificateAuthority; +import com.azure.resourcemanager.containerservice.models.IstioServiceMesh; +import com.azure.resourcemanager.containerservice.models.KubernetesSupportPlan; +import com.azure.resourcemanager.containerservice.models.LicenseType; +import com.azure.resourcemanager.containerservice.models.LoadBalancerSku; +import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterAddonProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterApiServerAccessProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterHttpProxyConfig; +import com.azure.resourcemanager.containerservice.models.ManagedClusterIdentity; +import com.azure.resourcemanager.containerservice.models.ManagedClusterIngressProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterIngressProfileWebAppRouting; +import com.azure.resourcemanager.containerservice.models.ManagedClusterLoadBalancerProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs; +import com.azure.resourcemanager.containerservice.models.ManagedClusterManagedOutboundIpProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterNatGatewayProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterPodIdentityProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterPropertiesAutoScalerProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterSecurityProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterSecurityProfileDefender; +import com.azure.resourcemanager.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring; +import com.azure.resourcemanager.containerservice.models.ManagedClusterSecurityProfileWorkloadIdentity; +import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterSku; +import com.azure.resourcemanager.containerservice.models.ManagedClusterSkuName; +import com.azure.resourcemanager.containerservice.models.ManagedClusterSkuTier; +import com.azure.resourcemanager.containerservice.models.ManagedClusterWindowsProfile; +import com.azure.resourcemanager.containerservice.models.ManagedServiceIdentityUserAssignedIdentitiesValue; +import com.azure.resourcemanager.containerservice.models.OSSku; +import com.azure.resourcemanager.containerservice.models.OSType; +import com.azure.resourcemanager.containerservice.models.OutboundType; +import com.azure.resourcemanager.containerservice.models.ResourceIdentityType; +import com.azure.resourcemanager.containerservice.models.ScaleDownMode; +import com.azure.resourcemanager.containerservice.models.ServiceMeshMode; +import com.azure.resourcemanager.containerservice.models.ServiceMeshProfile; +import com.azure.resourcemanager.containerservice.models.UpgradeOverrideSettings; +import com.azure.resourcemanager.containerservice.models.WindowsGmsaProfile; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ManagedClusters CreateOrUpdate. + */ +public final class ManagedClustersCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_CRG.json + */ + /** + * Sample code: Create Managed Cluster with Capacity Reservation Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithCapacityReservationGroup( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withCapacityReservationGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/capacityReservationGroups/crg1") + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_CustomCATrustCertificates.json + */ + /** + * Sample code: Create Managed Cluster with Custom CA Trust Certificates. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithCustomCATrustCertificates( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .withSecurityProfile(new ManagedClusterSecurityProfile().withCustomCATrustCertificates( + Arrays.asList("ZHVtbXlFeGFtcGxlVGVzdFZhbHVlRm9yQ2VydGlmaWNhdGVUb0JlQWRkZWQ=".getBytes()))), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_DualStackNetworking.json + */ + /** + * Sample code: Create/Update Managed Cluster with dual-stack networking. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateManagedClusterWithDualStackNetworking( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withIdentity(new ManagedClusterIdentity().withType(ResourceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", + new ManagedServiceIdentityUserAssignedIdentitiesValue()))) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withScaleDownMode(ScaleDownMode.DEALLOCATE) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs(new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2))) + .withIpFamilies(Arrays.asList(IpFamily.IPV4, IpFamily.IPV6))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile().withBalanceSimilarNodeGroups("true") + .withExpander(Expander.PRIORITY) + .withMaxNodeProvisionTime("15m") + .withNewPodScaleUpDelay("1m") + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m") + .withSkipNodesWithSystemPods("false")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_PodIdentity.json + */ + /** + * Sample code: Create Managed Cluster with PodIdentity enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithPodIdentityEnabled( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withPodIdentityProfile( + new ManagedClusterPodIdentityProfile().withEnabled(true).withAllowNetworkPluginKubenet(true)) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_UserAssignedNATGateway.json + */ + /** + * Sample code: Create Managed Cluster with user-assigned NAT gateway as outbound type. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithUserAssignedNATGatewayAsOutboundType( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(false) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile().withOutboundType(OutboundType.USER_ASSIGNED_NATGATEWAY) + .withLoadBalancerSku(LoadBalancerSku.STANDARD)) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_Update.json + */ + /** + * Sample code: Create/Update Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createUpdateManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withIdentity(new ManagedClusterIdentity().withType(ResourceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", + new ManagedServiceIdentityUserAssignedIdentitiesValue()))) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withScaleDownMode(ScaleDownMode.DEALLOCATE) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withUpgradeSettings(new ClusterUpgradeSettings() + .withOverrideSettings(new UpgradeOverrideSettings().withForceUpgrade(false) + .withUntil(OffsetDateTime.parse("2022-11-01T13:00:00Z")))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile().withBalanceSimilarNodeGroups("true") + .withExpander(Expander.PRIORITY) + .withMaxNodeProvisionTime("15m") + .withNewPodScaleUpDelay("1m") + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m") + .withSkipNodesWithSystemPods("false")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_PrivateClusterFQDNSubdomain.json + */ + /** + * Sample code: Create Managed Private Cluster with fqdn subdomain specified. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedPrivateClusterWithFqdnSubdomainSpecified( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withFqdnSubdomain("domain1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableEncryptionAtHost(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withApiServerAccessProfile(new ManagedClusterApiServerAccessProfile().withEnablePrivateCluster(true) + .withPrivateDnsZone( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/privateDnsZones/privatelink.location1.azmk8s.io")), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_ManagedNATGateway.json + */ + /** + * Sample code: Create Managed Cluster with AKS-managed NAT gateway as outbound type. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithAKSManagedNATGatewayAsOutboundType( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(false) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile().withOutboundType(OutboundType.MANAGED_NATGATEWAY) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withNatGatewayProfile(new ManagedClusterNatGatewayProfile() + .withManagedOutboundIpProfile(new ManagedClusterManagedOutboundIpProfile().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_Premium.json + */ + /** + * Sample code: Create Managed Cluster with LongTermSupport. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithLongTermSupport( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.BASE) + .withTier(ManagedClusterSkuTier.PREMIUM)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableEncryptionAtHost(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withSupportPlan(KubernetesSupportPlan.AKSLONG_TERM_SUPPORT) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withApiServerAccessProfile(new ManagedClusterApiServerAccessProfile().withDisableRunCommand(true)), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_NodePublicIPPrefix.json + */ + /** + * Sample code: Create Managed Cluster with Node Public IP Prefix. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithNodePublicIPPrefix( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withNodePublicIpPrefixId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/public-ip-prefix") + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_EnableEncryptionAtHost.json + */ + /** + * Sample code: Create Managed Cluster with EncryptionAtHost enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithEncryptionAtHostEnabled( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableEncryptionAtHost(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_PrivateClusterPublicFQDN.json + */ + /** + * Sample code: Create Managed Private Cluster with Public FQDN specified. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedPrivateClusterWithPublicFQDNSpecified( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableEncryptionAtHost(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withApiServerAccessProfile(new ManagedClusterApiServerAccessProfile().withEnablePrivateCluster(true) + .withEnablePrivateClusterPublicFqdn(true)), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_HTTPProxy.json + */ + /** + * Sample code: Create Managed Cluster with HTTP proxy configured. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithHTTPProxyConfigured( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .withHttpProxyConfig(new ManagedClusterHttpProxyConfig().withHttpProxy("http://myproxy.server.com:8080") + .withHttpsProxy("https://myproxy.server.com:8080") + .withNoProxy(Arrays.asList("localhost", "127.0.0.1")) + .withTrustedCa("Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U=")), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_DedicatedHostGroup.json + */ + /** + * Sample code: Create Managed Cluster with Dedicated Host Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithDedicatedHostGroup( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withEnableNodePublicIp(true) + .withHostGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1") + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_EnabledFIPS.json + */ + /** + * Sample code: Create Managed Cluster with FIPS enabled OS. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithFIPSEnabledOS( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableFips(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_SecurityProfile.json + */ + /** + * Sample code: Create Managed Cluster with Security Profile configured. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithSecurityProfileConfigured( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withSecurityProfile(new ManagedClusterSecurityProfile() + .withDefender(new ManagedClusterSecurityProfileDefender().withLogAnalyticsWorkspaceResourceId( + "/subscriptions/SUB_ID/resourceGroups/RG_NAME/providers/microsoft.operationalinsights/workspaces/WORKSPACE_NAME") + .withSecurityMonitoring( + new ManagedClusterSecurityProfileDefenderSecurityMonitoring().withEnabled(true))) + .withWorkloadIdentity(new ManagedClusterSecurityProfileWorkloadIdentity().withEnabled(true))), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_PPG.json + */ + /** + * Sample code: Create Managed Cluster with PPG. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createManagedClusterWithPPG(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withProximityPlacementGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1") + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_IngressProfile_WebAppRouting.json + */ + /** + * Sample code: Create Managed Cluster with Web App Routing Ingress Profile configured. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithWebAppRoutingIngressProfileConfigured( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withIngressProfile(new ManagedClusterIngressProfile() + .withWebAppRouting(new ManagedClusterIngressProfileWebAppRouting().withEnabled(true) + .withDnsZoneResourceIds(Arrays.asList( + "/subscriptions/SUB_ID/resourceGroups/RG_NAME/providers/Microsoft.Network/dnszones/DNS_ZONE_NAME")))), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_UpdateWithAHUB.json + */ + /** + * Sample code: Create/Update Managed Cluster with EnableAHUB. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateManagedClusterWithEnableAHUB( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withIdentity(new ManagedClusterIdentity().withType(ResourceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", + new ManagedServiceIdentityUserAssignedIdentitiesValue()))) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder") + .withLicenseType(LicenseType.WINDOWS_SERVER)) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_DisableRunCommand.json + */ + /** + * Sample code: Create Managed Cluster with RunCommand disabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithRunCommandDisabled( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableEncryptionAtHost(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withApiServerAccessProfile(new ManagedClusterApiServerAccessProfile().withDisableRunCommand(true)), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_Snapshot.json + */ + /** + * Sample code: Create Managed Cluster using an agent pool snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterUsingAnAgentPoolSnapshot( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableFips(true) + .withCreationData(new CreationData().withSourceResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1")) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_AzureServiceMesh.json + */ + /** + * Sample code: Create/Update Managed Cluster with Azure Service Mesh. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateManagedClusterWithAzureServiceMesh( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", + new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles( + mapOf("azureKeyvaultSecretsProvider", + new ManagedClusterAddonProfile().withEnabled(true) + .withConfig(mapOf("enableSecretRotation", "fakeTokenPlaceholder", + "rotationPollInterval", "2m")))) + .withEnableRbac(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .withServiceMeshProfile(new ServiceMeshProfile().withMode(ServiceMeshMode.ISTIO) + .withIstio(new IstioServiceMesh() + .withComponents(new IstioComponents() + .withIngressGateways( + Arrays.asList(new IstioIngressGateway().withMode(IstioIngressGatewayMode.INTERNAL) + .withEnabled(true))) + .withEgressGateways(Arrays.asList(new IstioEgressGateway().withEnabled(true) + .withName("test-istio-egress") + .withGatewayConfigurationName("test-gateway-configuration")))) + .withCertificateAuthority(new IstioCertificateAuthority() + .withPlugin(new IstioPluginCertificateAuthority().withKeyVaultId("fakeTokenPlaceholder") + .withCertObjectName("ca-cert") + .withKeyObjectName("fakeTokenPlaceholder") + .withRootCertObjectName("root-cert") + .withCertChainObjectName("cert-chain"))))), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_AzureKeyvaultSecretsProvider.json + */ + /** + * Sample code: Create Managed Cluster with Azure KeyVault Secrets Provider Addon. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithAzureKeyVaultSecretsProviderAddon( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", + new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles( + mapOf("azureKeyvaultSecretsProvider", + new ManagedClusterAddonProfile().withEnabled(true) + .withConfig(mapOf("enableSecretRotation", "fakeTokenPlaceholder", + "rotationPollInterval", "2m")))) + .withEnableRbac(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile() + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_OSSKU.json + */ + /** + * Sample code: Create Managed Cluster with OSSKU. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createManagedClusterWithOSSKU(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOsSku(OSSku.AZURE_LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .withHttpProxyConfig(new ManagedClusterHttpProxyConfig().withHttpProxy("http://myproxy.server.com:8080") + .withHttpsProxy("https://myproxy.server.com:8080") + .withNoProxy(Arrays.asList("localhost", "127.0.0.1")) + .withTrustedCa("Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U=")), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_UpdateWithEnableAzureRBAC.json + */ + /** + * Sample code: Create/Update AAD Managed Cluster with EnableAzureRBAC. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateAADManagedClusterWithEnableAzureRBAC( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAadProfile(new ManagedClusterAadProfile().withManaged(true).withEnableAzureRbac(true)) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_EnableUltraSSD.json + */ + /** + * Sample code: Create Managed Cluster with UltraSSD enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithUltraSSDEnabled( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableUltraSsd(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_UpdateWindowsGmsa.json + */ + /** + * Sample code: Create/Update Managed Cluster with Windows gMSA enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateManagedClusterWithWindowsGMSAEnabled( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withIdentity(new ManagedClusterIdentity().withType(ResourceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", + new ManagedServiceIdentityUserAssignedIdentitiesValue()))) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder") + .withGmsaProfile(new WindowsGmsaProfile().withEnabled(true))) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersCreate_GPUMIG.json + */ + /** + * Sample code: Create Managed Cluster with GPUMIG. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createManagedClusterWithGPUMIG(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_ND96asr_v4") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withGpuInstanceProfile(GpuInstanceProfile.MIG3G) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .withHttpProxyConfig(new ManagedClusterHttpProxyConfig().withHttpProxy("http://myproxy.server.com:8080") + .withHttpsProxy("https://myproxy.server.com:8080") + .withNoProxy(Arrays.asList("localhost", "127.0.0.1")) + .withTrustedCa("Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U=")), + null, null, 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/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java new file mode 100644 index 000000000000..711ba46d6120 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters Delete. + */ +public final class ManagedClustersDeleteSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersDelete.json + */ + /** + * Sample code: Delete Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + deleteManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .delete("rg1", "clustername1", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetAccessProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetAccessProfileSamples.java new file mode 100644 index 000000000000..8d866422e011 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetAccessProfileSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters GetAccessProfile. + */ +public final class ManagedClustersGetAccessProfileSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersGetAccessProfile.json + */ + /** + * Sample code: Get Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .getAccessProfileWithResponse("rg1", "clustername1", "clusterUser", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetByResourceGroupSamples.java new file mode 100644 index 000000000000..9692c0491b0a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetByResourceGroupSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters GetByResourceGroup. + */ +public final class ManagedClustersGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersGet.json + */ + /** + * Sample code: Get Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .getByResourceGroupWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetCommandResultSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetCommandResultSamples.java new file mode 100644 index 000000000000..42ea9c5e11bf --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetCommandResultSamples.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters GetCommandResult. + */ +public final class ManagedClustersGetCommandResultSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * RunCommandResultFailed.json + */ + /** + * Sample code: commandFailedResult. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void commandFailedResult(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .getCommandResultWithResponse("rg1", "clustername1", "def7b3ea71bd4f7e9d226ddbc0f00ad9", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * RunCommandResultSucceed.json + */ + /** + * Sample code: commandSucceedResult. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + commandSucceedResult(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .getCommandResultWithResponse("rg1", "clustername1", "def7b3ea71bd4f7e9d226ddbc0f00ad9", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshRevisionProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshRevisionProfileSamples.java new file mode 100644 index 000000000000..01d6fe744880 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshRevisionProfileSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters GetMeshRevisionProfile. + */ +public final class ManagedClustersGetMeshRevisionProfileSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersGet_MeshRevisionProfile.json + */ + /** + * Sample code: Get a mesh revision profile for a mesh mode. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getAMeshRevisionProfileForAMeshMode( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .getMeshRevisionProfileWithResponse("location1", "istio", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshUpgradeProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshUpgradeProfileSamples.java new file mode 100644 index 000000000000..e71709922ed1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshUpgradeProfileSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters GetMeshUpgradeProfile. + */ +public final class ManagedClustersGetMeshUpgradeProfileSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersGet_MeshUpgradeProfile.json + */ + /** + * Sample code: Gets version compatibility and upgrade profile for a service mesh in a cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getsVersionCompatibilityAndUpgradeProfileForAServiceMeshInACluster( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .getMeshUpgradeProfileWithResponse("rg1", "clustername1", "istio", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetUpgradeProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetUpgradeProfileSamples.java new file mode 100644 index 000000000000..33555a2b3f3a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetUpgradeProfileSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters GetUpgradeProfile. + */ +public final class ManagedClustersGetUpgradeProfileSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersGetUpgradeProfile.json + */ + /** + * Sample code: Get Upgrade Profile for Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + getUpgradeProfileForManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .getUpgradeProfileWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListByResourceGroupSamples.java new file mode 100644 index 000000000000..7115e6d1912c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters ListByResourceGroup. + */ +public final class ManagedClustersListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersListByResourceGroup.json + */ + /** + * Sample code: Get Managed Clusters by Resource Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + getManagedClustersByResourceGroup(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient().getManagedClusters().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterAdminCredentialsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterAdminCredentialsSamples.java new file mode 100644 index 000000000000..e3886fa4b73e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterAdminCredentialsSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters ListClusterAdminCredentials. + */ +public final class ManagedClustersListClusterAdminCredentialsSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersListClusterAdminCredentials.json + */ + /** + * Sample code: Get Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .listClusterAdminCredentialsWithResponse("rg1", "clustername1", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterMonitoringUserCredentialsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterMonitoringUserCredentialsSamples.java new file mode 100644 index 000000000000..c4fbc8cdd632 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterMonitoringUserCredentialsSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters ListClusterMonitoringUserCredentials. + */ +public final class ManagedClustersListClusterMonitoringUserCredentialsSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersListClusterMonitoringUserCredentials.json + */ + /** + * Sample code: Get Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .listClusterMonitoringUserCredentialsWithResponse("rg1", "clustername1", null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterUserCredentialsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterUserCredentialsSamples.java new file mode 100644 index 000000000000..473535db309b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterUserCredentialsSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters ListClusterUserCredentials. + */ +public final class ManagedClustersListClusterUserCredentialsSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersListClusterUserCredentials.json + */ + /** + * Sample code: Get Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .listClusterUserCredentialsWithResponse("rg1", "clustername1", null, null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListKubernetesVersionsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListKubernetesVersionsSamples.java new file mode 100644 index 000000000000..789de44bd3f1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListKubernetesVersionsSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters ListKubernetesVersions. + */ +public final class ManagedClustersListKubernetesVersionsSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * KubernetesVersions_List.json + */ + /** + * Sample code: List Kubernetes Versions. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + listKubernetesVersions(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .listKubernetesVersionsWithResponse("location1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshRevisionProfilesSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshRevisionProfilesSamples.java new file mode 100644 index 000000000000..147c60498d5e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshRevisionProfilesSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters ListMeshRevisionProfiles. + */ +public final class ManagedClustersListMeshRevisionProfilesSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersList_MeshRevisionProfiles.json + */ + /** + * Sample code: List mesh revision profiles in a location. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listMeshRevisionProfilesInALocation( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .listMeshRevisionProfiles("location1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshUpgradeProfilesSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshUpgradeProfilesSamples.java new file mode 100644 index 000000000000..311ec833aa0c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshUpgradeProfilesSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters ListMeshUpgradeProfiles. + */ +public final class ManagedClustersListMeshUpgradeProfilesSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersList_MeshUpgradeProfiles.json + */ + /** + * Sample code: Lists version compatibility and upgrade profile for all service meshes in a cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listsVersionCompatibilityAndUpgradeProfileForAllServiceMeshesInACluster( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .listMeshUpgradeProfiles("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListOutboundNetworkDependenciesEndpointsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListOutboundNetworkDependenciesEndpointsSamples.java new file mode 100644 index 000000000000..eb55f6f796c7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListOutboundNetworkDependenciesEndpointsSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters ListOutboundNetworkDependenciesEndpoints. + */ +public final class ManagedClustersListOutboundNetworkDependenciesEndpointsSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * OutboundNetworkDependenciesEndpointsList.json + */ + /** + * Sample code: List OutboundNetworkDependenciesEndpoints by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listOutboundNetworkDependenciesEndpointsByManagedCluster( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .listOutboundNetworkDependenciesEndpoints("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSamples.java new file mode 100644 index 000000000000..2abc7fa02123 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters List. + */ +public final class ManagedClustersListSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersList.json + */ + /** + * Sample code: List Managed Clusters. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listManagedClusters(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient().getManagedClusters().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAadProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAadProfileSamples.java new file mode 100644 index 000000000000..4aeb8177a902 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAadProfileSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; + +/** + * Samples for ManagedClusters ResetAadProfile. + */ +public final class ManagedClustersResetAadProfileSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersResetAADProfile.json + */ + /** + * Sample code: Reset AAD Profile. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void resetAADProfile(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .resetAadProfile("rg1", "clustername1", + new ManagedClusterAadProfile().withClientAppId("clientappid") + .withServerAppId("serverappid") + .withServerAppSecret("fakeTokenPlaceholder") + .withTenantId("tenantid"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetServicePrincipalProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetServicePrincipalProfileSamples.java new file mode 100644 index 000000000000..6556e8a37592 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetServicePrincipalProfileSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; + +/** + * Samples for ManagedClusters ResetServicePrincipalProfile. + */ +public final class ManagedClustersResetServicePrincipalProfileSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersResetServicePrincipalProfile.json + */ + /** + * Sample code: Reset Service Principal Profile. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + resetServicePrincipalProfile(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .resetServicePrincipalProfile("rg1", "clustername1", + new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateClusterCertificatesSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateClusterCertificatesSamples.java new file mode 100644 index 000000000000..57e4d8eee24b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateClusterCertificatesSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters RotateClusterCertificates. + */ +public final class ManagedClustersRotateClusterCertificatesSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersRotateClusterCertificates.json + */ + /** + * Sample code: Rotate Cluster Certificates. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + rotateClusterCertificates(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .rotateClusterCertificates("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateServiceAccountSigningKeysSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateServiceAccountSigningKeysSamples.java new file mode 100644 index 000000000000..dad4a5e64814 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateServiceAccountSigningKeysSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters RotateServiceAccountSigningKeys. + */ +public final class ManagedClustersRotateServiceAccountSigningKeysSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersRotateServiceAccountSigningKeys.json + */ + /** + * Sample code: Rotate Cluster Service Account Signing Keys. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void rotateClusterServiceAccountSigningKeys( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .rotateServiceAccountSigningKeys("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRunCommandSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRunCommandSamples.java new file mode 100644 index 000000000000..348ff1ae1420 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRunCommandSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.models.RunCommandRequest; + +/** + * Samples for ManagedClusters RunCommand. + */ +public final class ManagedClustersRunCommandSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * RunCommandRequest.json + */ + /** + * Sample code: submitNewCommand. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void submitNewCommand(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .runCommand("rg1", "clustername1", + new RunCommandRequest().withCommand("kubectl apply -f ns.yaml") + .withContext("") + .withClusterToken("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStartSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStartSamples.java new file mode 100644 index 000000000000..3cd4d6079d8b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStartSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters Start. + */ +public final class ManagedClustersStartSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersStart.json + */ + /** + * Sample code: Start Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void startManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient().getManagedClusters().start("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStopSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStopSamples.java new file mode 100644 index 000000000000..1602aee622f6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStopSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters Stop. + */ +public final class ManagedClustersStopSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersStop.json + */ + /** + * Sample code: Stop Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void stopManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient().getManagedClusters().stop("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersUpdateTagsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersUpdateTagsSamples.java new file mode 100644 index 000000000000..dcb0a75203e6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersUpdateTagsSamples.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.models.TagsObject; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ManagedClusters UpdateTags. + */ +public final class ManagedClustersUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedClustersUpdateTags.json + */ + /** + * Sample code: Update Managed Cluster Tags. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + updateManagedClusterTags(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .updateTags("rg1", "clustername1", new TagsObject().withTags(mapOf("archv3", "", "tier", "testing")), null, + 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/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..487c62fcbf1f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesCreateOrUpdateSamples.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.fluent.models.ManagedNamespaceInner; +import com.azure.resourcemanager.containerservice.models.AdoptionPolicy; +import com.azure.resourcemanager.containerservice.models.DeletePolicy; +import com.azure.resourcemanager.containerservice.models.NamespaceProperties; +import com.azure.resourcemanager.containerservice.models.NetworkPolicies; +import com.azure.resourcemanager.containerservice.models.PolicyRule; +import com.azure.resourcemanager.containerservice.models.ResourceQuota; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ManagedNamespaces CreateOrUpdate. + */ +public final class ManagedNamespacesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedNamespacesCreate_Update.json + */ + /** + * Sample code: Create/Update Managed Namespace. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createUpdateManagedNamespace(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedNamespaces() + .createOrUpdate("rg1", "clustername1", "namespace1", + new ManagedNamespaceInner().withLocation("eastus2") + .withTags(mapOf("tagKey1", "fakeTokenPlaceholder")) + .withProperties(new NamespaceProperties().withLabels(mapOf("kubernetes.io/metadata.name", "true")) + .withAnnotations(mapOf("annatationKey", "fakeTokenPlaceholder")) + .withDefaultResourceQuota(new ResourceQuota().withCpuRequest("3m") + .withCpuLimit("3m") + .withMemoryRequest("5Gi") + .withMemoryLimit("5Gi")) + .withDefaultNetworkPolicy(new NetworkPolicies().withIngress(PolicyRule.ALLOW_SAME_NAMESPACE) + .withEgress(PolicyRule.ALLOW_ALL)) + .withAdoptionPolicy(AdoptionPolicy.IF_IDENTICAL) + .withDeletePolicy(DeletePolicy.KEEP)), + 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/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesDeleteSamples.java new file mode 100644 index 000000000000..de70f3fe9ab1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesDeleteSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedNamespaces Delete. + */ +public final class ManagedNamespacesDeleteSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedNamespacesDelete.json + */ + /** + * Sample code: Delete Managed Namespace. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + deleteManagedNamespace(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedNamespaces() + .delete("rg1", "clustername1", "namespace1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesGetSamples.java new file mode 100644 index 000000000000..217cc33af966 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesGetSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedNamespaces Get. + */ +public final class ManagedNamespacesGetSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedNamespacesGet.json + */ + /** + * Sample code: Get Managed Namespace. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getManagedNamespace(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedNamespaces() + .getWithResponse("rg1", "clustername1", "namespace1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListByManagedClusterSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListByManagedClusterSamples.java new file mode 100644 index 000000000000..50f5393d06d7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListByManagedClusterSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedNamespaces ListByManagedCluster. + */ +public final class ManagedNamespacesListByManagedClusterSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedNamespacesList.json + */ + /** + * Sample code: List namespaces by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + listNamespacesByManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedNamespaces() + .listByManagedCluster("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListCredentialSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListCredentialSamples.java new file mode 100644 index 000000000000..b7ed7c6bc380 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListCredentialSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedNamespaces ListCredential. + */ +public final class ManagedNamespacesListCredentialSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedNamespacesListCredentialResult.json + */ + /** + * Sample code: List managed namespace credentials. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + listManagedNamespaceCredentials(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedNamespaces() + .listCredentialWithResponse("rg1", "clustername1", "namespace1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesUpdateSamples.java new file mode 100644 index 000000000000..9ca2e67b98fe --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesUpdateSamples.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.models.TagsObject; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ManagedNamespaces Update. + */ +public final class ManagedNamespacesUpdateSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ManagedNamespacesUpdateTags.json + */ + /** + * Sample code: Update Managed Namespace Tags. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + updateManagedNamespaceTags(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedNamespaces() + .updateWithResponse("rg1", "clustername1", "namespace1", + new TagsObject().withTags(mapOf("tagKey1", "fakeTokenPlaceholder", "tagKey2", "fakeTokenPlaceholder")), + 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/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationsListSamples.java new file mode 100644 index 000000000000..213fdbc75e45 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationsListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * Operation_List.json + */ + /** + * Sample code: List available operations for the container service resource provider. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listAvailableOperationsForTheContainerServiceResourceProvider( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient().getOperations().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsDeleteSamples.java new file mode 100644 index 000000000000..8dc4ba16afa2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for PrivateEndpointConnections Delete. + */ +public final class PrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * PrivateEndpointConnectionsDelete.json + */ + /** + * Sample code: Delete Private Endpoint Connection. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + deletePrivateEndpointConnection(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getPrivateEndpointConnections() + .delete("rg1", "clustername1", "privateendpointconnection1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsGetSamples.java new file mode 100644 index 000000000000..f649f692467f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsGetSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for PrivateEndpointConnections Get. + */ +public final class PrivateEndpointConnectionsGetSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * PrivateEndpointConnectionsGet.json + */ + /** + * Sample code: Get Private Endpoint Connection. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + getPrivateEndpointConnection(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getPrivateEndpointConnections() + .getWithResponse("rg1", "clustername1", "privateendpointconnection1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsListSamples.java new file mode 100644 index 000000000000..ebdf5308f72c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsListSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for PrivateEndpointConnections List. + */ +public final class PrivateEndpointConnectionsListSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * PrivateEndpointConnectionsList.json + */ + /** + * Sample code: List Private Endpoint Connections by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listPrivateEndpointConnectionsByManagedCluster( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getPrivateEndpointConnections() + .listWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsUpdateSamples.java new file mode 100644 index 000000000000..596d761fbaa7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsUpdateSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerservice.models.ConnectionStatus; +import com.azure.resourcemanager.containerservice.models.PrivateLinkServiceConnectionState; + +/** + * Samples for PrivateEndpointConnections Update. + */ +public final class PrivateEndpointConnectionsUpdateSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * PrivateEndpointConnectionsUpdate.json + */ + /** + * Sample code: Update Private Endpoint Connection. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + updatePrivateEndpointConnection(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getPrivateEndpointConnections() + .updateWithResponse("rg1", "clustername1", "privateendpointconnection1", + new PrivateEndpointConnectionInner().withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.APPROVED)), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateLinkResourcesListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateLinkResourcesListSamples.java new file mode 100644 index 000000000000..8806d72f613a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateLinkResourcesListSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for PrivateLinkResources List. + */ +public final class PrivateLinkResourcesListSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * PrivateLinkResourcesList.json + */ + /** + * Sample code: List Private Link Resources by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listPrivateLinkResourcesByManagedCluster( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getPrivateLinkResources() + .listWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPostSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPostSamples.java new file mode 100644 index 000000000000..93db85f4eeac --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPostSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.fluent.models.PrivateLinkResourceInner; + +/** + * Samples for ResolvePrivateLinkServiceId Post. + */ +public final class ResolvePrivateLinkServiceIdPostSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * ResolvePrivateLinkServiceId.json + */ + /** + * Sample code: Resolve the Private Link Service ID for Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void resolveThePrivateLinkServiceIDForManagedCluster( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getResolvePrivateLinkServiceIds() + .postWithResponse("rg1", "clustername1", new PrivateLinkResourceInner().withName("management"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..9b56acefe003 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsCreateOrUpdateSamples.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.fluent.models.SnapshotInner; +import com.azure.resourcemanager.containerservice.models.CreationData; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Snapshots CreateOrUpdate. + */ +public final class SnapshotsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * SnapshotsCreate.json + */ + /** + * Sample code: Create/Update Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createUpdateSnapshot(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getSnapshots() + .createOrUpdateWithResponse("rg1", "snapshot1", new SnapshotInner().withLocation("westus") + .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) + .withCreationData(new CreationData().withSourceResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0")), + 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/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsDeleteSamples.java new file mode 100644 index 000000000000..0436c265bde7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for Snapshots Delete. + */ +public final class SnapshotsDeleteSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * SnapshotsDelete.json + */ + /** + * Sample code: Delete Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteSnapshot(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient().getSnapshots().deleteWithResponse("rg1", "snapshot1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsGetByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..0589c9f0daed --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsGetByResourceGroupSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for Snapshots GetByResourceGroup. + */ +public final class SnapshotsGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * SnapshotsGet.json + */ + /** + * Sample code: Get Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getSnapshot(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getSnapshots() + .getByResourceGroupWithResponse("rg1", "snapshot1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListByResourceGroupSamples.java new file mode 100644 index 000000000000..92c2f4def55d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for Snapshots ListByResourceGroup. + */ +public final class SnapshotsListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * SnapshotsListByResourceGroup.json + */ + /** + * Sample code: List Snapshots by Resource Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + listSnapshotsByResourceGroup(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient().getSnapshots().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListSamples.java new file mode 100644 index 000000000000..75ea26aae2bb --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for Snapshots List. + */ +public final class SnapshotsListSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * SnapshotsList.json + */ + /** + * Sample code: List Snapshots. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listSnapshots(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient().getSnapshots().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsUpdateTagsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsUpdateTagsSamples.java new file mode 100644 index 000000000000..51f1e0d4c70c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsUpdateTagsSamples.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.models.TagsObject; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Snapshots UpdateTags. + */ +public final class SnapshotsUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * SnapshotsUpdateTags.json + */ + /** + * Sample code: Update Snapshot Tags. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updateSnapshotTags(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getSnapshots() + .updateTagsWithResponse("rg1", "snapshot1", + new TagsObject().withTags(mapOf("key2", "fakeTokenPlaceholder", "key3", "fakeTokenPlaceholder")), + 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/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..1d256d7d8c91 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsCreateOrUpdateSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.fluent.models.TrustedAccessRoleBindingInner; +import java.util.Arrays; + +/** + * Samples for TrustedAccessRoleBindings CreateOrUpdate. + */ +public final class TrustedAccessRoleBindingsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * TrustedAccessRoleBindings_CreateOrUpdate.json + */ + /** + * Sample code: Create or update a trusted access role binding. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createOrUpdateATrustedAccessRoleBinding( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getTrustedAccessRoleBindings() + .createOrUpdate("rg1", "clustername1", "binding1", new TrustedAccessRoleBindingInner().withSourceResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/b/providers/Microsoft.MachineLearningServices/workspaces/c") + .withRoles(Arrays.asList("Microsoft.MachineLearningServices/workspaces/reader", + "Microsoft.MachineLearningServices/workspaces/writer")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsDeleteSamples.java new file mode 100644 index 000000000000..7add67ac781a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsDeleteSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for TrustedAccessRoleBindings Delete. + */ +public final class TrustedAccessRoleBindingsDeleteSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * TrustedAccessRoleBindings_Delete.json + */ + /** + * Sample code: Delete a trusted access role binding. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + deleteATrustedAccessRoleBinding(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getTrustedAccessRoleBindings() + .delete("rg1", "clustername1", "binding1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsGetSamples.java new file mode 100644 index 000000000000..93ea394a13f3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsGetSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for TrustedAccessRoleBindings Get. + */ +public final class TrustedAccessRoleBindingsGetSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * TrustedAccessRoleBindings_Get.json + */ + /** + * Sample code: Get a trusted access role binding. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + getATrustedAccessRoleBinding(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getTrustedAccessRoleBindings() + .getWithResponse("rg1", "clustername1", "binding1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsListSamples.java new file mode 100644 index 000000000000..3f4de183f670 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsListSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for TrustedAccessRoleBindings List. + */ +public final class TrustedAccessRoleBindingsListSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * TrustedAccessRoleBindings_List.json + */ + /** + * Sample code: List trusted access role bindings. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + listTrustedAccessRoleBindings(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getTrustedAccessRoleBindings() + .list("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRolesListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRolesListSamples.java new file mode 100644 index 000000000000..6104934e386d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRolesListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for TrustedAccessRoles List. + */ +public final class TrustedAccessRolesListSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ + * TrustedAccessRoles_List.json + */ + /** + * Sample code: List trusted access roles. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + listTrustedAccessRoles(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient().getTrustedAccessRoles().list("westus2", com.azure.core.util.Context.NONE); + } +} From 33a8e39bbd15eb679112d4db9320221c0e0ce59f Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 20 Mar 2026 12:54:51 +0800 Subject: [PATCH 07/19] update Manager --- .../ContainerServiceManager.java | 34 +++++++++++++++++++ .../KubernetesClustersImpl.java | 6 ++-- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/ContainerServiceManager.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/ContainerServiceManager.java index fde2eadd392f..137567d3504b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/ContainerServiceManager.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/ContainerServiceManager.java @@ -6,8 +6,12 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; import com.azure.resourcemanager.containerservice.fluent.ContainerServiceManagementClient; +import com.azure.resourcemanager.containerservice.fluent.OpenShiftManagementClient; +import com.azure.resourcemanager.containerservice.fluent.OrchestratorManagementClient; import com.azure.resourcemanager.containerservice.implementation.ContainerServiceManagementClientBuilder; import com.azure.resourcemanager.containerservice.implementation.KubernetesClustersImpl; +import com.azure.resourcemanager.containerservice.implementation.OpenShiftManagementClientBuilder; +import com.azure.resourcemanager.containerservice.implementation.OrchestratorManagementClientBuilder; import com.azure.resourcemanager.containerservice.models.KubernetesClusters; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.Manager; @@ -21,6 +25,8 @@ public final class ContainerServiceManager extends Manager { // The service managers private KubernetesClustersImpl kubernetesClusters; + private final OrchestratorManagementClient orchestratorManagementClient; + private final OpenShiftManagementClient openShiftManagementClient; /** * Get a Configurable instance that can be used to create ContainerServiceManager with optional configuration. @@ -85,6 +91,16 @@ private ContainerServiceManager(HttpPipeline httpPipeline, AzureProfile profile) .pipeline(httpPipeline) .subscriptionId(profile.getSubscriptionId()) .buildClient()); + this.orchestratorManagementClient + = new OrchestratorManagementClientBuilder().endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .pipeline(httpPipeline) + .subscriptionId(profile.getSubscriptionId()) + .buildClient(); + this.openShiftManagementClient + = new OpenShiftManagementClientBuilder().endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .pipeline(httpPipeline) + .subscriptionId(profile.getSubscriptionId()) + .buildClient(); } /** @@ -98,4 +114,22 @@ public KubernetesClusters kubernetesClusters() { } return this.kubernetesClusters; } + + /** + * Gets the OrchestratorManagementClient. + * + * @return the OrchestratorManagementClient + */ + public OrchestratorManagementClient orchestratorClient() { + return this.orchestratorManagementClient; + } + + /** + * Gets the OpenShiftManagementClient. + * + * @return the OpenShiftManagementClient + */ + public OpenShiftManagementClient openShiftClient() { + return this.openShiftManagementClient; + } } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClustersImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClustersImpl.java index 59fccfec5c35..5f13fc533938 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClustersImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClustersImpl.java @@ -98,7 +98,7 @@ public KubernetesClusterImpl define(String name) { public Set listKubernetesVersions(Region region) { TreeSet kubernetesVersions = new TreeSet<>(); OrchestratorVersionProfileListResultInner inner - = this.manager().serviceClient().getContainerServices().listOrchestrators(region.name()); + = this.manager().orchestratorClient().getContainerServices().listOrchestrators(region.name()); if (inner != null && inner.orchestrators() != null && inner.orchestrators().size() > 0) { for (OrchestratorVersionProfile orchestrator : inner.orchestrators()) { @@ -114,7 +114,7 @@ public Set listKubernetesVersions(Region region) { @Override public Mono> listKubernetesVersionsAsync(Region region) { return this.manager() - .serviceClient() + .orchestratorClient() .getContainerServices() .listOrchestratorsAsync(region.name()) .map(inner -> { @@ -140,7 +140,7 @@ public PagedIterable listOrchestrators(Region region public PagedFlux listOrchestratorsAsync(Region region, ContainerServiceResourceTypes resourceTypes) { return new PagedFlux<>(() -> this.manager() - .serviceClient() + .orchestratorClient() .getContainerServices() .listOrchestratorsWithResponseAsync(region.name(), resourceTypes.toString()) .map(response -> new PagedResponseBase(response.getRequest(), From dcaf4f0b7e15d2822a418e4479fefe0d61d48bb0 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 20 Mar 2026 14:20:15 +0800 Subject: [PATCH 08/19] Migrate containerservice SDK from AutoRest to TypeSpec - Regenerate SDK from TypeSpec with api-version 2026-01-01 - Update hand-written code: replace listOrchestrators with listKubernetesVersions - Fix float-to-Double type change for spotMaxPrice - Fix OrchestratorManagementClientImpl constructor compatibility - Add revapi suppressions for TypeSpec migration breaks - Update module-info.java for implementation.models package Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/lintingconfigs/revapi/track2/revapi.json | 159 + .../README.md | 2 +- .../fluent/AgentPoolsClient.java | 219 +- .../ContainerServiceManagementClient.java | 74 +- .../fluent/MachinesClient.java | 72 +- .../MaintenanceConfigurationsClient.java | 90 +- .../fluent/ManagedClustersClient.java | 1438 ++--- .../fluent/ManagedNamespacesClient.java | 90 +- .../fluent/OperationsClient.java | 2 +- .../PrivateEndpointConnectionsClient.java | 159 +- .../fluent/PrivateLinkResourcesClient.java | 21 +- .../ResolvePrivateLinkServiceIdsClient.java | 10 +- .../fluent/SnapshotsClient.java | 140 +- .../TrustedAccessRoleBindingsClient.java | 86 +- .../fluent/TrustedAccessRolesClient.java | 2 +- .../fluent/models/AccessProfile.java | 19 +- .../AgentPoolAvailableVersionsInner.java | 25 +- .../AgentPoolAvailableVersionsProperties.java | 20 +- .../fluent/models/AgentPoolInner.java | 26 +- .../models/AgentPoolUpgradeProfileInner.java | 66 +- .../AgentPoolUpgradeProfileProperties.java | 53 +- .../models/CommandResultProperties.java | 4 +- .../fluent/models/CredentialResultsInner.java | 4 +- .../KubernetesVersionListResultInner.java | 19 +- .../fluent/models/MachineInner.java | 19 +- .../models/MaintenanceConfigurationInner.java | 2 +- .../MaintenanceConfigurationProperties.java | 2 +- .../ManagedClusterAccessProfileInner.java | 40 +- ...agedClusterAgentPoolProfileProperties.java | 48 +- .../fluent/models/ManagedClusterInner.java | 38 +- .../models/ManagedClusterProperties.java | 38 +- .../ManagedClusterUpgradeProfileInner.java | 40 +- ...anagedClusterUpgradeProfileProperties.java | 32 +- .../fluent/models/ManagedNamespaceInner.java | 14 +- .../models/MeshRevisionProfileInner.java | 19 +- .../models/MeshUpgradeProfileInner.java | 19 +- .../fluent/models/OperationValueDisplay.java | 4 +- .../fluent/models/OperationValueInner.java | 4 +- .../OutboundEnvironmentEndpointInner.java | 31 +- .../PrivateEndpointConnectionInner.java | 2 +- ...vateEndpointConnectionListResultInner.java | 19 +- .../PrivateEndpointConnectionProperties.java | 2 +- .../models/PrivateLinkResourceInner.java | 2 +- .../PrivateLinkResourcesListResultInner.java | 19 +- .../fluent/models/RunCommandResultInner.java | 4 +- .../fluent/models/SnapshotInner.java | 2 +- .../fluent/models/SnapshotProperties.java | 2 +- .../models/TrustedAccessRoleBindingInner.java | 2 +- .../TrustedAccessRoleBindingProperties.java | 2 +- .../fluent/models/TrustedAccessRoleInner.java | 4 +- .../fluent/models/package-info.java | 6 +- .../containerservice/fluent/package-info.java | 6 +- .../implementation/AgentPoolsClientImpl.java | 689 +-- ...ntainerServiceManagementClientBuilder.java | 28 +- .../ContainerServiceManagementClientImpl.java | 166 +- .../implementation/MachinesClientImpl.java | 218 +- .../MaintenanceConfigurationsClientImpl.java | 358 +- .../ManagedClustersClientImpl.java | 4783 +++++++++-------- .../ManagedNamespacesClientImpl.java | 372 +- .../implementation/OperationsClientImpl.java | 10 +- .../PrivateEndpointConnectionsClientImpl.java | 346 +- .../PrivateLinkResourcesClientImpl.java | 30 +- ...esolvePrivateLinkServiceIdsClientImpl.java | 39 +- .../implementation/SnapshotsClientImpl.java | 650 +-- .../TrustedAccessRoleBindingsClientImpl.java | 348 +- .../TrustedAccessRolesClientImpl.java | 10 +- .../models/AgentPoolListResult.java | 32 +- .../models/MachineListResult.java | 32 +- .../MaintenanceConfigurationListResult.java | 32 +- .../models/ManagedClusterListResult.java | 32 +- .../models/ManagedNamespaceListResult.java | 32 +- .../models/MeshRevisionProfileList.java | 32 +- .../models/MeshUpgradeProfileList.java | 32 +- .../models/OperationListResult.java | 32 +- ...OutboundEnvironmentEndpointCollection.java | 32 +- .../models/SnapshotListResult.java | 32 +- .../TrustedAccessRoleBindingListResult.java | 32 +- .../models/TrustedAccessRoleListResult.java | 32 +- .../models/AbsoluteMonthlySchedule.java | 2 +- .../models/AccelerationMode.java | 54 + .../models/AdoptionPolicy.java | 8 +- .../models/AdvancedNetworkPolicies.java | 8 +- .../models/AdvancedNetworking.java | 35 +- .../AdvancedNetworkingObservability.java | 2 +- .../models/AdvancedNetworkingPerformance.java | 105 + .../models/AdvancedNetworkingSecurity.java | 38 +- ...edNetworkingSecurityTransitEncryption.java | 100 + ...rsionsPropertiesAgentPoolVersionsItem.java | 41 +- .../AgentPoolDeleteMachinesParameter.java | 2 +- .../models/AgentPoolGatewayProfile.java | 2 +- .../models/AgentPoolMode.java | 10 +- .../models/AgentPoolNetworkProfile.java | 2 +- .../models/AgentPoolSecurityProfile.java | 24 +- .../models/AgentPoolSshAccess.java | 6 +- .../models/AgentPoolStatus.java | 2 +- .../models/AgentPoolType.java | 8 +- ...lUpgradeProfilePropertiesUpgradesItem.java | 30 +- .../models/AgentPoolUpgradeSettings.java | 2 +- .../models/AgentPoolWindowsProfile.java | 2 +- .../models/ArtifactSource.java | 6 +- .../models/AzureKeyVaultKms.java | 2 +- .../models/BackendPoolType.java | 8 +- .../models/ClusterUpgradeSettings.java | 2 +- .../containerservice/models/Code.java | 6 +- .../models/CompatibleVersions.java | 30 +- .../models/ConnectionStatus.java | 10 +- .../models/ContainerServiceLinuxProfile.java | 2 +- .../ContainerServiceNetworkProfile.java | 2 +- .../ContainerServiceSshConfiguration.java | 2 +- .../models/ContainerServiceSshPublicKey.java | 2 +- .../containerservice/models/CreationData.java | 2 +- .../models/CredentialResult.java | 4 +- .../models/DailySchedule.java | 2 +- .../containerservice/models/DateSpan.java | 2 +- .../models/DelegatedResource.java | 2 +- .../containerservice/models/DeletePolicy.java | 6 +- .../models/EndpointDependency.java | 30 +- .../models/EndpointDetail.java | 52 +- .../containerservice/models/Expander.java | 16 +- .../models/ExtendedLocation.java | 2 +- .../models/ExtendedLocationTypes.java | 4 +- .../containerservice/models/Format.java | 9 +- .../containerservice/models/GpuDriver.java | 6 +- .../models/GpuInstanceProfile.java | 12 +- .../containerservice/models/GpuProfile.java | 2 +- .../containerservice/models/IpFamily.java | 6 +- .../containerservice/models/IpTag.java | 2 +- .../models/IstioCertificateAuthority.java | 2 +- .../models/IstioComponents.java | 32 +- .../models/IstioEgressGateway.java | 2 +- .../models/IstioIngressGateway.java | 2 +- .../models/IstioIngressGatewayMode.java | 6 +- .../IstioPluginCertificateAuthority.java | 2 +- .../models/IstioServiceMesh.java | 2 +- .../models/KeyVaultNetworkAccessTypes.java | 6 +- .../models/KubeletConfig.java | 2 +- .../models/KubeletDiskType.java | 6 +- .../models/KubernetesPatchVersion.java | 19 +- .../models/KubernetesSupportPlan.java | 8 +- .../models/KubernetesVersion.java | 63 +- .../models/KubernetesVersionCapabilities.java | 19 +- .../containerservice/models/LicenseType.java | 6 +- .../models/LinuxOSConfig.java | 2 +- .../models/LoadBalancerSku.java | 8 +- .../models/LocalDnsForwardDestination.java | 7 +- .../models/LocalDnsForwardPolicy.java | 11 +- .../containerservice/models/LocalDnsMode.java | 8 +- .../models/LocalDnsOverride.java | 2 +- .../models/LocalDnsProfile.java | 58 +- .../models/LocalDnsProtocol.java | 6 +- .../models/LocalDnsQueryLogging.java | 6 +- .../models/LocalDnsServeStale.java | 11 +- .../models/LocalDnsState.java | 6 +- .../models/MachineIpAddress.java | 4 +- .../models/MachineNetworkProperties.java | 4 +- .../models/MachineProperties.java | 4 +- .../models/MaintenanceWindow.java | 2 +- ...agedClusterAIToolchainOperatorProfile.java | 2 +- .../models/ManagedClusterAadProfile.java | 2 +- .../models/ManagedClusterAddonProfile.java | 2 +- .../ManagedClusterAddonProfileIdentity.java | 35 +- .../ManagedClusterAgentPoolProfile.java | 26 +- .../ManagedClusterApiServerAccessProfile.java | 24 +- .../ManagedClusterAutoUpgradeProfile.java | 2 +- .../ManagedClusterAzureMonitorProfile.java | 2 +- ...erAzureMonitorProfileKubeStateMetrics.java | 2 +- ...agedClusterAzureMonitorProfileMetrics.java | 2 +- .../ManagedClusterBootstrapProfile.java | 2 +- .../models/ManagedClusterCostAnalysis.java | 2 +- .../models/ManagedClusterHttpProxyConfig.java | 33 +- .../models/ManagedClusterIdentity.java | 2 +- .../models/ManagedClusterIngressProfile.java | 2 +- .../ManagedClusterIngressProfileNginx.java | 2 +- ...gedClusterIngressProfileWebAppRouting.java | 2 +- .../ManagedClusterLoadBalancerProfile.java | 72 +- ...LoadBalancerProfileManagedOutboundIPs.java | 2 +- ...ClusterLoadBalancerProfileOutboundIPs.java | 30 +- ...LoadBalancerProfileOutboundIpPrefixes.java | 2 +- ...anagedClusterManagedOutboundIpProfile.java | 2 +- .../models/ManagedClusterMetricsProfile.java | 2 +- .../ManagedClusterNatGatewayProfile.java | 20 +- ...ManagedClusterNodeProvisioningProfile.java | 2 +- ...anagedClusterNodeResourceGroupProfile.java | 2 +- .../ManagedClusterOidcIssuerProfile.java | 2 +- .../models/ManagedClusterPodIdentity.java | 2 +- .../ManagedClusterPodIdentityException.java | 2 +- .../ManagedClusterPodIdentityProfile.java | 2 +- ...edClusterPodIdentityProvisioningError.java | 19 +- ...usterPodIdentityProvisioningErrorBody.java | 55 +- ...gedClusterPodIdentityProvisioningInfo.java | 19 +- ...edClusterPodIdentityProvisioningState.java | 14 +- .../ManagedClusterPoolUpgradeProfile.java | 52 +- ...ClusterPoolUpgradeProfileUpgradesItem.java | 30 +- ...gedClusterPropertiesAutoScalerProfile.java | 2 +- .../models/ManagedClusterSecurityProfile.java | 2 +- ...ManagedClusterSecurityProfileDefender.java | 2 +- ...rityProfileDefenderSecurityMonitoring.java | 2 +- ...gedClusterSecurityProfileImageCleaner.java | 2 +- ...lusterSecurityProfileWorkloadIdentity.java | 2 +- ...ManagedClusterServicePrincipalProfile.java | 2 +- .../models/ManagedClusterSku.java | 2 +- .../models/ManagedClusterSkuName.java | 8 +- .../models/ManagedClusterSkuTier.java | 13 +- ...agedClusterStaticEgressGatewayProfile.java | 2 +- .../models/ManagedClusterStatus.java | 2 +- .../models/ManagedClusterStorageProfile.java | 80 +- ...gedClusterStorageProfileBlobCsiDriver.java | 2 +- ...gedClusterStorageProfileDiskCsiDriver.java | 2 +- ...gedClusterStorageProfileFileCsiDriver.java | 2 +- ...usterStorageProfileSnapshotController.java | 2 +- .../models/ManagedClusterWindowsProfile.java | 24 +- ...nagedClusterWorkloadAutoScalerProfile.java | 2 +- ...dClusterWorkloadAutoScalerProfileKeda.java | 2 +- ...utoScalerProfileVerticalPodAutoscaler.java | 2 +- ...anagedClustersGetCommandResultHeaders.java | 19 +- ...nagedClustersGetCommandResultResponse.java | 2 +- ...ceIdentityUserAssignedIdentitiesValue.java | 2 +- .../models/ManualScaleProfile.java | 2 +- .../containerservice/models/MeshRevision.java | 14 +- .../models/MeshRevisionProfileProperties.java | 19 +- .../models/MeshUpgradeProfileProperties.java | 57 +- .../models/NamespaceProperties.java | 2 +- .../models/NamespaceProvisioningState.java | 14 +- .../models/NetworkDataplane.java | 7 +- .../containerservice/models/NetworkMode.java | 7 +- .../models/NetworkPlugin.java | 12 +- .../models/NetworkPluginMode.java | 5 +- .../models/NetworkPolicies.java | 2 +- .../models/NetworkPolicy.java | 14 +- .../models/NginxIngressControllerType.java | 14 +- .../models/NodeOSUpgradeChannel.java | 21 +- .../NodeProvisioningDefaultNodePools.java | 7 +- .../models/NodeProvisioningMode.java | 7 +- .../containerservice/models/OSDiskType.java | 10 +- .../containerservice/models/OSSku.java | 25 +- .../containerservice/models/OSType.java | 6 +- .../containerservice/models/OutboundType.java | 19 +- .../models/PodIpAllocationMode.java | 11 +- .../containerservice/models/PolicyRule.java | 8 +- .../containerservice/models/PortRange.java | 2 +- .../containerservice/models/PowerState.java | 2 +- .../models/PrivateEndpoint.java | 2 +- ...teEndpointConnectionProvisioningState.java | 12 +- .../PrivateLinkServiceConnectionState.java | 2 +- .../containerservice/models/Protocol.java | 6 +- .../models/ProxyRedirectionMechanism.java | 51 + .../models/PublicNetworkAccess.java | 6 +- .../models/RelativeMonthlySchedule.java | 2 +- .../models/ResourceIdentityType.java | 11 +- .../models/ResourceQuota.java | 2 +- .../models/ResourceReference.java | 2 +- .../models/RestrictionLevel.java | 6 +- .../models/RunCommandRequest.java | 2 +- .../models/ScaleDownMode.java | 7 +- .../containerservice/models/ScaleProfile.java | 2 +- .../models/ScaleSetEvictionPolicy.java | 8 +- .../models/ScaleSetPriority.java | 7 +- .../containerservice/models/Schedule.java | 2 +- .../models/ServiceMeshMode.java | 6 +- .../models/ServiceMeshProfile.java | 2 +- .../containerservice/models/SnapshotType.java | 4 +- .../containerservice/models/SysctlConfig.java | 2 +- .../containerservice/models/TagsObject.java | 2 +- .../containerservice/models/TimeInWeek.java | 2 +- .../containerservice/models/TimeSpan.java | 2 +- .../models/TransitEncryptionType.java | 53 + ...tedAccessRoleBindingProvisioningState.java | 12 +- .../models/TrustedAccessRoleRule.java | 4 +- .../containerservice/models/Type.java | 12 +- .../models/UndrainableNodeBehavior.java | 13 +- .../models/UpgradeChannel.java | 21 +- .../models/UpgradeOverrideSettings.java | 2 +- .../models/UserAssignedIdentity.java | 2 +- .../models/VirtualMachineNodes.java | 2 +- .../models/VirtualMachinesProfile.java | 2 +- .../containerservice/models/WeekDay.java | 16 +- .../models/WeeklySchedule.java | 2 +- .../models/WindowsGmsaProfile.java | 2 +- .../models/WorkloadRuntime.java | 10 +- .../containerservice/models/package-info.java | 6 +- .../containerservice/package-info.java | 6 +- ...urcemanager-containerservice_metadata.json | 1 + ...AgentPoolsAbortLatestOperationSamples.java | 6 +- .../AgentPoolsCreateOrUpdateSamples.java | 108 +- .../AgentPoolsDeleteMachinesSamples.java | 6 +- .../generated/AgentPoolsDeleteSamples.java | 6 +- ...sGetAvailableAgentPoolVersionsSamples.java | 6 +- .../generated/AgentPoolsGetSamples.java | 6 +- .../AgentPoolsGetUpgradeProfileSamples.java | 6 +- .../generated/AgentPoolsListSamples.java | 6 +- ...ntPoolsUpgradeNodeImageVersionSamples.java | 6 +- .../generated/MachinesGetSamples.java | 6 +- .../generated/MachinesListSamples.java | 6 +- ...ceConfigurationsCreateOrUpdateSamples.java | 6 +- ...aintenanceConfigurationsDeleteSamples.java | 6 +- .../MaintenanceConfigurationsGetSamples.java | 6 +- ...igurationsListByManagedClusterSamples.java | 6 +- ...edClustersAbortLatestOperationSamples.java | 6 +- .../ManagedClustersCreateOrUpdateSamples.java | 318 +- .../ManagedClustersDeleteSamples.java | 6 +- ...anagedClustersGetAccessProfileSamples.java | 6 +- ...agedClustersGetByResourceGroupSamples.java | 6 +- ...anagedClustersGetCommandResultSamples.java | 10 +- ...ClustersGetMeshRevisionProfileSamples.java | 6 +- ...dClustersGetMeshUpgradeProfileSamples.java | 6 +- ...nagedClustersGetUpgradeProfileSamples.java | 6 +- ...gedClustersListByResourceGroupSamples.java | 6 +- ...ersListClusterAdminCredentialsSamples.java | 6 +- ...usterMonitoringUserCredentialsSamples.java | 6 +- ...tersListClusterUserCredentialsSamples.java | 6 +- ...ClustersListKubernetesVersionsSamples.java | 6 +- ...ustersListMeshRevisionProfilesSamples.java | 6 +- ...lustersListMeshUpgradeProfilesSamples.java | 6 +- ...ndNetworkDependenciesEndpointsSamples.java | 6 +- .../generated/ManagedClustersListSamples.java | 6 +- ...ManagedClustersResetAadProfileSamples.java | 12 +- ...rsResetServicePrincipalProfileSamples.java | 6 +- ...stersRotateClusterCertificatesSamples.java | 6 +- ...otateServiceAccountSigningKeysSamples.java | 6 +- .../ManagedClustersRunCommandSamples.java | 6 +- .../ManagedClustersStartSamples.java | 6 +- .../generated/ManagedClustersStopSamples.java | 6 +- .../ManagedClustersUpdateTagsSamples.java | 6 +- ...anagedNamespacesCreateOrUpdateSamples.java | 6 +- .../ManagedNamespacesDeleteSamples.java | 6 +- .../ManagedNamespacesGetSamples.java | 6 +- ...NamespacesListByManagedClusterSamples.java | 6 +- ...anagedNamespacesListCredentialSamples.java | 6 +- .../ManagedNamespacesUpdateSamples.java | 6 +- .../generated/OperationsListSamples.java | 6 +- ...ivateEndpointConnectionsDeleteSamples.java | 6 +- .../PrivateEndpointConnectionsGetSamples.java | 6 +- ...PrivateEndpointConnectionsListSamples.java | 6 +- ...ivateEndpointConnectionsUpdateSamples.java | 6 +- .../PrivateLinkResourcesListSamples.java | 6 +- ...esolvePrivateLinkServiceIdPostSamples.java | 12 +- .../SnapshotsCreateOrUpdateSamples.java | 6 +- .../generated/SnapshotsDeleteSamples.java | 6 +- .../SnapshotsGetByResourceGroupSamples.java | 6 +- .../SnapshotsListByResourceGroupSamples.java | 6 +- .../generated/SnapshotsListSamples.java | 6 +- .../generated/SnapshotsUpdateTagsSamples.java | 6 +- ...cessRoleBindingsCreateOrUpdateSamples.java | 6 +- ...rustedAccessRoleBindingsDeleteSamples.java | 6 +- .../TrustedAccessRoleBindingsGetSamples.java | 6 +- .../TrustedAccessRoleBindingsListSamples.java | 6 +- .../TrustedAccessRolesListSamples.java | 6 +- .../tsp-location.yaml | 4 + 348 files changed, 7288 insertions(+), 7479 deletions(-) rename sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/{ => implementation}/models/AgentPoolListResult.java (80%) rename sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/{ => implementation}/models/MachineListResult.java (80%) rename sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/{ => implementation}/models/MaintenanceConfigurationListResult.java (80%) rename sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/{ => implementation}/models/ManagedClusterListResult.java (80%) rename sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/{ => implementation}/models/ManagedNamespaceListResult.java (80%) rename sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/{ => implementation}/models/MeshRevisionProfileList.java (80%) rename sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/{ => implementation}/models/MeshUpgradeProfileList.java (80%) rename sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/{ => implementation}/models/OperationListResult.java (81%) rename sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/{ => implementation}/models/OutboundEnvironmentEndpointCollection.java (80%) rename sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/{ => implementation}/models/SnapshotListResult.java (80%) rename sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/{ => implementation}/models/TrustedAccessRoleBindingListResult.java (80%) rename sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/{ => implementation}/models/TrustedAccessRoleListResult.java (80%) create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AccelerationMode.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingPerformance.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurityTransitEncryption.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ProxyRedirectionMechanism.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/azure-resourcemanager-containerservice_metadata.json create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/tsp-location.yaml diff --git a/eng/lintingconfigs/revapi/track2/revapi.json b/eng/lintingconfigs/revapi/track2/revapi.json index c7941b8efa38..88a230f6ef7f 100644 --- a/eng/lintingconfigs/revapi/track2/revapi.json +++ b/eng/lintingconfigs/revapi/track2/revapi.json @@ -697,6 +697,165 @@ "old" : "method java.lang.String com.azure.resourcemanager.containerservice.models.ManagedClusterAgentPoolProfile::nodeImageVersion()", "justification": "Not a break, same method exists on its parent class." }, + { + "ignore": true, + "code": "java.method.visibilityReduced", + "old" : { + "matcher": "regex", + "match": "method void com\\.azure\\.resourcemanager\\.containerservice\\.models\\..*\\:\\:\\\\(\\)" + }, + "justification": "Output-only immutable models' constructors are now private." + }, + { + "ignore": true, + "code": "java.method.visibilityReduced", + "old" : { + "matcher": "regex", + "match": "method .* com\\.azure\\.resourcemanager\\.containerservice\\.models\\..*\\:\\:with.*\\(.*\\).*" + }, + "justification": "Output-only immutable models' setters are now package-private." + }, + { + "ignore": true, + "code": "java.method.removed", + "old" : { + "matcher": "regex", + "match": "method .* com\\.azure\\.resourcemanager\\.containerservice\\.models\\..*\\:\\:with.*\\(.*\\).*" + }, + "justification": "Output-only immutable models' setters are removed." + }, + { + "ignore": true, + "code": "java.class.removed", + "old" : { + "matcher": "regex", + "match": "class com\\.azure\\.resourcemanager\\.containerservice\\.models\\..*(ListResult|List|Collection)" + }, + "justification": "Pageable models moved to implementation package." + }, + { + "ignore": true, + "code": "java.missing.newSuperType", + "new" : "class com.azure.resourcemanager.containerservice.models.ResourceIdentityType", + "justification": "ResourceIdentityType changed from enum to expandable string union." + }, + { + "ignore": true, + "code": "java.class.kindChanged", + "old" : "enum com.azure.resourcemanager.containerservice.models.ResourceIdentityType", + "new" : "class com.azure.resourcemanager.containerservice.models.ResourceIdentityType", + "justification": "ResourceIdentityType changed from enum to expandable string union." + }, + { + "ignore": true, + "code": "java.class.noLongerImplementsInterface", + "old" : "enum com.azure.resourcemanager.containerservice.models.ResourceIdentityType", + "justification": "ResourceIdentityType changed from enum to expandable string union." + }, + { + "ignore": true, + "code": "java.method.removed", + "old" : { + "matcher": "regex", + "match": "method .* java\\.lang\\.Enum.*\\:\\:.*\\(.*\\) @ com\\.azure\\.resourcemanager\\.containerservice\\.models\\.ResourceIdentityType" + }, + "justification": "ResourceIdentityType changed from enum to expandable string union." + }, + { + "ignore": true, + "code": "java.method.visibilityIncreased", + "old" : { + "matcher": "regex", + "match": "method .* com\\.azure\\.resourcemanager\\.containerservice\\.models\\.ResourceIdentityType\\:\\:.*\\(.*\\)" + }, + "justification": "ResourceIdentityType changed from enum to expandable string union." + }, + { + "ignore": true, + "code": "java.method.removed", + "old" : { + "matcher": "regex", + "match": "method .* com\\.azure\\.resourcemanager\\.containerservice\\.models\\..*\\:\\:.*\\(.*\\)" + }, + "justification": "Read-only properties' getter removed in TypeSpec migration." + }, + { + "ignore": true, + "code": "java.method.returnTypeChanged", + "new" : { + "matcher": "regex", + "match": "method .* com\\.azure\\.resourcemanager\\.containerservice\\.models\\.UserAssignedIdentity\\:\\:with.*\\(.*\\) @ com\\.azure\\.resourcemanager\\.containerservice\\.models\\.ManagedClusterAddonProfileIdentity" + }, + "justification": "ManagedClusterAddonProfileIdentity covariant overrides removed, inherited methods return parent type." + }, + { + "ignore": true, + "code": "java.method.returnTypeChanged", + "old": "method com.azure.resourcemanager.containerservice.models.ResourceIdentityType[] com.azure.resourcemanager.containerservice.models.ResourceIdentityType::values()", + "justification": "ResourceIdentityType changed from enum to expandable string union." + }, + { + "ignore": true, + "code": "java.method.visibilityReduced", + "old" : { + "matcher": "regex", + "match": "method .* com\\.azure\\.resourcemanager\\.containerservice\\.models\\..*\\:\\:with.*\\(.*\\).*" + }, + "justification": "Output-only immutable models' setters are now package-private if it's being used by child class." + }, + { + "ignore": true, + "code": "java.method.removed", + "old" : { + "matcher": "regex", + "match": "method .* com\\.azure\\.resourcemanager\\.containerservice\\.models\\..*\\:\\:with.*\\(.*\\).*" + }, + "justification": "Output-only immutable models' setters are removed if no explicit usage." + }, + { + "ignore": true, + "code": "java.class.removed", + "old" : { + "matcher": "regex", + "match": "class com\\.azure\\.resourcemanager\\.containerservice\\.models\\..*(ListResult|List|Collection)" + }, + "justification": "Pageable models moved to implementation package. Unlikely used by user." + }, + { + "regex": true, + "ignore": true, + "code": "java\\.missing\\.(oldSuperType|newSuperType)", + "old" : "class com\\.azure\\.resourcemanager\\.containerservice\\.models\\..*", + "justification": "TypeSpec fix for base resource class." + }, + { + "ignore": true, + "code": "java.missing.newSuperType", + "new" : "class com.azure.resourcemanager.containerservice.models.ResourceIdentityType", + "justification": "ResourceIdentityType changed from enum to expandable string union." + }, + { + "ignore": true, + "code": "java.class.kindChanged", + "old" : "enum com.azure.resourcemanager.containerservice.models.ResourceIdentityType", + "new" : "class com.azure.resourcemanager.containerservice.models.ResourceIdentityType", + "justification": "ResourceIdentityType changed from enum to expandable string union." + }, + { + "ignore": true, + "code": "java.class.noLongerImplementsInterface", + "old" : "enum com.azure.resourcemanager.containerservice.models.ResourceIdentityType", + "justification": "ResourceIdentityType changed from enum to expandable string union." + }, + { + "ignore": true, + "code": "java.method.removed", + "old" : { + "matcher": "regex", + "match": "method .* com\\.azure\\.resourcemanager\\.containerservice\\.models\\..*\\:\\:.*\\(.*\\)" + }, + "justification": "Read-only properties' getter/setter removed in TypeSpec migration." + }, { "ignore": true, "code": "java.method.visibilityReduced", diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/README.md b/sdk/containerservice/azure-resourcemanager-containerservice/README.md index 0c44651d3ca8..748632634c4d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/README.md +++ b/sdk/containerservice/azure-resourcemanager-containerservice/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-containerservice - 2.57.0 + 2.58.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java index b68f807cc677..b2a610735e62 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent; @@ -25,46 +25,6 @@ * An instance of this class provides access to all the operations defined in AgentPoolsClient. */ public interface AgentPoolsClient { - /** - * Gets a list of agent pools in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String resourceName); - - /** - * Gets a list of agent pools in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String resourceName); - - /** - * Gets a list of agent pools in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String resourceName, Context context); - /** * Gets the specified managed cluster agent pool. * @@ -429,6 +389,46 @@ Mono deleteAsync(String resourceGroupName, String resourceName, String age void delete(String resourceGroupName, String resourceName, String agentPoolName, Boolean ignorePodDisruptionBudget, String ifMatch, Context context); + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String resourceName); + + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName, Context context); + /** * Aborts last operation running on agent pool. * @@ -684,7 +684,7 @@ void deleteMachines(String resourceGroupName, String resourceName, String agentP * @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 body along with {@link Response} on successful completion of {@link Mono}. + * @return agent Pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> upgradeNodeImageVersionWithResponseAsync(String resourceGroupName, @@ -703,11 +703,11 @@ Mono>> upgradeNodeImageVersionWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of agent Pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, AgentPoolInner> beginUpgradeNodeImageVersionAsync(String resourceGroupName, - String resourceName, String agentPoolName); + PollerFlux, Void> beginUpgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, + String agentPoolName); /** * Upgrades the node image version of an agent pool to the latest. @@ -722,11 +722,11 @@ PollerFlux, AgentPoolInner> beginUpgradeNodeImageVers * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of agent Pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AgentPoolInner> beginUpgradeNodeImageVersion(String resourceGroupName, - String resourceName, String agentPoolName); + SyncPoller, Void> beginUpgradeNodeImageVersion(String resourceGroupName, String resourceName, + String agentPoolName); /** * Upgrades the node image version of an agent pool to the latest. @@ -742,11 +742,11 @@ SyncPoller, AgentPoolInner> beginUpgradeNodeImageVers * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of agent Pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AgentPoolInner> beginUpgradeNodeImageVersion(String resourceGroupName, - String resourceName, String agentPoolName, Context context); + SyncPoller, Void> beginUpgradeNodeImageVersion(String resourceGroupName, String resourceName, + String agentPoolName, Context context); /** * Upgrades the node image version of an agent pool to the latest. @@ -761,11 +761,10 @@ SyncPoller, AgentPoolInner> beginUpgradeNodeImageVers * @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 body on successful completion of {@link Mono}. + * @return agent Pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono upgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, - String agentPoolName); + Mono upgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, String agentPoolName); /** * Upgrades the node image version of an agent pool to the latest. @@ -780,10 +779,9 @@ Mono upgradeNodeImageVersionAsync(String resourceGroupName, Stri * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - AgentPoolInner upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName); + void upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName); /** * Upgrades the node image version of an agent pool to the latest. @@ -799,139 +797,148 @@ Mono upgradeNodeImageVersionAsync(String resourceGroupName, Stri * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - AgentPoolInner upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName, - Context context); + void upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName, Context context); /** - * Gets the upgrade profile for an agent pool. + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. * @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 upgrade profile for an agent pool along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getUpgradeProfileWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName); + Mono> + getAvailableAgentPoolVersionsWithResponseAsync(String resourceGroupName, String resourceName); /** - * Gets the upgrade profile for an agent pool. + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. * @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 upgrade profile for an agent pool on successful completion of {@link Mono}. + * @return a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getUpgradeProfileAsync(String resourceGroupName, String resourceName, - String agentPoolName); + Mono getAvailableAgentPoolVersionsAsync(String resourceGroupName, + String resourceName); /** - * Gets the upgrade profile for an agent pool. + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. * @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 upgrade profile for an agent pool along with {@link Response}. + * @return a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getUpgradeProfileWithResponse(String resourceGroupName, String resourceName, - String agentPoolName, Context context); + Response getAvailableAgentPoolVersionsWithResponse(String resourceGroupName, + String resourceName, Context context); /** - * Gets the upgrade profile for an agent pool. + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. * @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 upgrade profile for an agent pool. + * @return a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle. */ @ServiceMethod(returns = ReturnType.SINGLE) - AgentPoolUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName, String agentPoolName); + AgentPoolAvailableVersionsInner getAvailableAgentPoolVersions(String resourceGroupName, String resourceName); /** - * Gets a list of supported Kubernetes versions for the specified agent pool. - * - * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more - * details about the version lifecycle. + * Gets the upgrade profile for an agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. * @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 list of available versions for an agent pool along with {@link Response} on successful completion of + * @return the upgrade profile for an agent pool along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> - getAvailableAgentPoolVersionsWithResponseAsync(String resourceGroupName, String resourceName); + Mono> getUpgradeProfileWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName); /** - * Gets a list of supported Kubernetes versions for the specified agent pool. - * - * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more - * details about the version lifecycle. + * Gets the upgrade profile for an agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. * @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 list of available versions for an agent pool on successful completion of {@link Mono}. + * @return the upgrade profile for an agent pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAvailableAgentPoolVersionsAsync(String resourceGroupName, - String resourceName); + Mono getUpgradeProfileAsync(String resourceGroupName, String resourceName, + String agentPoolName); /** - * Gets a list of supported Kubernetes versions for the specified agent pool. - * - * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more - * details about the version lifecycle. + * Gets the upgrade profile for an agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. * @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 list of available versions for an agent pool along with {@link Response}. + * @return the upgrade profile for an agent pool along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getAvailableAgentPoolVersionsWithResponse(String resourceGroupName, - String resourceName, Context context); + Response getUpgradeProfileWithResponse(String resourceGroupName, String resourceName, + String agentPoolName, Context context); /** - * Gets a list of supported Kubernetes versions for the specified agent pool. - * - * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more - * details about the version lifecycle. + * Gets the upgrade profile for an agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. * @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 list of available versions for an agent pool. + * @return the upgrade profile for an agent pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - AgentPoolAvailableVersionsInner getAvailableAgentPoolVersions(String resourceGroupName, String resourceName); + AgentPoolUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName, String agentPoolName); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java index 8da1d29d10d0..adb22e304ca4 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent; @@ -12,26 +12,26 @@ */ public interface ContainerServiceManagementClient { /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -47,11 +47,11 @@ public interface ContainerServiceManagementClient { Duration getDefaultPollInterval(); /** - * Gets the OperationsClient object to access its operations. + * Gets the AgentPoolsClient object to access its operations. * - * @return the OperationsClient object. + * @return the AgentPoolsClient object. */ - OperationsClient getOperations(); + AgentPoolsClient getAgentPools(); /** * Gets the ManagedClustersClient object to access its operations. @@ -61,53 +61,53 @@ public interface ContainerServiceManagementClient { ManagedClustersClient getManagedClusters(); /** - * Gets the TrustedAccessRolesClient object to access its operations. + * Gets the MaintenanceConfigurationsClient object to access its operations. * - * @return the TrustedAccessRolesClient object. + * @return the MaintenanceConfigurationsClient object. */ - TrustedAccessRolesClient getTrustedAccessRoles(); + MaintenanceConfigurationsClient getMaintenanceConfigurations(); /** - * Gets the SnapshotsClient object to access its operations. + * Gets the ManagedNamespacesClient object to access its operations. * - * @return the SnapshotsClient object. + * @return the ManagedNamespacesClient object. */ - SnapshotsClient getSnapshots(); + ManagedNamespacesClient getManagedNamespaces(); /** - * Gets the AgentPoolsClient object to access its operations. + * Gets the MachinesClient object to access its operations. * - * @return the AgentPoolsClient object. + * @return the MachinesClient object. */ - AgentPoolsClient getAgentPools(); + MachinesClient getMachines(); /** - * Gets the MachinesClient object to access its operations. + * Gets the PrivateEndpointConnectionsClient object to access its operations. * - * @return the MachinesClient object. + * @return the PrivateEndpointConnectionsClient object. */ - MachinesClient getMachines(); + PrivateEndpointConnectionsClient getPrivateEndpointConnections(); /** - * Gets the MaintenanceConfigurationsClient object to access its operations. + * Gets the SnapshotsClient object to access its operations. * - * @return the MaintenanceConfigurationsClient object. + * @return the SnapshotsClient object. */ - MaintenanceConfigurationsClient getMaintenanceConfigurations(); + SnapshotsClient getSnapshots(); /** - * Gets the ManagedNamespacesClient object to access its operations. + * Gets the TrustedAccessRoleBindingsClient object to access its operations. * - * @return the ManagedNamespacesClient object. + * @return the TrustedAccessRoleBindingsClient object. */ - ManagedNamespacesClient getManagedNamespaces(); + TrustedAccessRoleBindingsClient getTrustedAccessRoleBindings(); /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the PrivateEndpointConnectionsClient object. + * @return the OperationsClient object. */ - PrivateEndpointConnectionsClient getPrivateEndpointConnections(); + OperationsClient getOperations(); /** * Gets the PrivateLinkResourcesClient object to access its operations. @@ -124,9 +124,9 @@ public interface ContainerServiceManagementClient { ResolvePrivateLinkServiceIdsClient getResolvePrivateLinkServiceIds(); /** - * Gets the TrustedAccessRoleBindingsClient object to access its operations. + * Gets the TrustedAccessRolesClient object to access its operations. * - * @return the TrustedAccessRoleBindingsClient object. + * @return the TrustedAccessRolesClient object. */ - TrustedAccessRoleBindingsClient getTrustedAccessRoleBindings(); + TrustedAccessRolesClient getTrustedAccessRoles(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java index 1d77adf6fede..9a9d7edbf868 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent; @@ -18,48 +18,54 @@ */ public interface MachinesClient { /** - * Gets a list of machines in the specified agent pool. + * Get a specific machine in the specified agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of machines in the specified agent pool as paginated response with {@link PagedFlux}. + * @return a specific machine in the specified agent pool along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String resourceName, String agentPoolName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName, String machineName); /** - * Gets a list of machines in the specified agent pool. + * Get a specific machine in the specified agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of machines in the specified agent pool as paginated response with {@link PagedIterable}. + * @return a specific machine in the specified agent pool on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String resourceName, String agentPoolName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String resourceName, String agentPoolName, + String machineName); /** - * Gets a list of machines in the specified agent pool. + * Get a specific machine in the specified agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of machines in the specified agent pool as paginated response with {@link PagedIterable}. + * @return a specific machine in the specified agent pool along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String resourceName, String agentPoolName, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, Context context); /** * Get a specific machine in the specified agent pool. @@ -71,58 +77,52 @@ PagedIterable list(String resourceGroupName, String resourceName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific machine in the specified agent pool along with {@link Response} on successful completion of - * {@link Mono}. + * @return a specific machine in the specified agent pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String resourceName, - String agentPoolName, String machineName); + MachineInner get(String resourceGroupName, String resourceName, String agentPoolName, String machineName); /** - * Get a specific machine in the specified agent pool. + * Gets a list of machines in the specified agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific machine in the specified agent pool on successful completion of {@link Mono}. + * @return a list of machines in the specified agent pool as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String resourceName, String agentPoolName, - String machineName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String resourceName, String agentPoolName); /** - * Get a specific machine in the specified agent pool. + * Gets a list of machines in the specified agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific machine in the specified agent pool along with {@link Response}. + * @return a list of machines in the specified agent pool as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String resourceName, String agentPoolName, - String machineName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName, String agentPoolName); /** - * Get a specific machine in the specified agent pool. + * Gets a list of machines in the specified agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific machine in the specified agent pool. + * @return a list of machines in the specified agent pool as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - MachineInner get(String resourceGroupName, String resourceName, String agentPoolName, String machineName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName, String agentPoolName, + Context context); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceConfigurationsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceConfigurationsClient.java index a044c35f527c..0b89170df615 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceConfigurationsClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceConfigurationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent; @@ -17,50 +17,6 @@ * An instance of this class provides access to all the operations defined in MaintenanceConfigurationsClient. */ public interface MaintenanceConfigurationsClient { - /** - * Gets a list of maintenance configurations in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of maintenance configurations in the specified managed cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName); - - /** - * Gets a list of maintenance configurations in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of maintenance configurations in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedCluster(String resourceGroupName, String resourceName); - - /** - * Gets a list of maintenance configurations in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of maintenance configurations in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, - Context context); - /** * Gets the specified maintenance configuration of a managed cluster. * @@ -257,4 +213,48 @@ Response deleteWithResponse(String resourceGroupName, String resourceName, */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String resourceName, String configName); + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName); + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName); + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java index 09fb08492f5b..a512c37ee51f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent; @@ -40,251 +40,6 @@ */ public interface ManagedClustersClient extends InnerSupportsGet, InnerSupportsListing, InnerSupportsDelete { - /** - * Gets a list of supported Kubernetes versions in the specified subscription. - * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. - * - * @param location The name of the Azure region. - * @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 hold values properties, which is array of KubernetesVersion along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> listKubernetesVersionsWithResponseAsync(String location); - - /** - * Gets a list of supported Kubernetes versions in the specified subscription. - * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. - * - * @param location The name of the Azure region. - * @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 hold values properties, which is array of KubernetesVersion on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono listKubernetesVersionsAsync(String location); - - /** - * Gets a list of supported Kubernetes versions in the specified subscription. - * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. - * - * @param location The name of the Azure region. - * @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 hold values properties, which is array of KubernetesVersion along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listKubernetesVersionsWithResponse(String location, Context context); - - /** - * Gets a list of supported Kubernetes versions in the specified subscription. - * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. - * - * @param location The name of the Azure region. - * @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 hold values properties, which is array of KubernetesVersion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - KubernetesVersionListResultInner listKubernetesVersions(String location); - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listMeshRevisionProfilesAsync(String location); - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listMeshRevisionProfiles(String location); - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listMeshRevisionProfiles(String location, Context context); - - /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. - * @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 mesh revision profile for a mesh along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getMeshRevisionProfileWithResponseAsync(String location, String mode); - - /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. - * @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 mesh revision profile for a mesh on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getMeshRevisionProfileAsync(String location, String mode); - - /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. - * @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 mesh revision profile for a mesh along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getMeshRevisionProfileWithResponse(String location, String mode, - Context context); - - /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. - * @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 mesh revision profile for a mesh. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MeshRevisionProfileInner getMeshRevisionProfile(String location, String mode); - - /** - * Gets a list of managed clusters in the specified subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed clusters in the specified subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); - - /** - * Gets a list of managed clusters in the specified subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed clusters in the specified subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Gets a list of managed clusters in the specified subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed clusters in the specified subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Lists managed clusters in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a ManagedCluster list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); - - /** - * Lists managed clusters in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a ManagedCluster list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists managed clusters in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a ManagedCluster list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - /** * Gets a managed cluster. * @@ -751,125 +506,75 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String resourceName, String ifMatch, Context context); /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * Lists managed clusters in the specified subscription and resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response of a ManagedCluster list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> abortLatestOperationWithResponseAsync(String resourceGroupName, - String resourceName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync(String resourceGroupName); /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * Lists managed clusters in the specified subscription and resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginAbortLatestOperationAsync(String resourceGroupName, String resourceName); - - /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the response of a ManagedCluster list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * Lists managed clusters in the specified subscription and resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the response of a ManagedCluster list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * Gets a list of managed clusters in the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return a list of managed clusters in the specified subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono abortLatestOperationAsync(String resourceGroupName, String resourceName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(); /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * Gets a list of managed clusters in the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed clusters in the specified subscription as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void abortLatestOperation(String resourceGroupName, String resourceName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * Gets a list of managed clusters in the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed clusters in the specified subscription as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void abortLatestOperation(String resourceGroupName, String resourceName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); /** * Gets an access profile of a managed cluster. @@ -886,7 +591,9 @@ SyncPoller, Void> beginAbortLatestOperation(String resourceGrou * @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 managed cluster Access Profile along with {@link Response} on successful completion of {@link Mono}. + * @return an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> getAccessProfileWithResponseAsync(String resourceGroupName, @@ -907,7 +614,9 @@ Mono> getAccessProfileWithResponseAsy * @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 managed cluster Access Profile on successful completion of {@link Mono}. + * @return an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono getAccessProfileAsync(String resourceGroupName, String resourceName, @@ -929,7 +638,9 @@ Mono getAccessProfileAsync(String resourceGrou * @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 managed cluster Access Profile along with {@link Response}. + * @return an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getAccessProfileWithResponse(String resourceGroupName, @@ -950,89 +661,90 @@ Response getAccessProfileWithResponse(String r * @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 managed cluster Access Profile. + * @return an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. */ @ServiceMethod(returns = ReturnType.SINGLE) ManagedClusterAccessProfileInner getAccessProfile(String resourceGroupName, String resourceName, String roleName); /** - * Gets the results of a command which has been run on the Managed Cluster. + * Lists the admin credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param commandId Id of the command. + * @param serverFqdn server fqdn type for credentials to be returned. * @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 results of a command which has been run on the Managed Cluster on successful completion of - * {@link Mono}. + * @return the list credential result response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getCommandResultWithResponseAsync(String resourceGroupName, - String resourceName, String commandId); + Mono> listClusterAdminCredentialsWithResponseAsync(String resourceGroupName, + String resourceName, String serverFqdn); /** - * Gets the results of a command which has been run on the Managed Cluster. + * Lists the admin credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param commandId Id of the command. * @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 results of a command which has been run on the Managed Cluster on successful completion of - * {@link Mono}. + * @return the list credential result response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getCommandResultAsync(String resourceGroupName, String resourceName, String commandId); + Mono listClusterAdminCredentialsAsync(String resourceGroupName, String resourceName); /** - * Gets the results of a command which has been run on the Managed Cluster. + * Lists the admin credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param commandId Id of the command. + * @param serverFqdn server fqdn type for credentials to be returned. * @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 results of a command which has been run on the Managed Cluster. + * @return the list credential result response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedClustersGetCommandResultResponse getCommandResultWithResponse(String resourceGroupName, String resourceName, - String commandId, Context context); + Response listClusterAdminCredentialsWithResponse(String resourceGroupName, + String resourceName, String serverFqdn, Context context); /** - * Gets the results of a command which has been run on the Managed Cluster. + * Lists the admin credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param commandId Id of the command. * @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 results of a command which has been run on the Managed Cluster. + * @return the list credential result response. */ @ServiceMethod(returns = ReturnType.SINGLE) - RunCommandResultInner getCommandResult(String resourceGroupName, String resourceName, String commandId); + CredentialResultsInner listClusterAdminCredentials(String resourceGroupName, String resourceName); /** - * Lists the admin credentials of a managed cluster. + * Lists the user credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param serverFqdn server fqdn type for credentials to be returned. + * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return + * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary + * in the path. * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> listClusterAdminCredentialsWithResponseAsync(String resourceGroupName, - String resourceName, String serverFqdn); + Mono> listClusterUserCredentialsWithResponseAsync(String resourceGroupName, + String resourceName, String serverFqdn, Format format); /** - * Lists the admin credentials of a managed cluster. + * Lists the user credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1042,14 +754,17 @@ Mono> listClusterAdminCredentialsWithResponseAs * @return the list credential result response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono listClusterAdminCredentialsAsync(String resourceGroupName, String resourceName); + Mono listClusterUserCredentialsAsync(String resourceGroupName, String resourceName); /** - * Lists the admin credentials of a managed cluster. + * Lists the user credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param serverFqdn server fqdn type for credentials to be returned. + * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return + * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary + * in the path. * @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. @@ -1057,11 +772,11 @@ Mono> listClusterAdminCredentialsWithResponseAs * @return the list credential result response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listClusterAdminCredentialsWithResponse(String resourceGroupName, - String resourceName, String serverFqdn, Context context); + Response listClusterUserCredentialsWithResponse(String resourceGroupName, + String resourceName, String serverFqdn, Format format, Context context); /** - * Lists the admin credentials of a managed cluster. + * Lists the user credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1071,7 +786,7 @@ Response listClusterAdminCredentialsWithResponse(String * @return the list credential result response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CredentialResultsInner listClusterAdminCredentials(String resourceGroupName, String resourceName); + CredentialResultsInner listClusterUserCredentials(String resourceGroupName, String resourceName); /** * Lists the cluster monitoring user credentials of a managed cluster. @@ -1132,248 +847,144 @@ Response listClusterMonitoringUserCredentialsWithRespons CredentialResultsInner listClusterMonitoringUserCredentials(String resourceGroupName, String resourceName); /** - * Lists the user credentials of a managed cluster. + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. - * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return - * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary - * in the path. + * @param parameters The service principal profile to set on the managed cluster. * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> listClusterUserCredentialsWithResponseAsync(String resourceGroupName, - String resourceName, String serverFqdn, Format format); + Mono>> resetServicePrincipalProfileWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterServicePrincipalProfile parameters); /** - * Lists the user credentials of a managed cluster. + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. * @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 list credential result response on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono listClusterUserCredentialsAsync(String resourceGroupName, String resourceName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginResetServicePrincipalProfileAsync(String resourceGroupName, + String resourceName, ManagedClusterServicePrincipalProfile parameters); /** - * Lists the user credentials of a managed cluster. + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. - * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return - * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary - * in the path. - * @param context The context to associate with this operation. + * @param parameters The service principal profile to set on the managed cluster. * @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 list credential result response along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listClusterUserCredentialsWithResponse(String resourceGroupName, - String resourceName, String serverFqdn, Format format, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginResetServicePrincipalProfile(String resourceGroupName, String resourceName, + ManagedClusterServicePrincipalProfile parameters); /** - * Lists the user credentials of a managed cluster. + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @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 list credential result response. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - CredentialResultsInner listClusterUserCredentials(String resourceGroupName, String resourceName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginResetServicePrincipalProfile(String resourceGroupName, String resourceName, + ManagedClusterServicePrincipalProfile parameters, Context context); /** - * Lists available upgrades for all service meshes in a specific cluster. + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. * @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 holds an array of MeshUpgradeProfiles as paginated response with {@link PagedFlux}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listMeshUpgradeProfilesAsync(String resourceGroupName, String resourceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono resetServicePrincipalProfileAsync(String resourceGroupName, String resourceName, + ManagedClusterServicePrincipalProfile parameters); /** - * Lists available upgrades for all service meshes in a specific cluster. + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. * @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 holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listMeshUpgradeProfiles(String resourceGroupName, String resourceName); + @ServiceMethod(returns = ReturnType.SINGLE) + void resetServicePrincipalProfile(String resourceGroupName, String resourceName, + ManagedClusterServicePrincipalProfile parameters); /** - * Lists available upgrades for all service meshes in a specific cluster. + * Reset the Service Principal Profile of a managed cluster. + * + * This action cannot be performed on a cluster that is not using a service principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. * @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 holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listMeshUpgradeProfiles(String resourceGroupName, String resourceName, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void resetServicePrincipalProfile(String resourceGroupName, String resourceName, + ManagedClusterServicePrincipalProfile parameters, Context context); /** - * Gets available upgrades for a service mesh in a cluster. + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. + * @param parameters The AAD profile to set on the Managed Cluster. * @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 available upgrades for a service mesh in a cluster along with {@link Response} on successful completion - * of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getMeshUpgradeProfileWithResponseAsync(String resourceGroupName, - String resourceName, String mode); + Mono>> resetAADProfileWithResponseAsync(String resourceGroupName, String resourceName, + ManagedClusterAadProfile parameters); /** - * Gets available upgrades for a service mesh in a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. - * @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 available upgrades for a service mesh in a cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getMeshUpgradeProfileAsync(String resourceGroupName, String resourceName, - String mode); - - /** - * Gets available upgrades for a service mesh in a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. - * @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 available upgrades for a service mesh in a cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getMeshUpgradeProfileWithResponse(String resourceGroupName, String resourceName, - String mode, Context context); - - /** - * Gets available upgrades for a service mesh in a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. - * @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 available upgrades for a service mesh in a cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MeshUpgradeProfileInner getMeshUpgradeProfile(String resourceGroupName, String resourceName, String mode); - - /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. - * - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. The operation returns properties of each egress endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, - String resourceName); - - /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. - * - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. The operation returns properties of each egress endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, - String resourceName); - - /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. - * - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. The operation returns properties of each egress endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, - String resourceName, Context context); - - /** - * Reset the AAD Profile of a managed cluster. - * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> resetAadProfileWithResponseAsync(String resourceGroupName, String resourceName, - ManagedClusterAadProfile parameters); - - /** - * Reset the AAD Profile of a managed cluster. + * Reset the AAD Profile of a managed cluster. * * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. @@ -1387,7 +998,7 @@ Mono>> resetAadProfileWithResponseAsync(String resourc * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginResetAadProfileAsync(String resourceGroupName, String resourceName, + PollerFlux, Void> beginResetAADProfileAsync(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters); /** @@ -1405,7 +1016,7 @@ PollerFlux, Void> beginResetAadProfileAsync(String resourceGrou * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginResetAadProfile(String resourceGroupName, String resourceName, + SyncPoller, Void> beginResetAADProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters); /** @@ -1424,7 +1035,7 @@ SyncPoller, Void> beginResetAadProfile(String resourceGroupName * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginResetAadProfile(String resourceGroupName, String resourceName, + SyncPoller, Void> beginResetAADProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, Context context); /** @@ -1442,7 +1053,7 @@ SyncPoller, Void> beginResetAadProfile(String resourceGroupName * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono resetAadProfileAsync(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters); + Mono resetAADProfileAsync(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters); /** * Reset the AAD Profile of a managed cluster. @@ -1458,7 +1069,7 @@ SyncPoller, Void> beginResetAadProfile(String resourceGroupName * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void resetAadProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters); + void resetAADProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters); /** * Reset the AAD Profile of a managed cluster. @@ -1475,68 +1086,67 @@ SyncPoller, Void> beginResetAadProfile(String resourceGroupName * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void resetAadProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, + void resetAADProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, Context context); /** - * Reset the Service Principal Profile of a managed cluster. + * Rotates the certificates of a managed cluster. * - * This action cannot be performed on a cluster that is not using a service principal. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> resetServicePrincipalProfileWithResponseAsync(String resourceGroupName, - String resourceName, ManagedClusterServicePrincipalProfile parameters); + Mono>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, + String resourceName); /** - * Reset the Service Principal Profile of a managed cluster. + * Rotates the certificates of a managed cluster. * - * This action cannot be performed on a cluster that is not using a service principal. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginResetServicePrincipalProfileAsync(String resourceGroupName, - String resourceName, ManagedClusterServicePrincipalProfile parameters); + PollerFlux, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, + String resourceName); /** - * Reset the Service Principal Profile of a managed cluster. + * Rotates the certificates of a managed cluster. * - * This action cannot be performed on a cluster that is not using a service principal. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginResetServicePrincipalProfile(String resourceGroupName, String resourceName, - ManagedClusterServicePrincipalProfile parameters); + SyncPoller, Void> beginRotateClusterCertificates(String resourceGroupName, String resourceName); /** - * Reset the Service Principal Profile of a managed cluster. + * Rotates the certificates of a managed cluster. * - * This action cannot be performed on a cluster that is not using a service principal. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. * @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. @@ -1544,64 +1154,62 @@ SyncPoller, Void> beginResetServicePrincipalProfile(String reso * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginResetServicePrincipalProfile(String resourceGroupName, String resourceName, - ManagedClusterServicePrincipalProfile parameters, Context context); + SyncPoller, Void> beginRotateClusterCertificates(String resourceGroupName, String resourceName, + Context context); /** - * Reset the Service Principal Profile of a managed cluster. + * Rotates the certificates of a managed cluster. * - * This action cannot be performed on a cluster that is not using a service principal. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono resetServicePrincipalProfileAsync(String resourceGroupName, String resourceName, - ManagedClusterServicePrincipalProfile parameters); + Mono rotateClusterCertificatesAsync(String resourceGroupName, String resourceName); /** - * Reset the Service Principal Profile of a managed cluster. + * Rotates the certificates of a managed cluster. * - * This action cannot be performed on a cluster that is not using a service principal. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void resetServicePrincipalProfile(String resourceGroupName, String resourceName, - ManagedClusterServicePrincipalProfile parameters); + void rotateClusterCertificates(String resourceGroupName, String resourceName); /** - * Reset the Service Principal Profile of a managed cluster. + * Rotates the certificates of a managed cluster. * - * This action cannot be performed on a cluster that is not using a service principal. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - void resetServicePrincipalProfile(String resourceGroupName, String resourceName, - ManagedClusterServicePrincipalProfile parameters, Context context); + void rotateClusterCertificates(String resourceGroupName, String resourceName, Context context); /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1611,14 +1219,15 @@ void resetServicePrincipalProfile(String resourceGroupName, String resourceName, * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, + Mono>> abortLatestOperationWithResponseAsync(String resourceGroupName, String resourceName); /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1628,14 +1237,14 @@ Mono>> rotateClusterCertificatesWithResponseAsync(Stri * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, - String resourceName); + PollerFlux, Void> beginAbortLatestOperationAsync(String resourceGroupName, String resourceName); /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1645,13 +1254,14 @@ PollerFlux, Void> beginRotateClusterCertificatesAsync(String re * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRotateClusterCertificates(String resourceGroupName, String resourceName); + SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName); /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1662,14 +1272,15 @@ PollerFlux, Void> beginRotateClusterCertificatesAsync(String re * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRotateClusterCertificates(String resourceGroupName, String resourceName, + SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, Context context); /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1679,13 +1290,14 @@ SyncPoller, Void> beginRotateClusterCertificates(String resourc * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono rotateClusterCertificatesAsync(String resourceGroupName, String resourceName); + Mono abortLatestOperationAsync(String resourceGroupName, String resourceName); /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1694,13 +1306,14 @@ SyncPoller, Void> beginRotateClusterCertificates(String resourc * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void rotateClusterCertificates(String resourceGroupName, String resourceName); + void abortLatestOperation(String resourceGroupName, String resourceName); /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1710,7 +1323,7 @@ SyncPoller, Void> beginRotateClusterCertificates(String resourc * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void rotateClusterCertificates(String resourceGroupName, String resourceName, Context context); + void abortLatestOperation(String resourceGroupName, String resourceName, Context context); /** * Rotates the service account signing keys of a managed cluster. @@ -1808,131 +1421,130 @@ SyncPoller, Void> beginRotateServiceAccountSigningKeys(String r void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName, Context context); /** - * Submits a command to run against the Managed Cluster. + * Stops a Managed Cluster * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return run command result along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> runCommandWithResponseAsync(String resourceGroupName, String resourceName, - RunCommandRequest requestPayload); + Mono>> stopWithResponseAsync(String resourceGroupName, String resourceName); /** - * Submits a command to run against the Managed Cluster. + * Stops a Managed Cluster * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of run command result. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, RunCommandResultInner> beginRunCommandAsync(String resourceGroupName, - String resourceName, RunCommandRequest requestPayload); + PollerFlux, Void> beginStopAsync(String resourceGroupName, String resourceName); /** - * Submits a command to run against the Managed Cluster. + * Stops a Managed Cluster * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of run command result. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RunCommandResultInner> beginRunCommand(String resourceGroupName, - String resourceName, RunCommandRequest requestPayload); + SyncPoller, Void> beginStop(String resourceGroupName, String resourceName); /** - * Submits a command to run against the Managed Cluster. + * Stops a Managed Cluster * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of run command result. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RunCommandResultInner> beginRunCommand(String resourceGroupName, - String resourceName, RunCommandRequest requestPayload, Context context); + SyncPoller, Void> beginStop(String resourceGroupName, String resourceName, Context context); /** - * Submits a command to run against the Managed Cluster. + * Stops a Managed Cluster * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return run command result on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono runCommandAsync(String resourceGroupName, String resourceName, - RunCommandRequest requestPayload); + Mono stopAsync(String resourceGroupName, String resourceName); /** - * Submits a command to run against the Managed Cluster. + * Stops a Managed Cluster * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return run command result. */ @ServiceMethod(returns = ReturnType.SINGLE) - RunCommandResultInner runCommand(String resourceGroupName, String resourceName, RunCommandRequest requestPayload); + void stop(String resourceGroupName, String resourceName); /** - * Submits a command to run against the Managed Cluster. + * Stops a Managed Cluster * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return run command result. */ @ServiceMethod(returns = ReturnType.SINGLE) - RunCommandResultInner runCommand(String resourceGroupName, String resourceName, RunCommandRequest requestPayload, - Context context); + void stop(String resourceGroupName, String resourceName, Context context); /** * Starts a previously stopped Managed Cluster @@ -2047,69 +1659,68 @@ RunCommandResultInner runCommand(String resourceGroupName, String resourceName, void start(String resourceGroupName, String resourceName, Context context); /** - * Stops a Managed Cluster + * Submits a command to run against the Managed Cluster. * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> stopWithResponseAsync(String resourceGroupName, String resourceName); + Mono>> runCommandWithResponseAsync(String resourceGroupName, String resourceName, + RunCommandRequest requestPayload); /** - * Stops a Managed Cluster + * Submits a command to run against the Managed Cluster. * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginStopAsync(String resourceGroupName, String resourceName); + PollerFlux, RunCommandResultInner> beginRunCommandAsync(String resourceGroupName, + String resourceName, RunCommandRequest requestPayload); /** - * Stops a Managed Cluster + * Submits a command to run against the Managed Cluster. * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStop(String resourceGroupName, String resourceName); + SyncPoller, RunCommandResultInner> beginRunCommand(String resourceGroupName, + String resourceName, RunCommandRequest requestPayload); /** - * Stops a Managed Cluster + * Submits a command to run against the Managed Cluster. * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -2117,114 +1728,543 @@ RunCommandResultInner runCommand(String resourceGroupName, String resourceName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStop(String resourceGroupName, String resourceName, Context context); + SyncPoller, RunCommandResultInner> beginRunCommand(String resourceGroupName, + String resourceName, RunCommandRequest requestPayload, Context context); /** - * Stops a Managed Cluster + * Submits a command to run against the Managed Cluster. * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono stopAsync(String resourceGroupName, String resourceName); + Mono runCommandAsync(String resourceGroupName, String resourceName, + RunCommandRequest requestPayload); /** - * Stops a Managed Cluster + * Submits a command to run against the Managed Cluster. * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void stop(String resourceGroupName, String resourceName); + RunCommandResultInner runCommand(String resourceGroupName, String resourceName, RunCommandRequest requestPayload); /** - * Stops a Managed Cluster + * Submits a command to run against the Managed Cluster. * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void stop(String resourceGroupName, String resourceName, Context context); + RunCommandResultInner runCommand(String resourceGroupName, String resourceName, RunCommandRequest requestPayload, + Context context); /** - * Gets the upgrade profile of a managed cluster. + * Gets the results of a command which has been run on the Managed Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. * @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 upgrade profile of a managed cluster along with {@link Response} on successful completion of + * @return the results of a command which has been run on the Managed Cluster on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getUpgradeProfileWithResponseAsync(String resourceGroupName, - String resourceName); + Mono getCommandResultWithResponseAsync(String resourceGroupName, + String resourceName, String commandId); /** - * Gets the upgrade profile of a managed cluster. + * Gets the results of a command which has been run on the Managed Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. * @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 upgrade profile of a managed cluster on successful completion of {@link Mono}. + * @return the results of a command which has been run on the Managed Cluster on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getUpgradeProfileAsync(String resourceGroupName, String resourceName); + Mono getCommandResultAsync(String resourceGroupName, String resourceName, String commandId); /** - * Gets the upgrade profile of a managed cluster. + * Gets the results of a command which has been run on the Managed Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. * @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 upgrade profile of a managed cluster along with {@link Response}. + * @return the results of a command which has been run on the Managed Cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getUpgradeProfileWithResponse(String resourceGroupName, - String resourceName, Context context); + ManagedClustersGetCommandResultResponse getCommandResultWithResponse(String resourceGroupName, String resourceName, + String commandId, Context context); /** - * Gets the upgrade profile of a managed cluster. + * Gets the results of a command which has been run on the Managed Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. * @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 upgrade profile of a managed cluster. + * @return the results of a command which has been run on the Managed Cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedClusterUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName); + RunCommandResultInner getCommandResult(String resourceGroupName, String resourceName, String commandId); + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster + * as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, + String resourceName); + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster + * as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, + String resourceName); + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster + * as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, + String resourceName, Context context); + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getUpgradeProfileWithResponseAsync(String resourceGroupName, + String resourceName); + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getUpgradeProfileAsync(String resourceGroupName, String resourceName); + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getUpgradeProfileWithResponse(String resourceGroupName, + String resourceName, Context context); + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName); + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getMeshRevisionProfileWithResponseAsync(String location, String mode); + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getMeshRevisionProfileAsync(String location, String mode); + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getMeshRevisionProfileWithResponse(String location, String mode, + Context context); + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MeshRevisionProfileInner getMeshRevisionProfile(String location, String mode); + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listMeshRevisionProfilesAsync(String location); + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMeshRevisionProfiles(String location); + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMeshRevisionProfiles(String location, Context context); + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @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 available upgrades for a service mesh in a cluster along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getMeshUpgradeProfileWithResponseAsync(String resourceGroupName, + String resourceName, String mode); + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @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 available upgrades for a service mesh in a cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getMeshUpgradeProfileAsync(String resourceGroupName, String resourceName, + String mode); + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @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 available upgrades for a service mesh in a cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getMeshUpgradeProfileWithResponse(String resourceGroupName, String resourceName, + String mode, Context context); + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @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 available upgrades for a service mesh in a cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MeshUpgradeProfileInner getMeshUpgradeProfile(String resourceGroupName, String resourceName, String mode); + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listMeshUpgradeProfilesAsync(String resourceGroupName, String resourceName); + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMeshUpgradeProfiles(String resourceGroupName, String resourceName); + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMeshUpgradeProfiles(String resourceGroupName, String resourceName, + Context context); + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> listKubernetesVersionsWithResponseAsync(String location); + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono listKubernetesVersionsAsync(String location); + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listKubernetesVersionsWithResponse(String location, Context context); + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KubernetesVersionListResultInner listKubernetesVersions(String location); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedNamespacesClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedNamespacesClient.java index d106499db36c..eb84ee56021c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedNamespacesClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedNamespacesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent; @@ -24,50 +24,6 @@ * An instance of this class provides access to all the operations defined in ManagedNamespacesClient. */ public interface ManagedNamespacesClient { - /** - * Gets a list of managed namespaces in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed namespaces in the specified managed cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName); - - /** - * Gets a list of managed namespaces in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed namespaces in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedCluster(String resourceGroupName, String resourceName); - - /** - * Gets a list of managed namespaces in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed namespaces in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, - Context context); - /** * Gets the specified namespace of a managed cluster. * @@ -416,6 +372,50 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String resourceName, String managedNamespaceName, Context context); + /** + * Gets a list of managed namespaces in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed namespaces in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName); + + /** + * Gets a list of managed namespaces in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed namespaces in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName); + + /** + * Gets a list of managed namespaces in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed namespaces in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context); + /** * Lists the credentials of a namespace. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationsClient.java index c21d92a200b7..aa6358492b51 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationsClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateEndpointConnectionsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateEndpointConnectionsClient.java index 3d1685d6874a..7f19142408db 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateEndpointConnectionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent; @@ -21,70 +21,6 @@ * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ public interface PrivateEndpointConnectionsClient { - /** - * Gets a list of private endpoint connections in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> listWithResponseAsync(String resourceGroupName, - String resourceName); - - /** - * Gets a list of private endpoint connections in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono listAsync(String resourceGroupName, String resourceName); - - /** - * Gets a list of private endpoint connections in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String resourceGroupName, String resourceName, - Context context); - - /** - * Gets a list of private endpoint connections in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionListResultInner list(String resourceGroupName, String resourceName); - /** * Gets the specified private endpoint connection. * @@ -96,7 +32,10 @@ Response listWithResponse(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. + * @return the specified private endpoint connection. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> getWithResponseAsync(String resourceGroupName, String resourceName, @@ -113,7 +52,10 @@ Mono> getWithResponseAsync(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection on successful completion of {@link Mono}. + * @return the specified private endpoint connection. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono getAsync(String resourceGroupName, String resourceName, @@ -131,7 +73,10 @@ Mono getAsync(String resourceGroupName, String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection along with {@link Response}. + * @return the specified private endpoint connection. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String resourceName, @@ -148,7 +93,9 @@ Response getWithResponse(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return the specified private endpoint connection. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. */ @ServiceMethod(returns = ReturnType.SINGLE) PrivateEndpointConnectionInner get(String resourceGroupName, String resourceName, @@ -320,4 +267,78 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context); + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> listWithResponseAsync(String resourceGroupName, + String resourceName); + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono listAsync(String resourceGroupName, String resourceName); + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listWithResponse(String resourceGroupName, String resourceName, + Context context); + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionListResultInner list(String resourceGroupName, String resourceName); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateLinkResourcesClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateLinkResourcesClient.java index cd2367dd8beb..7b709d73b356 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateLinkResourcesClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateLinkResourcesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent; @@ -25,7 +25,10 @@ public interface PrivateLinkResourcesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources along with {@link Response} on successful completion of {@link Mono}. + * @return a list of private link resources in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> listWithResponseAsync(String resourceGroupName, @@ -41,7 +44,10 @@ Mono> listWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources on successful completion of {@link Mono}. + * @return a list of private link resources in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono listAsync(String resourceGroupName, String resourceName); @@ -57,7 +63,10 @@ Mono> listWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources along with {@link Response}. + * @return a list of private link resources in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listWithResponse(String resourceGroupName, String resourceName, @@ -73,7 +82,9 @@ Response listWithResponse(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources. + * @return a list of private link resources in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. */ @ServiceMethod(returns = ReturnType.SINGLE) PrivateLinkResourcesListResultInner list(String resourceGroupName, String resourceName); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ResolvePrivateLinkServiceIdsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ResolvePrivateLinkServiceIdsClient.java index f1255c9f7aa5..89ebd2916b5e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ResolvePrivateLinkServiceIdsClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ResolvePrivateLinkServiceIdsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent; @@ -28,7 +28,7 @@ public interface ResolvePrivateLinkServiceIdsClient { * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> postWithResponseAsync(String resourceGroupName, String resourceName, + Mono> pOSTWithResponseAsync(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters); /** @@ -43,7 +43,7 @@ Mono> postWithResponseAsync(String resourceGr * @return the private link service ID for the specified managed cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono postAsync(String resourceGroupName, String resourceName, + Mono pOSTAsync(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters); /** @@ -59,7 +59,7 @@ Mono postAsync(String resourceGroupName, String resour * @return the private link service ID for the specified managed cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response postWithResponse(String resourceGroupName, String resourceName, + Response pOSTWithResponse(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters, Context context); /** @@ -74,5 +74,5 @@ Response postWithResponse(String resourceGroupName, St * @return the private link service ID for the specified managed cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourceInner post(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters); + PrivateLinkResourceInner pOST(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/SnapshotsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/SnapshotsClient.java index c7a95a642be0..7ed40315cce7 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/SnapshotsClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/SnapshotsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent; @@ -22,75 +22,6 @@ */ public interface SnapshotsClient extends InnerSupportsGet, InnerSupportsListing, InnerSupportsDelete { - /** - * Gets a list of snapshots in the specified subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of snapshots in the specified subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); - - /** - * Gets a list of snapshots in the specified subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of snapshots in the specified subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Gets a list of snapshots in the specified subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of snapshots in the specified subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Lists snapshots in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Snapshot list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); - - /** - * Lists snapshots in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists snapshots in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - /** * Gets a snapshot. * @@ -314,4 +245,73 @@ Response updateTagsWithResponse(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String resourceName); + + /** + * Lists snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync(String resourceGroupName); + + /** + * Lists snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets a list of snapshots in the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(); + + /** + * Gets a list of snapshots in the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets a list of snapshots in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRoleBindingsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRoleBindingsClient.java index c2c56fecfb09..91109f06f2f4 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRoleBindingsClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRoleBindingsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent; @@ -22,48 +22,6 @@ * An instance of this class provides access to all the operations defined in TrustedAccessRoleBindingsClient. */ public interface TrustedAccessRoleBindingsClient { - /** - * List trusted access role bindings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a TrustedAccessRoleBinding list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String resourceName); - - /** - * List trusted access role bindings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a TrustedAccessRoleBinding list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String resourceName); - - /** - * List trusted access role bindings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a TrustedAccessRoleBinding list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String resourceName, Context context); - /** * Get a trusted access role binding. * @@ -344,4 +302,46 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, Context context); + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a TrustedAccessRoleBinding list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String resourceName); + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a TrustedAccessRoleBinding list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a TrustedAccessRoleBinding list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName, Context context); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRolesClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRolesClient.java index f9cac9a8f19e..ef4602d45da1 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRolesClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRolesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AccessProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AccessProfile.java index fc9e1725879c..7cb64d2e194d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AccessProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AccessProfile.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -15,7 +15,7 @@ /** * Profile for enabling a user to access a managed cluster. */ -@Fluent +@Immutable public final class AccessProfile implements JsonSerializable { /* * Base64-encoded Kubernetes configuration file. @@ -25,7 +25,7 @@ public final class AccessProfile implements JsonSerializable { /** * Creates an instance of AccessProfile class. */ - public AccessProfile() { + private AccessProfile() { } /** @@ -37,17 +37,6 @@ public byte[] kubeConfig() { return CoreUtils.clone(this.kubeConfig); } - /** - * Set the kubeConfig property: Base64-encoded Kubernetes configuration file. - * - * @param kubeConfig the kubeConfig value to set. - * @return the AccessProfile object itself. - */ - public AccessProfile withKubeConfig(byte[] kubeConfig) { - this.kubeConfig = CoreUtils.clone(kubeConfig); - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsInner.java index e84d83ef38ee..9acd40dd89b3 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * The list of available versions for an agent pool. */ -@Fluent +@Immutable public final class AgentPoolAvailableVersionsInner implements JsonSerializable { /* * The ID of the agent pool version list. @@ -37,12 +37,12 @@ public final class AgentPoolAvailableVersionsInner implements JsonSerializable agentPool return this.innerProperties() == null ? null : this.innerProperties().agentPoolVersions(); } - /** - * Set the agentPoolVersions property: List of versions available for agent pool. - * - * @param agentPoolVersions the agentPoolVersions value to set. - * @return the AgentPoolAvailableVersionsInner object itself. - */ - public AgentPoolAvailableVersionsInner - withAgentPoolVersions(List agentPoolVersions) { - if (this.innerProperties() == null) { - this.innerProperties = new AgentPoolAvailableVersionsProperties(); - } - this.innerProperties().withAgentPoolVersions(agentPoolVersions); - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsProperties.java index fd96a07e23cd..178f33d25e3e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * The list of available agent pool versions. */ -@Fluent +@Immutable public final class AgentPoolAvailableVersionsProperties implements JsonSerializable { /* @@ -27,7 +27,7 @@ public final class AgentPoolAvailableVersionsProperties /** * Creates an instance of AgentPoolAvailableVersionsProperties class. */ - public AgentPoolAvailableVersionsProperties() { + private AgentPoolAvailableVersionsProperties() { } /** @@ -39,18 +39,6 @@ public List agentPool return this.agentPoolVersions; } - /** - * Set the agentPoolVersions property: List of versions available for agent pool. - * - * @param agentPoolVersions the agentPoolVersions value to set. - * @return the AgentPoolAvailableVersionsProperties object itself. - */ - public AgentPoolAvailableVersionsProperties - withAgentPoolVersions(List agentPoolVersions) { - this.agentPoolVersions = agentPoolVersions; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java index 7eb71fc9a547..fe6b3a1f1f89 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; @@ -125,14 +125,14 @@ public String id() { } /** - * Get the etag property: Unique read-only string used to implement optimistic concurrency. The eTag value will + * Get the eTag property: Unique read-only string used to implement optimistic concurrency. The eTag value will * change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a * subsequent request to enable optimistic concurrency per the normal eTag convention. * - * @return the etag value. + * @return the eTag value. */ - public String etag() { - return this.innerProperties() == null ? null : this.innerProperties().etag(); + public String eTag() { + return this.innerProperties() == null ? null : this.innerProperties().eTag(); } /** @@ -1421,29 +1421,29 @@ public AgentPoolInner withStatus(AgentPoolStatus status) { } /** - * Get the localDnsProfile property: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS + * Get the localDNSProfile property: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS * helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see * aka.ms/aks/localdns. * - * @return the localDnsProfile value. + * @return the localDNSProfile value. */ - public LocalDnsProfile localDnsProfile() { - return this.innerProperties() == null ? null : this.innerProperties().localDnsProfile(); + public LocalDnsProfile localDNSProfile() { + return this.innerProperties() == null ? null : this.innerProperties().localDNSProfile(); } /** - * Set the localDnsProfile property: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS + * Set the localDNSProfile property: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS * helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see * aka.ms/aks/localdns. * - * @param localDnsProfile the localDnsProfile value to set. + * @param localDNSProfile the localDNSProfile value to set. * @return the AgentPoolInner object itself. */ - public AgentPoolInner withLocalDnsProfile(LocalDnsProfile localDnsProfile) { + public AgentPoolInner withLocalDNSProfile(LocalDnsProfile localDNSProfile) { if (this.innerProperties() == null) { this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); } - this.innerProperties().withLocalDnsProfile(localDnsProfile); + this.innerProperties().withLocalDNSProfile(localDNSProfile); return this; } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java index 4860c5cec6a8..1a3a8e515ad3 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; @@ -19,12 +19,12 @@ /** * The list of available upgrades for an agent pool. */ -@Fluent +@Immutable public final class AgentPoolUpgradeProfileInner extends ProxyResource { /* * The properties of the agent pool upgrade profile. */ - private AgentPoolUpgradeProfileProperties innerProperties = new AgentPoolUpgradeProfileProperties(); + private AgentPoolUpgradeProfileProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -49,7 +49,7 @@ public final class AgentPoolUpgradeProfileInner extends ProxyResource { /** * Creates an instance of AgentPoolUpgradeProfileInner class. */ - public AgentPoolUpgradeProfileInner() { + private AgentPoolUpgradeProfileInner() { } /** @@ -109,20 +109,6 @@ public String kubernetesVersion() { return this.innerProperties() == null ? null : this.innerProperties().kubernetesVersion(); } - /** - * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). - * - * @param kubernetesVersion the kubernetesVersion value to set. - * @return the AgentPoolUpgradeProfileInner object itself. - */ - public AgentPoolUpgradeProfileInner withKubernetesVersion(String kubernetesVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new AgentPoolUpgradeProfileProperties(); - } - this.innerProperties().withKubernetesVersion(kubernetesVersion); - return this; - } - /** * Get the osType property: The operating system type. The default is Linux. * @@ -132,20 +118,6 @@ public OSType osType() { return this.innerProperties() == null ? null : this.innerProperties().osType(); } - /** - * Set the osType property: The operating system type. The default is Linux. - * - * @param osType the osType value to set. - * @return the AgentPoolUpgradeProfileInner object itself. - */ - public AgentPoolUpgradeProfileInner withOsType(OSType osType) { - if (this.innerProperties() == null) { - this.innerProperties = new AgentPoolUpgradeProfileProperties(); - } - this.innerProperties().withOsType(osType); - return this; - } - /** * Get the upgrades property: List of orchestrator types and versions available for upgrade. * @@ -155,20 +127,6 @@ public List upgrades() { return this.innerProperties() == null ? null : this.innerProperties().upgrades(); } - /** - * Set the upgrades property: List of orchestrator types and versions available for upgrade. - * - * @param upgrades the upgrades value to set. - * @return the AgentPoolUpgradeProfileInner object itself. - */ - public AgentPoolUpgradeProfileInner withUpgrades(List upgrades) { - if (this.innerProperties() == null) { - this.innerProperties = new AgentPoolUpgradeProfileProperties(); - } - this.innerProperties().withUpgrades(upgrades); - return this; - } - /** * Get the latestNodeImageVersion property: The latest AKS supported node image version. * @@ -178,20 +136,6 @@ public String latestNodeImageVersion() { return this.innerProperties() == null ? null : this.innerProperties().latestNodeImageVersion(); } - /** - * Set the latestNodeImageVersion property: The latest AKS supported node image version. - * - * @param latestNodeImageVersion the latestNodeImageVersion value to set. - * @return the AgentPoolUpgradeProfileInner object itself. - */ - public AgentPoolUpgradeProfileInner withLatestNodeImageVersion(String latestNodeImageVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new AgentPoolUpgradeProfileProperties(); - } - this.innerProperties().withLatestNodeImageVersion(latestNodeImageVersion); - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java index e05c4dbd0934..1836eca428c1 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -18,7 +18,7 @@ /** * The list of available upgrade versions. */ -@Fluent +@Immutable public final class AgentPoolUpgradeProfileProperties implements JsonSerializable { /* * The Kubernetes version (major.minor.patch). @@ -43,7 +43,7 @@ public final class AgentPoolUpgradeProfileProperties implements JsonSerializable /** * Creates an instance of AgentPoolUpgradeProfileProperties class. */ - public AgentPoolUpgradeProfileProperties() { + private AgentPoolUpgradeProfileProperties() { } /** @@ -55,17 +55,6 @@ public String kubernetesVersion() { return this.kubernetesVersion; } - /** - * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). - * - * @param kubernetesVersion the kubernetesVersion value to set. - * @return the AgentPoolUpgradeProfileProperties object itself. - */ - public AgentPoolUpgradeProfileProperties withKubernetesVersion(String kubernetesVersion) { - this.kubernetesVersion = kubernetesVersion; - return this; - } - /** * Get the osType property: The operating system type. The default is Linux. * @@ -75,17 +64,6 @@ public OSType osType() { return this.osType; } - /** - * Set the osType property: The operating system type. The default is Linux. - * - * @param osType the osType value to set. - * @return the AgentPoolUpgradeProfileProperties object itself. - */ - public AgentPoolUpgradeProfileProperties withOsType(OSType osType) { - this.osType = osType; - return this; - } - /** * Get the upgrades property: List of orchestrator types and versions available for upgrade. * @@ -95,18 +73,6 @@ public List upgrades() { return this.upgrades; } - /** - * Set the upgrades property: List of orchestrator types and versions available for upgrade. - * - * @param upgrades the upgrades value to set. - * @return the AgentPoolUpgradeProfileProperties object itself. - */ - public AgentPoolUpgradeProfileProperties - withUpgrades(List upgrades) { - this.upgrades = upgrades; - return this; - } - /** * Get the latestNodeImageVersion property: The latest AKS supported node image version. * @@ -116,17 +82,6 @@ public String latestNodeImageVersion() { return this.latestNodeImageVersion; } - /** - * Set the latestNodeImageVersion property: The latest AKS supported node image version. - * - * @param latestNodeImageVersion the latestNodeImageVersion value to set. - * @return the AgentPoolUpgradeProfileProperties object itself. - */ - public AgentPoolUpgradeProfileProperties withLatestNodeImageVersion(String latestNodeImageVersion) { - this.latestNodeImageVersion = latestNodeImageVersion; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CommandResultProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CommandResultProperties.java index 477c0c268457..47688402be98 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CommandResultProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CommandResultProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; @@ -51,7 +51,7 @@ public final class CommandResultProperties implements JsonSerializable { /* * Array of AKS supported Kubernetes versions. @@ -26,7 +26,7 @@ public final class KubernetesVersionListResultInner implements JsonSerializable< /** * Creates an instance of KubernetesVersionListResultInner class. */ - public KubernetesVersionListResultInner() { + private KubernetesVersionListResultInner() { } /** @@ -38,17 +38,6 @@ public List values() { return this.values; } - /** - * Set the values property: Array of AKS supported Kubernetes versions. - * - * @param values the values value to set. - * @return the KubernetesVersionListResultInner object itself. - */ - public KubernetesVersionListResultInner withValues(List values) { - this.values = values; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java index 806cd7e16e72..348ec6777350 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -18,7 +18,7 @@ * A machine. Contains details about the underlying virtual machine. A machine may be visible here but not in kubectl * get nodes; if so it may be because the machine has not been registered with the Kubernetes API Server yet. */ -@Fluent +@Immutable public final class MachineInner extends ProxyResource { /* * The properties of the machine @@ -53,7 +53,7 @@ public final class MachineInner extends ProxyResource { /** * Creates an instance of MachineInner class. */ - public MachineInner() { + private MachineInner() { } /** @@ -65,17 +65,6 @@ public MachineProperties properties() { return this.properties; } - /** - * Set the properties property: The properties of the machine. - * - * @param properties the properties value to set. - * @return the MachineInner object itself. - */ - public MachineInner withProperties(MachineProperties properties) { - this.properties = properties; - return this; - } - /** * Get the zones property: The Availability zone in which machine is located. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationInner.java index f967d26974bd..4b7da59359e4 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationProperties.java index 278a29cd3848..3c543b48ae30 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAccessProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAccessProfileInner.java index e99678c9e8be..322a86f59a09 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAccessProfileInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAccessProfileInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * Managed cluster Access Profile. */ -@Fluent +@Immutable public final class ManagedClusterAccessProfileInner extends Resource { private static final byte[] EMPTY_BYTE_ARRAY = new byte[0]; @@ -48,7 +48,7 @@ public final class ManagedClusterAccessProfileInner extends Resource { /** * Creates an instance of ManagedClusterAccessProfileInner class. */ - public ManagedClusterAccessProfileInner() { + private ManagedClusterAccessProfileInner() { } /** @@ -99,24 +99,6 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAccessProfileInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAccessProfileInner withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * Get the kubeConfig property: Base64-encoded Kubernetes configuration file. * @@ -126,20 +108,6 @@ public byte[] kubeConfig() { return this.innerProperties() == null ? EMPTY_BYTE_ARRAY : this.innerProperties().kubeConfig(); } - /** - * Set the kubeConfig property: Base64-encoded Kubernetes configuration file. - * - * @param kubeConfig the kubeConfig value to set. - * @return the ManagedClusterAccessProfileInner object itself. - */ - public ManagedClusterAccessProfileInner withKubeConfig(byte[] kubeConfig) { - if (this.innerProperties() == null) { - this.innerProperties = new AccessProfile(); - } - this.innerProperties().withKubeConfig(kubeConfig); - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java index 721d64f00f7d..848d8620ff71 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; @@ -50,7 +50,7 @@ public class ManagedClusterAgentPoolProfileProperties * updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable * optimistic concurrency per the normal eTag convention. */ - private String etag; + private String eTag; /* * Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) @@ -375,7 +375,7 @@ public class ManagedClusterAgentPoolProfileProperties * Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve performance and * reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns. */ - private LocalDnsProfile localDnsProfile; + private LocalDnsProfile localDNSProfile; /** * Creates an instance of ManagedClusterAgentPoolProfileProperties class. @@ -384,26 +384,26 @@ public ManagedClusterAgentPoolProfileProperties() { } /** - * Get the etag property: Unique read-only string used to implement optimistic concurrency. The eTag value will + * Get the eTag property: Unique read-only string used to implement optimistic concurrency. The eTag value will * change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a * subsequent request to enable optimistic concurrency per the normal eTag convention. * - * @return the etag value. + * @return the eTag value. */ - public String etag() { - return this.etag; + public String eTag() { + return this.eTag; } /** - * Set the etag property: Unique read-only string used to implement optimistic concurrency. The eTag value will + * Set the eTag property: Unique read-only string used to implement optimistic concurrency. The eTag value will * change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a * subsequent request to enable optimistic concurrency per the normal eTag convention. * - * @param etag the etag value to set. + * @param eTag the eTag value to set. * @return the ManagedClusterAgentPoolProfileProperties object itself. */ - ManagedClusterAgentPoolProfileProperties withEtag(String etag) { - this.etag = etag; + ManagedClusterAgentPoolProfileProperties withETag(String eTag) { + this.eTag = eTag; return this; } @@ -1585,26 +1585,26 @@ public ManagedClusterAgentPoolProfileProperties withStatus(AgentPoolStatus statu } /** - * Get the localDnsProfile property: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS + * Get the localDNSProfile property: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS * helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see * aka.ms/aks/localdns. * - * @return the localDnsProfile value. + * @return the localDNSProfile value. */ - public LocalDnsProfile localDnsProfile() { - return this.localDnsProfile; + public LocalDnsProfile localDNSProfile() { + return this.localDNSProfile; } /** - * Set the localDnsProfile property: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS + * Set the localDNSProfile property: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS * helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see * aka.ms/aks/localdns. * - * @param localDnsProfile the localDnsProfile value to set. + * @param localDNSProfile the localDNSProfile value to set. * @return the ManagedClusterAgentPoolProfileProperties object itself. */ - public ManagedClusterAgentPoolProfileProperties withLocalDnsProfile(LocalDnsProfile localDnsProfile) { - this.localDnsProfile = localDnsProfile; + public ManagedClusterAgentPoolProfileProperties withLocalDNSProfile(LocalDnsProfile localDNSProfile) { + this.localDNSProfile = localDNSProfile; return this; } @@ -1653,8 +1653,8 @@ public void validate() { if (status() != null) { status().validate(); } - if (localDnsProfile() != null) { - localDnsProfile().validate(); + if (localDNSProfile() != null) { + localDNSProfile().validate(); } } @@ -1721,7 +1721,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("virtualMachineNodesStatus", this.virtualMachineNodesStatus, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("status", this.status); - jsonWriter.writeJsonField("localDNSProfile", this.localDnsProfile); + jsonWriter.writeJsonField("localDNSProfile", this.localDNSProfile); return jsonWriter.writeEndObject(); } @@ -1742,7 +1742,7 @@ public static ManagedClusterAgentPoolProfileProperties fromJson(JsonReader jsonR reader.nextToken(); if ("eTag".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.etag = reader.getString(); + deserializedManagedClusterAgentPoolProfileProperties.eTag = reader.getString(); } else if ("count".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.count = reader.getNullable(JsonReader::getInt); } else if ("vmSize".equals(fieldName)) { @@ -1883,7 +1883,7 @@ public static ManagedClusterAgentPoolProfileProperties fromJson(JsonReader jsonR } else if ("status".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.status = AgentPoolStatus.fromJson(reader); } else if ("localDNSProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.localDnsProfile + deserializedManagedClusterAgentPoolProfileProperties.localDNSProfile = LocalDnsProfile.fromJson(reader); } else { reader.skipChildren(); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java index 18a411bb1328..906cddf39c6b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; @@ -63,7 +63,7 @@ public final class ManagedClusterInner extends Resource { * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section * 14.27) header fields. */ - private String etag; + private String eTag; /* * The managed cluster SKU. @@ -121,15 +121,15 @@ private ManagedClusterProperties innerProperties() { } /** - * Get the etag property: If eTag is provided in the response body, it may also be provided as a header per the + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), * and If-Range (section 14.27) header fields. * - * @return the etag value. + * @return the eTag value. */ - public String etag() { - return this.etag; + public String eTag() { + return this.eTag; } /** @@ -407,24 +407,24 @@ public String fqdn() { } /** - * Get the privateFqdn property: The FQDN of private cluster. + * Get the privateFQDN property: The FQDN of private cluster. * - * @return the privateFqdn value. + * @return the privateFQDN value. */ - public String privateFqdn() { - return this.innerProperties() == null ? null : this.innerProperties().privateFqdn(); + public String privateFQDN() { + return this.innerProperties() == null ? null : this.innerProperties().privateFQDN(); } /** - * Get the azurePortalFqdn property: The special FQDN used by the Azure Portal to access the Managed Cluster. This + * Get the azurePortalFQDN property: The special FQDN used by the Azure Portal to access the Managed Cluster. This * FQDN is for use only by the Azure Portal and should not be used by other clients. The Azure Portal requires * certain Cross-Origin Resource Sharing (CORS) headers to be sent in some responses, which Kubernetes APIServer * doesn't handle by default. This special FQDN supports CORS, allowing the Azure Portal to function properly. * - * @return the azurePortalFqdn value. + * @return the azurePortalFQDN value. */ - public String azurePortalFqdn() { - return this.innerProperties() == null ? null : this.innerProperties().azurePortalFqdn(); + public String azurePortalFQDN() { + return this.innerProperties() == null ? null : this.innerProperties().azurePortalFQDN(); } /** @@ -1124,13 +1124,13 @@ public ManagedClusterInner withServiceMeshProfile(ServiceMeshProfile serviceMesh } /** - * Get the resourceUid property: The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds + * Get the resourceUID property: The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds * (i.e: create, delete, create sequence). * - * @return the resourceUid value. + * @return the resourceUID value. */ - public String resourceUid() { - return this.innerProperties() == null ? null : this.innerProperties().resourceUid(); + public String resourceUID() { + return this.innerProperties() == null ? null : this.innerProperties().resourceUID(); } /** @@ -1316,7 +1316,7 @@ public static ManagedClusterInner fromJson(JsonReader jsonReader) throws IOExcep } else if ("properties".equals(fieldName)) { deserializedManagedClusterInner.innerProperties = ManagedClusterProperties.fromJson(reader); } else if ("eTag".equals(fieldName)) { - deserializedManagedClusterInner.etag = reader.getString(); + deserializedManagedClusterInner.eTag = reader.getString(); } else if ("sku".equals(fieldName)) { deserializedManagedClusterInner.sku = ManagedClusterSku.fromJson(reader); } else if ("extendedLocation".equals(fieldName)) { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java index 2d3a5904c461..74ba5738d8da 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; @@ -101,7 +101,7 @@ public final class ManagedClusterProperties implements JsonSerializable agentPoolProfiles = reader.readArray(reader1 -> ManagedClusterAgentPoolProfile.fromJson(reader1)); @@ -1440,7 +1440,7 @@ public static ManagedClusterProperties fromJson(JsonReader jsonReader) throws IO } else if ("serviceMeshProfile".equals(fieldName)) { deserializedManagedClusterProperties.serviceMeshProfile = ServiceMeshProfile.fromJson(reader); } else if ("resourceUID".equals(fieldName)) { - deserializedManagedClusterProperties.resourceUid = reader.getString(); + deserializedManagedClusterProperties.resourceUID = reader.getString(); } else if ("metricsProfile".equals(fieldName)) { deserializedManagedClusterProperties.metricsProfile = ManagedClusterMetricsProfile.fromJson(reader); } else if ("nodeProvisioningProfile".equals(fieldName)) { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileInner.java index 7dbf28e3cba4..e3e892a5f24d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; @@ -18,12 +18,12 @@ /** * The list of available upgrades for compute pools. */ -@Fluent +@Immutable public final class ManagedClusterUpgradeProfileInner extends ProxyResource { /* * The properties of the upgrade profile. */ - private ManagedClusterUpgradeProfileProperties innerProperties = new ManagedClusterUpgradeProfileProperties(); + private ManagedClusterUpgradeProfileProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -48,7 +48,7 @@ public final class ManagedClusterUpgradeProfileInner extends ProxyResource { /** * Creates an instance of ManagedClusterUpgradeProfileInner class. */ - public ManagedClusterUpgradeProfileInner() { + private ManagedClusterUpgradeProfileInner() { } /** @@ -108,21 +108,6 @@ public ManagedClusterPoolUpgradeProfile controlPlaneProfile() { return this.innerProperties() == null ? null : this.innerProperties().controlPlaneProfile(); } - /** - * Set the controlPlaneProfile property: The list of available upgrade versions for the control plane. - * - * @param controlPlaneProfile the controlPlaneProfile value to set. - * @return the ManagedClusterUpgradeProfileInner object itself. - */ - public ManagedClusterUpgradeProfileInner - withControlPlaneProfile(ManagedClusterPoolUpgradeProfile controlPlaneProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterUpgradeProfileProperties(); - } - this.innerProperties().withControlPlaneProfile(controlPlaneProfile); - return this; - } - /** * Get the agentPoolProfiles property: The list of available upgrade versions for agent pools. * @@ -132,21 +117,6 @@ public List agentPoolProfiles() { return this.innerProperties() == null ? null : this.innerProperties().agentPoolProfiles(); } - /** - * Set the agentPoolProfiles property: The list of available upgrade versions for agent pools. - * - * @param agentPoolProfiles the agentPoolProfiles value to set. - * @return the ManagedClusterUpgradeProfileInner object itself. - */ - public ManagedClusterUpgradeProfileInner - withAgentPoolProfiles(List agentPoolProfiles) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterUpgradeProfileProperties(); - } - this.innerProperties().withAgentPoolProfiles(agentPoolProfiles); - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileProperties.java index 624fe6953d50..33b51352242a 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * Control plane and agent pool upgrade profiles. */ -@Fluent +@Immutable public final class ManagedClusterUpgradeProfileProperties implements JsonSerializable { /* @@ -33,7 +33,7 @@ public final class ManagedClusterUpgradeProfileProperties /** * Creates an instance of ManagedClusterUpgradeProfileProperties class. */ - public ManagedClusterUpgradeProfileProperties() { + private ManagedClusterUpgradeProfileProperties() { } /** @@ -45,18 +45,6 @@ public ManagedClusterPoolUpgradeProfile controlPlaneProfile() { return this.controlPlaneProfile; } - /** - * Set the controlPlaneProfile property: The list of available upgrade versions for the control plane. - * - * @param controlPlaneProfile the controlPlaneProfile value to set. - * @return the ManagedClusterUpgradeProfileProperties object itself. - */ - public ManagedClusterUpgradeProfileProperties - withControlPlaneProfile(ManagedClusterPoolUpgradeProfile controlPlaneProfile) { - this.controlPlaneProfile = controlPlaneProfile; - return this; - } - /** * Get the agentPoolProfiles property: The list of available upgrade versions for agent pools. * @@ -66,18 +54,6 @@ public List agentPoolProfiles() { return this.agentPoolProfiles; } - /** - * Set the agentPoolProfiles property: The list of available upgrade versions for agent pools. - * - * @param agentPoolProfiles the agentPoolProfiles value to set. - * @return the ManagedClusterUpgradeProfileProperties object itself. - */ - public ManagedClusterUpgradeProfileProperties - withAgentPoolProfiles(List agentPoolProfiles) { - this.agentPoolProfiles = agentPoolProfiles; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedNamespaceInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedNamespaceInner.java index f64de2c3397e..afaf1bf290a1 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedNamespaceInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedNamespaceInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; @@ -30,7 +30,7 @@ public final class ManagedNamespaceInner extends Resource { * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section * 14.27) header fields. */ - private String etag; + private String eTag; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -79,15 +79,15 @@ public ManagedNamespaceInner withProperties(NamespaceProperties properties) { } /** - * Get the etag property: If eTag is provided in the response body, it may also be provided as a header per the + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), * and If-Range (section 14.27) header fields. * - * @return the etag value. + * @return the eTag value. */ - public String etag() { - return this.etag; + public String eTag() { + return this.eTag; } /** @@ -200,7 +200,7 @@ public static ManagedNamespaceInner fromJson(JsonReader jsonReader) throws IOExc } else if ("properties".equals(fieldName)) { deserializedManagedNamespaceInner.properties = NamespaceProperties.fromJson(reader); } else if ("eTag".equals(fieldName)) { - deserializedManagedNamespaceInner.etag = reader.getString(); + deserializedManagedNamespaceInner.eTag = reader.getString(); } else if ("systemData".equals(fieldName)) { deserializedManagedNamespaceInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshRevisionProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshRevisionProfileInner.java index f5d81ffcf56c..de5a20c493c6 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshRevisionProfileInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshRevisionProfileInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * Mesh revision profile for a mesh. */ -@Fluent +@Immutable public final class MeshRevisionProfileInner extends ProxyResource { /* * Mesh revision profile properties for a mesh @@ -46,7 +46,7 @@ public final class MeshRevisionProfileInner extends ProxyResource { /** * Creates an instance of MeshRevisionProfileInner class. */ - public MeshRevisionProfileInner() { + private MeshRevisionProfileInner() { } /** @@ -58,17 +58,6 @@ public MeshRevisionProfileProperties properties() { return this.properties; } - /** - * Set the properties property: Mesh revision profile properties for a mesh. - * - * @param properties the properties value to set. - * @return the MeshRevisionProfileInner object itself. - */ - public MeshRevisionProfileInner withProperties(MeshRevisionProfileProperties properties) { - this.properties = properties; - return this; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshUpgradeProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshUpgradeProfileInner.java index 0796a76591cb..d628a34b7d8b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshUpgradeProfileInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshUpgradeProfileInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * Upgrade profile for given mesh. */ -@Fluent +@Immutable public final class MeshUpgradeProfileInner extends ProxyResource { /* * Mesh upgrade profile properties for a major.minor release. @@ -46,7 +46,7 @@ public final class MeshUpgradeProfileInner extends ProxyResource { /** * Creates an instance of MeshUpgradeProfileInner class. */ - public MeshUpgradeProfileInner() { + private MeshUpgradeProfileInner() { } /** @@ -58,17 +58,6 @@ public MeshUpgradeProfileProperties properties() { return this.properties; } - /** - * Set the properties property: Mesh upgrade profile properties for a major.minor release. - * - * @param properties the properties value to set. - * @return the MeshUpgradeProfileInner object itself. - */ - public MeshUpgradeProfileInner withProperties(MeshUpgradeProfileProperties properties) { - this.properties = properties; - return this; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueDisplay.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueDisplay.java index 099e1ac25d68..787e825f9bd3 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueDisplay.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueDisplay.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; @@ -39,7 +39,7 @@ public final class OperationValueDisplay implements JsonSerializable { /* * The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. @@ -31,7 +31,7 @@ public final class OutboundEnvironmentEndpointInner implements JsonSerializable< /** * Creates an instance of OutboundEnvironmentEndpointInner class. */ - public OutboundEnvironmentEndpointInner() { + private OutboundEnvironmentEndpointInner() { } /** @@ -44,18 +44,6 @@ public String category() { return this.category; } - /** - * Set the category property: The category of endpoints accessed by the AKS agent node, e.g. - * azure-resource-management, apiserver, etc. - * - * @param category the category value to set. - * @return the OutboundEnvironmentEndpointInner object itself. - */ - public OutboundEnvironmentEndpointInner withCategory(String category) { - this.category = category; - return this; - } - /** * Get the endpoints property: The endpoints that AKS agent nodes connect to. * @@ -65,17 +53,6 @@ public List endpoints() { return this.endpoints; } - /** - * Set the endpoints property: The endpoints that AKS agent nodes connect to. - * - * @param endpoints the endpoints value to set. - * @return the OutboundEnvironmentEndpointInner object itself. - */ - public OutboundEnvironmentEndpointInner withEndpoints(List endpoints) { - this.endpoints = endpoints; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionInner.java index d6598faf679b..6e8c92a4a69d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionListResultInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionListResultInner.java index 3d5b7a349f39..dc9d46adfcba 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionListResultInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionListResultInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * A list of private endpoint connections. */ -@Fluent +@Immutable public final class PrivateEndpointConnectionListResultInner implements JsonSerializable { /* @@ -26,7 +26,7 @@ public final class PrivateEndpointConnectionListResultInner /** * Creates an instance of PrivateEndpointConnectionListResultInner class. */ - public PrivateEndpointConnectionListResultInner() { + private PrivateEndpointConnectionListResultInner() { } /** @@ -38,17 +38,6 @@ public List value() { return this.value; } - /** - * Set the value property: The collection value. - * - * @param value the value value to set. - * @return the PrivateEndpointConnectionListResultInner object itself. - */ - public PrivateEndpointConnectionListResultInner withValue(List value) { - this.value = value; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionProperties.java index 1ba3b3f5c011..70eda5ab289f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourceInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourceInner.java index 92cfef3b82e8..0087f2adfd08 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourceInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourceInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourcesListResultInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourcesListResultInner.java index 5d38ebfc0410..47cc7eba30f3 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourcesListResultInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourcesListResultInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * A list of private link resources. */ -@Fluent +@Immutable public final class PrivateLinkResourcesListResultInner implements JsonSerializable { /* @@ -26,7 +26,7 @@ public final class PrivateLinkResourcesListResultInner /** * Creates an instance of PrivateLinkResourcesListResultInner class. */ - public PrivateLinkResourcesListResultInner() { + private PrivateLinkResourcesListResultInner() { } /** @@ -38,17 +38,6 @@ public List value() { return this.value; } - /** - * Set the value property: The collection value. - * - * @param value the value value to set. - * @return the PrivateLinkResourcesListResultInner object itself. - */ - public PrivateLinkResourcesListResultInner withValue(List value) { - this.value = value; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/RunCommandResultInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/RunCommandResultInner.java index 17d578d3da75..d9383493bb8f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/RunCommandResultInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/RunCommandResultInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.fluent.models; @@ -30,7 +30,7 @@ public final class RunCommandResultInner implements JsonSerializable> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("agentPoolName") String agentPoolName, @HeaderParam("if-match") String ifMatch, - @HeaderParam("if-none-match") String ifNoneMatch, @BodyParam("application/json") AgentPoolInner parameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("if-none-match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") AgentPoolInner parameters, + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("agentPoolName") String agentPoolName, @QueryParam("ignore-pod-disruption-budget") Boolean ignorePodDisruptionBudget, - @HeaderParam("if-match") String ifMatch, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("if-match") String ifMatch, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/abort") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> abortLatestOperation(@HostParam("$host") String endpoint, + Mono>> abortLatestOperation(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); + @PathParam("agentPoolName") String agentPoolName, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteMachines(@HostParam("$host") String endpoint, + Mono>> deleteMachines(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("agentPoolName") String agentPoolName, - @BodyParam("application/json") AgentPoolDeleteMachinesParameter machines, - @HeaderParam("Accept") String accept, Context context); + @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") AgentPoolDeleteMachinesParameter machines, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> upgradeNodeImageVersion(@HostParam("$host") String endpoint, + Mono>> upgradeNodeImageVersion(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getUpgradeProfile(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> getAvailableAgentPoolVersions( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getAvailableAgentPoolVersions( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> getUpgradeProfile(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of agent pools in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of agent pools in the specified managed cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of agent pools in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of agent pools in the specified managed cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String resourceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of agent pools in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of agent pools in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String resourceName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of agent pools in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String resourceName) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceName)); - } - - /** - * Gets a list of agent pools in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String resourceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -481,11 +340,12 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, ifMatch, ifNoneMatch, - parameters, accept, context)) + contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -531,11 +391,12 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, ifMatch, ifNoneMatch, - parameters, accept, context); + contentType, accept, parameters, context); } /** @@ -799,11 +660,10 @@ public Mono>> deleteWithResponseAsync(String resourceG if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, - ignorePodDisruptionBudget, ifMatch, accept, context)) + ignorePodDisruptionBudget, ifMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -843,10 +703,9 @@ private Mono>> deleteWithResponseAsync(String resource if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch, accept, context); + resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch, context); } /** @@ -986,83 +845,223 @@ public Mono deleteAsync(String resourceGroupName, String resourceName, Str } /** - * Deletes an agent pool in the specified managed cluster. + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String resourceName, String agentPoolName) { + final Boolean ignorePodDisruptionBudget = null; + final String ifMatch = null; + return beginDeleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String agentPoolName, + Boolean ignorePodDisruptionBudget, String ifMatch, Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String agentPoolName) { + final Boolean ignorePodDisruptionBudget = null; + final String ifMatch = null; + deleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch).block(); + } + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param ifMatch The request should only proceed if an entity matches this string. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String agentPoolName, + Boolean ignorePodDisruptionBudget, String ifMatch, Context context) { + deleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch, context) + .block(); + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of agent pools in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String resourceName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of agent pools in the specified managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String resourceName, String agentPoolName) { - final Boolean ignorePodDisruptionBudget = null; - final String ifMatch = null; - return beginDeleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch) - .last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Deletes an agent pool in the specified managed cluster. + * Gets a list of agent pools in the specified managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. - * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName, String agentPoolName, - Boolean ignorePodDisruptionBudget, String ifMatch, Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch, - context).last().flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String resourceName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Deletes an agent pool in the specified managed cluster. + * Gets a list of agent pools in the specified managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String agentPoolName) { - final Boolean ignorePodDisruptionBudget = null; - final String ifMatch = null; - deleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName)); } /** - * Deletes an agent pool in the specified managed cluster. + * Gets a list of agent pools in the specified managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. - * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of agent pools in the specified managed cluster as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String agentPoolName, - Boolean ignorePodDisruptionBudget, String ifMatch, Context context) { - deleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, ifMatch, context) - .block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); } /** @@ -1101,10 +1100,9 @@ public Mono>> abortLatestOperationWithResponseAsync(St if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.abortLatestOperation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1145,10 +1143,9 @@ private Mono>> abortLatestOperationWithResponseAsync(S if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String accept = "application/json"; context = this.client.mergeContext(context); return service.abortLatestOperation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, accept, context); + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, context); } /** @@ -1367,10 +1364,10 @@ public Mono>> deleteMachinesWithResponseAsync(String r } else { machines.validate(); } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil .withContext(context -> service.deleteMachines(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, machines, accept, + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, contentType, machines, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1414,10 +1411,11 @@ private Mono>> deleteMachinesWithResponseAsync(String } else { machines.validate(); } - final String accept = "application/json"; + final String contentType = "application/json"; context = this.client.mergeContext(context); return service.deleteMachines(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, machines, accept, context); + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, contentType, machines, + context); } /** @@ -1589,7 +1587,7 @@ public void deleteMachines(String resourceGroupName, String resourceName, String * @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 body along with {@link Response} on successful completion of {@link Mono}. + * @return agent Pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> upgradeNodeImageVersionWithResponseAsync(String resourceGroupName, @@ -1634,7 +1632,7 @@ public Mono>> upgradeNodeImageVersionWithResponseAsync * @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 body along with {@link Response} on successful completion of {@link Mono}. + * @return agent Pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> upgradeNodeImageVersionWithResponseAsync(String resourceGroupName, @@ -1676,15 +1674,15 @@ private Mono>> upgradeNodeImageVersionWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of agent Pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, AgentPoolInner> - beginUpgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, String agentPoolName) { + public PollerFlux, Void> beginUpgradeNodeImageVersionAsync(String resourceGroupName, + String resourceName, String agentPoolName) { Mono>> mono = upgradeNodeImageVersionWithResponseAsync(resourceGroupName, resourceName, agentPoolName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - AgentPoolInner.class, AgentPoolInner.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** @@ -1701,16 +1699,16 @@ private Mono>> upgradeNodeImageVersionWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of agent Pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AgentPoolInner> beginUpgradeNodeImageVersionAsync( - String resourceGroupName, String resourceName, String agentPoolName, Context context) { + private PollerFlux, Void> beginUpgradeNodeImageVersionAsync(String resourceGroupName, + String resourceName, String agentPoolName, Context context) { context = this.client.mergeContext(context); Mono>> mono = upgradeNodeImageVersionWithResponseAsync(resourceGroupName, resourceName, agentPoolName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - AgentPoolInner.class, AgentPoolInner.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** @@ -1726,10 +1724,10 @@ private PollerFlux, AgentPoolInner> beginUpgradeNodeI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of agent Pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AgentPoolInner> beginUpgradeNodeImageVersion(String resourceGroupName, + public SyncPoller, Void> beginUpgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName) { return this.beginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).getSyncPoller(); } @@ -1748,10 +1746,10 @@ public SyncPoller, AgentPoolInner> beginUpgradeNodeIm * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of agent Pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AgentPoolInner> beginUpgradeNodeImageVersion(String resourceGroupName, + public SyncPoller, Void> beginUpgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName, Context context) { return this.beginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName, context) .getSyncPoller(); @@ -1770,10 +1768,10 @@ public SyncPoller, AgentPoolInner> beginUpgradeNodeIm * @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 body on successful completion of {@link Mono}. + * @return agent Pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono upgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, + public Mono upgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, String agentPoolName) { return beginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).last() .flatMap(this.client::getLroFinalResultOrError); @@ -1793,11 +1791,11 @@ public Mono upgradeNodeImageVersionAsync(String resourceGroupNam * @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 body on successful completion of {@link Mono}. + * @return agent Pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono upgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, - String agentPoolName, Context context) { + private Mono upgradeNodeImageVersionAsync(String resourceGroupName, String resourceName, String agentPoolName, + Context context) { return beginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1815,11 +1813,10 @@ private Mono upgradeNodeImageVersionAsync(String resourceGroupNa * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AgentPoolInner upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName) { - return upgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).block(); + public void upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName) { + upgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).block(); } /** @@ -1836,29 +1833,32 @@ public AgentPoolInner upgradeNodeImageVersion(String resourceGroupName, String r * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AgentPoolInner upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName, + public void upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName, Context context) { - return upgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName, context).block(); + upgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName, context).block(); } /** - * Gets the upgrade profile for an agent pool. + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. * @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 upgrade profile for an agent pool along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getUpgradeProfileWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName) { + public Mono> + getAvailableAgentPoolVersionsWithResponseAsync(String resourceGroupName, String resourceName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1874,32 +1874,34 @@ public Mono> getUpgradeProfileWithRespons if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, accept, context)) + .withContext( + context -> service.getAvailableAgentPoolVersions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the upgrade profile for an agent pool. + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. * @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 upgrade profile for an agent pool along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getUpgradeProfileWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName, Context context) { + private Mono> + getAvailableAgentPoolVersionsWithResponseAsync(String resourceGroupName, String resourceName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1915,85 +1917,95 @@ private Mono> getUpgradeProfileWithRespon if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, accept, context); + return service.getAvailableAgentPoolVersions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); } /** - * Gets the upgrade profile for an agent pool. + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. * @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 upgrade profile for an agent pool on successful completion of {@link Mono}. + * @return a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getUpgradeProfileAsync(String resourceGroupName, String resourceName, - String agentPoolName) { - return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, agentPoolName) + public Mono getAvailableAgentPoolVersionsAsync(String resourceGroupName, + String resourceName) { + return getAvailableAgentPoolVersionsWithResponseAsync(resourceGroupName, resourceName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets the upgrade profile for an agent pool. + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. * @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 upgrade profile for an agent pool along with {@link Response}. + * @return a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getUpgradeProfileWithResponse(String resourceGroupName, - String resourceName, String agentPoolName, Context context) { - return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, agentPoolName, context).block(); + public Response getAvailableAgentPoolVersionsWithResponse(String resourceGroupName, + String resourceName, Context context) { + return getAvailableAgentPoolVersionsWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** - * Gets the upgrade profile for an agent pool. + * Gets a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. * @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 upgrade profile for an agent pool. + * @return a list of supported Kubernetes versions for the specified agent pool. + * + * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more + * details about the version lifecycle. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AgentPoolUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName, - String agentPoolName) { - return getUpgradeProfileWithResponse(resourceGroupName, resourceName, agentPoolName, Context.NONE).getValue(); + public AgentPoolAvailableVersionsInner getAvailableAgentPoolVersions(String resourceGroupName, + String resourceName) { + return getAvailableAgentPoolVersionsWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } /** - * Gets a list of supported Kubernetes versions for the specified agent pool. - * - * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more - * details about the version lifecycle. + * Gets the upgrade profile for an agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. * @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 list of available versions for an agent pool along with {@link Response} on successful completion of + * @return the upgrade profile for an agent pool along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - getAvailableAgentPoolVersionsWithResponseAsync(String resourceGroupName, String resourceName) { + public Mono> getUpgradeProfileWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2009,32 +2021,32 @@ public AgentPoolUpgradeProfileInner getUpgradeProfile(String resourceGroupName, if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.getAvailableAgentPoolVersions(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .withContext(context -> service.getUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of supported Kubernetes versions for the specified agent pool. - * - * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more - * details about the version lifecycle. + * Gets the upgrade profile for an agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. * @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 list of available versions for an agent pool along with {@link Response} on successful completion of + * @return the upgrade profile for an agent pool along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getAvailableAgentPoolVersionsWithResponseAsync(String resourceGroupName, String resourceName, Context context) { + private Mono> getUpgradeProfileWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2050,69 +2062,66 @@ public AgentPoolUpgradeProfileInner getUpgradeProfile(String resourceGroupName, if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getAvailableAgentPoolVersions(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + return service.getUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, accept, context); } /** - * Gets a list of supported Kubernetes versions for the specified agent pool. - * - * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more - * details about the version lifecycle. + * Gets the upgrade profile for an agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. * @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 list of available versions for an agent pool on successful completion of {@link Mono}. + * @return the upgrade profile for an agent pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAvailableAgentPoolVersionsAsync(String resourceGroupName, - String resourceName) { - return getAvailableAgentPoolVersionsWithResponseAsync(resourceGroupName, resourceName) + public Mono getUpgradeProfileAsync(String resourceGroupName, String resourceName, + String agentPoolName) { + return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, agentPoolName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of supported Kubernetes versions for the specified agent pool. - * - * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more - * details about the version lifecycle. + * Gets the upgrade profile for an agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. * @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 list of available versions for an agent pool along with {@link Response}. + * @return the upgrade profile for an agent pool along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAvailableAgentPoolVersionsWithResponse(String resourceGroupName, - String resourceName, Context context) { - return getAvailableAgentPoolVersionsWithResponseAsync(resourceGroupName, resourceName, context).block(); + public Response getUpgradeProfileWithResponse(String resourceGroupName, + String resourceName, String agentPoolName, Context context) { + return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, agentPoolName, context).block(); } /** - * Gets a list of supported Kubernetes versions for the specified agent pool. - * - * See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more - * details about the version lifecycle. + * Gets the upgrade profile for an agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. * @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 list of available versions for an agent pool. + * @return the upgrade profile for an agent pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AgentPoolAvailableVersionsInner getAvailableAgentPoolVersions(String resourceGroupName, - String resourceName) { - return getAvailableAgentPoolVersionsWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + public AgentPoolUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName, + String agentPoolName) { + return getUpgradeProfileWithResponse(resourceGroupName, resourceName, agentPoolName, Context.NONE).getValue(); } /** diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientBuilder.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientBuilder.java index 70114c534bc8..967217c30e07 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientBuilder.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.implementation; @@ -20,34 +20,34 @@ @ServiceClientBuilder(serviceClients = { ContainerServiceManagementClientImpl.class }) public final class ContainerServiceManagementClientBuilder { /* - * The ID of the target subscription. The value must be an UUID. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. The value must be an UUID. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. + * @param endpoint the endpoint value. * @return the ContainerServiceManagementClientBuilder. */ - public ContainerServiceManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public ContainerServiceManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. + * @param subscriptionId the subscriptionId value. * @return the ContainerServiceManagementClientBuilder. */ - public ContainerServiceManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public ContainerServiceManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -132,7 +132,7 @@ public ContainerServiceManagementClientImpl buildClient() { ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); ContainerServiceManagementClientImpl client = new ContainerServiceManagementClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java index bcfaad3533ce..184e918422b5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.implementation; @@ -31,26 +31,12 @@ public final class ContainerServiceManagementClientImpl extends AzureServiceClient implements ContainerServiceManagementClient { /** - * The ID of the target subscription. The value must be an UUID. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. + * Service host. */ private final String endpoint; /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ @@ -59,12 +45,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -72,6 +58,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -115,17 +115,17 @@ public Duration getDefaultPollInterval() { } /** - * The OperationsClient object to access its operations. + * The AgentPoolsClient object to access its operations. */ - private final OperationsClient operations; + private final AgentPoolsClient agentPools; /** - * Gets the OperationsClient object to access its operations. + * Gets the AgentPoolsClient object to access its operations. * - * @return the OperationsClient object. + * @return the AgentPoolsClient object. */ - public OperationsClient getOperations() { - return this.operations; + public AgentPoolsClient getAgentPools() { + return this.agentPools; } /** @@ -143,101 +143,101 @@ public ManagedClustersClient getManagedClusters() { } /** - * The TrustedAccessRolesClient object to access its operations. + * The MaintenanceConfigurationsClient object to access its operations. */ - private final TrustedAccessRolesClient trustedAccessRoles; + private final MaintenanceConfigurationsClient maintenanceConfigurations; /** - * Gets the TrustedAccessRolesClient object to access its operations. + * Gets the MaintenanceConfigurationsClient object to access its operations. * - * @return the TrustedAccessRolesClient object. + * @return the MaintenanceConfigurationsClient object. */ - public TrustedAccessRolesClient getTrustedAccessRoles() { - return this.trustedAccessRoles; + public MaintenanceConfigurationsClient getMaintenanceConfigurations() { + return this.maintenanceConfigurations; } /** - * The SnapshotsClient object to access its operations. + * The ManagedNamespacesClient object to access its operations. */ - private final SnapshotsClient snapshots; + private final ManagedNamespacesClient managedNamespaces; /** - * Gets the SnapshotsClient object to access its operations. + * Gets the ManagedNamespacesClient object to access its operations. * - * @return the SnapshotsClient object. + * @return the ManagedNamespacesClient object. */ - public SnapshotsClient getSnapshots() { - return this.snapshots; + public ManagedNamespacesClient getManagedNamespaces() { + return this.managedNamespaces; } /** - * The AgentPoolsClient object to access its operations. + * The MachinesClient object to access its operations. */ - private final AgentPoolsClient agentPools; + private final MachinesClient machines; /** - * Gets the AgentPoolsClient object to access its operations. + * Gets the MachinesClient object to access its operations. * - * @return the AgentPoolsClient object. + * @return the MachinesClient object. */ - public AgentPoolsClient getAgentPools() { - return this.agentPools; + public MachinesClient getMachines() { + return this.machines; } /** - * The MachinesClient object to access its operations. + * The PrivateEndpointConnectionsClient object to access its operations. */ - private final MachinesClient machines; + private final PrivateEndpointConnectionsClient privateEndpointConnections; /** - * Gets the MachinesClient object to access its operations. + * Gets the PrivateEndpointConnectionsClient object to access its operations. * - * @return the MachinesClient object. + * @return the PrivateEndpointConnectionsClient object. */ - public MachinesClient getMachines() { - return this.machines; + public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { + return this.privateEndpointConnections; } /** - * The MaintenanceConfigurationsClient object to access its operations. + * The SnapshotsClient object to access its operations. */ - private final MaintenanceConfigurationsClient maintenanceConfigurations; + private final SnapshotsClient snapshots; /** - * Gets the MaintenanceConfigurationsClient object to access its operations. + * Gets the SnapshotsClient object to access its operations. * - * @return the MaintenanceConfigurationsClient object. + * @return the SnapshotsClient object. */ - public MaintenanceConfigurationsClient getMaintenanceConfigurations() { - return this.maintenanceConfigurations; + public SnapshotsClient getSnapshots() { + return this.snapshots; } /** - * The ManagedNamespacesClient object to access its operations. + * The TrustedAccessRoleBindingsClient object to access its operations. */ - private final ManagedNamespacesClient managedNamespaces; + private final TrustedAccessRoleBindingsClient trustedAccessRoleBindings; /** - * Gets the ManagedNamespacesClient object to access its operations. + * Gets the TrustedAccessRoleBindingsClient object to access its operations. * - * @return the ManagedNamespacesClient object. + * @return the TrustedAccessRoleBindingsClient object. */ - public ManagedNamespacesClient getManagedNamespaces() { - return this.managedNamespaces; + public TrustedAccessRoleBindingsClient getTrustedAccessRoleBindings() { + return this.trustedAccessRoleBindings; } /** - * The PrivateEndpointConnectionsClient object to access its operations. + * The OperationsClient object to access its operations. */ - private final PrivateEndpointConnectionsClient privateEndpointConnections; + private final OperationsClient operations; /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the PrivateEndpointConnectionsClient object. + * @return the OperationsClient object. */ - public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { - return this.privateEndpointConnections; + public OperationsClient getOperations() { + return this.operations; } /** @@ -269,17 +269,17 @@ public ResolvePrivateLinkServiceIdsClient getResolvePrivateLinkServiceIds() { } /** - * The TrustedAccessRoleBindingsClient object to access its operations. + * The TrustedAccessRolesClient object to access its operations. */ - private final TrustedAccessRoleBindingsClient trustedAccessRoleBindings; + private final TrustedAccessRolesClient trustedAccessRoles; /** - * Gets the TrustedAccessRoleBindingsClient object to access its operations. + * Gets the TrustedAccessRolesClient object to access its operations. * - * @return the TrustedAccessRoleBindingsClient object. + * @return the TrustedAccessRolesClient object. */ - public TrustedAccessRoleBindingsClient getTrustedAccessRoleBindings() { - return this.trustedAccessRoleBindings; + public TrustedAccessRolesClient getTrustedAccessRoles() { + return this.trustedAccessRoles; } /** @@ -289,29 +289,29 @@ public TrustedAccessRoleBindingsClient getTrustedAccessRoleBindings() { * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. + * @param endpoint Service host. * @param subscriptionId The ID of the target subscription. The value must be an UUID. - * @param endpoint server parameter. */ ContainerServiceManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { super(httpPipeline, serializerAdapter, environment); this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2025-10-01"; - this.operations = new OperationsClientImpl(this); - this.managedClusters = new ManagedClustersClientImpl(this); - this.trustedAccessRoles = new TrustedAccessRolesClientImpl(this); - this.snapshots = new SnapshotsClientImpl(this); + this.subscriptionId = subscriptionId; + this.apiVersion = "2026-01-01"; this.agentPools = new AgentPoolsClientImpl(this); - this.machines = new MachinesClientImpl(this); + this.managedClusters = new ManagedClustersClientImpl(this); this.maintenanceConfigurations = new MaintenanceConfigurationsClientImpl(this); this.managedNamespaces = new ManagedNamespacesClientImpl(this); + this.machines = new MachinesClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); + this.snapshots = new SnapshotsClientImpl(this); + this.trustedAccessRoleBindings = new TrustedAccessRoleBindingsClientImpl(this); + this.operations = new OperationsClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.resolvePrivateLinkServiceIds = new ResolvePrivateLinkServiceIdsClientImpl(this); - this.trustedAccessRoleBindings = new TrustedAccessRoleBindingsClientImpl(this); + this.trustedAccessRoles = new TrustedAccessRolesClientImpl(this); } } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java index 41d6203753d4..b04845e1f389 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.containerservice.fluent.MachinesClient; import com.azure.resourcemanager.containerservice.fluent.models.MachineInner; -import com.azure.resourcemanager.containerservice.models.MachineListResult; +import com.azure.resourcemanager.containerservice.implementation.models.MachineListResult; import reactor.core.publisher.Mono; /** @@ -58,51 +58,52 @@ public final class MachinesClientImpl implements MachinesClient { * The interface defining all the services for ContainerServiceManagementClientMachines to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerServiceManagementClientMachines") public interface MachinesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); + @PathParam("agentPoolName") String agentPoolName, @PathParam("machineName") String machineName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("agentPoolName") String agentPoolName, @PathParam("machineName") String machineName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a list of machines in the specified agent pool. + * Get a specific machine in the specified agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of machines in the specified agent pool along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a specific machine in the specified agent pool along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String resourceName, - String agentPoolName) { + public Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName, String machineName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -121,31 +122,34 @@ private Mono> listSinglePageAsync(String resourceGro if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } + if (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, machineName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of machines in the specified agent pool. + * Get a specific machine in the specified agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of machines in the specified agent pool along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a specific machine in the specified agent pool along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String resourceName, - String agentPoolName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName, String machineName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -164,65 +168,68 @@ private Mono> listSinglePageAsync(String resourceGro if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } + if (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, agentPoolName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, agentPoolName, machineName, accept, context); } /** - * Gets a list of machines in the specified agent pool. + * Get a specific machine in the specified agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of machines in the specified agent pool as paginated response with {@link PagedFlux}. + * @return a specific machine in the specified agent pool on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String resourceName, String agentPoolName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, agentPoolName), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String resourceName, String agentPoolName, + String machineName) { + return getWithResponseAsync(resourceGroupName, resourceName, agentPoolName, machineName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of machines in the specified agent pool. + * Get a specific machine in the specified agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of machines in the specified agent pool as paginated response with {@link PagedFlux}. + * @return a specific machine in the specified agent pool along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String resourceName, String agentPoolName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, agentPoolName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, agentPoolName, machineName, context).block(); } /** - * Gets a list of machines in the specified agent pool. + * Get a specific machine in the specified agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of machines in the specified agent pool as paginated response with {@link PagedIterable}. + * @return a specific machine in the specified agent pool. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String resourceName, String agentPoolName) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceName, agentPoolName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public MachineInner get(String resourceGroupName, String resourceName, String agentPoolName, String machineName) { + return getWithResponse(resourceGroupName, resourceName, agentPoolName, machineName, Context.NONE).getValue(); } /** @@ -231,34 +238,15 @@ public PagedIterable list(String resourceGroupName, String resourc * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of machines in the specified agent pool as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String resourceName, String agentPoolName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceName, agentPoolName, context)); - } - - /** - * Get a specific machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific machine in the specified agent pool along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of machines in the specified agent pool along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String resourceName, - String agentPoolName, String machineName) { + private Mono> listSinglePageAsync(String resourceGroupName, String resourceName, + String agentPoolName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -277,34 +265,31 @@ public Mono> getWithResponseAsync(String resourceGroupNam if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - if (machineName == null) { - return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, machineName, accept, - context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a specific machine in the specified agent pool. + * Gets a list of machines in the specified agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific machine in the specified agent pool along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of machines in the specified agent pool along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, - String agentPoolName, String machineName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String resourceName, + String agentPoolName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -323,68 +308,83 @@ private Mono> getWithResponseAsync(String resourceGroupNa if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - if (machineName == null) { - return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, agentPoolName, machineName, accept, context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, agentPoolName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Get a specific machine in the specified agent pool. + * Gets a list of machines in the specified agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific machine in the specified agent pool on successful completion of {@link Mono}. + * @return a list of machines in the specified agent pool as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String resourceName, String agentPoolName, - String machineName) { - return getWithResponseAsync(resourceGroupName, resourceName, agentPoolName, machineName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String resourceName, String agentPoolName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, agentPoolName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get a specific machine in the specified agent pool. + * Gets a list of machines in the specified agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific machine in the specified agent pool along with {@link Response}. + * @return a list of machines in the specified agent pool as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String resourceName, String agentPoolName, - String machineName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, agentPoolName, machineName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String resourceName, String agentPoolName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, agentPoolName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Get a specific machine in the specified agent pool. + * Gets a list of machines in the specified agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific machine in the specified agent pool. + * @return a list of machines in the specified agent pool as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MachineInner get(String resourceGroupName, String resourceName, String agentPoolName, String machineName) { - return getWithResponse(resourceGroupName, resourceName, agentPoolName, machineName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName, String agentPoolName) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName, agentPoolName)); + } + + /** + * Gets a list of machines in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of machines in the specified agent pool as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName, String agentPoolName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName, agentPoolName, context)); } /** diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java index 9b1c74156581..645adcb953af 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.implementation; @@ -30,7 +30,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.containerservice.fluent.MaintenanceConfigurationsClient; import com.azure.resourcemanager.containerservice.fluent.models.MaintenanceConfigurationInner; -import com.azure.resourcemanager.containerservice.models.MaintenanceConfigurationListResult; +import com.azure.resourcemanager.containerservice.implementation.models.MaintenanceConfigurationListResult; import reactor.core.publisher.Mono; /** @@ -62,205 +62,55 @@ public final class MaintenanceConfigurationsClientImpl implements MaintenanceCon * The interface defining all the services for ContainerServiceManagementClientMaintenanceConfigurations to be used * by the proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerServiceManagementClientMaintenanceConfigurations") public interface MaintenanceConfigurationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByManagedCluster(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("configName") String configName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("configName") String configName, - @BodyParam("application/json") MaintenanceConfigurationInner parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("configName") String configName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") MaintenanceConfigurationInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("configName") String configName, @HeaderParam("Accept") String accept, Context context); + @PathParam("configName") String configName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedCluster(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByManagedClusterNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * Gets a list of maintenance configurations in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of maintenance configurations in the specified managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByManagedClusterSinglePageAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of maintenance configurations in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of maintenance configurations in the specified managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByManagedClusterSinglePageAsync(String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of maintenance configurations in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of maintenance configurations in the specified managed cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByManagedClusterAsync(String resourceGroupName, - String resourceName) { - return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), - nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of maintenance configurations in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of maintenance configurations in the specified managed cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByManagedClusterAsync(String resourceGroupName, - String resourceName, Context context) { - return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), - nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of maintenance configurations in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of maintenance configurations in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedCluster(String resourceGroupName, - String resourceName) { - return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); - } - - /** - * Gets a list of maintenance configurations in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of maintenance configurations in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedCluster(String resourceGroupName, - String resourceName, Context context) { - return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); - } - /** * Gets the specified maintenance configuration of a managed cluster. * @@ -438,11 +288,12 @@ public Mono> createOrUpdateWithResponseA } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, configName, parameters, accept, - context)) + this.client.getSubscriptionId(), resourceGroupName, resourceName, configName, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -487,10 +338,12 @@ private Mono> createOrUpdateWithResponse } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, configName, parameters, accept, context); + this.client.getSubscriptionId(), resourceGroupName, resourceName, configName, contentType, accept, + parameters, context); } /** @@ -589,10 +442,9 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St if (configName == null) { return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, configName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, resourceName, configName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -630,10 +482,9 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (configName == null) { return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); } - final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, configName, accept, context); + resourceGroupName, resourceName, configName, context); } /** @@ -688,6 +539,155 @@ public void delete(String resourceGroupName, String resourceName, String configN deleteWithResponse(resourceGroupName, resourceName, configName, Context.NONE); } + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByManagedClusterSinglePageAsync(String resourceGroupName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByManagedClusterSinglePageAsync(String resourceGroupName, String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByManagedClusterAsync(String resourceGroupName, + String resourceName) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByManagedClusterAsync(String resourceGroupName, + String resourceName, Context context) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, + String resourceName) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); + } + + /** + * Gets a list of maintenance configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of maintenance configurations in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, + String resourceName, Context context) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); + } + /** * Get the next page of items. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java index 75c29684f314..8329456913d3 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.implementation; @@ -43,14 +43,14 @@ import com.azure.resourcemanager.containerservice.fluent.models.MeshUpgradeProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.OutboundEnvironmentEndpointInner; import com.azure.resourcemanager.containerservice.fluent.models.RunCommandResultInner; +import com.azure.resourcemanager.containerservice.implementation.models.ManagedClusterListResult; +import com.azure.resourcemanager.containerservice.implementation.models.MeshRevisionProfileList; +import com.azure.resourcemanager.containerservice.implementation.models.MeshUpgradeProfileList; +import com.azure.resourcemanager.containerservice.implementation.models.OutboundEnvironmentEndpointCollection; import com.azure.resourcemanager.containerservice.models.Format; import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterListResult; import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; import com.azure.resourcemanager.containerservice.models.ManagedClustersGetCommandResultResponse; -import com.azure.resourcemanager.containerservice.models.MeshRevisionProfileList; -import com.azure.resourcemanager.containerservice.models.MeshUpgradeProfileList; -import com.azure.resourcemanager.containerservice.models.OutboundEnvironmentEndpointCollection; import com.azure.resourcemanager.containerservice.models.RunCommandRequest; import com.azure.resourcemanager.containerservice.models.TagsObject; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; @@ -90,254 +90,253 @@ public final class ManagedClustersClientImpl implements InnerSupportsGet> listKubernetesVersions(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listMeshRevisionProfiles(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("if-match") String ifMatch, @HeaderParam("if-none-match") String ifNoneMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ManagedClusterInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles/{mode}") - @ExpectedResponses({ 200 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getMeshRevisionProfile(@HostParam("$host") String endpoint, + Mono>> updateTags(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @PathParam("mode") String mode, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("if-match") String ifMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") TagsObject parameters, + Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("if-match") String ifMatch, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") - @ExpectedResponses({ 200, 201 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono> getAccessProfile(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("if-match") String ifMatch, @HeaderParam("if-none-match") String ifNoneMatch, - @BodyParam("application/json") ManagedClusterInner parameters, @HeaderParam("Accept") String accept, - Context context); + @PathParam("roleName") String roleName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") - @ExpectedResponses({ 200, 202 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateTags(@HostParam("$host") String endpoint, + Mono> listClusterAdminCredentials(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("if-match") String ifMatch, @BodyParam("application/json") TagsObject parameters, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("server-fqdn") String serverFqdn, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}") - @ExpectedResponses({ 202, 204 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono> listClusterUserCredentials(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("if-match") String ifMatch, @HeaderParam("Accept") String accept, Context context); + @QueryParam("server-fqdn") String serverFqdn, @QueryParam("format") Format format, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/abort") - @ExpectedResponses({ 202, 204 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> abortLatestOperation(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listClusterMonitoringUserCredentials( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("server-fqdn") String serverFqdn, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getAccessProfile(@HostParam("$host") String endpoint, + Mono>> resetServicePrincipalProfile(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("roleName") String roleName, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") ManagedClusterServicePrincipalProfile parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}") + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono getCommandResult(@HostParam("$host") String endpoint, + Mono>> resetAADProfile(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("commandId") String commandId, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") ManagedClusterAadProfile parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listClusterAdminCredentials(@HostParam("$host") String endpoint, + Mono>> rotateClusterCertificates(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @QueryParam("server-fqdn") String serverFqdn, @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/abort") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listClusterMonitoringUserCredentials(@HostParam("$host") String endpoint, + Mono>> abortLatestOperation(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @QueryParam("server-fqdn") String serverFqdn, @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listClusterUserCredentials(@HostParam("$host") String endpoint, + Mono>> rotateServiceAccountSigningKeys(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @QueryParam("server-fqdn") String serverFqdn, @QueryParam("format") Format format, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listMeshUpgradeProfiles(@HostParam("$host") String endpoint, + Mono>> stop(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles/{mode}") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getMeshUpgradeProfile(@HostParam("$host") String endpoint, + Mono>> start(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("mode") String mode, @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints") - @ExpectedResponses({ 200 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listOutboundNetworkDependenciesEndpoints( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono>> runCommand(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RunCommandRequest requestPayload, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resetAadProfile(@HostParam("$host") String endpoint, + Mono getCommandResult(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @BodyParam("application/json") ManagedClusterAadProfile parameters, @HeaderParam("Accept") String accept, - Context context); + @PathParam("commandId") String commandId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resetServicePrincipalProfile(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listOutboundNetworkDependenciesEndpoints( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @BodyParam("application/json") ManagedClusterServicePrincipalProfile parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates") - @ExpectedResponses({ 202, 204 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> rotateClusterCertificates(@HostParam("$host") String endpoint, + Mono> getUpgradeProfile(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys") - @ExpectedResponses({ 202, 204 }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles/{mode}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> rotateServiceAccountSigningKeys(@HostParam("$host") String endpoint, + Mono> getMeshRevisionProfile(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("location") String location, @PathParam("mode") String mode, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> runCommand(@HostParam("$host") String endpoint, + Mono> listMeshRevisionProfiles(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @BodyParam("application/json") RunCommandRequest requestPayload, @HeaderParam("Accept") String accept, - Context context); + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start") - @ExpectedResponses({ 202, 204 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles/{mode}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start(@HostParam("$host") String endpoint, + Mono> getMeshUpgradeProfile(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("mode") String mode, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop") - @ExpectedResponses({ 202, 204 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> stop(@HostParam("$host") String endpoint, + Mono> listMeshUpgradeProfiles(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/kubernetesVersions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getUpgradeProfile(@HostParam("$host") String endpoint, + Mono> listKubernetesVersions(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listMeshRevisionProfilesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -345,49 +344,47 @@ Mono> listMeshRevisionProfilesNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listOutboundNetworkDependenciesEndpointsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listMeshUpgradeProfilesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listMeshRevisionProfilesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listOutboundNetworkDependenciesEndpointsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listMeshUpgradeProfilesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a list of supported Kubernetes versions in the specified subscription. - * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. + * Gets a managed cluster. * - * @param location The name of the Azure region. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of KubernetesVersion along with {@link Response} on successful - * completion of {@link Mono}. + * @return a managed cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listKubernetesVersionsWithResponseAsync(String location) { + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -396,33 +393,34 @@ public Mono> listKubernetesVersionsWi return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listKubernetesVersions(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of supported Kubernetes versions in the specified subscription. - * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. + * Gets a managed cluster. * - * @param location The name of the Azure region. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of KubernetesVersion along with {@link Response} on successful - * completion of {@link Mono}. + * @return a managed cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKubernetesVersionsWithResponseAsync(String location, - Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -431,83 +429,83 @@ private Mono> listKubernetesVersionsW return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listKubernetesVersions(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, accept, context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); } /** - * Gets a list of supported Kubernetes versions in the specified subscription. - * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. + * Gets a managed cluster. * - * @param location The name of the Azure region. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of KubernetesVersion on successful completion of {@link Mono}. + * @return a managed cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listKubernetesVersionsAsync(String location) { - return listKubernetesVersionsWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of supported Kubernetes versions in the specified subscription. - * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. + * Gets a managed cluster. * - * @param location The name of the Azure region. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of KubernetesVersion along with {@link Response}. + * @return a managed cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKubernetesVersionsWithResponse(String location, + public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context) { - return listKubernetesVersionsWithResponseAsync(location, context).block(); + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** - * Gets a list of supported Kubernetes versions in the specified subscription. - * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. + * Gets a managed cluster. * - * @param location The name of the Azure region. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of KubernetesVersion. + * @return a managed cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public KubernetesVersionListResultInner listKubernetesVersions(String location) { - return listKubernetesVersionsWithResponse(location, Context.NONE).getValue(); + public ManagedClusterInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. + * Creates or updates a managed cluster. * - * @param location The name of the Azure region. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. * @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 holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return managed cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMeshRevisionProfilesSinglePageAsync(String location) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterInner parameters, String ifMatch, String ifNoneMatch) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -516,35 +514,44 @@ private Mono> listMeshRevisionProfilesSi return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listMeshRevisionProfiles(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, ifNoneMatch, contentType, + accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. + * Creates or updates a managed cluster. * - * @param location The name of the Azure region. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. * @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 holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return managed cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMeshRevisionProfilesSinglePageAsync(String location, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterInner parameters, String ifMatch, String ifNoneMatch, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -553,343 +560,254 @@ private Mono> listMeshRevisionProfilesSi return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listMeshRevisionProfiles(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listMeshRevisionProfilesAsync(String location) { - return new PagedFlux<>(() -> listMeshRevisionProfilesSinglePageAsync(location), - nextLink -> listMeshRevisionProfilesNextSinglePageAsync(nextLink)); - } - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listMeshRevisionProfilesAsync(String location, Context context) { - return new PagedFlux<>(() -> listMeshRevisionProfilesSinglePageAsync(location, context), - nextLink -> listMeshRevisionProfilesNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMeshRevisionProfiles(String location) { - return new PagedIterable<>(listMeshRevisionProfilesAsync(location)); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, ifNoneMatch, contentType, accept, + parameters, context); } /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. + * Creates or updates a managed cluster. * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. + * @return the {@link PollerFlux} for polling of managed cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMeshRevisionProfiles(String location, Context context) { - return new PagedIterable<>(listMeshRevisionProfilesAsync(location, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, ManagedClusterInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, ManagedClusterInner parameters, String ifMatch, + String ifNoneMatch) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedClusterInner.class, ManagedClusterInner.class, this.client.getContext()); } /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. + * Creates or updates a managed cluster. * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. * @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 mesh revision profile for a mesh along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of managed cluster. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getMeshRevisionProfileWithResponseAsync(String location, - String mode) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (mode == null) { - return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getMeshRevisionProfile(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), location, mode, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, ManagedClusterInner> + beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, ManagedClusterInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedClusterInner.class, ManagedClusterInner.class, this.client.getContext()); } /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. + * Creates or updates a managed cluster. * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. * @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 mesh revision profile for a mesh along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of managed cluster. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getMeshRevisionProfileWithResponseAsync(String location, - String mode, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (mode == null) { - return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); - } - final String accept = "application/json"; + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ManagedClusterInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, ManagedClusterInner parameters, String ifMatch, + String ifNoneMatch, Context context) { context = this.client.mergeContext(context); - return service.getMeshRevisionProfile(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, mode, accept, context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + parameters, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedClusterInner.class, ManagedClusterInner.class, context); } /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. + * Creates or updates a managed cluster. * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. * @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 mesh revision profile for a mesh on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of managed cluster. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getMeshRevisionProfileAsync(String location, String mode) { - return getMeshRevisionProfileWithResponseAsync(location, mode).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ManagedClusterInner> + beginCreateOrUpdate(String resourceGroupName, String resourceName, ManagedClusterInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch) + .getSyncPoller(); } /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. + * Creates or updates a managed cluster. * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. * @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 mesh revision profile for a mesh along with {@link Response}. + * @return the {@link SyncPoller} for polling of managed cluster. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getMeshRevisionProfileWithResponse(String location, String mode, - Context context) { - return getMeshRevisionProfileWithResponseAsync(location, mode, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ManagedClusterInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, ManagedClusterInner parameters, String ifMatch, + String ifNoneMatch, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch, context) + .getSyncPoller(); } /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. + * Creates or updates a managed cluster. * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. * @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 mesh revision profile for a mesh. + * @return managed cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MeshRevisionProfileInner getMeshRevisionProfile(String location, String mode) { - return getMeshRevisionProfileWithResponse(location, mode, Context.NONE).getValue(); + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + ManagedClusterInner parameters, String ifMatch, String ifNoneMatch) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a list of managed clusters in the specified subscription. + * Creates or updates a managed cluster. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed clusters in the specified subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return managed cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + ManagedClusterInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a list of managed clusters in the specified subscription. + * Creates or updates a managed cluster. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed clusters in the specified subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return managed cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of managed clusters in the specified subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed clusters in the specified subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + ManagedClusterInner parameters, String ifMatch, String ifNoneMatch, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a list of managed clusters in the specified subscription. + * Creates or updates a managed cluster. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed clusters in the specified subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of managed clusters in the specified subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed clusters in the specified subscription as paginated response with - * {@link PagedIterable}. + * @return managed cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterInner createOrUpdate(String resourceGroupName, String resourceName, + ManagedClusterInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return createOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch).block(); } /** - * Gets a list of managed clusters in the specified subscription. + * Creates or updates a managed cluster. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed clusters in the specified subscription as paginated response with - * {@link PagedIterable}. + * @return managed cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterInner createOrUpdate(String resourceGroupName, String resourceName, + ManagedClusterInner parameters, String ifMatch, String ifNoneMatch, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch, context).block(); } /** - * Lists managed clusters in the specified subscription and resource group. + * Updates tags on a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param ifMatch The request should only proceed if an entity matches this string. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a ManagedCluster list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return managed cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + public Mono>> updateTagsWithResponseAsync(String resourceGroupName, String resourceName, + TagsObject parameters, String ifMatch) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -902,29 +820,39 @@ private Mono> listByResourceGroupSinglePageAs return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists managed clusters in the specified subscription and resource group. + * Updates tags on a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a ManagedCluster list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return managed cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { + private Mono>> updateTagsWithResponseAsync(String resourceGroupName, String resourceName, + TagsObject parameters, String ifMatch, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -937,209 +865,232 @@ private Mono> listByResourceGroupSinglePageAs return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, contentType, accept, parameters, + context); } /** - * Lists managed clusters in the specified subscription and resource group. + * Updates tags on a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param ifMatch The request should only proceed if an entity matches this string. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a ManagedCluster list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of managed cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, ManagedClusterInner> + beginUpdateTagsAsync(String resourceGroupName, String resourceName, TagsObject parameters, String ifMatch) { + Mono>> mono + = updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedClusterInner.class, ManagedClusterInner.class, this.client.getContext()); } /** - * Lists managed clusters in the specified subscription and resource group. + * Updates tags on a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, ManagedClusterInner> + beginUpdateTagsAsync(String resourceGroupName, String resourceName, TagsObject parameters) { + final String ifMatch = null; + Mono>> mono + = updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedClusterInner.class, ManagedClusterInner.class, this.client.getContext()); + } + + /** + * Updates tags on a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a ManagedCluster list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of managed cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ManagedClusterInner> beginUpdateTagsAsync( + String resourceGroupName, String resourceName, TagsObject parameters, String ifMatch, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, ifMatch, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedClusterInner.class, ManagedClusterInner.class, context); } /** - * Lists managed clusters in the specified subscription and resource group. + * Updates tags on a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a ManagedCluster list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of managed cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ManagedClusterInner> beginUpdateTags(String resourceGroupName, + String resourceName, TagsObject parameters) { + final String ifMatch = null; + return this.beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch).getSyncPoller(); } /** - * Lists managed clusters in the specified subscription and resource group. + * Updates tags on a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a ManagedCluster list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of managed cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ManagedClusterInner> beginUpdateTags(String resourceGroupName, + String resourceName, TagsObject parameters, String ifMatch, Context context) { + return this.beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch, context).getSyncPoller(); } /** - * Gets a managed cluster. + * Updates tags on a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param ifMatch The request should only proceed if an entity matches this string. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster along with {@link Response} on successful completion of {@link Mono}. + * @return managed cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public Mono updateTagsAsync(String resourceGroupName, String resourceName, + TagsObject parameters, String ifMatch) { + return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a managed cluster. + * Updates tags on a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster along with {@link Response} on successful completion of {@link Mono}. + * @return managed cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + public Mono updateTagsAsync(String resourceGroupName, String resourceName, + TagsObject parameters) { + final String ifMatch = null; + return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a managed cluster. + * Updates tags on a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster on successful completion of {@link Mono}. + * @return managed cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono updateTagsAsync(String resourceGroupName, String resourceName, + TagsObject parameters, String ifMatch, Context context) { + return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a managed cluster. + * Updates tags on a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster along with {@link Response}. + * @return managed cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); + public ManagedClusterInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters) { + final String ifMatch = null; + return updateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch).block(); } /** - * Gets a managed cluster. + * Updates tags on a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster. + * @return managed cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterInner getByResourceGroup(String resourceGroupName, String resourceName) { - return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + public ManagedClusterInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters, + String ifMatch, Context context) { + return updateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch, context).block(); } /** - * Creates or updates a managed cluster. + * Deletes a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. * @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 managed cluster along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, ManagedClusterInner parameters, String ifMatch, String ifNoneMatch) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String ifMatch) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1155,36 +1106,27 @@ public Mono>> createOrUpdateWithResponseAsync(String r if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, ifNoneMatch, parameters, - accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates a managed cluster. + * Deletes a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. * @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 managed cluster along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, ManagedClusterInner parameters, String ifMatch, String ifNoneMatch, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String ifMatch, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1200,246 +1142,325 @@ private Mono>> createOrUpdateWithResponseAsync(String if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, ifNoneMatch, parameters, accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, ifMatch, context); } /** - * Creates or updates a managed cluster. + * Deletes a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed cluster. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ManagedClusterInner> beginCreateOrUpdateAsync( - String resourceGroupName, String resourceName, ManagedClusterInner parameters, String ifMatch, - String ifNoneMatch) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedClusterInner.class, ManagedClusterInner.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String ifMatch) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Creates or updates a managed cluster. + * Deletes a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed cluster. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ManagedClusterInner> - beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, ManagedClusterInner parameters) { + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName) { final String ifMatch = null; - final String ifNoneMatch = null; - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedClusterInner.class, ManagedClusterInner.class, this.client.getContext()); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Creates or updates a managed cluster. + * Deletes a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed cluster. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedClusterInner> beginCreateOrUpdateAsync( - String resourceGroupName, String resourceName, ManagedClusterInner parameters, String ifMatch, - String ifNoneMatch, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String ifMatch, Context context) { context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, - parameters, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedClusterInner.class, ManagedClusterInner.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Creates or updates a managed cluster. + * Deletes a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedClusterInner> - beginCreateOrUpdate(String resourceGroupName, String resourceName, ManagedClusterInner parameters) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName) { final String ifMatch = null; - final String ifNoneMatch = null; - return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch) - .getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch).getSyncPoller(); } /** - * Creates or updates a managed cluster. + * Deletes a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedClusterInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, ManagedClusterInner parameters, String ifMatch, - String ifNoneMatch, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch, context) - .getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, String ifMatch, + Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch, context).getSyncPoller(); } /** - * Creates or updates a managed cluster. + * Deletes a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. * @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 managed cluster on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - ManagedClusterInner parameters, String ifMatch, String ifNoneMatch) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch).last() + public Mono deleteAsync(String resourceGroupName, String resourceName, String ifMatch) { + return beginDeleteAsync(resourceGroupName, resourceName, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates or updates a managed cluster. + * Deletes a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. * @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 managed cluster on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - ManagedClusterInner parameters) { + public Mono deleteAsync(String resourceGroupName, String resourceName) { final String ifMatch = null; - final String ifNoneMatch = null; - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch).last() + return beginDeleteAsync(resourceGroupName, resourceName, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates or updates a managed cluster. + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String ifMatch, Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, ifMatch, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName) { + final String ifMatch = null; + deleteAsync(resourceGroupName, resourceName, ifMatch).block(); + } + + /** + * Deletes a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String ifMatch, Context context) { + deleteAsync(resourceGroupName, resourceName, ifMatch, context).block(); + } + + /** + * Lists managed clusters in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedCluster list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists managed clusters in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedCluster list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists managed clusters in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedCluster list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists managed clusters in the specified subscription and resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. * @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 managed cluster on successful completion of {@link Mono}. + * @return the response of a ManagedCluster list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - ManagedClusterInner parameters, String ifMatch, String ifNoneMatch, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** - * Creates or updates a managed cluster. + * Lists managed clusters in the specified subscription and resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. * @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 managed cluster. + * @return the response of a ManagedCluster list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterInner createOrUpdate(String resourceGroupName, String resourceName, - ManagedClusterInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return createOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); } /** - * Creates or updates a managed cluster. + * Lists managed clusters in the specified subscription and resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. * @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 managed cluster. + * @return the response of a ManagedCluster list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterInner createOrUpdate(String resourceGroupName, String resourceName, - ManagedClusterInner parameters, String ifMatch, String ifNoneMatch, Context context) { - return createOrUpdateAsync(resourceGroupName, resourceName, parameters, ifMatch, ifNoneMatch, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } /** - * Updates tags on a managed cluster. + * Gets a list of managed clusters in the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @param ifMatch The request should only proceed if an entity matches this string. - * @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 managed cluster along with {@link Response} on successful completion of {@link Mono}. + * @return a list of managed clusters in the specified subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateTagsWithResponseAsync(String resourceGroupName, String resourceName, - TagsObject parameters, String ifMatch) { + private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1448,41 +1469,27 @@ public Mono>> updateTagsWithResponseAsync(String resou return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, parameters, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates tags on a managed cluster. + * Gets a list of managed clusters in the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @param ifMatch The request should only proceed if an entity matches this string. * @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 managed cluster along with {@link Response} on successful completion of {@link Mono}. + * @return a list of managed clusters in the specified subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateTagsWithResponseAsync(String resourceGroupName, String resourceName, - TagsObject parameters, String ifMatch, Context context) { + private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1491,234 +1498,255 @@ private Mono>> updateTagsWithResponseAsync(String reso return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, parameters, accept, context); - } - - /** - * Updates tags on a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @param ifMatch The request should only proceed if an entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ManagedClusterInner> - beginUpdateTagsAsync(String resourceGroupName, String resourceName, TagsObject parameters, String ifMatch) { - Mono>> mono - = updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedClusterInner.class, ManagedClusterInner.class, this.client.getContext()); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Updates tags on a managed cluster. + * Gets a list of managed clusters in the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed cluster. + * @return a list of managed clusters in the specified subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ManagedClusterInner> - beginUpdateTagsAsync(String resourceGroupName, String resourceName, TagsObject parameters) { - final String ifMatch = null; - Mono>> mono - = updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedClusterInner.class, ManagedClusterInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Updates tags on a managed cluster. + * Gets a list of managed clusters in the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed cluster. + * @return a list of managed clusters in the specified subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedClusterInner> beginUpdateTagsAsync( - String resourceGroupName, String resourceName, TagsObject parameters, String ifMatch, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, ifMatch, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedClusterInner.class, ManagedClusterInner.class, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Updates tags on a managed cluster. + * Gets a list of managed clusters in the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed cluster. + * @return a list of managed clusters in the specified subscription as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedClusterInner> beginUpdateTags(String resourceGroupName, - String resourceName, TagsObject parameters) { - final String ifMatch = null; - return this.beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); } /** - * Updates tags on a managed cluster. + * Gets a list of managed clusters in the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed cluster. + * @return a list of managed clusters in the specified subscription as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedClusterInner> beginUpdateTags(String resourceGroupName, - String resourceName, TagsObject parameters, String ifMatch, Context context) { - return this.beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); } /** - * Updates tags on a managed cluster. + * Gets an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @param ifMatch The request should only proceed if an entity matches this string. + * @param roleName The name of the role for managed cluster accessProfile resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed cluster on successful completion of {@link Mono}. + * @return an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateTagsAsync(String resourceGroupName, String resourceName, - TagsObject parameters, String ifMatch) { - return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono> getAccessProfileWithResponseAsync(String resourceGroupName, + String resourceName, String roleName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (roleName == null) { + return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getAccessProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, roleName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates tags on a managed cluster. + * Gets an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed cluster on successful completion of {@link Mono}. + * @return an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateTagsAsync(String resourceGroupName, String resourceName, - TagsObject parameters) { - final String ifMatch = null; - return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> getAccessProfileWithResponseAsync(String resourceGroupName, + String resourceName, String roleName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (roleName == null) { + return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getAccessProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, roleName, accept, context); } /** - * Updates tags on a managed cluster. + * Gets an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param context The context to associate with this operation. + * @param roleName The name of the role for managed cluster accessProfile resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed cluster on successful completion of {@link Mono}. + * @return an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateTagsAsync(String resourceGroupName, String resourceName, - TagsObject parameters, String ifMatch, Context context) { - return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono getAccessProfileAsync(String resourceGroupName, String resourceName, + String roleName) { + return getAccessProfileWithResponseAsync(resourceGroupName, resourceName, roleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Updates tags on a managed cluster. + * Gets an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed cluster. + * @return an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters) { - final String ifMatch = null; - return updateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch).block(); + public Response getAccessProfileWithResponse(String resourceGroupName, + String resourceName, String roleName, Context context) { + return getAccessProfileWithResponseAsync(resourceGroupName, resourceName, roleName, context).block(); } /** - * Updates tags on a managed cluster. + * Gets an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Instead use + * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) + * or + * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) + * . * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param context The context to associate with this operation. + * @param roleName The name of the role for managed cluster accessProfile resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed cluster. + * @return an access profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters, - String ifMatch, Context context) { - return updateTagsAsync(resourceGroupName, resourceName, parameters, ifMatch, context).block(); + public ManagedClusterAccessProfileInner getAccessProfile(String resourceGroupName, String resourceName, + String roleName) { + return getAccessProfileWithResponse(resourceGroupName, resourceName, roleName, Context.NONE).getValue(); } /** - * Deletes a managed cluster. + * Lists the admin credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param ifMatch The request should only proceed if an entity matches this string. + * @param serverFqdn server fqdn type for credentials to be returned. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the list credential result response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String ifMatch) { + public Mono> listClusterAdminCredentialsWithResponseAsync(String resourceGroupName, + String resourceName, String serverFqdn) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1736,26 +1764,27 @@ public Mono>> deleteWithResponseAsync(String resourceG } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, accept, context)) + .withContext( + context -> service.listClusterAdminCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, serverFqdn, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a managed cluster. + * Lists the admin credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param ifMatch The request should only proceed if an entity matches this string. + * @param serverFqdn server fqdn type for credentials to be returned. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the list credential result response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String ifMatch, Context context) { + private Mono> listClusterAdminCredentialsWithResponseAsync( + String resourceGroupName, String resourceName, String serverFqdn, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1773,203 +1802,215 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, ifMatch, accept, context); - } - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param ifMatch The request should only proceed if an entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String ifMatch) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + return service.listClusterAdminCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, serverFqdn, accept, context); } /** - * Deletes a managed cluster. + * Lists the admin credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the list credential result response on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName) { - final String ifMatch = null; - Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listClusterAdminCredentialsAsync(String resourceGroupName, + String resourceName) { + final String serverFqdn = null; + return listClusterAdminCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Deletes a managed cluster. + * Lists the admin credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param ifMatch The request should only proceed if an entity matches this string. + * @param serverFqdn server fqdn type for credentials to be returned. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the list credential result response along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String ifMatch, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listClusterAdminCredentialsWithResponse(String resourceGroupName, + String resourceName, String serverFqdn, Context context) { + return listClusterAdminCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn, context) + .block(); } /** - * Deletes a managed cluster. + * Lists the admin credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the list credential result response. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName) { - final String ifMatch = null; - return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public CredentialResultsInner listClusterAdminCredentials(String resourceGroupName, String resourceName) { + final String serverFqdn = null; + return listClusterAdminCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, Context.NONE) + .getValue(); } /** - * Deletes a managed cluster. + * Lists the user credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param context The context to associate with this operation. + * @param serverFqdn server fqdn type for credentials to be returned. + * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return + * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary + * in the path. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the list credential result response along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, String ifMatch, - Context context) { - return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listClusterUserCredentialsWithResponseAsync(String resourceGroupName, + String resourceName, String serverFqdn, Format format) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listClusterUserCredentials(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, + serverFqdn, format, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a managed cluster. + * Lists the user credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param ifMatch The request should only proceed if an entity matches this string. + * @param serverFqdn server fqdn type for credentials to be returned. + * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return + * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary + * in the path. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the list credential result response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String resourceName, String ifMatch) { - return beginDeleteAsync(resourceGroupName, resourceName, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> listClusterUserCredentialsWithResponseAsync(String resourceGroupName, + String resourceName, String serverFqdn, Format format, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listClusterUserCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, serverFqdn, format, accept, context); } /** - * Deletes a managed cluster. + * Lists the user credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the list credential result response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String resourceName) { - final String ifMatch = null; - return beginDeleteAsync(resourceGroupName, resourceName, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono listClusterUserCredentialsAsync(String resourceGroupName, String resourceName) { + final String serverFqdn = null; + final Format format = null; + return listClusterUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn, format) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Deletes a managed cluster. + * Lists the user credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param ifMatch The request should only proceed if an entity matches this string. + * @param serverFqdn server fqdn type for credentials to be returned. + * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return + * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary + * in the path. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName, String ifMatch, Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, ifMatch, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list credential result response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName) { - final String ifMatch = null; - deleteAsync(resourceGroupName, resourceName, ifMatch).block(); + public Response listClusterUserCredentialsWithResponse(String resourceGroupName, + String resourceName, String serverFqdn, Format format, Context context) { + return listClusterUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn, format, context) + .block(); } /** - * Deletes a managed cluster. + * Lists the user credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param ifMatch The request should only proceed if an entity matches this string. - * @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 list credential result response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String ifMatch, Context context) { - deleteAsync(resourceGroupName, resourceName, ifMatch, context).block(); + public CredentialResultsInner listClusterUserCredentials(String resourceGroupName, String resourceName) { + final String serverFqdn = null; + final Format format = null; + return listClusterUserCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, format, Context.NONE) + .getValue(); } /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * Lists the cluster monitoring user credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the list credential result response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> abortLatestOperationWithResponseAsync(String resourceGroupName, - String resourceName) { + public Mono> listClusterMonitoringUserCredentialsWithResponseAsync( + String resourceGroupName, String resourceName, String serverFqdn) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1987,29 +2028,27 @@ public Mono>> abortLatestOperationWithResponseAsync(St } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.abortLatestOperation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .withContext(context -> service.listClusterMonitoringUserCredentials(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, + serverFqdn, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * Lists the cluster monitoring user credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the list credential result response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> abortLatestOperationWithResponseAsync(String resourceGroupName, - String resourceName, Context context) { + private Mono> listClusterMonitoringUserCredentialsWithResponseAsync( + String resourceGroupName, String resourceName, String serverFqdn, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2027,351 +2066,332 @@ private Mono>> abortLatestOperationWithResponseAsync(S } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.abortLatestOperation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + return service.listClusterMonitoringUserCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, serverFqdn, accept, context); } /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * Lists the cluster monitoring user credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the list credential result response on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginAbortLatestOperationAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listClusterMonitoringUserCredentialsAsync(String resourceGroupName, String resourceName) { - Mono>> mono = abortLatestOperationWithResponseAsync(resourceGroupName, resourceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + final String serverFqdn = null; + return listClusterMonitoringUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * Lists the cluster monitoring user credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the list credential result response along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginAbortLatestOperationAsync(String resourceGroupName, - String resourceName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = abortLatestOperationWithResponseAsync(resourceGroupName, resourceName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listClusterMonitoringUserCredentialsWithResponse(String resourceGroupName, + String resourceName, String serverFqdn, Context context) { + return listClusterMonitoringUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn, + context).block(); } /** - * Aborts last operation running on managed cluster. - * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * Lists the cluster monitoring user credentials of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the list credential result response. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName) { - return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public CredentialResultsInner listClusterMonitoringUserCredentials(String resourceGroupName, String resourceName) { + final String serverFqdn = null; + return listClusterMonitoringUserCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, + Context.NONE).getValue(); } /** - * Aborts last operation running on managed cluster. + * Reset the Service Principal Profile of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * This action cannot be performed on a cluster that is not using a service principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. + * @param parameters The service principal profile to set on the managed cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, - Context context) { - return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> resetServicePrincipalProfileWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterServicePrincipalProfile parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + return FluxUtil + .withContext( + context -> service.resetServicePrincipalProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Aborts last operation running on managed cluster. + * Reset the Service Principal Profile of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * This action cannot be performed on a cluster that is not using a service principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono abortLatestOperationAsync(String resourceGroupName, String resourceName) { - return beginAbortLatestOperationAsync(resourceGroupName, resourceName).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono>> resetServicePrincipalProfileWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterServicePrincipalProfile parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + context = this.client.mergeContext(context); + return service.resetServicePrincipalProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, parameters, context); } /** - * Aborts last operation running on managed cluster. + * Reset the Service Principal Profile of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * This action cannot be performed on a cluster that is not using a service principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. + * @param parameters The service principal profile to set on the managed cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono abortLatestOperationAsync(String resourceGroupName, String resourceName, Context context) { - return beginAbortLatestOperationAsync(resourceGroupName, resourceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginResetServicePrincipalProfileAsync(String resourceGroupName, + String resourceName, ManagedClusterServicePrincipalProfile parameters) { + Mono>> mono + = resetServicePrincipalProfileWithResponseAsync(resourceGroupName, resourceName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Aborts last operation running on managed cluster. + * Reset the Service Principal Profile of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * This action cannot be performed on a cluster that is not using a service principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters The service principal profile to set on the managed cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void abortLatestOperation(String resourceGroupName, String resourceName) { - abortLatestOperationAsync(resourceGroupName, resourceName).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginResetServicePrincipalProfileAsync(String resourceGroupName, + String resourceName, ManagedClusterServicePrincipalProfile parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = resetServicePrincipalProfileWithResponseAsync(resourceGroupName, resourceName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Aborts last operation running on managed cluster. + * Reset the Service Principal Profile of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * This action cannot be performed on a cluster that is not using a service principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. + * @param parameters The service principal profile to set on the managed cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void abortLatestOperation(String resourceGroupName, String resourceName, Context context) { - abortLatestOperationAsync(resourceGroupName, resourceName, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResetServicePrincipalProfile(String resourceGroupName, + String resourceName, ManagedClusterServicePrincipalProfile parameters) { + return this.beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); } /** - * Gets an access profile of a managed cluster. + * Reset the Service Principal Profile of a managed cluster. * - * **WARNING**: This API will be deprecated. Instead use - * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) - * or - * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) - * . + * This action cannot be performed on a cluster that is not using a service principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param roleName The name of the role for managed cluster accessProfile resource. + * @param parameters The service principal profile to set on the managed cluster. + * @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 managed cluster Access Profile along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAccessProfileWithResponseAsync(String resourceGroupName, - String resourceName, String roleName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (roleName == null) { - return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getAccessProfile(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, roleName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResetServicePrincipalProfile(String resourceGroupName, + String resourceName, ManagedClusterServicePrincipalProfile parameters, Context context) { + return this.beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters, context) + .getSyncPoller(); } /** - * Gets an access profile of a managed cluster. + * Reset the Service Principal Profile of a managed cluster. * - * **WARNING**: This API will be deprecated. Instead use - * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) - * or - * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) - * . + * This action cannot be performed on a cluster that is not using a service principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param roleName The name of the role for managed cluster accessProfile resource. - * @param context The context to associate with this operation. + * @param parameters The service principal profile to set on the managed cluster. * @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 managed cluster Access Profile along with {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAccessProfileWithResponseAsync(String resourceGroupName, - String resourceName, String roleName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (roleName == null) { - return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getAccessProfile(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, roleName, accept, context); + public Mono resetServicePrincipalProfileAsync(String resourceGroupName, String resourceName, + ManagedClusterServicePrincipalProfile parameters) { + return beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets an access profile of a managed cluster. + * Reset the Service Principal Profile of a managed cluster. * - * **WARNING**: This API will be deprecated. Instead use - * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) - * or - * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) - * . + * This action cannot be performed on a cluster that is not using a service principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param roleName The name of the role for managed cluster accessProfile resource. + * @param parameters The service principal profile to set on the managed cluster. + * @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 managed cluster Access Profile on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAccessProfileAsync(String resourceGroupName, String resourceName, - String roleName) { - return getAccessProfileWithResponseAsync(resourceGroupName, resourceName, roleName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono resetServicePrincipalProfileAsync(String resourceGroupName, String resourceName, + ManagedClusterServicePrincipalProfile parameters, Context context) { + return beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets an access profile of a managed cluster. + * Reset the Service Principal Profile of a managed cluster. * - * **WARNING**: This API will be deprecated. Instead use - * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) - * or - * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) - * . + * This action cannot be performed on a cluster that is not using a service principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param roleName The name of the role for managed cluster accessProfile resource. - * @param context The context to associate with this operation. + * @param parameters The service principal profile to set on the managed cluster. * @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 managed cluster Access Profile along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAccessProfileWithResponse(String resourceGroupName, - String resourceName, String roleName, Context context) { - return getAccessProfileWithResponseAsync(resourceGroupName, resourceName, roleName, context).block(); + public void resetServicePrincipalProfile(String resourceGroupName, String resourceName, + ManagedClusterServicePrincipalProfile parameters) { + resetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters).block(); } /** - * Gets an access profile of a managed cluster. + * Reset the Service Principal Profile of a managed cluster. * - * **WARNING**: This API will be deprecated. Instead use - * [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) - * or - * [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) - * . + * This action cannot be performed on a cluster that is not using a service principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param roleName The name of the role for managed cluster accessProfile resource. + * @param parameters The service principal profile to set on the managed cluster. + * @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 managed cluster Access Profile. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterAccessProfileInner getAccessProfile(String resourceGroupName, String resourceName, - String roleName) { - return getAccessProfileWithResponse(resourceGroupName, resourceName, roleName, Context.NONE).getValue(); + public void resetServicePrincipalProfile(String resourceGroupName, String resourceName, + ManagedClusterServicePrincipalProfile parameters, Context context) { + resetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters, context).block(); } /** - * Gets the results of a command which has been run on the Managed Cluster. + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param commandId Id of the command. + * @param parameters The AAD profile to set on the Managed Cluster. * @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 results of a command which has been run on the Managed Cluster on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getCommandResultWithResponseAsync(String resourceGroupName, - String resourceName, String commandId) { + public Mono>> resetAADProfileWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterAadProfile parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2387,32 +2407,36 @@ public Mono getCommandResultWithRespons if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (commandId == null) { - return Mono.error(new IllegalArgumentException("Parameter commandId is required and cannot be null.")); + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.getCommandResult(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, commandId, accept, context)) + .withContext(context -> service.resetAADProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the results of a command which has been run on the Managed Cluster. + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param commandId Id of the command. + * @param parameters The AAD profile to set on the Managed Cluster. * @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 results of a command which has been run on the Managed Cluster on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getCommandResultWithResponseAsync(String resourceGroupName, - String resourceName, String commandId, Context context) { + private Mono>> resetAADProfileWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterAadProfile parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2428,209 +2452,203 @@ private Mono getCommandResultWithRespon if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (commandId == null) { - return Mono.error(new IllegalArgumentException("Parameter commandId is required and cannot be null.")); + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); } - final String accept = "application/json"; + final String contentType = "application/json"; context = this.client.mergeContext(context); - return service.getCommandResult(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, commandId, accept, context); + return service.resetAADProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, parameters, context); } /** - * Gets the results of a command which has been run on the Managed Cluster. + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param commandId Id of the command. + * @param parameters The AAD profile to set on the Managed Cluster. * @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 results of a command which has been run on the Managed Cluster on successful completion of - * {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getCommandResultAsync(String resourceGroupName, String resourceName, - String commandId) { - return getCommandResultWithResponseAsync(resourceGroupName, resourceName, commandId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginResetAADProfileAsync(String resourceGroupName, String resourceName, + ManagedClusterAadProfile parameters) { + Mono>> mono + = resetAADProfileWithResponseAsync(resourceGroupName, resourceName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Gets the results of a command which has been run on the Managed Cluster. + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param commandId Id of the command. + * @param parameters The AAD profile to set on the Managed Cluster. * @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 results of a command which has been run on the Managed Cluster. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClustersGetCommandResultResponse getCommandResultWithResponse(String resourceGroupName, - String resourceName, String commandId, Context context) { - return getCommandResultWithResponseAsync(resourceGroupName, resourceName, commandId, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginResetAADProfileAsync(String resourceGroupName, String resourceName, + ManagedClusterAadProfile parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = resetAADProfileWithResponseAsync(resourceGroupName, resourceName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Gets the results of a command which has been run on the Managed Cluster. + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param commandId Id of the command. + * @param parameters The AAD profile to set on the Managed Cluster. * @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 results of a command which has been run on the Managed Cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RunCommandResultInner getCommandResult(String resourceGroupName, String resourceName, String commandId) { - return getCommandResultWithResponse(resourceGroupName, resourceName, commandId, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResetAADProfile(String resourceGroupName, String resourceName, + ManagedClusterAadProfile parameters) { + return this.beginResetAADProfileAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); } /** - * Lists the admin credentials of a managed cluster. + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. + * @param parameters The AAD profile to set on the Managed Cluster. + * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listClusterAdminCredentialsWithResponseAsync(String resourceGroupName, - String resourceName, String serverFqdn) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listClusterAdminCredentials(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, serverFqdn, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResetAADProfile(String resourceGroupName, String resourceName, + ManagedClusterAadProfile parameters, Context context) { + return this.beginResetAADProfileAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); } /** - * Lists the admin credentials of a managed cluster. + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. - * @param context The context to associate with this operation. + * @param parameters The AAD profile to set on the Managed Cluster. * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listClusterAdminCredentialsWithResponseAsync( - String resourceGroupName, String resourceName, String serverFqdn, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listClusterAdminCredentials(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, serverFqdn, accept, context); + public Mono resetAADProfileAsync(String resourceGroupName, String resourceName, + ManagedClusterAadProfile parameters) { + return beginResetAADProfileAsync(resourceGroupName, resourceName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Lists the admin credentials of a managed cluster. + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @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 list credential result response on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listClusterAdminCredentialsAsync(String resourceGroupName, - String resourceName) { - final String serverFqdn = null; - return listClusterAdminCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono resetAADProfileAsync(String resourceGroupName, String resourceName, + ManagedClusterAadProfile parameters, Context context) { + return beginResetAADProfileAsync(resourceGroupName, resourceName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Lists the admin credentials of a managed cluster. + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. - * @param context The context to associate with this operation. + * @param parameters The AAD profile to set on the Managed Cluster. * @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 list credential result response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listClusterAdminCredentialsWithResponse(String resourceGroupName, - String resourceName, String serverFqdn, Context context) { - return listClusterAdminCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn, context) - .block(); + public void resetAADProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters) { + resetAADProfileAsync(resourceGroupName, resourceName, parameters).block(); } /** - * Lists the admin credentials of a managed cluster. + * Reset the AAD Profile of a managed cluster. + * + * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory + * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters The AAD profile to set on the Managed Cluster. + * @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 list credential result response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CredentialResultsInner listClusterAdminCredentials(String resourceGroupName, String resourceName) { - final String serverFqdn = null; - return listClusterAdminCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, Context.NONE) - .getValue(); + public void resetAADProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, + Context context) { + resetAADProfileAsync(resourceGroupName, resourceName, parameters, context).block(); } /** - * Lists the cluster monitoring user credentials of a managed cluster. + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listClusterMonitoringUserCredentialsWithResponseAsync( - String resourceGroupName, String resourceName, String serverFqdn) { + public Mono>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, + String resourceName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2646,29 +2664,29 @@ public Mono> listClusterMonitoringUserCredentia if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listClusterMonitoringUserCredentials(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, - serverFqdn, accept, context)) + .withContext(context -> service.rotateClusterCertificates(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists the cluster monitoring user credentials of a managed cluster. + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listClusterMonitoringUserCredentialsWithResponseAsync( - String resourceGroupName, String resourceName, String serverFqdn, Context context) { + private Mono>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, + String resourceName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2684,217 +2702,187 @@ private Mono> listClusterMonitoringUserCredenti if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listClusterMonitoringUserCredentials(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, serverFqdn, accept, context); + return service.rotateClusterCertificates(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, context); } /** - * Lists the cluster monitoring user credentials of a managed cluster. + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list credential result response on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listClusterMonitoringUserCredentialsAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, String resourceName) { - final String serverFqdn = null; - return listClusterMonitoringUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + Mono>> mono + = rotateClusterCertificatesWithResponseAsync(resourceGroupName, resourceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Lists the cluster monitoring user credentials of a managed cluster. + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. * @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 list credential result response along with {@link Response}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listClusterMonitoringUserCredentialsWithResponse(String resourceGroupName, - String resourceName, String serverFqdn, Context context) { - return listClusterMonitoringUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn, - context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, + String resourceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = rotateClusterCertificatesWithResponseAsync(resourceGroupName, resourceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Lists the cluster monitoring user credentials of a managed cluster. + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list credential result response. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CredentialResultsInner listClusterMonitoringUserCredentials(String resourceGroupName, String resourceName) { - final String serverFqdn = null; - return listClusterMonitoringUserCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, - Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRotateClusterCertificates(String resourceGroupName, + String resourceName) { + return this.beginRotateClusterCertificatesAsync(resourceGroupName, resourceName).getSyncPoller(); } /** - * Lists the user credentials of a managed cluster. + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. - * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return - * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary - * in the path. + * @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 list credential result response along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listClusterUserCredentialsWithResponseAsync(String resourceGroupName, - String resourceName, String serverFqdn, Format format) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listClusterUserCredentials(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, - serverFqdn, format, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRotateClusterCertificates(String resourceGroupName, + String resourceName, Context context) { + return this.beginRotateClusterCertificatesAsync(resourceGroupName, resourceName, context).getSyncPoller(); } /** - * Lists the user credentials of a managed cluster. + * Rotates the certificates of a managed cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. - * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return - * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary - * in the path. - * @param context The context to associate with this operation. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list credential result response along with {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listClusterUserCredentialsWithResponseAsync(String resourceGroupName, - String resourceName, String serverFqdn, Format format, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listClusterUserCredentials(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, serverFqdn, format, accept, context); + public Mono rotateClusterCertificatesAsync(String resourceGroupName, String resourceName) { + return beginRotateClusterCertificatesAsync(resourceGroupName, resourceName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Lists the user credentials of a managed cluster. + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list credential result response on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listClusterUserCredentialsAsync(String resourceGroupName, String resourceName) { - final String serverFqdn = null; - final Format format = null; - return listClusterUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn, format) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono rotateClusterCertificatesAsync(String resourceGroupName, String resourceName, Context context) { + return beginRotateClusterCertificatesAsync(resourceGroupName, resourceName, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Lists the user credentials of a managed cluster. + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param serverFqdn server fqdn type for credentials to be returned. - * @param format Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return - * azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary - * in the path. - * @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 list credential result response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listClusterUserCredentialsWithResponse(String resourceGroupName, - String resourceName, String serverFqdn, Format format, Context context) { - return listClusterUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn, format, context) - .block(); + public void rotateClusterCertificates(String resourceGroupName, String resourceName) { + rotateClusterCertificatesAsync(resourceGroupName, resourceName).block(); } /** - * Lists the user credentials of a managed cluster. + * Rotates the certificates of a managed cluster. + * + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list credential result response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CredentialResultsInner listClusterUserCredentials(String resourceGroupName, String resourceName) { - final String serverFqdn = null; - final Format format = null; - return listClusterUserCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, format, Context.NONE) - .getValue(); + public void rotateClusterCertificates(String resourceGroupName, String resourceName, Context context) { + rotateClusterCertificatesAsync(resourceGroupName, resourceName, context).block(); } /** - * Lists available upgrades for all service meshes in a specific cluster. + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listMeshUpgradeProfilesSinglePageAsync(String resourceGroupName, String resourceName) { + public Mono>> abortLatestOperationWithResponseAsync(String resourceGroupName, + String resourceName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2910,18 +2898,18 @@ public CredentialResultsInner listClusterUserCredentials(String resourceGroupNam if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listMeshUpgradeProfiles(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.abortLatestOperation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists available upgrades for all service meshes in a specific cluster. + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -2929,12 +2917,11 @@ public CredentialResultsInner listClusterUserCredentials(String resourceGroupNam * @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 holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listMeshUpgradeProfilesSinglePageAsync(String resourceGroupName, String resourceName, Context context) { + private Mono>> abortLatestOperationWithResponseAsync(String resourceGroupName, + String resourceName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2950,34 +2937,39 @@ public CredentialResultsInner listClusterUserCredentials(String resourceGroupNam if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listMeshUpgradeProfiles(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.abortLatestOperation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, context); } /** - * Lists available upgrades for all service meshes in a specific cluster. + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listMeshUpgradeProfilesAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginAbortLatestOperationAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>(() -> listMeshUpgradeProfilesSinglePageAsync(resourceGroupName, resourceName), - nextLink -> listMeshUpgradeProfilesNextSinglePageAsync(nextLink)); + Mono>> mono = abortLatestOperationWithResponseAsync(resourceGroupName, resourceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Lists available upgrades for all service meshes in a specific cluster. + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -2985,33 +2977,43 @@ public PagedFlux listMeshUpgradeProfilesAsync(String re * @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 holds an array of MeshUpgradeProfiles as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listMeshUpgradeProfilesAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginAbortLatestOperationAsync(String resourceGroupName, String resourceName, Context context) { - return new PagedFlux<>(() -> listMeshUpgradeProfilesSinglePageAsync(resourceGroupName, resourceName, context), - nextLink -> listMeshUpgradeProfilesNextSinglePageAsync(nextLink, context)); + context = this.client.mergeContext(context); + Mono>> mono + = abortLatestOperationWithResponseAsync(resourceGroupName, resourceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Lists available upgrades for all service meshes in a specific cluster. + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMeshUpgradeProfiles(String resourceGroupName, - String resourceName) { - return new PagedIterable<>(listMeshUpgradeProfilesAsync(resourceGroupName, resourceName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName) { + return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName).getSyncPoller(); } /** - * Lists available upgrades for all service meshes in a specific cluster. + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3019,165 +3021,105 @@ public PagedIterable listMeshUpgradeProfiles(String res * @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 holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMeshUpgradeProfiles(String resourceGroupName, String resourceName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, Context context) { - return new PagedIterable<>(listMeshUpgradeProfilesAsync(resourceGroupName, resourceName, context)); + return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName, context).getSyncPoller(); } /** - * Gets available upgrades for a service mesh in a cluster. + * Aborts last operation running on managed cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. - * @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 available upgrades for a service mesh in a cluster along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getMeshUpgradeProfileWithResponseAsync(String resourceGroupName, - String resourceName, String mode) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (mode == null) { - return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getMeshUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, mode, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets available upgrades for a service mesh in a cluster. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. - * @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 available upgrades for a service mesh in a cluster along with {@link Response} on successful completion - * of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getMeshUpgradeProfileWithResponseAsync(String resourceGroupName, - String resourceName, String mode, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (mode == null) { - return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getMeshUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, mode, accept, context); + public Mono abortLatestOperationAsync(String resourceGroupName, String resourceName) { + return beginAbortLatestOperationAsync(resourceGroupName, resourceName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets available upgrades for a service mesh in a cluster. + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. + * @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 available upgrades for a service mesh in a cluster on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getMeshUpgradeProfileAsync(String resourceGroupName, String resourceName, - String mode) { - return getMeshUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, mode) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono abortLatestOperationAsync(String resourceGroupName, String resourceName, Context context) { + return beginAbortLatestOperationAsync(resourceGroupName, resourceName, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets available upgrades for a service mesh in a cluster. + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. - * @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 available upgrades for a service mesh in a cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getMeshUpgradeProfileWithResponse(String resourceGroupName, - String resourceName, String mode, Context context) { - return getMeshUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, mode, context).block(); + public void abortLatestOperation(String resourceGroupName, String resourceName) { + abortLatestOperationAsync(resourceGroupName, resourceName).block(); } /** - * Gets available upgrades for a service mesh in a cluster. + * Aborts last operation running on managed cluster. + * + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. + * @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 available upgrades for a service mesh in a cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MeshUpgradeProfileInner getMeshUpgradeProfile(String resourceGroupName, String resourceName, String mode) { - return getMeshUpgradeProfileWithResponse(resourceGroupName, resourceName, mode, Context.NONE).getValue(); + public void abortLatestOperation(String resourceGroupName, String resourceName, Context context) { + abortLatestOperationAsync(resourceGroupName, resourceName, context).block(); } /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. - * - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. The operation returns properties of each egress endpoint. + * Rotates the service account signing keys of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listOutboundNetworkDependenciesEndpointsSinglePageAsync(String resourceGroupName, String resourceName) { + public Mono>> rotateServiceAccountSigningKeysWithResponseAsync(String resourceGroupName, + String resourceName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3193,22 +3135,14 @@ public MeshUpgradeProfileInner getMeshUpgradeProfile(String resourceGroupName, S if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, - context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.rotateServiceAccountSigningKeys(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. - * - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. The operation returns properties of each egress endpoint. + * Rotates the service account signing keys of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3216,13 +3150,11 @@ public MeshUpgradeProfileInner getMeshUpgradeProfile(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listOutboundNetworkDependenciesEndpointsSinglePageAsync(String resourceGroupName, String resourceName, - Context context) { + private Mono>> rotateServiceAccountSigningKeysWithResponseAsync(String resourceGroupName, + String resourceName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3238,44 +3170,69 @@ public MeshUpgradeProfileInner getMeshUpgradeProfile(String resourceGroupName, S if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.rotateServiceAccountSigningKeys(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, context); } /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. + * Rotates the service account signing keys of a managed cluster. * - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. The operation returns properties of each egress endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginRotateServiceAccountSigningKeysAsync(String resourceGroupName, + String resourceName) { + Mono>> mono + = rotateServiceAccountSigningKeysWithResponseAsync(resourceGroupName, resourceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Rotates the service account signing keys of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux - listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>( - () -> listOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, resourceName), - nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRotateServiceAccountSigningKeysAsync(String resourceGroupName, + String resourceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = rotateServiceAccountSigningKeysWithResponseAsync(resourceGroupName, resourceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. + * Rotates the service account signing keys of a managed cluster. * - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. The operation returns properties of each egress endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRotateServiceAccountSigningKeys(String resourceGroupName, + String resourceName) { + return this.beginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName).getSyncPoller(); + } + + /** + * Rotates the service account signing keys of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3283,44 +3240,64 @@ public MeshUpgradeProfileInner getMeshUpgradeProfile(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster as paginated response with {@link PagedFlux}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux - listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, String resourceName, Context context) { - return new PagedFlux<>( - () -> listOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, resourceName, context), - nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRotateServiceAccountSigningKeys(String resourceGroupName, + String resourceName, Context context) { + return this.beginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName, context).getSyncPoller(); } /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. + * Rotates the service account signing keys of a managed cluster. * - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. The operation returns properties of each egress endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono rotateServiceAccountSigningKeysAsync(String resourceGroupName, String resourceName) { + return beginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Rotates the service account signing keys of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster as paginated response with {@link PagedIterable}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable - listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String resourceName) { - return new PagedIterable<>(listOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, resourceName)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono rotateServiceAccountSigningKeysAsync(String resourceGroupName, String resourceName, + Context context) { + return beginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. + * Rotates the service account signing keys of a managed cluster. * - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. The operation returns properties of each egress endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName) { + rotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName).block(); + } + + /** + * Rotates the service account signing keys of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3328,33 +3305,29 @@ public MeshUpgradeProfileInner getMeshUpgradeProfile(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable - listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String resourceName, Context context) { - return new PagedIterable<>( - listOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, resourceName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName, Context context) { + rotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName, context).block(); } /** - * Reset the AAD Profile of a managed cluster. + * Stops a Managed Cluster * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> resetAadProfileWithResponseAsync(String resourceGroupName, - String resourceName, ManagedClusterAadProfile parameters) { + public Mono>> stopWithResponseAsync(String resourceGroupName, String resourceName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3370,27 +3343,22 @@ public Mono>> resetAadProfileWithResponseAsync(String if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.resetAadProfile(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) + .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Reset the AAD Profile of a managed cluster. + * Stops a Managed Cluster * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. * @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. @@ -3398,8 +3366,8 @@ public Mono>> resetAadProfileWithResponseAsync(String * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resetAadProfileWithResponseAsync(String resourceGroupName, - String resourceName, ManagedClusterAadProfile parameters, Context context) { + private Mono>> stopWithResponseAsync(String resourceGroupName, String resourceName, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3410,54 +3378,48 @@ private Mono>> resetAadProfileWithResponseAsync(String } if (resourceGroupName == null) { return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.resetAadProfile(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context); + return service.stop(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, context); } /** - * Reset the AAD Profile of a managed cluster. + * Stops a Managed Cluster * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginResetAadProfileAsync(String resourceGroupName, String resourceName, - ManagedClusterAadProfile parameters) { - Mono>> mono - = resetAadProfileWithResponseAsync(resourceGroupName, resourceName, parameters); + public PollerFlux, Void> beginStopAsync(String resourceGroupName, String resourceName) { + Mono>> mono = stopWithResponseAsync(resourceGroupName, resourceName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Reset the AAD Profile of a managed cluster. + * Stops a Managed Cluster * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. * @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. @@ -3465,44 +3427,44 @@ public PollerFlux, Void> beginResetAadProfileAsync(String resou * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginResetAadProfileAsync(String resourceGroupName, String resourceName, - ManagedClusterAadProfile parameters, Context context) { + private PollerFlux, Void> beginStopAsync(String resourceGroupName, String resourceName, + Context context) { context = this.client.mergeContext(context); - Mono>> mono - = resetAadProfileWithResponseAsync(resourceGroupName, resourceName, parameters, context); + Mono>> mono = stopWithResponseAsync(resourceGroupName, resourceName, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Reset the AAD Profile of a managed cluster. + * Stops a Managed Cluster * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResetAadProfile(String resourceGroupName, String resourceName, - ManagedClusterAadProfile parameters) { - return this.beginResetAadProfileAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + public SyncPoller, Void> beginStop(String resourceGroupName, String resourceName) { + return this.beginStopAsync(resourceGroupName, resourceName).getSyncPoller(); } /** - * Reset the AAD Profile of a managed cluster. + * Stops a Managed Cluster * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. * @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. @@ -3510,41 +3472,41 @@ public SyncPoller, Void> beginResetAadProfile(String resourceGr * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResetAadProfile(String resourceGroupName, String resourceName, - ManagedClusterAadProfile parameters, Context context) { - return this.beginResetAadProfileAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); + public SyncPoller, Void> beginStop(String resourceGroupName, String resourceName, + Context context) { + return this.beginStopAsync(resourceGroupName, resourceName, context).getSyncPoller(); } /** - * Reset the AAD Profile of a managed cluster. + * Stops a Managed Cluster * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono resetAadProfileAsync(String resourceGroupName, String resourceName, - ManagedClusterAadProfile parameters) { - return beginResetAadProfileAsync(resourceGroupName, resourceName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono stopAsync(String resourceGroupName, String resourceName) { + return beginStopAsync(resourceGroupName, resourceName).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Reset the AAD Profile of a managed cluster. + * Stops a Managed Cluster * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. * @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. @@ -3552,66 +3514,65 @@ public Mono resetAadProfileAsync(String resourceGroupName, String resource * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resetAadProfileAsync(String resourceGroupName, String resourceName, - ManagedClusterAadProfile parameters, Context context) { - return beginResetAadProfileAsync(resourceGroupName, resourceName, parameters, context).last() + private Mono stopAsync(String resourceGroupName, String resourceName, Context context) { + return beginStopAsync(resourceGroupName, resourceName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Reset the AAD Profile of a managed cluster. + * Stops a Managed Cluster * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void resetAadProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters) { - resetAadProfileAsync(resourceGroupName, resourceName, parameters).block(); + public void stop(String resourceGroupName, String resourceName) { + stopAsync(resourceGroupName, resourceName).block(); } /** - * Reset the AAD Profile of a managed cluster. + * Stops a Managed Cluster * - * **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory - * integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the + * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue + * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) + * for more details about stopping a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The AAD profile to set on the Managed Cluster. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void resetAadProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, - Context context) { - resetAadProfileAsync(resourceGroupName, resourceName, parameters, context).block(); + public void stop(String resourceGroupName, String resourceName, Context context) { + stopAsync(resourceGroupName, resourceName, context).block(); } /** - * Reset the Service Principal Profile of a managed cluster. + * Starts a previously stopped Managed Cluster * - * This action cannot be performed on a cluster that is not using a service principal. + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> resetServicePrincipalProfileWithResponseAsync(String resourceGroupName, - String resourceName, ManagedClusterServicePrincipalProfile parameters) { + public Mono>> startWithResponseAsync(String resourceGroupName, String resourceName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3627,27 +3588,20 @@ public Mono>> resetServicePrincipalProfileWithResponse if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.resetServicePrincipalProfile(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) + .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Reset the Service Principal Profile of a managed cluster. + * Starts a previously stopped Managed Cluster * - * This action cannot be performed on a cluster that is not using a service principal. + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. * @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. @@ -3655,8 +3609,8 @@ public Mono>> resetServicePrincipalProfileWithResponse * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resetServicePrincipalProfileWithResponseAsync(String resourceGroupName, - String resourceName, ManagedClusterServicePrincipalProfile parameters, Context context) { + private Mono>> startWithResponseAsync(String resourceGroupName, String resourceName, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3672,47 +3626,39 @@ private Mono>> resetServicePrincipalProfileWithRespons if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.resetServicePrincipalProfile(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context); + return service.start(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, context); } /** - * Reset the Service Principal Profile of a managed cluster. + * Starts a previously stopped Managed Cluster * - * This action cannot be performed on a cluster that is not using a service principal. + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginResetServicePrincipalProfileAsync(String resourceGroupName, - String resourceName, ManagedClusterServicePrincipalProfile parameters) { - Mono>> mono - = resetServicePrincipalProfileWithResponseAsync(resourceGroupName, resourceName, parameters); + public PollerFlux, Void> beginStartAsync(String resourceGroupName, String resourceName) { + Mono>> mono = startWithResponseAsync(resourceGroupName, resourceName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Reset the Service Principal Profile of a managed cluster. + * Starts a previously stopped Managed Cluster * - * This action cannot be performed on a cluster that is not using a service principal. + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. * @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. @@ -3720,42 +3666,40 @@ public PollerFlux, Void> beginResetServicePrincipalProfileAsync * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginResetServicePrincipalProfileAsync(String resourceGroupName, - String resourceName, ManagedClusterServicePrincipalProfile parameters, Context context) { + private PollerFlux, Void> beginStartAsync(String resourceGroupName, String resourceName, + Context context) { context = this.client.mergeContext(context); - Mono>> mono - = resetServicePrincipalProfileWithResponseAsync(resourceGroupName, resourceName, parameters, context); + Mono>> mono = startWithResponseAsync(resourceGroupName, resourceName, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Reset the Service Principal Profile of a managed cluster. + * Starts a previously stopped Managed Cluster * - * This action cannot be performed on a cluster that is not using a service principal. + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResetServicePrincipalProfile(String resourceGroupName, - String resourceName, ManagedClusterServicePrincipalProfile parameters) { - return this.beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + public SyncPoller, Void> beginStart(String resourceGroupName, String resourceName) { + return this.beginStartAsync(resourceGroupName, resourceName).getSyncPoller(); } /** - * Reset the Service Principal Profile of a managed cluster. + * Starts a previously stopped Managed Cluster * - * This action cannot be performed on a cluster that is not using a service principal. + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. * @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. @@ -3763,40 +3707,37 @@ public SyncPoller, Void> beginResetServicePrincipalProfile(Stri * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResetServicePrincipalProfile(String resourceGroupName, - String resourceName, ManagedClusterServicePrincipalProfile parameters, Context context) { - return this.beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters, context) - .getSyncPoller(); + public SyncPoller, Void> beginStart(String resourceGroupName, String resourceName, + Context context) { + return this.beginStartAsync(resourceGroupName, resourceName, context).getSyncPoller(); } /** - * Reset the Service Principal Profile of a managed cluster. + * Starts a previously stopped Managed Cluster * - * This action cannot be performed on a cluster that is not using a service principal. + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono resetServicePrincipalProfileAsync(String resourceGroupName, String resourceName, - ManagedClusterServicePrincipalProfile parameters) { - return beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono startAsync(String resourceGroupName, String resourceName) { + return beginStartAsync(resourceGroupName, resourceName).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Reset the Service Principal Profile of a managed cluster. + * Starts a previously stopped Managed Cluster * - * This action cannot be performed on a cluster that is not using a service principal. + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. * @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. @@ -3804,65 +3745,63 @@ public Mono resetServicePrincipalProfileAsync(String resourceGroupName, St * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resetServicePrincipalProfileAsync(String resourceGroupName, String resourceName, - ManagedClusterServicePrincipalProfile parameters, Context context) { - return beginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters, context).last() + private Mono startAsync(String resourceGroupName, String resourceName, Context context) { + return beginStartAsync(resourceGroupName, resourceName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Reset the Service Principal Profile of a managed cluster. + * Starts a previously stopped Managed Cluster * - * This action cannot be performed on a cluster that is not using a service principal. + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void resetServicePrincipalProfile(String resourceGroupName, String resourceName, - ManagedClusterServicePrincipalProfile parameters) { - resetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters).block(); + public void start(String resourceGroupName, String resourceName) { + startAsync(resourceGroupName, resourceName).block(); } /** - * Reset the Service Principal Profile of a managed cluster. + * Starts a previously stopped Managed Cluster * - * This action cannot be performed on a cluster that is not using a service principal. + * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting + * a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The service principal profile to set on the managed cluster. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void resetServicePrincipalProfile(String resourceGroupName, String resourceName, - ManagedClusterServicePrincipalProfile parameters, Context context) { - resetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters, context).block(); + public void start(String resourceGroupName, String resourceName, Context context) { + startAsync(resourceGroupName, resourceName, context).block(); } /** - * Rotates the certificates of a managed cluster. + * Submits a command to run against the Managed Cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, - String resourceName) { + public Mono>> runCommandWithResponseAsync(String resourceGroupName, String resourceName, + RunCommandRequest requestPayload) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3878,31 +3817,38 @@ public Mono>> rotateClusterCertificatesWithResponseAsy if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } + if (requestPayload == null) { + return Mono.error(new IllegalArgumentException("Parameter requestPayload is required and cannot be null.")); + } else { + requestPayload.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.rotateClusterCertificates(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + return FluxUtil + .withContext(context -> service.runCommand(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, requestPayload, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Rotates the certificates of a managed cluster. + * Submits a command to run against the Managed Cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, - String resourceName, Context context) { + private Mono>> runCommandWithResponseAsync(String resourceGroupName, String resourceName, + RunCommandRequest requestPayload, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3918,42 +3864,52 @@ private Mono>> rotateClusterCertificatesWithResponseAs if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } + if (requestPayload == null) { + return Mono.error(new IllegalArgumentException("Parameter requestPayload is required and cannot be null.")); + } else { + requestPayload.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.rotateClusterCertificates(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + return service.runCommand(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, requestPayload, + context); } /** - * Rotates the certificates of a managed cluster. + * Submits a command to run against the Managed Cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, - String resourceName) { + public PollerFlux, RunCommandResultInner> + beginRunCommandAsync(String resourceGroupName, String resourceName, RunCommandRequest requestPayload) { Mono>> mono - = rotateClusterCertificatesWithResponseAsync(resourceGroupName, resourceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + = runCommandWithResponseAsync(resourceGroupName, resourceName, requestPayload); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), RunCommandResultInner.class, RunCommandResultInner.class, this.client.getContext()); } /** - * Rotates the certificates of a managed cluster. + * Submits a command to run against the Managed Cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3961,42 +3917,44 @@ public PollerFlux, Void> beginRotateClusterCertificatesAsync(St * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, - String resourceName, Context context) { + private PollerFlux, RunCommandResultInner> beginRunCommandAsync( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload, Context context) { context = this.client.mergeContext(context); Mono>> mono - = rotateClusterCertificatesWithResponseAsync(resourceGroupName, resourceName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = runCommandWithResponseAsync(resourceGroupName, resourceName, requestPayload, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), RunCommandResultInner.class, RunCommandResultInner.class, context); } /** - * Rotates the certificates of a managed cluster. + * Submits a command to run against the Managed Cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRotateClusterCertificates(String resourceGroupName, - String resourceName) { - return this.beginRotateClusterCertificatesAsync(resourceGroupName, resourceName).getSyncPoller(); + public SyncPoller, RunCommandResultInner> + beginRunCommand(String resourceGroupName, String resourceName, RunCommandRequest requestPayload) { + return this.beginRunCommandAsync(resourceGroupName, resourceName, requestPayload).getSyncPoller(); } /** - * Rotates the certificates of a managed cluster. + * Submits a command to run against the Managed Cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -4004,98 +3962,110 @@ public SyncPoller, Void> beginRotateClusterCertificates(String * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRotateClusterCertificates(String resourceGroupName, - String resourceName, Context context) { - return this.beginRotateClusterCertificatesAsync(resourceGroupName, resourceName, context).getSyncPoller(); + public SyncPoller, RunCommandResultInner> beginRunCommand( + String resourceGroupName, String resourceName, RunCommandRequest requestPayload, Context context) { + return this.beginRunCommandAsync(resourceGroupName, resourceName, requestPayload, context).getSyncPoller(); } /** - * Rotates the certificates of a managed cluster. + * Submits a command to run against the Managed Cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono rotateClusterCertificatesAsync(String resourceGroupName, String resourceName) { - return beginRotateClusterCertificatesAsync(resourceGroupName, resourceName).last() + public Mono runCommandAsync(String resourceGroupName, String resourceName, + RunCommandRequest requestPayload) { + return beginRunCommandAsync(resourceGroupName, resourceName, requestPayload).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Rotates the certificates of a managed cluster. + * Submits a command to run against the Managed Cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono rotateClusterCertificatesAsync(String resourceGroupName, String resourceName, Context context) { - return beginRotateClusterCertificatesAsync(resourceGroupName, resourceName, context).last() + private Mono runCommandAsync(String resourceGroupName, String resourceName, + RunCommandRequest requestPayload, Context context) { + return beginRunCommandAsync(resourceGroupName, resourceName, requestPayload, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Rotates the certificates of a managed cluster. + * Submits a command to run against the Managed Cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void rotateClusterCertificates(String resourceGroupName, String resourceName) { - rotateClusterCertificatesAsync(resourceGroupName, resourceName).block(); + public RunCommandResultInner runCommand(String resourceGroupName, String resourceName, + RunCommandRequest requestPayload) { + return runCommandAsync(resourceGroupName, resourceName, requestPayload).block(); } /** - * Rotates the certificates of a managed cluster. + * Submits a command to run against the Managed Cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see + * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param requestPayload The run command request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void rotateClusterCertificates(String resourceGroupName, String resourceName, Context context) { - rotateClusterCertificatesAsync(resourceGroupName, resourceName, context).block(); + public RunCommandResultInner runCommand(String resourceGroupName, String resourceName, + RunCommandRequest requestPayload, Context context) { + return runCommandAsync(resourceGroupName, resourceName, requestPayload, context).block(); } /** - * Rotates the service account signing keys of a managed cluster. + * Gets the results of a command which has been run on the Managed Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the results of a command which has been run on the Managed Cluster on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> rotateServiceAccountSigningKeysWithResponseAsync(String resourceGroupName, - String resourceName) { + public Mono getCommandResultWithResponseAsync(String resourceGroupName, + String resourceName, String commandId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4111,28 +4081,32 @@ public Mono>> rotateServiceAccountSigningKeysWithRespo if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } + if (commandId == null) { + return Mono.error(new IllegalArgumentException("Parameter commandId is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.rotateServiceAccountSigningKeys(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, - context)) + .withContext(context -> service.getCommandResult(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, commandId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Rotates the service account signing keys of a managed cluster. + * Gets the results of a command which has been run on the Managed Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the results of a command which has been run on the Managed Cluster on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> rotateServiceAccountSigningKeysWithResponseAsync(String resourceGroupName, - String resourceName, Context context) { + private Mono getCommandResultWithResponseAsync(String resourceGroupName, + String resourceName, String commandId, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4146,167 +4120,91 @@ private Mono>> rotateServiceAccountSigningKeysWithResp .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.rotateServiceAccountSigningKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); - } - - /** - * Rotates the service account signing keys of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginRotateServiceAccountSigningKeysAsync(String resourceGroupName, - String resourceName) { - Mono>> mono - = rotateServiceAccountSigningKeysWithResponseAsync(resourceGroupName, resourceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Rotates the service account signing keys of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRotateServiceAccountSigningKeysAsync(String resourceGroupName, - String resourceName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = rotateServiceAccountSigningKeysWithResponseAsync(resourceGroupName, resourceName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Rotates the service account signing keys of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRotateServiceAccountSigningKeys(String resourceGroupName, - String resourceName) { - return this.beginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName).getSyncPoller(); - } - - /** - * Rotates the service account signing keys of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRotateServiceAccountSigningKeys(String resourceGroupName, - String resourceName, Context context) { - return this.beginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName, context).getSyncPoller(); - } - - /** - * Rotates the service account signing keys of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono rotateServiceAccountSigningKeysAsync(String resourceGroupName, String resourceName) { - return beginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName).last() - .flatMap(this.client::getLroFinalResultOrError); + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (commandId == null) { + return Mono.error(new IllegalArgumentException("Parameter commandId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getCommandResult(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, commandId, accept, context); } /** - * Rotates the service account signing keys of a managed cluster. + * Gets the results of a command which has been run on the Managed Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. + * @param commandId Id of the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the results of a command which has been run on the Managed Cluster on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono rotateServiceAccountSigningKeysAsync(String resourceGroupName, String resourceName, - Context context) { - return beginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono getCommandResultAsync(String resourceGroupName, String resourceName, + String commandId) { + return getCommandResultWithResponseAsync(resourceGroupName, resourceName, commandId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Rotates the service account signing keys of a managed cluster. + * Gets the results of a command which has been run on the Managed Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param commandId Id of the command. + * @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 results of a command which has been run on the Managed Cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName) { - rotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName).block(); + public ManagedClustersGetCommandResultResponse getCommandResultWithResponse(String resourceGroupName, + String resourceName, String commandId, Context context) { + return getCommandResultWithResponseAsync(resourceGroupName, resourceName, commandId, context).block(); } /** - * Rotates the service account signing keys of a managed cluster. + * Gets the results of a command which has been run on the Managed Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. + * @param commandId Id of the command. * @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 results of a command which has been run on the Managed Cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName, Context context) { - rotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName, context).block(); + public RunCommandResultInner getCommandResult(String resourceGroupName, String resourceName, String commandId) { + return getCommandResultWithResponse(resourceGroupName, resourceName, commandId, Context.NONE).getValue(); } /** - * Submits a command to run against the Managed Cluster. + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return run command result along with {@link Response} on successful completion of {@link Mono}. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster + * along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> runCommandWithResponseAsync(String resourceGroupName, String resourceName, - RunCommandRequest requestPayload) { + private Mono> + listOutboundNetworkDependenciesEndpointsSinglePageAsync(String resourceGroupName, String resourceName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4322,36 +4220,39 @@ public Mono>> runCommandWithResponseAsync(String resou if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (requestPayload == null) { - return Mono.error(new IllegalArgumentException("Parameter requestPayload is required and cannot be null.")); - } else { - requestPayload.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.runCommand(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, requestPayload, accept, context)) + .withContext(context -> service.listOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, + context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Submits a command to run against the Managed Cluster. + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return run command result along with {@link Response} on successful completion of {@link Mono}. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster + * along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> runCommandWithResponseAsync(String resourceGroupName, String resourceName, - RunCommandRequest requestPayload, Context context) { + private Mono> + listOutboundNetworkDependenciesEndpointsSinglePageAsync(String resourceGroupName, String resourceName, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4367,206 +4268,258 @@ private Mono>> runCommandWithResponseAsync(String reso if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (requestPayload == null) { - return Mono.error(new IllegalArgumentException("Parameter requestPayload is required and cannot be null.")); - } else { - requestPayload.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.runCommand(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, requestPayload, accept, context); + return service + .listOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Submits a command to run against the Managed Cluster. + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of run command result. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster + * as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, RunCommandResultInner> - beginRunCommandAsync(String resourceGroupName, String resourceName, RunCommandRequest requestPayload) { - Mono>> mono - = runCommandWithResponseAsync(resourceGroupName, resourceName, requestPayload); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), RunCommandResultInner.class, RunCommandResultInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux + listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>( + () -> listOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink)); } /** - * Submits a command to run against the Managed Cluster. + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of run command result. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster + * as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RunCommandResultInner> beginRunCommandAsync( - String resourceGroupName, String resourceName, RunCommandRequest requestPayload, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = runCommandWithResponseAsync(resourceGroupName, resourceName, requestPayload, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), RunCommandResultInner.class, RunCommandResultInner.class, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux + listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, String resourceName, Context context) { + return new PagedFlux<>( + () -> listOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink, context)); } /** - * Submits a command to run against the Managed Cluster. + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of run command result. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster + * as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RunCommandResultInner> - beginRunCommand(String resourceGroupName, String resourceName, RunCommandRequest requestPayload) { - return this.beginRunCommandAsync(resourceGroupName, resourceName, requestPayload).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable + listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, resourceName)); } /** - * Submits a command to run against the Managed Cluster. + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of run command result. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster + * as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RunCommandResultInner> beginRunCommand( - String resourceGroupName, String resourceName, RunCommandRequest requestPayload, Context context) { - return this.beginRunCommandAsync(resourceGroupName, resourceName, requestPayload, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable + listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String resourceName, Context context) { + return new PagedIterable<>( + listOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, resourceName, context)); + } + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + getUpgradeProfileWithResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getUpgradeProfileWithResponseAsync(String resourceGroupName, String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); } /** - * Submits a command to run against the Managed Cluster. - * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * Gets the upgrade profile of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return run command result on successful completion of {@link Mono}. + * @return the upgrade profile of a managed cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono runCommandAsync(String resourceGroupName, String resourceName, - RunCommandRequest requestPayload) { - return beginRunCommandAsync(resourceGroupName, resourceName, requestPayload).last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono getUpgradeProfileAsync(String resourceGroupName, + String resourceName) { + return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Submits a command to run against the Managed Cluster. - * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * Gets the upgrade profile of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return run command result on successful completion of {@link Mono}. + * @return the upgrade profile of a managed cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono runCommandAsync(String resourceGroupName, String resourceName, - RunCommandRequest requestPayload, Context context) { - return beginRunCommandAsync(resourceGroupName, resourceName, requestPayload, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public Response getUpgradeProfileWithResponse(String resourceGroupName, + String resourceName, Context context) { + return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** - * Submits a command to run against the Managed Cluster. - * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * Gets the upgrade profile of a managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return run command result. + * @return the upgrade profile of a managed cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RunCommandResultInner runCommand(String resourceGroupName, String resourceName, - RunCommandRequest requestPayload) { - return runCommandAsync(resourceGroupName, resourceName, requestPayload).block(); + public ManagedClusterUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName) { + return getUpgradeProfileWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } /** - * Submits a command to run against the Managed Cluster. + * Gets a mesh revision profile for a specified mesh in the specified location. * - * AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see - * [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param requestPayload The run command request. - * @param context The context to associate with this operation. + * @param location The name of the Azure region. + * @param mode The mode of the mesh. * @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 run command result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RunCommandResultInner runCommand(String resourceGroupName, String resourceName, - RunCommandRequest requestPayload, Context context) { - return runCommandAsync(resourceGroupName, resourceName, requestPayload, context).block(); - } - - /** - * Starts a previously stopped Managed Cluster - * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. + * @return a mesh revision profile for a specified mesh in the specified location. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> startWithResponseAsync(String resourceGroupName, String resourceName) { + public Mono> getMeshRevisionProfileWithResponseAsync(String location, + String mode) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4575,37 +4528,39 @@ public Mono>> startWithResponseAsync(String resourceGr return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .withContext(context -> service.getMeshRevisionProfile(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, mode, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Starts a previously stopped Managed Cluster + * Gets a mesh revision profile for a specified mesh in the specified location. * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * @param location The name of the Azure region. + * @param mode The mode of the mesh. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync(String resourceGroupName, String resourceName, - Context context) { + private Mono> getMeshRevisionProfileWithResponseAsync(String location, + String mode, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4614,190 +4569,242 @@ private Mono>> startWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.start(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context); + return service.getMeshRevisionProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, mode, accept, context); } /** - * Starts a previously stopped Managed Cluster + * Gets a mesh revision profile for a specified mesh in the specified location. * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * @param location The name of the Azure region. + * @param mode The mode of the mesh. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginStartAsync(String resourceGroupName, String resourceName) { - Mono>> mono = startWithResponseAsync(resourceGroupName, resourceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getMeshRevisionProfileAsync(String location, String mode) { + return getMeshRevisionProfileWithResponseAsync(location, mode).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Starts a previously stopped Managed Cluster + * Gets a mesh revision profile for a specified mesh in the specified location. * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * @param location The name of the Azure region. + * @param mode The mode of the mesh. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStartAsync(String resourceGroupName, String resourceName, + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMeshRevisionProfileWithResponse(String location, String mode, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = startWithResponseAsync(resourceGroupName, resourceName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + return getMeshRevisionProfileWithResponseAsync(location, mode, context).block(); } /** - * Starts a previously stopped Managed Cluster + * Gets a mesh revision profile for a specified mesh in the specified location. * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * @param location The name of the Azure region. + * @param mode The mode of the mesh. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStart(String resourceGroupName, String resourceName) { - return this.beginStartAsync(resourceGroupName, resourceName).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public MeshRevisionProfileInner getMeshRevisionProfile(String location, String mode) { + return getMeshRevisionProfileWithResponse(location, mode, Context.NONE).getValue(); } /** - * Starts a previously stopped Managed Cluster + * Lists mesh revision profiles for all meshes in the specified location. * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * @param location The name of the Azure region. + * @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 holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMeshRevisionProfilesSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listMeshRevisionProfiles(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStart(String resourceGroupName, String resourceName, + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMeshRevisionProfilesSinglePageAsync(String location, Context context) { - return this.beginStartAsync(resourceGroupName, resourceName, context).getSyncPoller(); + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listMeshRevisionProfiles(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Starts a previously stopped Managed Cluster - * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. + * Lists mesh revision profiles for all meshes in the specified location. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono startAsync(String resourceGroupName, String resourceName) { - return beginStartAsync(resourceGroupName, resourceName).last().flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listMeshRevisionProfilesAsync(String location) { + return new PagedFlux<>(() -> listMeshRevisionProfilesSinglePageAsync(location), + nextLink -> listMeshRevisionProfilesNextSinglePageAsync(nextLink)); } /** - * Starts a previously stopped Managed Cluster + * Lists mesh revision profiles for all meshes in the specified location. * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceGroupName, String resourceName, Context context) { - return beginStartAsync(resourceGroupName, resourceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMeshRevisionProfilesAsync(String location, Context context) { + return new PagedFlux<>(() -> listMeshRevisionProfilesSinglePageAsync(location, context), + nextLink -> listMeshRevisionProfilesNextSinglePageAsync(nextLink, context)); } /** - * Starts a previously stopped Managed Cluster + * Lists mesh revision profiles for all meshes in the specified location. * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * @param location The name of the Azure region. * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void start(String resourceGroupName, String resourceName) { - startAsync(resourceGroupName, resourceName).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMeshRevisionProfiles(String location) { + return new PagedIterable<>(listMeshRevisionProfilesAsync(location)); } /** - * Starts a previously stopped Managed Cluster + * Lists mesh revision profiles for all meshes in the specified location. * - * See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting - * a cluster. + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * @param location The name of the Azure region. * @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 holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void start(String resourceGroupName, String resourceName, Context context) { - startAsync(resourceGroupName, resourceName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMeshRevisionProfiles(String location, Context context) { + return new PagedIterable<>(listMeshRevisionProfilesAsync(location, context)); } /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. + * Gets available upgrades for a service mesh in a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return available upgrades for a service mesh in a cluster along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> stopWithResponseAsync(String resourceGroupName, String resourceName) { + public Mono> getMeshUpgradeProfileWithResponseAsync(String resourceGroupName, + String resourceName, String mode) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4813,32 +4820,33 @@ public Mono>> stopWithResponseAsync(String resourceGro if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .withContext( + context -> service.getMeshUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, mode, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. + * Gets available upgrades for a service mesh in a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return available upgrades for a service mesh in a cluster along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync(String resourceGroupName, String resourceName, - Context context) { + private Mono> getMeshUpgradeProfileWithResponseAsync(String resourceGroupName, + String resourceName, String mode, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4854,86 +4862,108 @@ private Mono>> stopWithResponseAsync(String resourceGr if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.stop(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context); + return service.getMeshUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, mode, accept, context); } /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. + * Gets available upgrades for a service mesh in a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return available upgrades for a service mesh in a cluster on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginStopAsync(String resourceGroupName, String resourceName) { - Mono>> mono = stopWithResponseAsync(resourceGroupName, resourceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getMeshUpgradeProfileAsync(String resourceGroupName, String resourceName, + String mode) { + return getMeshUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, mode) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. + * Gets available upgrades for a service mesh in a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return available upgrades for a service mesh in a cluster along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStopAsync(String resourceGroupName, String resourceName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = stopWithResponseAsync(resourceGroupName, resourceName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMeshUpgradeProfileWithResponse(String resourceGroupName, + String resourceName, String mode, Context context) { + return getMeshUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, mode, context).block(); } /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. + * Gets available upgrades for a service mesh in a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return available upgrades for a service mesh in a cluster. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStop(String resourceGroupName, String resourceName) { - return this.beginStopAsync(resourceGroupName, resourceName).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public MeshUpgradeProfileInner getMeshUpgradeProfile(String resourceGroupName, String resourceName, String mode) { + return getMeshUpgradeProfileWithResponse(resourceGroupName, resourceName, mode, Context.NONE).getValue(); } /** - * Stops a Managed Cluster + * Lists available upgrades for all service meshes in a specific cluster. * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listMeshUpgradeProfilesSinglePageAsync(String resourceGroupName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listMeshUpgradeProfiles(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists available upgrades for all service meshes in a specific cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -4941,41 +4971,55 @@ public SyncPoller, Void> beginStop(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStop(String resourceGroupName, String resourceName, - Context context) { - return this.beginStopAsync(resourceGroupName, resourceName, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listMeshUpgradeProfilesSinglePageAsync(String resourceGroupName, String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listMeshUpgradeProfiles(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. + * Lists available upgrades for all service meshes in a specific cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono stopAsync(String resourceGroupName, String resourceName) { - return beginStopAsync(resourceGroupName, resourceName).last().flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listMeshUpgradeProfilesAsync(String resourceGroupName, + String resourceName) { + return new PagedFlux<>(() -> listMeshUpgradeProfilesSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listMeshUpgradeProfilesNextSinglePageAsync(nextLink)); } /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. + * Lists available upgrades for all service meshes in a specific cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -4983,40 +5027,33 @@ public Mono stopAsync(String resourceGroupName, String resourceName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync(String resourceGroupName, String resourceName, Context context) { - return beginStopAsync(resourceGroupName, resourceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMeshUpgradeProfilesAsync(String resourceGroupName, + String resourceName, Context context) { + return new PagedFlux<>(() -> listMeshUpgradeProfilesSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listMeshUpgradeProfilesNextSinglePageAsync(nextLink, context)); } /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. + * Lists available upgrades for all service meshes in a specific cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void stop(String resourceGroupName, String resourceName) { - stopAsync(resourceGroupName, resourceName).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMeshUpgradeProfiles(String resourceGroupName, + String resourceName) { + return new PagedIterable<>(listMeshUpgradeProfilesAsync(resourceGroupName, resourceName)); } /** - * Stops a Managed Cluster - * - * This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the - * control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue - * charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - * for more details about stopping a cluster. + * Lists available upgrades for all service meshes in a specific cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -5024,26 +5061,31 @@ public void stop(String resourceGroupName, String resourceName) { * @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 holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void stop(String resourceGroupName, String resourceName, Context context) { - stopAsync(resourceGroupName, resourceName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMeshUpgradeProfiles(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listMeshUpgradeProfilesAsync(resourceGroupName, resourceName, context)); } /** - * Gets the upgrade profile of a managed cluster. + * Gets a list of supported Kubernetes versions in the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. * @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 upgrade profile of a managed cluster along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - getUpgradeProfileWithResponseAsync(String resourceGroupName, String resourceName) { + public Mono> listKubernetesVersionsWithResponseAsync(String location) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5052,35 +5094,35 @@ public void stop(String resourceGroupName, String resourceName, Context context) return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .withContext(context -> service.listKubernetesVersions(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the upgrade profile of a managed cluster. + * Gets a list of supported Kubernetes versions in the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. * @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 upgrade profile of a managed cluster along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getUpgradeProfileWithResponseAsync(String resourceGroupName, String resourceName, Context context) { + private Mono> listKubernetesVersionsWithResponseAsync(String location, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5089,82 +5131,89 @@ public void stop(String resourceGroupName, String resourceName, Context context) return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + return service.listKubernetesVersions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context); } /** - * Gets the upgrade profile of a managed cluster. + * Gets a list of supported Kubernetes versions in the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. * @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 upgrade profile of a managed cluster on successful completion of {@link Mono}. + * @return a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getUpgradeProfileAsync(String resourceGroupName, - String resourceName) { - return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono listKubernetesVersionsAsync(String location) { + return listKubernetesVersionsWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets the upgrade profile of a managed cluster. + * Gets a list of supported Kubernetes versions in the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. * @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 upgrade profile of a managed cluster along with {@link Response}. + * @return a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getUpgradeProfileWithResponse(String resourceGroupName, - String resourceName, Context context) { - return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, context).block(); + public Response listKubernetesVersionsWithResponse(String location, + Context context) { + return listKubernetesVersionsWithResponseAsync(location, context).block(); } /** - * Gets the upgrade profile of a managed cluster. + * Gets a list of supported Kubernetes versions in the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. * @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 upgrade profile of a managed cluster. + * @return a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName) { - return getUpgradeProfileWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + public KubernetesVersionListResultInner listKubernetesVersions(String location) { + return listKubernetesVersionsWithResponse(location, Context.NONE).getValue(); } /** - * Lists mesh revision profiles for all meshes in the specified location. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @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 holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a ManagedCluster list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMeshRevisionProfilesNextSinglePageAsync(String nextLink) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -5175,15 +5224,13 @@ private Mono> listMeshRevisionProfilesNe final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listMeshRevisionProfilesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists mesh revision profiles for all meshes in the specified location. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -5191,11 +5238,11 @@ private Mono> listMeshRevisionProfilesNe * @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 holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a ManagedCluster list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMeshRevisionProfilesNextSinglePageAsync(String nextLink, + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -5206,7 +5253,7 @@ private Mono> listMeshRevisionProfilesNe } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listMeshRevisionProfilesNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -5265,17 +5312,24 @@ private Mono> listNextSinglePageAsync(String } /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a ManagedCluster list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster + * along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + private Mono> + listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -5285,14 +5339,17 @@ private Mono> listByResourceGroupNextSinglePa } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + .withContext(context -> service.listOutboundNetworkDependenciesEndpointsNext(nextLink, + this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -5300,12 +5357,15 @@ private Mono> listByResourceGroupNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a ManagedCluster list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + * + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster + * along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { + private Mono> + listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -5315,23 +5375,26 @@ private Mono> listByResourceGroupNextSinglePa } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + return service + .listOutboundNetworkDependenciesEndpointsNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** + * Lists mesh revision profiles for all meshes in the specified location. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @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 holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of + * @return holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMeshUpgradeProfilesNextSinglePageAsync(String nextLink) { + private Mono> listMeshRevisionProfilesNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -5342,13 +5405,15 @@ private Mono> listMeshUpgradeProfilesNext final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listMeshUpgradeProfilesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + context -> service.listMeshRevisionProfilesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * Lists mesh revision profiles for all meshes in the specified location. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -5356,11 +5421,11 @@ private Mono> listMeshUpgradeProfilesNext * @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 holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of + * @return holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMeshUpgradeProfilesNextSinglePageAsync(String nextLink, + private Mono> listMeshRevisionProfilesNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -5371,27 +5436,23 @@ private Mono> listMeshUpgradeProfilesNext } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listMeshUpgradeProfilesNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listMeshRevisionProfilesNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(String nextLink) { + private Mono> listMeshUpgradeProfilesNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -5401,17 +5462,14 @@ private Mono> listMeshUpgradeProfilesNext } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listOutboundNetworkDependenciesEndpointsNext(nextLink, - this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + .withContext( + context -> service.listMeshUpgradeProfilesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -5419,12 +5477,12 @@ private Mono> listMeshUpgradeProfilesNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed - * cluster along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(String nextLink, Context context) { + private Mono> listMeshUpgradeProfilesNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -5434,8 +5492,7 @@ private Mono> listMeshUpgradeProfilesNext } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listOutboundNetworkDependenciesEndpointsNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listMeshUpgradeProfilesNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java index 11c3ac09dfc0..983f5ee6ff72 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.implementation; @@ -36,7 +36,7 @@ import com.azure.resourcemanager.containerservice.fluent.ManagedNamespacesClient; import com.azure.resourcemanager.containerservice.fluent.models.CredentialResultsInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedNamespaceInner; -import com.azure.resourcemanager.containerservice.models.ManagedNamespaceListResult; +import com.azure.resourcemanager.containerservice.implementation.models.ManagedNamespaceListResult; import com.azure.resourcemanager.containerservice.models.TagsObject; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -71,65 +71,62 @@ public final class ManagedNamespacesClientImpl implements ManagedNamespacesClien * The interface defining all the services for ContainerServiceManagementClientManagedNamespaces to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerServiceManagementClientManagedNamespaces") public interface ManagedNamespacesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByManagedCluster(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("managedNamespaceName") String managedNamespaceName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("managedNamespaceName") String managedNamespaceName, - @BodyParam("application/json") ManagedNamespaceInner parameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ManagedNamespaceInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, + Mono> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("managedNamespaceName") String managedNamespaceName, - @BodyParam("application/json") TagsObject parameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") TagsObject parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("managedNamespaceName") String managedNamespaceName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("managedNamespaceName") String managedNamespaceName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedCluster(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}/listCredential") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listCredential(@HostParam("$host") String endpoint, + Mono> listCredential(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("managedNamespaceName") String managedNamespaceName, @HeaderParam("Accept") String accept, @@ -140,157 +137,10 @@ Mono> listCredential(@HostParam("$host") String @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByManagedClusterNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * Gets a list of managed namespaces in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed namespaces in the specified managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of managed namespaces in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed namespaces in the specified managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of managed namespaces in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed namespaces in the specified managed cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), - nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of managed namespaces in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed namespaces in the specified managed cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName, - Context context) { - return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), - nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of managed namespaces in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed namespaces in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName) { - return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); - } - - /** - * Gets a list of managed namespaces in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed namespaces in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, - Context context) { - return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); - } - /** * Gets the specified namespace of a managed cluster. * @@ -464,11 +314,12 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, managedNamespaceName, parameters, - accept, context)) + this.client.getSubscriptionId(), resourceGroupName, resourceName, managedNamespaceName, contentType, + accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -513,11 +364,12 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, managedNamespaceName, parameters, accept, - context); + this.client.getSubscriptionId(), resourceGroupName, resourceName, managedNamespaceName, contentType, accept, + parameters, context); } /** @@ -730,11 +582,12 @@ public Mono> updateWithResponseAsync(String reso } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, managedNamespaceName, parameters, - accept, context)) + this.client.getSubscriptionId(), resourceGroupName, resourceName, managedNamespaceName, contentType, + accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -778,10 +631,11 @@ private Mono> updateWithResponseAsync(String res } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, managedNamespaceName, parameters, accept, context); + resourceGroupName, resourceName, managedNamespaceName, contentType, accept, parameters, context); } /** @@ -875,9 +729,9 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, managedNamespaceName, accept, context)) + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, managedNamespaceName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -915,10 +769,9 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); } - final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, managedNamespaceName, accept, context); + resourceGroupName, resourceName, managedNamespaceName, context); } /** @@ -1065,6 +918,153 @@ public void delete(String resourceGroupName, String resourceName, String managed deleteAsync(resourceGroupName, resourceName, managedNamespaceName, context).block(); } + /** + * Gets a list of managed namespaces in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed namespaces in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of managed namespaces in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed namespaces in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of managed namespaces in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed namespaces in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of managed namespaces in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed namespaces in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of managed namespaces in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed namespaces in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); + } + + /** + * Gets a list of managed namespaces in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed namespaces in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); + } + /** * Lists the credentials of a namespace. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java index ee07c04374b2..b92098980d0e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.containerservice.fluent.OperationsClient; import com.azure.resourcemanager.containerservice.fluent.models.OperationValueInner; -import com.azure.resourcemanager.containerservice.models.OperationListResult; +import com.azure.resourcemanager.containerservice.implementation.models.OperationListResult; import reactor.core.publisher.Mono; /** @@ -59,14 +59,14 @@ public final class OperationsClientImpl implements OperationsClient { * The interface defining all the services for ContainerServiceManagementClientOperations to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerServiceManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.ContainerService/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -74,7 +74,7 @@ Mono> list(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java index 5050fa42fd20..625725163c24 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.implementation; @@ -63,177 +63,46 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi * The interface defining all the services for ContainerServiceManagementClientPrivateEndpointConnections to be used * by the proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerServiceManagementClientPrivateEndpointConnections") public interface PrivateEndpointConnectionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, + Mono> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @BodyParam("application/json") PrivateEndpointConnectionInner parameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PrivateEndpointConnectionInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of private endpoint connections in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listWithResponseAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); - /** - * Gets a list of private endpoint connections in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context); - } - - /** - * Gets a list of private endpoint connections in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listAsync(String resourceGroupName, String resourceName) { - return listWithResponseAsync(resourceGroupName, resourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a list of private endpoint connections in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(String resourceGroupName, - String resourceName, Context context) { - return listWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Gets a list of private endpoint connections in the specified managed cluster. - * - * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionListResultInner list(String resourceGroupName, String resourceName) { - return listWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); } /** @@ -247,7 +116,10 @@ public PrivateEndpointConnectionListResultInner list(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. + * @return the specified private endpoint connection. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync(String resourceGroupName, @@ -291,7 +163,10 @@ public Mono> getWithResponseAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. + * @return the specified private endpoint connection. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, @@ -332,7 +207,10 @@ private Mono> getWithResponseAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection on successful completion of {@link Mono}. + * @return the specified private endpoint connection. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAsync(String resourceGroupName, String resourceName, @@ -353,7 +231,10 @@ public Mono getAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection along with {@link Response}. + * @return the specified private endpoint connection. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String resourceName, @@ -372,7 +253,9 @@ public Response getWithResponse(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return the specified private endpoint connection. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. */ @ServiceMethod(returns = ReturnType.SINGLE) public PrivateEndpointConnectionInner get(String resourceGroupName, String resourceName, @@ -419,11 +302,12 @@ public Mono> updateWithResponseAsync(St } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, privateEndpointConnectionName, - parameters, accept, context)) + contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -468,10 +352,11 @@ private Mono> updateWithResponseAsync(S } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, privateEndpointConnectionName, parameters, accept, context); + resourceGroupName, resourceName, privateEndpointConnectionName, contentType, accept, parameters, context); } /** @@ -565,11 +450,8 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, privateEndpointConnectionName, accept, - context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, privateEndpointConnectionName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -607,10 +489,9 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, privateEndpointConnectionName, accept, context); + resourceGroupName, resourceName, privateEndpointConnectionName, context); } /** @@ -758,4 +639,145 @@ public void delete(String resourceGroupName, String resourceName, String private Context context) { deleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context).block(); } + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listWithResponseAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context); + } + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listAsync(String resourceGroupName, String resourceName) { + return listWithResponseAsync(resourceGroupName, resourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listWithResponse(String resourceGroupName, + String resourceName, Context context) { + return listWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private endpoint connections in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionListResultInner list(String resourceGroupName, String resourceName) { + return listWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java index 48917d918b58..a7b0249f5cb2 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.implementation; @@ -54,14 +54,14 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource * The interface defining all the services for ContainerServiceManagementClientPrivateLinkResources to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerServiceManagementClientPrivateLinkResources") public interface PrivateLinkResourcesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); @@ -77,7 +77,10 @@ Mono> list(@HostParam("$host") Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources along with {@link Response} on successful completion of {@link Mono}. + * @return a list of private link resources in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listWithResponseAsync(String resourceGroupName, @@ -115,7 +118,10 @@ public Mono> listWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources along with {@link Response} on successful completion of {@link Mono}. + * @return a list of private link resources in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync(String resourceGroupName, @@ -151,7 +157,10 @@ private Mono> listWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources on successful completion of {@link Mono}. + * @return a list of private link resources in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono listAsync(String resourceGroupName, String resourceName) { @@ -169,7 +178,10 @@ public Mono listAsync(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources along with {@link Response}. + * @return a list of private link resources in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listWithResponse(String resourceGroupName, String resourceName, @@ -187,7 +199,9 @@ public Response listWithResponse(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources. + * @return a list of private link resources in the specified managed cluster. + * + * To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters. */ @ServiceMethod(returns = ReturnType.SINGLE) public PrivateLinkResourcesListResultInner list(String resourceGroupName, String resourceName) { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java index 24de7ec25b4b..614694e2fcb0 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.implementation; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; @@ -55,18 +54,17 @@ public final class ResolvePrivateLinkServiceIdsClientImpl implements ResolvePriv * The interface defining all the services for ContainerServiceManagementClientResolvePrivateLinkServiceIds to be * used by the proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerServiceManagementClientResolvePrivateLinkServiceIds") public interface ResolvePrivateLinkServiceIdsService { - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> post(@HostParam("$host") String endpoint, + Mono> pOST(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @BodyParam("application/json") PrivateLinkResourceInner parameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PrivateLinkResourceInner parameters, Context context); } /** @@ -82,7 +80,7 @@ Mono> post(@HostParam("$host") String endpoin * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> postWithResponseAsync(String resourceGroupName, String resourceName, + public Mono> pOSTWithResponseAsync(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -104,10 +102,10 @@ public Mono> postWithResponseAsync(String res } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.post(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) + return FluxUtil.withContext(context -> service.pOST(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -125,7 +123,7 @@ public Mono> postWithResponseAsync(String res * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> postWithResponseAsync(String resourceGroupName, + private Mono> pOSTWithResponseAsync(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -147,10 +145,11 @@ private Mono> postWithResponseAsync(String re } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.post(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, parameters, accept, context); + return service.pOST(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, contentType, accept, parameters, context); } /** @@ -165,9 +164,9 @@ private Mono> postWithResponseAsync(String re * @return the private link service ID for the specified managed cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono postAsync(String resourceGroupName, String resourceName, + public Mono pOSTAsync(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters) { - return postWithResponseAsync(resourceGroupName, resourceName, parameters) + return pOSTWithResponseAsync(resourceGroupName, resourceName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -184,9 +183,9 @@ public Mono postAsync(String resourceGroupName, String * @return the private link service ID for the specified managed cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response postWithResponse(String resourceGroupName, String resourceName, + public Response pOSTWithResponse(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters, Context context) { - return postWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); + return pOSTWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); } /** @@ -201,8 +200,8 @@ public Response postWithResponse(String resourceGroupN * @return the private link service ID for the specified managed cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourceInner post(String resourceGroupName, String resourceName, + public PrivateLinkResourceInner pOST(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters) { - return postWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); + return pOSTWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); } } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java index 32143c32af45..9f6f52710823 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.implementation; @@ -31,7 +31,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.containerservice.fluent.SnapshotsClient; import com.azure.resourcemanager.containerservice.fluent.models.SnapshotInner; -import com.azure.resourcemanager.containerservice.models.SnapshotListResult; +import com.azure.resourcemanager.containerservice.implementation.models.SnapshotListResult; import com.azure.resourcemanager.containerservice.models.TagsObject; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; @@ -68,90 +68,91 @@ public final class SnapshotsClientImpl implements InnerSupportsGet> list(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") SnapshotInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> updateTags(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") TagsObject parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, + Mono> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @BodyParam("application/json") SnapshotInner parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateTags(@HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @BodyParam("application/json") TagsObject parameters, @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}") - @ExpectedResponses({ 200, 204 }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a list of snapshots in the specified subscription. + * Gets a snapshot. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of snapshots in the specified subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a snapshot along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -160,27 +161,34 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of snapshots in the specified subscription. + * Gets a snapshot. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of snapshots in the specified subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a snapshot along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -189,80 +197,81 @@ private Mono> listSinglePageAsync(Context context) return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); } /** - * Gets a list of snapshots in the specified subscription. + * Gets a snapshot. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of snapshots in the specified subscription as paginated response with {@link PagedFlux}. + * @return a snapshot on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of snapshots in the specified subscription. + * Gets a snapshot. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of snapshots in the specified subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of snapshots in the specified subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of snapshots in the specified subscription as paginated response with {@link PagedIterable}. + * @return a snapshot along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** - * Gets a list of snapshots in the specified subscription. + * Gets a snapshot. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of snapshots in the specified subscription as paginated response with {@link PagedIterable}. + * @return a snapshot. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public SnapshotInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } /** - * Lists snapshots in the specified subscription and resource group. + * Creates or updates a snapshot. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Snapshot list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + SnapshotInner parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -275,29 +284,38 @@ private Mono> listByResourceGroupSinglePageAsync(St return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, parameters, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists snapshots in the specified subscription and resource group. + * Creates or updates a snapshot. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Snapshot list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + SnapshotInner parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -310,88 +328,87 @@ private Mono> listByResourceGroupSinglePageAsync(St return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, parameters, context); } /** - * Lists snapshots in the specified subscription and resource group. + * Creates or updates a snapshot. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Snapshot list operation as paginated response with {@link PagedFlux}. + * @return a node pool snapshot resource on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + SnapshotInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists snapshots in the specified subscription and resource group. + * Creates or updates a snapshot. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Snapshot list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists snapshots in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. + * @return a node pool snapshot resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, + SnapshotInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); } /** - * Lists snapshots in the specified subscription and resource group. + * Creates or updates a snapshot. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. + * @return a node pool snapshot resource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public SnapshotInner createOrUpdate(String resourceGroupName, String resourceName, SnapshotInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); } /** - * Gets a snapshot. + * Updates tags on a snapshot. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a snapshot along with {@link Response} on successful completion of {@link Mono}. + * @return a node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String resourceName) { + public Mono> updateTagsWithResponseAsync(String resourceGroupName, String resourceName, + TagsObject parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -407,27 +424,35 @@ public Mono> getByResourceGroupWithResponseAsync(String if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, parameters, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a snapshot. + * Updates tags on a snapshot. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a snapshot along with {@link Response} on successful completion of {@link Mono}. + * @return a node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String resourceName, Context context) { + private Mono> updateTagsWithResponseAsync(String resourceGroupName, String resourceName, + TagsObject parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -443,74 +468,81 @@ private Mono> getByResourceGroupWithResponseAsync(String if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + return service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, parameters, context); } /** - * Gets a snapshot. + * Updates tags on a snapshot. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a snapshot on successful completion of {@link Mono}. + * @return a node pool snapshot resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) + public Mono updateTagsAsync(String resourceGroupName, String resourceName, TagsObject parameters) { + return updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a snapshot. + * Updates tags on a snapshot. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a snapshot along with {@link Response}. + * @return a node pool snapshot resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); + public Response updateTagsWithResponse(String resourceGroupName, String resourceName, + TagsObject parameters, Context context) { + return updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); } /** - * Gets a snapshot. + * Updates tags on a snapshot. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a snapshot. + * @return a node pool snapshot resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SnapshotInner getByResourceGroup(String resourceGroupName, String resourceName) { - return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + public SnapshotInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters) { + return updateTagsWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); } /** - * Creates or updates a snapshot. + * Deletes a snapshot. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The snapshot to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, - SnapshotInner parameters) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -526,33 +558,26 @@ public Mono> createOrUpdateWithResponseAsync(String reso if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates a snapshot. + * Deletes a snapshot. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The snapshot to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, - SnapshotInner parameters, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -568,83 +593,68 @@ private Mono> createOrUpdateWithResponseAsync(String res if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, context); } /** - * Creates or updates a snapshot. + * Deletes a snapshot. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The snapshot to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - SnapshotInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String resourceName) { + return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap(ignored -> Mono.empty()); } /** - * Creates or updates a snapshot. + * Deletes a snapshot. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The snapshot to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, - SnapshotInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); + public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** - * Creates or updates a snapshot. + * Deletes a snapshot. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The snapshot to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SnapshotInner createOrUpdate(String resourceGroupName, String resourceName, SnapshotInner parameters) { - return createOrUpdateWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); + public void delete(String resourceGroupName, String resourceName) { + deleteWithResponse(resourceGroupName, resourceName, Context.NONE); } /** - * Updates tags on a snapshot. + * Lists snapshots in the specified subscription and resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update snapshot Tags operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a Snapshot list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateTagsWithResponseAsync(String resourceGroupName, String resourceName, - TagsObject parameters) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -657,36 +667,29 @@ public Mono> updateTagsWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates tags on a snapshot. + * Lists snapshots in the specified subscription and resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update snapshot Tags operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a Snapshot list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateTagsWithResponseAsync(String resourceGroupName, String resourceName, - TagsObject parameters, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -699,83 +702,85 @@ private Mono> updateTagsWithResponseAsync(String resourc return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Updates tags on a snapshot. + * Lists snapshots in the specified subscription and resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update snapshot Tags operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource on successful completion of {@link Mono}. + * @return the response of a Snapshot list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateTagsAsync(String resourceGroupName, String resourceName, TagsObject parameters) { - return updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Updates tags on a snapshot. + * Lists snapshots in the specified subscription and resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update snapshot Tags operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource along with {@link Response}. + * @return the response of a Snapshot list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateTagsWithResponse(String resourceGroupName, String resourceName, - TagsObject parameters, Context context) { - return updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** - * Updates tags on a snapshot. + * Lists snapshots in the specified subscription and resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update snapshot Tags operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a node pool snapshot resource. + * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SnapshotInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters) { - return updateTagsWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); } /** - * Deletes a snapshot. + * Lists snapshots in the specified subscription and resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Gets a list of snapshots in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName) { + private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -784,34 +789,27 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a snapshot. + * Gets a list of snapshots in the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return a list of snapshots in the specified subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, - Context context) { + private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -820,62 +818,66 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Deletes a snapshot. + * Gets a list of snapshots in the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return a list of snapshots in the specified subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String resourceName) { - return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap(ignored -> Mono.empty()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Deletes a snapshot. + * Gets a list of snapshots in the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return a list of snapshots in the specified subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Deletes a snapshot. + * Gets a list of snapshots in the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Gets a list of snapshots in the specified subscription. + * + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of snapshots in the specified subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName) { - deleteWithResponse(resourceGroupName, resourceName, Context.NONE); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); } /** @@ -885,11 +887,11 @@ public void delete(String resourceGroupName, String resourceName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of snapshots in the specified subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a Snapshot list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -898,7 +900,9 @@ private Mono> listNextSinglePageAsync(String nextLi new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -912,11 +916,12 @@ private Mono> listNextSinglePageAsync(String nextLi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of snapshots in the specified subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a Snapshot list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -926,7 +931,7 @@ private Mono> listNextSinglePageAsync(String nextLi } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -938,11 +943,11 @@ private Mono> listNextSinglePageAsync(String nextLi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Snapshot list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of snapshots in the specified subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -951,9 +956,7 @@ private Mono> listByResourceGroupNextSinglePageAsyn new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -967,12 +970,11 @@ private Mono> listByResourceGroupNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Snapshot list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of snapshots in the specified subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -982,7 +984,7 @@ private Mono> listByResourceGroupNextSinglePageAsyn } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java index f5c1969c0414..e9d9e6b74ca5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.implementation; @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservice.fluent.TrustedAccessRoleBindingsClient; import com.azure.resourcemanager.containerservice.fluent.models.TrustedAccessRoleBindingInner; -import com.azure.resourcemanager.containerservice.models.TrustedAccessRoleBindingListResult; +import com.azure.resourcemanager.containerservice.implementation.models.TrustedAccessRoleBindingListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,47 +67,45 @@ public final class TrustedAccessRoleBindingsClientImpl implements TrustedAccessR * The interface defining all the services for ContainerServiceManagementClientTrustedAccessRoleBindings to be used * by the proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerServiceManagementClientTrustedAccessRoleBindings") public interface TrustedAccessRoleBindingsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("trustedAccessRoleBindingName") String trustedAccessRoleBindingName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("trustedAccessRoleBindingName") String trustedAccessRoleBindingName, - @BodyParam("application/json") TrustedAccessRoleBindingInner trustedAccessRoleBinding, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") TrustedAccessRoleBindingInner trustedAccessRoleBinding, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("trustedAccessRoleBindingName") String trustedAccessRoleBindingName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("trustedAccessRoleBindingName") String trustedAccessRoleBindingName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -115,155 +113,10 @@ Mono>> delete(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * List trusted access role bindings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a TrustedAccessRoleBinding list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List trusted access role bindings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a TrustedAccessRoleBinding list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List trusted access role bindings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a TrustedAccessRoleBinding list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List trusted access role bindings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a TrustedAccessRoleBinding list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String resourceName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List trusted access role bindings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a TrustedAccessRoleBinding list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String resourceName) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceName)); - } - - /** - * List trusted access role bindings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a TrustedAccessRoleBinding list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String resourceName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); - } - /** * Get a trusted access role binding. * @@ -440,11 +293,12 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { trustedAccessRoleBinding.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, trustedAccessRoleBindingName, - trustedAccessRoleBinding, accept, context)) + contentType, accept, trustedAccessRoleBinding, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -491,11 +345,12 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { trustedAccessRoleBinding.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, trustedAccessRoleBindingName, - trustedAccessRoleBinding, accept, context); + this.client.getSubscriptionId(), resourceGroupName, resourceName, trustedAccessRoleBindingName, contentType, + accept, trustedAccessRoleBinding, context); } /** @@ -702,11 +557,8 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error( new IllegalArgumentException("Parameter trustedAccessRoleBindingName is required and cannot be null.")); } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, trustedAccessRoleBindingName, accept, - context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, trustedAccessRoleBindingName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -744,10 +596,9 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter trustedAccessRoleBindingName is required and cannot be null.")); } - final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, trustedAccessRoleBindingName, accept, context); + resourceGroupName, resourceName, trustedAccessRoleBindingName, context); } /** @@ -896,6 +747,151 @@ public void delete(String resourceGroupName, String resourceName, String trusted deleteAsync(resourceGroupName, resourceName, trustedAccessRoleBindingName, context).block(); } + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a TrustedAccessRoleBinding list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a TrustedAccessRoleBinding list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a TrustedAccessRoleBinding list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a TrustedAccessRoleBinding list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a TrustedAccessRoleBinding list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName)); + } + + /** + * List trusted access role bindings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a TrustedAccessRoleBinding list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); + } + /** * Get the next page of items. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java index e73aa7e0e07b..86cd0408ddde 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.containerservice.fluent.TrustedAccessRolesClient; import com.azure.resourcemanager.containerservice.fluent.models.TrustedAccessRoleInner; -import com.azure.resourcemanager.containerservice.models.TrustedAccessRoleListResult; +import com.azure.resourcemanager.containerservice.implementation.models.TrustedAccessRoleListResult; import reactor.core.publisher.Mono; /** @@ -59,14 +59,14 @@ public final class TrustedAccessRolesClientImpl implements TrustedAccessRolesCli * The interface defining all the services for ContainerServiceManagementClientTrustedAccessRoles to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerServiceManagementClientTrustedAccessRoles") public interface TrustedAccessRolesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); @@ -75,7 +75,7 @@ Mono> list(@HostParam("$host") String endp @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/AgentPoolListResult.java similarity index 80% rename from sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolListResult.java rename to sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/AgentPoolListResult.java index 6f195436b77c..4308eb422782 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolListResult.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/AgentPoolListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerservice.models; +package com.azure.resourcemanager.containerservice.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * The response of a AgentPool list operation. */ -@Fluent +@Immutable public final class AgentPoolListResult implements JsonSerializable { /* * The AgentPool items on this page @@ -32,7 +32,7 @@ public final class AgentPoolListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The AgentPool items on this page. - * - * @param value the value value to set. - * @return the AgentPoolListResult object itself. - */ - public AgentPoolListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -64,17 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the AgentPoolListResult object itself. - */ - public AgentPoolListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MachineListResult.java similarity index 80% rename from sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineListResult.java rename to sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MachineListResult.java index 1c504ea19a37..528b2ec3cfd2 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineListResult.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MachineListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerservice.models; +package com.azure.resourcemanager.containerservice.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * The response of a Machine list operation. */ -@Fluent +@Immutable public final class MachineListResult implements JsonSerializable { /* * The Machine items on this page @@ -32,7 +32,7 @@ public final class MachineListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The Machine items on this page. - * - * @param value the value value to set. - * @return the MachineListResult object itself. - */ - public MachineListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -64,17 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the MachineListResult object itself. - */ - public MachineListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceConfigurationListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MaintenanceConfigurationListResult.java similarity index 80% rename from sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceConfigurationListResult.java rename to sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MaintenanceConfigurationListResult.java index 45db56a2aa5d..7e42d393625e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceConfigurationListResult.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MaintenanceConfigurationListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerservice.models; +package com.azure.resourcemanager.containerservice.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * The response of a MaintenanceConfiguration list operation. */ -@Fluent +@Immutable public final class MaintenanceConfigurationListResult implements JsonSerializable { /* * The MaintenanceConfiguration items on this page @@ -32,7 +32,7 @@ public final class MaintenanceConfigurationListResult implements JsonSerializabl /** * Creates an instance of MaintenanceConfigurationListResult class. */ - public MaintenanceConfigurationListResult() { + private MaintenanceConfigurationListResult() { } /** @@ -44,17 +44,6 @@ public List value() { return this.value; } - /** - * Set the value property: The MaintenanceConfiguration items on this page. - * - * @param value the value value to set. - * @return the MaintenanceConfigurationListResult object itself. - */ - public MaintenanceConfigurationListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -64,17 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the MaintenanceConfigurationListResult object itself. - */ - public MaintenanceConfigurationListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedClusterListResult.java similarity index 80% rename from sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterListResult.java rename to sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedClusterListResult.java index 82860914b688..7617321a3e22 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterListResult.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedClusterListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerservice.models; +package com.azure.resourcemanager.containerservice.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * The response of a ManagedCluster list operation. */ -@Fluent +@Immutable public final class ManagedClusterListResult implements JsonSerializable { /* * The ManagedCluster items on this page @@ -32,7 +32,7 @@ public final class ManagedClusterListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The ManagedCluster items on this page. - * - * @param value the value value to set. - * @return the ManagedClusterListResult object itself. - */ - public ManagedClusterListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -64,17 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the ManagedClusterListResult object itself. - */ - public ManagedClusterListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedNamespaceListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedNamespaceListResult.java similarity index 80% rename from sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedNamespaceListResult.java rename to sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedNamespaceListResult.java index dbaa571c52a7..dc6adc01c36d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedNamespaceListResult.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedNamespaceListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerservice.models; +package com.azure.resourcemanager.containerservice.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * The response of a ManagedNamespace list operation. */ -@Fluent +@Immutable public final class ManagedNamespaceListResult implements JsonSerializable { /* * The ManagedNamespace items on this page @@ -32,7 +32,7 @@ public final class ManagedNamespaceListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The ManagedNamespace items on this page. - * - * @param value the value value to set. - * @return the ManagedNamespaceListResult object itself. - */ - public ManagedNamespaceListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -64,17 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the ManagedNamespaceListResult object itself. - */ - public ManagedNamespaceListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileList.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshRevisionProfileList.java similarity index 80% rename from sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileList.java rename to sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshRevisionProfileList.java index bb0f9033d503..7857ea4d6988 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileList.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshRevisionProfileList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerservice.models; +package com.azure.resourcemanager.containerservice.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * Holds an array of MeshRevisionsProfiles. */ -@Fluent +@Immutable public final class MeshRevisionProfileList implements JsonSerializable { /* * The MeshRevisionProfile items on this page @@ -32,7 +32,7 @@ public final class MeshRevisionProfileList implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The MeshRevisionProfile items on this page. - * - * @param value the value value to set. - * @return the MeshRevisionProfileList object itself. - */ - public MeshRevisionProfileList withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -64,17 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the MeshRevisionProfileList object itself. - */ - public MeshRevisionProfileList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileList.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshUpgradeProfileList.java similarity index 80% rename from sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileList.java rename to sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshUpgradeProfileList.java index 578dc0841f93..79303bdeb46b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileList.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshUpgradeProfileList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerservice.models; +package com.azure.resourcemanager.containerservice.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * Holds an array of MeshUpgradeProfiles. */ -@Fluent +@Immutable public final class MeshUpgradeProfileList implements JsonSerializable { /* * The MeshUpgradeProfile items on this page @@ -32,7 +32,7 @@ public final class MeshUpgradeProfileList implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The MeshUpgradeProfile items on this page. - * - * @param value the value value to set. - * @return the MeshUpgradeProfileList object itself. - */ - public MeshUpgradeProfileList withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -64,17 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the MeshUpgradeProfileList object itself. - */ - public MeshUpgradeProfileList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OperationListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OperationListResult.java similarity index 81% rename from sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OperationListResult.java rename to sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OperationListResult.java index 200a14a1e163..8219cba06741 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OperationListResult.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OperationListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerservice.models; +package com.azure.resourcemanager.containerservice.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * The List Operation response. */ -@Fluent +@Immutable public final class OperationListResult implements JsonSerializable { /* * The list of operations @@ -32,7 +32,7 @@ public final class OperationListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The list of operations. - * - * @param value the value value to set. - * @return the OperationListResult object itself. - */ - public OperationListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -64,17 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the OperationListResult object itself. - */ - public OperationListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundEnvironmentEndpointCollection.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OutboundEnvironmentEndpointCollection.java similarity index 80% rename from sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundEnvironmentEndpointCollection.java rename to sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OutboundEnvironmentEndpointCollection.java index 4195870fa019..5e0541d03cf3 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundEnvironmentEndpointCollection.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OutboundEnvironmentEndpointCollection.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerservice.models; +package com.azure.resourcemanager.containerservice.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * Collection of OutboundEnvironmentEndpoint. */ -@Fluent +@Immutable public final class OutboundEnvironmentEndpointCollection implements JsonSerializable { /* @@ -33,7 +33,7 @@ public final class OutboundEnvironmentEndpointCollection /** * Creates an instance of OutboundEnvironmentEndpointCollection class. */ - public OutboundEnvironmentEndpointCollection() { + private OutboundEnvironmentEndpointCollection() { } /** @@ -45,17 +45,6 @@ public List value() { return this.value; } - /** - * Set the value property: The OutboundEnvironmentEndpoint items on this page. - * - * @param value the value value to set. - * @return the OutboundEnvironmentEndpointCollection object itself. - */ - public OutboundEnvironmentEndpointCollection withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -65,17 +54,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the OutboundEnvironmentEndpointCollection object itself. - */ - public OutboundEnvironmentEndpointCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/SnapshotListResult.java similarity index 80% rename from sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotListResult.java rename to sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/SnapshotListResult.java index 2a010224fff4..d692396ab998 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotListResult.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/SnapshotListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerservice.models; +package com.azure.resourcemanager.containerservice.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * The response of a Snapshot list operation. */ -@Fluent +@Immutable public final class SnapshotListResult implements JsonSerializable { /* * The Snapshot items on this page @@ -32,7 +32,7 @@ public final class SnapshotListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The Snapshot items on this page. - * - * @param value the value value to set. - * @return the SnapshotListResult object itself. - */ - public SnapshotListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -64,17 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the SnapshotListResult object itself. - */ - public SnapshotListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/TrustedAccessRoleBindingListResult.java similarity index 80% rename from sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingListResult.java rename to sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/TrustedAccessRoleBindingListResult.java index b4a87c09f7b4..044fb5e661f7 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingListResult.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/TrustedAccessRoleBindingListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerservice.models; +package com.azure.resourcemanager.containerservice.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * The response of a TrustedAccessRoleBinding list operation. */ -@Fluent +@Immutable public final class TrustedAccessRoleBindingListResult implements JsonSerializable { /* * The TrustedAccessRoleBinding items on this page @@ -32,7 +32,7 @@ public final class TrustedAccessRoleBindingListResult implements JsonSerializabl /** * Creates an instance of TrustedAccessRoleBindingListResult class. */ - public TrustedAccessRoleBindingListResult() { + private TrustedAccessRoleBindingListResult() { } /** @@ -44,17 +44,6 @@ public List value() { return this.value; } - /** - * Set the value property: The TrustedAccessRoleBinding items on this page. - * - * @param value the value value to set. - * @return the TrustedAccessRoleBindingListResult object itself. - */ - public TrustedAccessRoleBindingListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -64,17 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the TrustedAccessRoleBindingListResult object itself. - */ - public TrustedAccessRoleBindingListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/TrustedAccessRoleListResult.java similarity index 80% rename from sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleListResult.java rename to sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/TrustedAccessRoleListResult.java index 0d9053385b4c..a0574a5cdd8c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleListResult.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/TrustedAccessRoleListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerservice.models; +package com.azure.resourcemanager.containerservice.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * List of trusted access roles. */ -@Fluent +@Immutable public final class TrustedAccessRoleListResult implements JsonSerializable { /* * The TrustedAccessRole items on this page @@ -32,7 +32,7 @@ public final class TrustedAccessRoleListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The TrustedAccessRole items on this page. - * - * @param value the value value to set. - * @return the TrustedAccessRoleListResult object itself. - */ - public TrustedAccessRoleListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -64,17 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the TrustedAccessRoleListResult object itself. - */ - public TrustedAccessRoleListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AbsoluteMonthlySchedule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AbsoluteMonthlySchedule.java index 034e66a75649..ead4c1e11552 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AbsoluteMonthlySchedule.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AbsoluteMonthlySchedule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AccelerationMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AccelerationMode.java new file mode 100644 index 000000000000..9770580aff24 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AccelerationMode.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.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enable advanced network acceleration options. This allows users to configure acceleration using BPF host routing. + * This can be enabled only with Cilium dataplane. If not specified, the default value is None (no acceleration). The + * acceleration mode can be changed on a pre-existing cluster. See https://aka.ms/acnsperformance for a detailed + * explanation. + */ +public final class AccelerationMode extends ExpandableStringEnum { + /** + * Enable eBPF host routing with veth device mode. + */ + public static final AccelerationMode BPF_VETH = fromString("BpfVeth"); + + /** + * Disable acceleration options. + */ + public static final AccelerationMode NONE = fromString("None"); + + /** + * Creates a new instance of AccelerationMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AccelerationMode() { + } + + /** + * Creates or finds a AccelerationMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding AccelerationMode. + */ + public static AccelerationMode fromString(String name) { + return fromString(name, AccelerationMode.class); + } + + /** + * Gets known AccelerationMode values. + * + * @return known AccelerationMode values. + */ + public static Collection values() { + return values(AccelerationMode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdoptionPolicy.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdoptionPolicy.java index 7a2cb8d39c4e..ab056da9ce77 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdoptionPolicy.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdoptionPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,17 +12,17 @@ */ public final class AdoptionPolicy extends ExpandableStringEnum { /** - * Static value Never for AdoptionPolicy. + * If the namespace already exists in Kubernetes, attempts to create that same namespace in ARM will fail. */ public static final AdoptionPolicy NEVER = fromString("Never"); /** - * Static value IfIdentical for AdoptionPolicy. + * Take over the existing namespace to be managed by ARM, if there is no difference. */ public static final AdoptionPolicy IF_IDENTICAL = fromString("IfIdentical"); /** - * Static value Always for AdoptionPolicy. + * Always take over the existing namespace to be managed by ARM, some fields might be overwritten. */ public static final AdoptionPolicy ALWAYS = fromString("Always"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkPolicies.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkPolicies.java index 3912695f8b3f..cc9dadabd19b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkPolicies.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkPolicies.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -15,17 +15,17 @@ */ public final class AdvancedNetworkPolicies extends ExpandableStringEnum { /** - * Static value L7 for AdvancedNetworkPolicies. + * Enable Layer7 network policies (FQDN, HTTP/S, Kafka). This option is a superset of the FQDN option. */ public static final AdvancedNetworkPolicies L7 = fromString("L7"); /** - * Static value FQDN for AdvancedNetworkPolicies. + * Enable FQDN based network policies. */ public static final AdvancedNetworkPolicies FQDN = fromString("FQDN"); /** - * Static value None for AdvancedNetworkPolicies. + * Disable Layer 7 network policies (FQDN, HTTP/S, Kafka). */ public static final AdvancedNetworkPolicies NONE = fromString("None"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java index 6132ead8e9b4..538653ad5be7 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -34,6 +34,11 @@ public final class AdvancedNetworking implements JsonSerializable { + /* + * Enable advanced network acceleration options. This allows users to configure acceleration using BPF host routing. + * This can be enabled only with Cilium dataplane. If not specified, the default value is None (no acceleration). + * The acceleration mode can be changed on a pre-existing cluster. See https://aka.ms/acnsperformance for a detailed + * explanation + */ + private AccelerationMode accelerationMode; + + /** + * Creates an instance of AdvancedNetworkingPerformance class. + */ + public AdvancedNetworkingPerformance() { + } + + /** + * Get the accelerationMode property: Enable advanced network acceleration options. This allows users to configure + * acceleration using BPF host routing. This can be enabled only with Cilium dataplane. If not specified, the + * default value is None (no acceleration). The acceleration mode can be changed on a pre-existing cluster. See + * https://aka.ms/acnsperformance for a detailed explanation. + * + * @return the accelerationMode value. + */ + public AccelerationMode accelerationMode() { + return this.accelerationMode; + } + + /** + * Set the accelerationMode property: Enable advanced network acceleration options. This allows users to configure + * acceleration using BPF host routing. This can be enabled only with Cilium dataplane. If not specified, the + * default value is None (no acceleration). The acceleration mode can be changed on a pre-existing cluster. See + * https://aka.ms/acnsperformance for a detailed explanation. + * + * @param accelerationMode the accelerationMode value to set. + * @return the AdvancedNetworkingPerformance object itself. + */ + public AdvancedNetworkingPerformance withAccelerationMode(AccelerationMode accelerationMode) { + this.accelerationMode = accelerationMode; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("accelerationMode", + this.accelerationMode == null ? null : this.accelerationMode.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdvancedNetworkingPerformance from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdvancedNetworkingPerformance 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 AdvancedNetworkingPerformance. + */ + public static AdvancedNetworkingPerformance fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdvancedNetworkingPerformance deserializedAdvancedNetworkingPerformance + = new AdvancedNetworkingPerformance(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("accelerationMode".equals(fieldName)) { + deserializedAdvancedNetworkingPerformance.accelerationMode + = AccelerationMode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAdvancedNetworkingPerformance; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java index 58d38fe29209..aa721e8ce3a5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -30,6 +30,12 @@ public final class AdvancedNetworkingSecurity implements JsonSerializable { + /* + * Configures pod-to-pod encryption. This can be enabled only on Cilium-based clusters. If not specified, the + * default value is None. + */ + private TransitEncryptionType type; + + /** + * Creates an instance of AdvancedNetworkingSecurityTransitEncryption class. + */ + public AdvancedNetworkingSecurityTransitEncryption() { + } + + /** + * Get the type property: Configures pod-to-pod encryption. This can be enabled only on Cilium-based clusters. If + * not specified, the default value is None. + * + * @return the type value. + */ + public TransitEncryptionType type() { + return this.type; + } + + /** + * Set the type property: Configures pod-to-pod encryption. This can be enabled only on Cilium-based clusters. If + * not specified, the default value is None. + * + * @param type the type value to set. + * @return the AdvancedNetworkingSecurityTransitEncryption object itself. + */ + public AdvancedNetworkingSecurityTransitEncryption withType(TransitEncryptionType type) { + this.type = type; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdvancedNetworkingSecurityTransitEncryption from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdvancedNetworkingSecurityTransitEncryption 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 AdvancedNetworkingSecurityTransitEncryption. + */ + public static AdvancedNetworkingSecurityTransitEncryption fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdvancedNetworkingSecurityTransitEncryption deserializedAdvancedNetworkingSecurityTransitEncryption + = new AdvancedNetworkingSecurityTransitEncryption(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedAdvancedNetworkingSecurityTransitEncryption.type + = TransitEncryptionType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAdvancedNetworkingSecurityTransitEncryption; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java index cdb8136db1e7..62d0bfbf5e89 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Available version information for an agent pool. */ -@Fluent +@Immutable public final class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem implements JsonSerializable { /* @@ -35,7 +35,7 @@ public final class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem /** * Creates an instance of AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem class. */ - public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem() { + private AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem() { } /** @@ -47,17 +47,6 @@ public Boolean defaultProperty() { return this.defaultProperty; } - /** - * Set the defaultProperty property: Whether this version is the default agent pool version. - * - * @param defaultProperty the defaultProperty value to set. - * @return the AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem object itself. - */ - public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem withDefaultProperty(Boolean defaultProperty) { - this.defaultProperty = defaultProperty; - return this; - } - /** * Get the kubernetesVersion property: The Kubernetes version (major.minor.patch). * @@ -67,17 +56,6 @@ public String kubernetesVersion() { return this.kubernetesVersion; } - /** - * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). - * - * @param kubernetesVersion the kubernetesVersion value to set. - * @return the AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem object itself. - */ - public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem withKubernetesVersion(String kubernetesVersion) { - this.kubernetesVersion = kubernetesVersion; - return this; - } - /** * Get the isPreview property: Whether Kubernetes version is currently in preview. * @@ -87,17 +65,6 @@ public Boolean isPreview() { return this.isPreview; } - /** - * Set the isPreview property: Whether Kubernetes version is currently in preview. - * - * @param isPreview the isPreview value to set. - * @return the AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem object itself. - */ - public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem withIsPreview(Boolean isPreview) { - this.isPreview = isPreview; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolDeleteMachinesParameter.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolDeleteMachinesParameter.java index 916eb8860fc9..7c97bbb62563 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolDeleteMachinesParameter.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolDeleteMachinesParameter.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolGatewayProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolGatewayProfile.java index 1729e255411a..97f3c8111a7b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolGatewayProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolGatewayProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java index a44247f5ca08..41ce870f4514 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -14,17 +14,19 @@ */ public final class AgentPoolMode extends ExpandableStringEnum { /** - * Static value System for AgentPoolMode. + * System agent pools are primarily for hosting critical system pods such as CoreDNS and metrics-server. System + * agent pools osType must be Linux. System agent pools VM SKU must have at least 2vCPUs and 4GB of memory. */ public static final AgentPoolMode SYSTEM = fromString("System"); /** - * Static value User for AgentPoolMode. + * User agent pools are primarily for hosting your application pods. */ public static final AgentPoolMode USER = fromString("User"); /** - * Static value Gateway for AgentPoolMode. + * Gateway agent pools are dedicated to providing static egress IPs to pods. For more details, see + * https://aka.ms/aks/static-egress-gateway. */ public static final AgentPoolMode GATEWAY = fromString("Gateway"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkProfile.java index b6e537c7d3d5..e0d6f622e0ed 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java index 1402defe71c1..3c5c5fe3fc02 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -20,7 +20,7 @@ public final class AgentPoolSecurityProfile implements JsonSerializable { /** - * Static value LocalUser for AgentPoolSshAccess. + * Can SSH onto the node as a local user using private key. */ public static final AgentPoolSshAccess LOCAL_USER = fromString("LocalUser"); /** - * Static value Disabled for AgentPoolSshAccess. + * SSH service will be turned off on the node. */ public static final AgentPoolSshAccess DISABLED = fromString("Disabled"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolStatus.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolStatus.java index f29f04ef7062..97c8654c24c0 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolStatus.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolType.java index 9b5ac363665d..5d9cc75ca5fe 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolType.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,17 +12,17 @@ */ public final class AgentPoolType extends ExpandableStringEnum { /** - * Static value VirtualMachineScaleSets for AgentPoolType. + * Create an Agent Pool backed by a Virtual Machine Scale Set. */ public static final AgentPoolType VIRTUAL_MACHINE_SCALE_SETS = fromString("VirtualMachineScaleSets"); /** - * Static value AvailabilitySet for AgentPoolType. + * Use of this is strongly discouraged. */ public static final AgentPoolType AVAILABILITY_SET = fromString("AvailabilitySet"); /** - * Static value VirtualMachines for AgentPoolType. + * Create an Agent Pool backed by a Single Instance VM orchestration mode. */ public static final AgentPoolType VIRTUAL_MACHINES = fromString("VirtualMachines"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java index d5c871c492ae..7fa33bb5d40d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Available upgrades for an AgentPool. */ -@Fluent +@Immutable public final class AgentPoolUpgradeProfilePropertiesUpgradesItem implements JsonSerializable { /* @@ -30,7 +30,7 @@ public final class AgentPoolUpgradeProfilePropertiesUpgradesItem /** * Creates an instance of AgentPoolUpgradeProfilePropertiesUpgradesItem class. */ - public AgentPoolUpgradeProfilePropertiesUpgradesItem() { + private AgentPoolUpgradeProfilePropertiesUpgradesItem() { } /** @@ -42,17 +42,6 @@ public String kubernetesVersion() { return this.kubernetesVersion; } - /** - * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). - * - * @param kubernetesVersion the kubernetesVersion value to set. - * @return the AgentPoolUpgradeProfilePropertiesUpgradesItem object itself. - */ - public AgentPoolUpgradeProfilePropertiesUpgradesItem withKubernetesVersion(String kubernetesVersion) { - this.kubernetesVersion = kubernetesVersion; - return this; - } - /** * Get the isPreview property: Whether the Kubernetes version is currently in preview. * @@ -62,17 +51,6 @@ public Boolean isPreview() { return this.isPreview; } - /** - * Set the isPreview property: Whether the Kubernetes version is currently in preview. - * - * @param isPreview the isPreview value to set. - * @return the AgentPoolUpgradeProfilePropertiesUpgradesItem object itself. - */ - public AgentPoolUpgradeProfilePropertiesUpgradesItem withIsPreview(Boolean isPreview) { - this.isPreview = isPreview; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java index 4fe15df7ade6..daf88503669e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolWindowsProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolWindowsProfile.java index cfefbed873d0..13ac79522f34 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolWindowsProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolWindowsProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ArtifactSource.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ArtifactSource.java index d2be9f88a64e..f218f92cb569 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ArtifactSource.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ArtifactSource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,12 +12,12 @@ */ public final class ArtifactSource extends ExpandableStringEnum { /** - * Static value Cache for ArtifactSource. + * pull images from Azure Container Registry with cache. */ public static final ArtifactSource CACHE = fromString("Cache"); /** - * Static value Direct for ArtifactSource. + * pull images from Microsoft Artifact Registry. */ public static final ArtifactSource DIRECT = fromString("Direct"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AzureKeyVaultKms.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AzureKeyVaultKms.java index 2f50fe818ab9..e5a7b177f3fa 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AzureKeyVaultKms.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AzureKeyVaultKms.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BackendPoolType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BackendPoolType.java index 6220922381e8..d75309d6652b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BackendPoolType.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BackendPoolType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,12 +12,14 @@ */ public final class BackendPoolType extends ExpandableStringEnum { /** - * Static value NodeIPConfiguration for BackendPoolType. + * The type of the managed inbound Load Balancer BackendPool. + * https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend. */ public static final BackendPoolType NODE_IPCONFIGURATION = fromString("NodeIPConfiguration"); /** - * Static value NodeIP for BackendPoolType. + * The type of the managed inbound Load Balancer BackendPool. + * https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend. */ public static final BackendPoolType NODE_IP = fromString("NodeIP"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterUpgradeSettings.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterUpgradeSettings.java index fe9edbb659c0..92a65c004c00 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterUpgradeSettings.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterUpgradeSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Code.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Code.java index 5e916c364db4..1276036098d7 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Code.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Code.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,12 +12,12 @@ */ public final class Code extends ExpandableStringEnum { /** - * Static value Running for Code. + * The cluster is running. */ public static final Code RUNNING = fromString("Running"); /** - * Static value Stopped for Code. + * The cluster is stopped. */ public static final Code STOPPED = fromString("Stopped"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CompatibleVersions.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CompatibleVersions.java index 950194c26564..1c94f3e4848d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CompatibleVersions.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CompatibleVersions.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Version information about a product/service that is compatible with a service mesh revision. */ -@Fluent +@Immutable public final class CompatibleVersions implements JsonSerializable { /* * The product/service name. @@ -30,7 +30,7 @@ public final class CompatibleVersions implements JsonSerializable versions() { return this.versions; } - /** - * Set the versions property: Product/service versions compatible with a service mesh add-on revision. - * - * @param versions the versions value to set. - * @return the CompatibleVersions object itself. - */ - public CompatibleVersions withVersions(List versions) { - this.versions = versions; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ConnectionStatus.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ConnectionStatus.java index ae33005b5b63..e2715c2076d8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ConnectionStatus.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ConnectionStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,22 +12,22 @@ */ public final class ConnectionStatus extends ExpandableStringEnum { /** - * Static value Pending for ConnectionStatus. + * Connection is pending approval. */ public static final ConnectionStatus PENDING = fromString("Pending"); /** - * Static value Approved for ConnectionStatus. + * Connection is approved. */ public static final ConnectionStatus APPROVED = fromString("Approved"); /** - * Static value Rejected for ConnectionStatus. + * Connection is rejected. */ public static final ConnectionStatus REJECTED = fromString("Rejected"); /** - * Static value Disconnected for ConnectionStatus. + * Connection is disconnected. */ public static final ConnectionStatus DISCONNECTED = fromString("Disconnected"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceLinuxProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceLinuxProfile.java index f78a1d7bc7f0..1aecd1a549d2 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceLinuxProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceLinuxProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java index 333f0bcc9ba8..1ae8f9a7a33c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshConfiguration.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshConfiguration.java index d27bf72b9860..35d40d64c313 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshConfiguration.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshPublicKey.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshPublicKey.java index b25eeebcf585..a2a23752d2e1 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshPublicKey.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshPublicKey.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CreationData.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CreationData.java index 4a42a8ae7ac2..aa7e8dadbf83 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CreationData.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CreationData.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CredentialResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CredentialResult.java index ae8cd9c8ea16..5b4ef0dbfc09 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CredentialResult.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CredentialResult.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -30,7 +30,7 @@ public final class CredentialResult implements JsonSerializable { /** - * Static value Keep for DeletePolicy. + * Only delete the ARM resource, keep the Kubernetes namespace. Also delete the ManagedByARM label. */ public static final DeletePolicy KEEP = fromString("Keep"); /** - * Static value Delete for DeletePolicy. + * Delete both the ARM resource and the Kubernetes namespace together. */ public static final DeletePolicy DELETE = fromString("Delete"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDependency.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDependency.java index 5da756e113d6..f14b5c169dcf 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDependency.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDependency.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * A domain name that AKS agent nodes are reaching at. */ -@Fluent +@Immutable public final class EndpointDependency implements JsonSerializable { /* * The domain name of the dependency. @@ -30,7 +30,7 @@ public final class EndpointDependency implements JsonSerializable endpointDetails() { return this.endpointDetails; } - /** - * Set the endpointDetails property: The Ports and Protocols used when connecting to domainName. - * - * @param endpointDetails the endpointDetails value to set. - * @return the EndpointDependency object itself. - */ - public EndpointDependency withEndpointDetails(List endpointDetails) { - this.endpointDetails = endpointDetails; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDetail.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDetail.java index ed2f615a1ac2..476f10f5234b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDetail.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDetail.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * connect information from the AKS agent nodes to a single endpoint. */ -@Fluent +@Immutable public final class EndpointDetail implements JsonSerializable { /* * An IP Address that Domain Name currently resolves to. @@ -39,7 +39,7 @@ public final class EndpointDetail implements JsonSerializable { /** * Creates an instance of EndpointDetail class. */ - public EndpointDetail() { + private EndpointDetail() { } /** @@ -51,17 +51,6 @@ public String ipAddress() { return this.ipAddress; } - /** - * Set the ipAddress property: An IP Address that Domain Name currently resolves to. - * - * @param ipAddress the ipAddress value to set. - * @return the EndpointDetail object itself. - */ - public EndpointDetail withIpAddress(String ipAddress) { - this.ipAddress = ipAddress; - return this; - } - /** * Get the port property: The port an endpoint is connected to. * @@ -71,17 +60,6 @@ public Integer port() { return this.port; } - /** - * Set the port property: The port an endpoint is connected to. - * - * @param port the port value to set. - * @return the EndpointDetail object itself. - */ - public EndpointDetail withPort(Integer port) { - this.port = port; - return this; - } - /** * Get the protocol property: The protocol used for connection. * @@ -91,17 +69,6 @@ public String protocol() { return this.protocol; } - /** - * Set the protocol property: The protocol used for connection. - * - * @param protocol the protocol value to set. - * @return the EndpointDetail object itself. - */ - public EndpointDetail withProtocol(String protocol) { - this.protocol = protocol; - return this; - } - /** * Get the description property: Description of the detail. * @@ -111,17 +78,6 @@ public String description() { return this.description; } - /** - * Set the description property: Description of the detail. - * - * @param description the description value to set. - * @return the EndpointDetail object itself. - */ - public EndpointDetail withDescription(String description) { - this.description = description; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Expander.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Expander.java index 73a681d770ba..38b15a4436ec 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Expander.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Expander.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -14,22 +14,28 @@ */ public final class Expander extends ExpandableStringEnum { /** - * Static value least-waste for Expander. + * Selects the node group that will have the least idle CPU (if tied, unused memory) after scale-up. This is useful + * when you have different classes of nodes, for example, high CPU or high memory nodes, and only want to expand + * those when there are pending pods that need a lot of those resources. */ public static final Expander LEAST_WASTE = fromString("least-waste"); /** - * Static value most-pods for Expander. + * Selects the node group that would be able to schedule the most pods when scaling up. This is useful when you are + * using nodeSelector to make sure certain pods land on certain nodes. Note that this won't cause the autoscaler to + * select bigger nodes vs. smaller, as it can add multiple smaller nodes at once. */ public static final Expander MOST_PODS = fromString("most-pods"); /** - * Static value priority for Expander. + * Selects the node group that has the highest priority assigned by the user. It's configuration is described in + * more details + * [here](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/expander/priority/readme.md). */ public static final Expander PRIORITY = fromString("priority"); /** - * Static value random for Expander. + * Used when you don't have a particular need for the node groups to scale differently. */ public static final Expander RANDOM = fromString("random"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocation.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocation.java index 8855d2051c24..f9fe4271d163 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocation.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocationTypes.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocationTypes.java index b5f3d77450db..f9fc8b54d063 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocationTypes.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocationTypes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,7 +12,7 @@ */ public final class ExtendedLocationTypes extends ExpandableStringEnum { /** - * Static value EdgeZone for ExtendedLocationTypes. + * Azure Edge Zone extended location type. */ public static final ExtendedLocationTypes EDGE_ZONE = fromString("EdgeZone"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Format.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Format.java index f27af9563915..a130d8cf7cc6 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Format.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Format.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -8,16 +8,17 @@ import java.util.Collection; /** - * Defines values for Format. + * The format of the kubeconfig credential. */ public final class Format extends ExpandableStringEnum { /** - * Static value azure for Format. + * Return azure auth-provider kubeconfig. This format is deprecated in v1.22 and will be fully removed in v1.26. + * See: https://aka.ms/k8s/changes-1-26. */ public static final Format AZURE = fromString("azure"); /** - * Static value exec for Format. + * Return exec format kubeconfig. This format requires kubelogin binary in the path. */ public static final Format EXEC = fromString("exec"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuDriver.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuDriver.java index d606e716dd65..2162106edd56 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuDriver.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuDriver.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,12 +12,12 @@ */ public final class GpuDriver extends ExpandableStringEnum { /** - * Static value Install for GpuDriver. + * Install driver. */ public static final GpuDriver INSTALL = fromString("Install"); /** - * Static value None for GpuDriver. + * Skip driver install. */ public static final GpuDriver NONE = fromString("None"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuInstanceProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuInstanceProfile.java index 706ae87c5b9c..4fcb628ceff7 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuInstanceProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuInstanceProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,27 +12,27 @@ */ public final class GpuInstanceProfile extends ExpandableStringEnum { /** - * Static value MIG1g for GpuInstanceProfile. + * MIG 1g GPU instance profile. */ public static final GpuInstanceProfile MIG1G = fromString("MIG1g"); /** - * Static value MIG2g for GpuInstanceProfile. + * MIG 2g GPU instance profile. */ public static final GpuInstanceProfile MIG2G = fromString("MIG2g"); /** - * Static value MIG3g for GpuInstanceProfile. + * MIG 3g GPU instance profile. */ public static final GpuInstanceProfile MIG3G = fromString("MIG3g"); /** - * Static value MIG4g for GpuInstanceProfile. + * MIG 4g GPU instance profile. */ public static final GpuInstanceProfile MIG4G = fromString("MIG4g"); /** - * Static value MIG7g for GpuInstanceProfile. + * MIG 7g GPU instance profile. */ public static final GpuInstanceProfile MIG7G = fromString("MIG7g"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java index 83dd030aabe6..f57ce925de53 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java index e780c371e177..e1950c9efbc5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,12 +12,12 @@ */ public final class IpFamily extends ExpandableStringEnum { /** - * Static value IPv4 for IpFamily. + * IPv4 family. */ public static final IpFamily IPV4 = fromString("IPv4"); /** - * Static value IPv6 for IpFamily. + * IPv6 family. */ public static final IpFamily IPV6 = fromString("IPv6"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpTag.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpTag.java index 13bb78fc2c6c..0e108e1ac9b1 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpTag.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpTag.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioCertificateAuthority.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioCertificateAuthority.java index 379541b09e4a..fba9c63f1997 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioCertificateAuthority.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioCertificateAuthority.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java index 0dc7eb7ddb66..9e443cf0dafb 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -27,6 +27,11 @@ public final class IstioComponents implements JsonSerializable */ private List egressGateways; + /* + * Mode of traffic redirection. + */ + private ProxyRedirectionMechanism proxyRedirectionMechanism; + /** * Creates an instance of IstioComponents class. */ @@ -73,6 +78,26 @@ public IstioComponents withEgressGateways(List egressGateway return this; } + /** + * Get the proxyRedirectionMechanism property: Mode of traffic redirection. + * + * @return the proxyRedirectionMechanism value. + */ + public ProxyRedirectionMechanism proxyRedirectionMechanism() { + return this.proxyRedirectionMechanism; + } + + /** + * Set the proxyRedirectionMechanism property: Mode of traffic redirection. + * + * @param proxyRedirectionMechanism the proxyRedirectionMechanism value to set. + * @return the IstioComponents object itself. + */ + public IstioComponents withProxyRedirectionMechanism(ProxyRedirectionMechanism proxyRedirectionMechanism) { + this.proxyRedirectionMechanism = proxyRedirectionMechanism; + return this; + } + /** * Validates the instance. * @@ -97,6 +122,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("egressGateways", this.egressGateways, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("proxyRedirectionMechanism", + this.proxyRedirectionMechanism == null ? null : this.proxyRedirectionMechanism.toString()); return jsonWriter.writeEndObject(); } @@ -123,6 +150,9 @@ public static IstioComponents fromJson(JsonReader jsonReader) throws IOException List egressGateways = reader.readArray(reader1 -> IstioEgressGateway.fromJson(reader1)); deserializedIstioComponents.egressGateways = egressGateways; + } else if ("proxyRedirectionMechanism".equals(fieldName)) { + deserializedIstioComponents.proxyRedirectionMechanism + = ProxyRedirectionMechanism.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioEgressGateway.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioEgressGateway.java index 42ebfbe64cf4..5a9a2725fe97 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioEgressGateway.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioEgressGateway.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGateway.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGateway.java index 89c1dbb810d9..2ad5691d72dc 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGateway.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGateway.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGatewayMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGatewayMode.java index 9373db2fab55..d879329cf680 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGatewayMode.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGatewayMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,12 +12,12 @@ */ public final class IstioIngressGatewayMode extends ExpandableStringEnum { /** - * Static value External for IstioIngressGatewayMode. + * The ingress gateway is assigned a public IP address and is publicly accessible. */ public static final IstioIngressGatewayMode EXTERNAL = fromString("External"); /** - * Static value Internal for IstioIngressGatewayMode. + * The ingress gateway is assigned an internal IP address and cannot is accessed publicly. */ public static final IstioIngressGatewayMode INTERNAL = fromString("Internal"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioPluginCertificateAuthority.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioPluginCertificateAuthority.java index 50a9744839c9..46f2272f91f5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioPluginCertificateAuthority.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioPluginCertificateAuthority.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioServiceMesh.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioServiceMesh.java index dc97b2b58638..5171a163cceb 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioServiceMesh.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioServiceMesh.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KeyVaultNetworkAccessTypes.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KeyVaultNetworkAccessTypes.java index f3e5532b9b76..c51301b852d6 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KeyVaultNetworkAccessTypes.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KeyVaultNetworkAccessTypes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -14,12 +14,12 @@ */ public final class KeyVaultNetworkAccessTypes extends ExpandableStringEnum { /** - * Static value Public for KeyVaultNetworkAccessTypes. + * Key vault allows public access from all networks. */ public static final KeyVaultNetworkAccessTypes PUBLIC = fromString("Public"); /** - * Static value Private for KeyVaultNetworkAccessTypes. + * Key vault disables public access and enables private link. */ public static final KeyVaultNetworkAccessTypes PRIVATE = fromString("Private"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java index a14c1ea5937b..d07302d31b09 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletDiskType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletDiskType.java index 18af44555422..a238ce54e137 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletDiskType.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletDiskType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,12 +12,12 @@ */ public final class KubeletDiskType extends ExpandableStringEnum { /** - * Static value OS for KubeletDiskType. + * Kubelet will use the OS disk for its data. */ public static final KubeletDiskType OS = fromString("OS"); /** - * Static value Temporary for KubeletDiskType. + * Kubelet will use the temporary disk for its data. */ public static final KubeletDiskType TEMPORARY = fromString("Temporary"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesPatchVersion.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesPatchVersion.java index 121098436176..502f70c02277 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesPatchVersion.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesPatchVersion.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Kubernetes patch version profile. */ -@Fluent +@Immutable public final class KubernetesPatchVersion implements JsonSerializable { /* * Possible upgrade path for given patch version @@ -25,7 +25,7 @@ public final class KubernetesPatchVersion implements JsonSerializable upgrades() { return this.upgrades; } - /** - * Set the upgrades property: Possible upgrade path for given patch version. - * - * @param upgrades the upgrades value to set. - * @return the KubernetesPatchVersion object itself. - */ - public KubernetesPatchVersion withUpgrades(List upgrades) { - this.upgrades = upgrades; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesSupportPlan.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesSupportPlan.java index bf35959bffb5..4917e3f10efb 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesSupportPlan.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesSupportPlan.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,12 +12,14 @@ */ public final class KubernetesSupportPlan extends ExpandableStringEnum { /** - * Static value KubernetesOfficial for KubernetesSupportPlan. + * Support for the version is the same as for the open source Kubernetes offering. Official Kubernetes open source + * community support versions for 1 year after release. */ public static final KubernetesSupportPlan KUBERNETES_OFFICIAL = fromString("KubernetesOfficial"); /** - * Static value AKSLongTermSupport for KubernetesSupportPlan. + * Support for the version extended past the KubernetesOfficial support of 1 year. AKS continues to patch CVEs for + * another 1 year, for a total of 2 years of support. */ public static final KubernetesSupportPlan AKSLONG_TERM_SUPPORT = fromString("AKSLongTermSupport"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersion.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersion.java index 809070423d78..314558af737f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersion.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersion.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Kubernetes version profile for given major.minor release. */ -@Fluent +@Immutable public final class KubernetesVersion implements JsonSerializable { /* * major.minor version of Kubernetes release @@ -45,7 +45,7 @@ public final class KubernetesVersion implements JsonSerializable patchVersions() { return this.patchVersions; } - /** - * Set the patchVersions property: Patch versions of Kubernetes release. - * - * @param patchVersions the patchVersions value to set. - * @return the KubernetesVersion object itself. - */ - public KubernetesVersion withPatchVersions(Map patchVersions) { - this.patchVersions = patchVersions; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersionCapabilities.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersionCapabilities.java index 372d6737e747..2f1b45ff2d0f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersionCapabilities.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersionCapabilities.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Capabilities on this Kubernetes version. */ -@Fluent +@Immutable public final class KubernetesVersionCapabilities implements JsonSerializable { /* * Kubernetes support plans available for this version. @@ -25,7 +25,7 @@ public final class KubernetesVersionCapabilities implements JsonSerializable supportPlan() { return this.supportPlan; } - /** - * Set the supportPlan property: Kubernetes support plans available for this version. - * - * @param supportPlan the supportPlan value to set. - * @return the KubernetesVersionCapabilities object itself. - */ - public KubernetesVersionCapabilities withSupportPlan(List supportPlan) { - this.supportPlan = supportPlan; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LicenseType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LicenseType.java index a4eedd7f5a74..4cfc9ebcd6c7 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LicenseType.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LicenseType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -13,12 +13,12 @@ */ public final class LicenseType extends ExpandableStringEnum { /** - * Static value None for LicenseType. + * No additional licensing is applied. */ public static final LicenseType NONE = fromString("None"); /** - * Static value Windows_Server for LicenseType. + * Enables Azure Hybrid User Benefits for Windows VMs. */ public static final LicenseType WINDOWS_SERVER = fromString("Windows_Server"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LinuxOSConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LinuxOSConfig.java index 05443a23cdb4..a877d399f9b5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LinuxOSConfig.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LinuxOSConfig.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerSku.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerSku.java index 65598b886c27..1edbb9a693cc 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerSku.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerSku.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -14,12 +14,14 @@ */ public final class LoadBalancerSku extends ExpandableStringEnum { /** - * Static value standard for LoadBalancerSku. + * Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information about on working + * with the load balancer in the managed cluster, see the [standard Load + * Balancer](https://docs.microsoft.com/azure/aks/load-balancer-standard) article. */ public static final LoadBalancerSku STANDARD = fromString("standard"); /** - * Static value basic for LoadBalancerSku. + * Use a basic Load Balancer with limited functionality. */ public static final LoadBalancerSku BASIC = fromString("basic"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardDestination.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardDestination.java index 39c9a39b739f..6592220c72e6 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardDestination.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardDestination.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,12 +12,13 @@ */ public final class LocalDnsForwardDestination extends ExpandableStringEnum { /** - * Static value ClusterCoreDNS for LocalDnsForwardDestination. + * Forward DNS queries from localDNS to cluster CoreDNS. */ public static final LocalDnsForwardDestination CLUSTER_CORE_DNS = fromString("ClusterCoreDNS"); /** - * Static value VnetDNS for LocalDnsForwardDestination. + * Forward DNS queries from localDNS to DNS server configured in the VNET. A VNET can have multiple DNS servers + * configured. */ public static final LocalDnsForwardDestination VNET_DNS = fromString("VnetDNS"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardPolicy.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardPolicy.java index 3fd4ced49ccc..0f0620bfea02 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardPolicy.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -13,17 +13,20 @@ */ public final class LocalDnsForwardPolicy extends ExpandableStringEnum { /** - * Static value Sequential for LocalDnsForwardPolicy. + * Implements sequential upstream DNS server selection. See [forward plugin](https://coredns.io/plugins/forward) for + * more information. */ public static final LocalDnsForwardPolicy SEQUENTIAL = fromString("Sequential"); /** - * Static value RoundRobin for LocalDnsForwardPolicy. + * Implements round robin upstream DNS server selection. See [forward plugin](https://coredns.io/plugins/forward) + * for more information. */ public static final LocalDnsForwardPolicy ROUND_ROBIN = fromString("RoundRobin"); /** - * Static value Random for LocalDnsForwardPolicy. + * Implements random upstream DNS server selection. See [forward plugin](https://coredns.io/plugins/forward) for + * more information. */ public static final LocalDnsForwardPolicy RANDOM = fromString("Random"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsMode.java index 0d9ae3ad031b..d4b2607365db 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsMode.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,17 +12,17 @@ */ public final class LocalDnsMode extends ExpandableStringEnum { /** - * Static value Preferred for LocalDnsMode. + * If the current orchestrator version supports this feature, prefer enabling localDNS. */ public static final LocalDnsMode PREFERRED = fromString("Preferred"); /** - * Static value Required for LocalDnsMode. + * Enable localDNS. */ public static final LocalDnsMode REQUIRED = fromString("Required"); /** - * Static value Disabled for LocalDnsMode. + * Disable localDNS. */ public static final LocalDnsMode DISABLED = fromString("Disabled"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsOverride.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsOverride.java index 7bd4f379f4ef..56c815c213e1 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsOverride.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsOverride.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProfile.java index cbbd0d7cb0bf..be86b018ed35 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -32,12 +32,12 @@ public final class LocalDnsProfile implements JsonSerializable * VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default or kubelet (referred to as VnetDNS * traffic). */ - private Map vnetDnsOverrides; + private Map vnetDNSOverrides; /* * KubeDNS overrides apply to DNS traffic from pods with dnsPolicy:ClusterFirst (referred to as KubeDNS traffic). */ - private Map kubeDnsOverrides; + private Map kubeDNSOverrides; /** * Creates an instance of LocalDnsProfile class. @@ -75,46 +75,46 @@ public LocalDnsState state() { } /** - * Get the vnetDnsOverrides property: VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default or + * Get the vnetDNSOverrides property: VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default or * kubelet (referred to as VnetDNS traffic). * - * @return the vnetDnsOverrides value. + * @return the vnetDNSOverrides value. */ - public Map vnetDnsOverrides() { - return this.vnetDnsOverrides; + public Map vnetDNSOverrides() { + return this.vnetDNSOverrides; } /** - * Set the vnetDnsOverrides property: VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default or + * Set the vnetDNSOverrides property: VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default or * kubelet (referred to as VnetDNS traffic). * - * @param vnetDnsOverrides the vnetDnsOverrides value to set. + * @param vnetDNSOverrides the vnetDNSOverrides value to set. * @return the LocalDnsProfile object itself. */ - public LocalDnsProfile withVnetDnsOverrides(Map vnetDnsOverrides) { - this.vnetDnsOverrides = vnetDnsOverrides; + public LocalDnsProfile withVnetDNSOverrides(Map vnetDNSOverrides) { + this.vnetDNSOverrides = vnetDNSOverrides; return this; } /** - * Get the kubeDnsOverrides property: KubeDNS overrides apply to DNS traffic from pods with dnsPolicy:ClusterFirst + * Get the kubeDNSOverrides property: KubeDNS overrides apply to DNS traffic from pods with dnsPolicy:ClusterFirst * (referred to as KubeDNS traffic). * - * @return the kubeDnsOverrides value. + * @return the kubeDNSOverrides value. */ - public Map kubeDnsOverrides() { - return this.kubeDnsOverrides; + public Map kubeDNSOverrides() { + return this.kubeDNSOverrides; } /** - * Set the kubeDnsOverrides property: KubeDNS overrides apply to DNS traffic from pods with dnsPolicy:ClusterFirst + * Set the kubeDNSOverrides property: KubeDNS overrides apply to DNS traffic from pods with dnsPolicy:ClusterFirst * (referred to as KubeDNS traffic). * - * @param kubeDnsOverrides the kubeDnsOverrides value to set. + * @param kubeDNSOverrides the kubeDNSOverrides value to set. * @return the LocalDnsProfile object itself. */ - public LocalDnsProfile withKubeDnsOverrides(Map kubeDnsOverrides) { - this.kubeDnsOverrides = kubeDnsOverrides; + public LocalDnsProfile withKubeDNSOverrides(Map kubeDNSOverrides) { + this.kubeDNSOverrides = kubeDNSOverrides; return this; } @@ -124,15 +124,15 @@ public LocalDnsProfile withKubeDnsOverrides(Map kubeDn * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (vnetDnsOverrides() != null) { - vnetDnsOverrides().values().forEach(e -> { + if (vnetDNSOverrides() != null) { + vnetDNSOverrides().values().forEach(e -> { if (e != null) { e.validate(); } }); } - if (kubeDnsOverrides() != null) { - kubeDnsOverrides().values().forEach(e -> { + if (kubeDNSOverrides() != null) { + kubeDNSOverrides().values().forEach(e -> { if (e != null) { e.validate(); } @@ -147,9 +147,9 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - jsonWriter.writeMapField("vnetDNSOverrides", this.vnetDnsOverrides, + jsonWriter.writeMapField("vnetDNSOverrides", this.vnetDNSOverrides, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeMapField("kubeDNSOverrides", this.kubeDnsOverrides, + jsonWriter.writeMapField("kubeDNSOverrides", this.kubeDNSOverrides, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -174,13 +174,13 @@ public static LocalDnsProfile fromJson(JsonReader jsonReader) throws IOException } else if ("state".equals(fieldName)) { deserializedLocalDnsProfile.state = LocalDnsState.fromString(reader.getString()); } else if ("vnetDNSOverrides".equals(fieldName)) { - Map vnetDnsOverrides + Map vnetDNSOverrides = reader.readMap(reader1 -> LocalDnsOverride.fromJson(reader1)); - deserializedLocalDnsProfile.vnetDnsOverrides = vnetDnsOverrides; + deserializedLocalDnsProfile.vnetDNSOverrides = vnetDNSOverrides; } else if ("kubeDNSOverrides".equals(fieldName)) { - Map kubeDnsOverrides + Map kubeDNSOverrides = reader.readMap(reader1 -> LocalDnsOverride.fromJson(reader1)); - deserializedLocalDnsProfile.kubeDnsOverrides = kubeDnsOverrides; + deserializedLocalDnsProfile.kubeDNSOverrides = kubeDNSOverrides; } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProtocol.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProtocol.java index 4ff3a5e7194c..4fd75e5c71ab 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProtocol.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProtocol.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,12 +12,12 @@ */ public final class LocalDnsProtocol extends ExpandableStringEnum { /** - * Static value PreferUDP for LocalDnsProtocol. + * Prefer UDP protocol for connections from localDNS to upstream DNS server. */ public static final LocalDnsProtocol PREFER_UDP = fromString("PreferUDP"); /** - * Static value ForceTCP for LocalDnsProtocol. + * Enforce TCP protocol for connections from localDNS to upstream DNS server. */ public static final LocalDnsProtocol FORCE_TCP = fromString("ForceTCP"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsQueryLogging.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsQueryLogging.java index 4c27d9badbe9..6bd73f58bf77 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsQueryLogging.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsQueryLogging.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,12 +12,12 @@ */ public final class LocalDnsQueryLogging extends ExpandableStringEnum { /** - * Static value Error for LocalDnsQueryLogging. + * Enables error logging in localDNS. See [errors plugin](https://coredns.io/plugins/errors) for more information. */ public static final LocalDnsQueryLogging ERROR = fromString("Error"); /** - * Static value Log for LocalDnsQueryLogging. + * Enables query logging in localDNS. See [log plugin](https://coredns.io/plugins/log) for more information. */ public static final LocalDnsQueryLogging LOG = fromString("Log"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsServeStale.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsServeStale.java index ea1184a977f0..76497662afdf 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsServeStale.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsServeStale.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,17 +12,20 @@ */ public final class LocalDnsServeStale extends ExpandableStringEnum { /** - * Static value Verify for LocalDnsServeStale. + * Serve stale data with verification. First verify that an entry is still unavailable from the source before + * sending the expired entry to the client. See [cache plugin](https://coredns.io/plugins/cache) for more + * information. */ public static final LocalDnsServeStale VERIFY = fromString("Verify"); /** - * Static value Immediate for LocalDnsServeStale. + * Serve stale data immediately. Send the expired entry to the client before checking to see if the entry is + * available from the source. See [cache plugin](https://coredns.io/plugins/cache) for more information. */ public static final LocalDnsServeStale IMMEDIATE = fromString("Immediate"); /** - * Static value Disable for LocalDnsServeStale. + * Disable serving stale data. */ public static final LocalDnsServeStale DISABLE = fromString("Disable"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsState.java index 93b21851689e..08baa73263dd 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsState.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,12 +12,12 @@ */ public final class LocalDnsState extends ExpandableStringEnum { /** - * Static value Enabled for LocalDnsState. + * localDNS is enabled. */ public static final LocalDnsState ENABLED = fromString("Enabled"); /** - * Static value Disabled for LocalDnsState. + * localDNS is disabled. */ public static final LocalDnsState DISABLED = fromString("Disabled"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineIpAddress.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineIpAddress.java index a6612cb6fcfd..1704f5549a7f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineIpAddress.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineIpAddress.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -29,7 +29,7 @@ public final class MachineIpAddress implements JsonSerializable writer.writeJson(element)); jsonWriter.writeJsonField("status", status()); - jsonWriter.writeJsonField("localDNSProfile", localDnsProfile()); + jsonWriter.writeJsonField("localDNSProfile", localDNSProfile()); jsonWriter.writeStringField("name", this.name); return jsonWriter.writeEndObject(); } @@ -715,7 +715,7 @@ public static ManagedClusterAgentPoolProfile fromJson(JsonReader jsonReader) thr reader.nextToken(); if ("eTag".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.etag = reader.getString(); + deserializedManagedClusterAgentPoolProfile.eTag = reader.getString(); } else if ("count".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.withCount(reader.getNullable(JsonReader::getInt)); } else if ("vmSize".equals(fieldName)) { @@ -847,7 +847,7 @@ public static ManagedClusterAgentPoolProfile fromJson(JsonReader jsonReader) thr } else if ("status".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.withStatus(AgentPoolStatus.fromJson(reader)); } else if ("localDNSProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withLocalDnsProfile(LocalDnsProfile.fromJson(reader)); + deserializedManagedClusterAgentPoolProfile.withLocalDNSProfile(LocalDnsProfile.fromJson(reader)); } else if ("name".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.name = reader.getString(); } else { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java index b1ba9d300a4e..3a1f485599a2 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -42,7 +42,7 @@ public final class ManagedClusterApiServerAccessProfile /* * Whether to create additional public FQDN for private cluster or not. */ - private Boolean enablePrivateClusterPublicFqdn; + private Boolean enablePrivateClusterPublicFQDN; /* * Whether to disable run command for the cluster or not. @@ -142,25 +142,25 @@ public ManagedClusterApiServerAccessProfile withPrivateDnsZone(String privateDns } /** - * Get the enablePrivateClusterPublicFqdn property: Whether to create additional public FQDN for private cluster or + * Get the enablePrivateClusterPublicFQDN property: Whether to create additional public FQDN for private cluster or * not. * - * @return the enablePrivateClusterPublicFqdn value. + * @return the enablePrivateClusterPublicFQDN value. */ - public Boolean enablePrivateClusterPublicFqdn() { - return this.enablePrivateClusterPublicFqdn; + public Boolean enablePrivateClusterPublicFQDN() { + return this.enablePrivateClusterPublicFQDN; } /** - * Set the enablePrivateClusterPublicFqdn property: Whether to create additional public FQDN for private cluster or + * Set the enablePrivateClusterPublicFQDN property: Whether to create additional public FQDN for private cluster or * not. * - * @param enablePrivateClusterPublicFqdn the enablePrivateClusterPublicFqdn value to set. + * @param enablePrivateClusterPublicFQDN the enablePrivateClusterPublicFQDN value to set. * @return the ManagedClusterApiServerAccessProfile object itself. */ public ManagedClusterApiServerAccessProfile - withEnablePrivateClusterPublicFqdn(Boolean enablePrivateClusterPublicFqdn) { - this.enablePrivateClusterPublicFqdn = enablePrivateClusterPublicFqdn; + withEnablePrivateClusterPublicFQDN(Boolean enablePrivateClusterPublicFQDN) { + this.enablePrivateClusterPublicFQDN = enablePrivateClusterPublicFQDN; return this; } @@ -246,7 +246,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("enablePrivateCluster", this.enablePrivateCluster); jsonWriter.writeStringField("privateDNSZone", this.privateDnsZone); - jsonWriter.writeBooleanField("enablePrivateClusterPublicFQDN", this.enablePrivateClusterPublicFqdn); + jsonWriter.writeBooleanField("enablePrivateClusterPublicFQDN", this.enablePrivateClusterPublicFQDN); jsonWriter.writeBooleanField("disableRunCommand", this.disableRunCommand); jsonWriter.writeBooleanField("enableVnetIntegration", this.enableVnetIntegration); jsonWriter.writeStringField("subnetId", this.subnetId); @@ -278,7 +278,7 @@ public static ManagedClusterApiServerAccessProfile fromJson(JsonReader jsonReade } else if ("privateDNSZone".equals(fieldName)) { deserializedManagedClusterApiServerAccessProfile.privateDnsZone = reader.getString(); } else if ("enablePrivateClusterPublicFQDN".equals(fieldName)) { - deserializedManagedClusterApiServerAccessProfile.enablePrivateClusterPublicFqdn + deserializedManagedClusterApiServerAccessProfile.enablePrivateClusterPublicFQDN = reader.getNullable(JsonReader::getBoolean); } else if ("disableRunCommand".equals(fieldName)) { deserializedManagedClusterApiServerAccessProfile.disableRunCommand diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java index cf6a236cb42e..f8e2e38dc949 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java index 929046a73d98..08e106811552 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java index c6fd51a2703f..49d74c21a9cd 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java index c429294b7ad5..fa17000e3cae 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterBootstrapProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterBootstrapProfile.java index eeb903b5db62..80c80305df4b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterBootstrapProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterBootstrapProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterCostAnalysis.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterCostAnalysis.java index c7c1b0473e7d..80c510eb4c51 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterCostAnalysis.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterCostAnalysis.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java index 24bb81b69756..aca96ac49794 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -37,6 +37,12 @@ public final class ManagedClusterHttpProxyConfig implements JsonSerializable writer.writeString(element)); jsonWriter.writeStringField("trustedCa", this.trustedCa); + jsonWriter.writeBooleanField("enabled", this.enabled); return jsonWriter.writeEndObject(); } @@ -169,6 +198,8 @@ public static ManagedClusterHttpProxyConfig fromJson(JsonReader jsonReader) thro deserializedManagedClusterHttpProxyConfig.noProxy = noProxy; } else if ("trustedCa".equals(fieldName)) { deserializedManagedClusterHttpProxyConfig.trustedCa = reader.getString(); + } else if ("enabled".equals(fieldName)) { + deserializedManagedClusterHttpProxyConfig.enabled = reader.getNullable(JsonReader::getBoolean); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIdentity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIdentity.java index cef1345cc612..af4a3856189d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIdentity.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java index ce50126d08fe..ad9d126f0f5c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileNginx.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileNginx.java index 5090b3a2cc80..6d5c1e0d90bb 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileNginx.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileNginx.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java index 7c7ac44b3702..4fa9b5deb7ef 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java index b01a7427e97b..e7831d521fb9 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -20,7 +20,7 @@ public final class ManagedClusterLoadBalancerProfile implements JsonSerializable /* * Desired managed outbound IPs for the cluster load balancer. */ - private ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIPs; + private ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIps; /* * Desired outbound IP Prefix resources for the cluster load balancer. @@ -30,12 +30,12 @@ public final class ManagedClusterLoadBalancerProfile implements JsonSerializable /* * Desired outbound IP resources for the cluster load balancer. */ - private ManagedClusterLoadBalancerProfileOutboundIPs outboundIPs; + private ManagedClusterLoadBalancerProfileOutboundIPs outboundIps; /* * The effective outbound IP resources of the cluster load balancer. */ - private List effectiveOutboundIPs; + private List effectiveOutboundIps; /* * The desired number of allocated SNAT ports per VM. Allowed values are in the range of 0 to 64000 (inclusive). The @@ -66,23 +66,23 @@ public ManagedClusterLoadBalancerProfile() { } /** - * Get the managedOutboundIPs property: Desired managed outbound IPs for the cluster load balancer. + * Get the managedOutboundIps property: Desired managed outbound IPs for the cluster load balancer. * - * @return the managedOutboundIPs value. + * @return the managedOutboundIps value. */ - public ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIPs() { - return this.managedOutboundIPs; + public ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIps() { + return this.managedOutboundIps; } /** - * Set the managedOutboundIPs property: Desired managed outbound IPs for the cluster load balancer. + * Set the managedOutboundIps property: Desired managed outbound IPs for the cluster load balancer. * - * @param managedOutboundIPs the managedOutboundIPs value to set. + * @param managedOutboundIps the managedOutboundIps value to set. * @return the ManagedClusterLoadBalancerProfile object itself. */ public ManagedClusterLoadBalancerProfile - withManagedOutboundIPs(ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIPs) { - this.managedOutboundIPs = managedOutboundIPs; + withManagedOutboundIps(ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIps) { + this.managedOutboundIps = managedOutboundIps; return this; } @@ -108,32 +108,32 @@ public ManagedClusterLoadBalancerProfileOutboundIpPrefixes outboundIpPrefixes() } /** - * Get the outboundIPs property: Desired outbound IP resources for the cluster load balancer. + * Get the outboundIps property: Desired outbound IP resources for the cluster load balancer. * - * @return the outboundIPs value. + * @return the outboundIps value. */ - public ManagedClusterLoadBalancerProfileOutboundIPs outboundIPs() { - return this.outboundIPs; + public ManagedClusterLoadBalancerProfileOutboundIPs outboundIps() { + return this.outboundIps; } /** - * Set the outboundIPs property: Desired outbound IP resources for the cluster load balancer. + * Set the outboundIps property: Desired outbound IP resources for the cluster load balancer. * - * @param outboundIPs the outboundIPs value to set. + * @param outboundIps the outboundIps value to set. * @return the ManagedClusterLoadBalancerProfile object itself. */ - public ManagedClusterLoadBalancerProfile withOutboundIPs(ManagedClusterLoadBalancerProfileOutboundIPs outboundIPs) { - this.outboundIPs = outboundIPs; + public ManagedClusterLoadBalancerProfile withOutboundIps(ManagedClusterLoadBalancerProfileOutboundIPs outboundIps) { + this.outboundIps = outboundIps; return this; } /** - * Get the effectiveOutboundIPs property: The effective outbound IP resources of the cluster load balancer. + * Get the effectiveOutboundIps property: The effective outbound IP resources of the cluster load balancer. * - * @return the effectiveOutboundIPs value. + * @return the effectiveOutboundIps value. */ - public List effectiveOutboundIPs() { - return this.effectiveOutboundIPs; + public List effectiveOutboundIps() { + return this.effectiveOutboundIps; } /** @@ -229,17 +229,17 @@ public ManagedClusterLoadBalancerProfile withBackendPoolType(BackendPoolType bac * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (managedOutboundIPs() != null) { - managedOutboundIPs().validate(); + if (managedOutboundIps() != null) { + managedOutboundIps().validate(); } if (outboundIpPrefixes() != null) { outboundIpPrefixes().validate(); } - if (outboundIPs() != null) { - outboundIPs().validate(); + if (outboundIps() != null) { + outboundIps().validate(); } - if (effectiveOutboundIPs() != null) { - effectiveOutboundIPs().forEach(e -> e.validate()); + if (effectiveOutboundIps() != null) { + effectiveOutboundIps().forEach(e -> e.validate()); } } @@ -249,9 +249,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("managedOutboundIPs", this.managedOutboundIPs); + jsonWriter.writeJsonField("managedOutboundIPs", this.managedOutboundIps); jsonWriter.writeJsonField("outboundIPPrefixes", this.outboundIpPrefixes); - jsonWriter.writeJsonField("outboundIPs", this.outboundIPs); + jsonWriter.writeJsonField("outboundIPs", this.outboundIps); jsonWriter.writeNumberField("allocatedOutboundPorts", this.allocatedOutboundPorts); jsonWriter.writeNumberField("idleTimeoutInMinutes", this.idleTimeoutInMinutes); jsonWriter.writeBooleanField("enableMultipleStandardLoadBalancers", this.enableMultipleStandardLoadBalancers); @@ -277,18 +277,18 @@ public static ManagedClusterLoadBalancerProfile fromJson(JsonReader jsonReader) reader.nextToken(); if ("managedOutboundIPs".equals(fieldName)) { - deserializedManagedClusterLoadBalancerProfile.managedOutboundIPs + deserializedManagedClusterLoadBalancerProfile.managedOutboundIps = ManagedClusterLoadBalancerProfileManagedOutboundIPs.fromJson(reader); } else if ("outboundIPPrefixes".equals(fieldName)) { deserializedManagedClusterLoadBalancerProfile.outboundIpPrefixes = ManagedClusterLoadBalancerProfileOutboundIpPrefixes.fromJson(reader); } else if ("outboundIPs".equals(fieldName)) { - deserializedManagedClusterLoadBalancerProfile.outboundIPs + deserializedManagedClusterLoadBalancerProfile.outboundIps = ManagedClusterLoadBalancerProfileOutboundIPs.fromJson(reader); } else if ("effectiveOutboundIPs".equals(fieldName)) { - List effectiveOutboundIPs + List effectiveOutboundIps = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); - deserializedManagedClusterLoadBalancerProfile.effectiveOutboundIPs = effectiveOutboundIPs; + deserializedManagedClusterLoadBalancerProfile.effectiveOutboundIps = effectiveOutboundIps; } else if ("allocatedOutboundPorts".equals(fieldName)) { deserializedManagedClusterLoadBalancerProfile.allocatedOutboundPorts = reader.getNullable(JsonReader::getInt); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java index 6b059301fd54..ce08e1cdbe51 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIPs.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIPs.java index dad12a301e4e..8ad090cca316 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIPs.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIPs.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -21,7 +21,7 @@ public final class ManagedClusterLoadBalancerProfileOutboundIPs /* * A list of public IP resources. */ - private List publicIPs; + private List publicIps; /** * Creates an instance of ManagedClusterLoadBalancerProfileOutboundIPs class. @@ -30,22 +30,22 @@ public ManagedClusterLoadBalancerProfileOutboundIPs() { } /** - * Get the publicIPs property: A list of public IP resources. + * Get the publicIps property: A list of public IP resources. * - * @return the publicIPs value. + * @return the publicIps value. */ - public List publicIPs() { - return this.publicIPs; + public List publicIps() { + return this.publicIps; } /** - * Set the publicIPs property: A list of public IP resources. + * Set the publicIps property: A list of public IP resources. * - * @param publicIPs the publicIPs value to set. + * @param publicIps the publicIps value to set. * @return the ManagedClusterLoadBalancerProfileOutboundIPs object itself. */ - public ManagedClusterLoadBalancerProfileOutboundIPs withPublicIPs(List publicIPs) { - this.publicIPs = publicIPs; + public ManagedClusterLoadBalancerProfileOutboundIPs withPublicIps(List publicIps) { + this.publicIps = publicIps; return this; } @@ -55,8 +55,8 @@ public ManagedClusterLoadBalancerProfileOutboundIPs withPublicIPs(List e.validate()); + if (publicIps() != null) { + publicIps().forEach(e -> e.validate()); } } @@ -66,7 +66,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("publicIPs", this.publicIPs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("publicIPs", this.publicIps, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -87,9 +87,9 @@ public static ManagedClusterLoadBalancerProfileOutboundIPs fromJson(JsonReader j reader.nextToken(); if ("publicIPs".equals(fieldName)) { - List publicIPs + List publicIps = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); - deserializedManagedClusterLoadBalancerProfileOutboundIPs.publicIPs = publicIPs; + deserializedManagedClusterLoadBalancerProfileOutboundIPs.publicIps = publicIps; } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java index f28ebf921629..6d141b61f27a 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterManagedOutboundIpProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterManagedOutboundIpProfile.java index 916a45258c47..ba2e7787bac1 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterManagedOutboundIpProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterManagedOutboundIpProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterMetricsProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterMetricsProfile.java index dd2199d93948..567348178156 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterMetricsProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterMetricsProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNatGatewayProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNatGatewayProfile.java index 3a466a995ba3..150e675aa136 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNatGatewayProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNatGatewayProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -25,7 +25,7 @@ public final class ManagedClusterNatGatewayProfile implements JsonSerializable effectiveOutboundIPs; + private List effectiveOutboundIps; /* * Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The @@ -63,12 +63,12 @@ public ManagedClusterManagedOutboundIpProfile managedOutboundIpProfile() { } /** - * Get the effectiveOutboundIPs property: The effective outbound IP resources of the cluster NAT gateway. + * Get the effectiveOutboundIps property: The effective outbound IP resources of the cluster NAT gateway. * - * @return the effectiveOutboundIPs value. + * @return the effectiveOutboundIps value. */ - public List effectiveOutboundIPs() { - return this.effectiveOutboundIPs; + public List effectiveOutboundIps() { + return this.effectiveOutboundIps; } /** @@ -102,8 +102,8 @@ public void validate() { if (managedOutboundIpProfile() != null) { managedOutboundIpProfile().validate(); } - if (effectiveOutboundIPs() != null) { - effectiveOutboundIPs().forEach(e -> e.validate()); + if (effectiveOutboundIps() != null) { + effectiveOutboundIps().forEach(e -> e.validate()); } } @@ -138,9 +138,9 @@ public static ManagedClusterNatGatewayProfile fromJson(JsonReader jsonReader) th deserializedManagedClusterNatGatewayProfile.managedOutboundIpProfile = ManagedClusterManagedOutboundIpProfile.fromJson(reader); } else if ("effectiveOutboundIPs".equals(fieldName)) { - List effectiveOutboundIPs + List effectiveOutboundIps = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); - deserializedManagedClusterNatGatewayProfile.effectiveOutboundIPs = effectiveOutboundIPs; + deserializedManagedClusterNatGatewayProfile.effectiveOutboundIps = effectiveOutboundIps; } else if ("idleTimeoutInMinutes".equals(fieldName)) { deserializedManagedClusterNatGatewayProfile.idleTimeoutInMinutes = reader.getNullable(JsonReader::getInt); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeProvisioningProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeProvisioningProfile.java index 517674eb18a4..7323674e6d23 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeProvisioningProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeProvisioningProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java index e3485eccdee3..d79c0bf850e5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterOidcIssuerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterOidcIssuerProfile.java index b8b9da10b000..4972492c351c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterOidcIssuerProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterOidcIssuerProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentity.java index 5c44d97dcc1f..ab9021b23a98 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentity.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityException.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityException.java index 100cdff0b894..28a3a0d9b8f5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityException.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityException.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProfile.java index 0a7c6c40a30f..2107f27a036f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningError.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningError.java index e9077e1475ca..8aa8fc8f31c5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningError.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningError.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * An error response from the pod identity provisioning. */ -@Fluent +@Immutable public final class ManagedClusterPodIdentityProvisioningError implements JsonSerializable { /* @@ -25,7 +25,7 @@ public final class ManagedClusterPodIdentityProvisioningError /** * Creates an instance of ManagedClusterPodIdentityProvisioningError class. */ - public ManagedClusterPodIdentityProvisioningError() { + private ManagedClusterPodIdentityProvisioningError() { } /** @@ -37,17 +37,6 @@ public ManagedClusterPodIdentityProvisioningErrorBody error() { return this.error; } - /** - * Set the error property: Details about the error. - * - * @param error the error value to set. - * @return the ManagedClusterPodIdentityProvisioningError object itself. - */ - public ManagedClusterPodIdentityProvisioningError withError(ManagedClusterPodIdentityProvisioningErrorBody error) { - this.error = error; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningErrorBody.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningErrorBody.java index bb3ef75fa8cf..a8b156acf628 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningErrorBody.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningErrorBody.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * An error response from the pod identity provisioning. */ -@Fluent +@Immutable public final class ManagedClusterPodIdentityProvisioningErrorBody implements JsonSerializable { /* @@ -41,7 +41,7 @@ public final class ManagedClusterPodIdentityProvisioningErrorBody /** * Creates an instance of ManagedClusterPodIdentityProvisioningErrorBody class. */ - public ManagedClusterPodIdentityProvisioningErrorBody() { + private ManagedClusterPodIdentityProvisioningErrorBody() { } /** @@ -54,18 +54,6 @@ public String code() { return this.code; } - /** - * Set the code property: An identifier for the error. Codes are invariant and are intended to be consumed - * programmatically. - * - * @param code the code value to set. - * @return the ManagedClusterPodIdentityProvisioningErrorBody object itself. - */ - public ManagedClusterPodIdentityProvisioningErrorBody withCode(String code) { - this.code = code; - return this; - } - /** * Get the message property: A message describing the error, intended to be suitable for display in a user * interface. @@ -76,18 +64,6 @@ public String message() { return this.message; } - /** - * Set the message property: A message describing the error, intended to be suitable for display in a user - * interface. - * - * @param message the message value to set. - * @return the ManagedClusterPodIdentityProvisioningErrorBody object itself. - */ - public ManagedClusterPodIdentityProvisioningErrorBody withMessage(String message) { - this.message = message; - return this; - } - /** * Get the target property: The target of the particular error. For example, the name of the property in error. * @@ -97,17 +73,6 @@ public String target() { return this.target; } - /** - * Set the target property: The target of the particular error. For example, the name of the property in error. - * - * @param target the target value to set. - * @return the ManagedClusterPodIdentityProvisioningErrorBody object itself. - */ - public ManagedClusterPodIdentityProvisioningErrorBody withTarget(String target) { - this.target = target; - return this; - } - /** * Get the details property: A list of additional details about the error. * @@ -117,18 +82,6 @@ public List details() { return this.details; } - /** - * Set the details property: A list of additional details about the error. - * - * @param details the details value to set. - * @return the ManagedClusterPodIdentityProvisioningErrorBody object itself. - */ - public ManagedClusterPodIdentityProvisioningErrorBody - withDetails(List details) { - this.details = details; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningInfo.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningInfo.java index 7545bf5770c9..490ab1bb147d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningInfo.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Pod identity provisioning information. */ -@Fluent +@Immutable public final class ManagedClusterPodIdentityProvisioningInfo implements JsonSerializable { /* @@ -25,7 +25,7 @@ public final class ManagedClusterPodIdentityProvisioningInfo /** * Creates an instance of ManagedClusterPodIdentityProvisioningInfo class. */ - public ManagedClusterPodIdentityProvisioningInfo() { + private ManagedClusterPodIdentityProvisioningInfo() { } /** @@ -37,17 +37,6 @@ public ManagedClusterPodIdentityProvisioningError error() { return this.error; } - /** - * Set the error property: Pod identity assignment error (if any). - * - * @param error the error value to set. - * @return the ManagedClusterPodIdentityProvisioningInfo object itself. - */ - public ManagedClusterPodIdentityProvisioningInfo withError(ManagedClusterPodIdentityProvisioningError error) { - this.error = error; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningState.java index 546e97059df1..1345c99b844c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningState.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -13,32 +13,32 @@ public final class ManagedClusterPodIdentityProvisioningState extends ExpandableStringEnum { /** - * Static value Assigned for ManagedClusterPodIdentityProvisioningState. + * Pod identity is assigned. */ public static final ManagedClusterPodIdentityProvisioningState ASSIGNED = fromString("Assigned"); /** - * Static value Canceled for ManagedClusterPodIdentityProvisioningState. + * Pod identity assignment was canceled. */ public static final ManagedClusterPodIdentityProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Deleting for ManagedClusterPodIdentityProvisioningState. + * Pod identity is being deleted. */ public static final ManagedClusterPodIdentityProvisioningState DELETING = fromString("Deleting"); /** - * Static value Failed for ManagedClusterPodIdentityProvisioningState. + * Pod identity assignment failed. */ public static final ManagedClusterPodIdentityProvisioningState FAILED = fromString("Failed"); /** - * Static value Succeeded for ManagedClusterPodIdentityProvisioningState. + * Pod identity assignment succeeded. */ public static final ManagedClusterPodIdentityProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Updating for ManagedClusterPodIdentityProvisioningState. + * Pod identity is being updated. */ public static final ManagedClusterPodIdentityProvisioningState UPDATING = fromString("Updating"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java index cf748f44a4a2..2fe55571ce53 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -16,7 +16,7 @@ /** * The list of available upgrade versions. */ -@Fluent +@Immutable public final class ManagedClusterPoolUpgradeProfile implements JsonSerializable { /* * The Kubernetes version (major.minor.patch). @@ -41,7 +41,7 @@ public final class ManagedClusterPoolUpgradeProfile implements JsonSerializable< /** * Creates an instance of ManagedClusterPoolUpgradeProfile class. */ - public ManagedClusterPoolUpgradeProfile() { + private ManagedClusterPoolUpgradeProfile() { } /** @@ -53,17 +53,6 @@ public String kubernetesVersion() { return this.kubernetesVersion; } - /** - * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). - * - * @param kubernetesVersion the kubernetesVersion value to set. - * @return the ManagedClusterPoolUpgradeProfile object itself. - */ - public ManagedClusterPoolUpgradeProfile withKubernetesVersion(String kubernetesVersion) { - this.kubernetesVersion = kubernetesVersion; - return this; - } - /** * Get the name property: The Agent Pool name. * @@ -73,17 +62,6 @@ public String name() { return this.name; } - /** - * Set the name property: The Agent Pool name. - * - * @param name the name value to set. - * @return the ManagedClusterPoolUpgradeProfile object itself. - */ - public ManagedClusterPoolUpgradeProfile withName(String name) { - this.name = name; - return this; - } - /** * Get the osType property: The operating system type. The default is Linux. * @@ -93,17 +71,6 @@ public OSType osType() { return this.osType; } - /** - * Set the osType property: The operating system type. The default is Linux. - * - * @param osType the osType value to set. - * @return the ManagedClusterPoolUpgradeProfile object itself. - */ - public ManagedClusterPoolUpgradeProfile withOsType(OSType osType) { - this.osType = osType; - return this; - } - /** * Get the upgrades property: List of orchestrator types and versions available for upgrade. * @@ -113,17 +80,6 @@ public List upgrades() { return this.upgrades; } - /** - * Set the upgrades property: List of orchestrator types and versions available for upgrade. - * - * @param upgrades the upgrades value to set. - * @return the ManagedClusterPoolUpgradeProfile object itself. - */ - public ManagedClusterPoolUpgradeProfile withUpgrades(List upgrades) { - this.upgrades = upgrades; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java index f67331554f6d..8717467dc2aa 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Available upgrades for an AgentPool. */ -@Fluent +@Immutable public final class ManagedClusterPoolUpgradeProfileUpgradesItem implements JsonSerializable { /* @@ -30,7 +30,7 @@ public final class ManagedClusterPoolUpgradeProfileUpgradesItem /** * Creates an instance of ManagedClusterPoolUpgradeProfileUpgradesItem class. */ - public ManagedClusterPoolUpgradeProfileUpgradesItem() { + private ManagedClusterPoolUpgradeProfileUpgradesItem() { } /** @@ -42,17 +42,6 @@ public String kubernetesVersion() { return this.kubernetesVersion; } - /** - * Set the kubernetesVersion property: The Kubernetes version (major.minor.patch). - * - * @param kubernetesVersion the kubernetesVersion value to set. - * @return the ManagedClusterPoolUpgradeProfileUpgradesItem object itself. - */ - public ManagedClusterPoolUpgradeProfileUpgradesItem withKubernetesVersion(String kubernetesVersion) { - this.kubernetesVersion = kubernetesVersion; - return this; - } - /** * Get the isPreview property: Whether the Kubernetes version is currently in preview. * @@ -62,17 +51,6 @@ public Boolean isPreview() { return this.isPreview; } - /** - * Set the isPreview property: Whether the Kubernetes version is currently in preview. - * - * @param isPreview the isPreview value to set. - * @return the ManagedClusterPoolUpgradeProfileUpgradesItem object itself. - */ - public ManagedClusterPoolUpgradeProfileUpgradesItem withIsPreview(Boolean isPreview) { - this.isPreview = isPreview; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java index b4e194a1ef21..4b320529f0f7 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java index 014323f743dc..87f640c2a584 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java index 78e8613b9bdb..3f831383f5de 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java index d0da2997534e..32395b126e57 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageCleaner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageCleaner.java index 700820e65270..3e643c004d69 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageCleaner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageCleaner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileWorkloadIdentity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileWorkloadIdentity.java index cc7af8f1f25a..06f0d91883a5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileWorkloadIdentity.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileWorkloadIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterServicePrincipalProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterServicePrincipalProfile.java index 6f82f9aed391..8a097de30fc4 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterServicePrincipalProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterServicePrincipalProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSku.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSku.java index 25b666b9f8d7..0295d9bcbacd 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSku.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSku.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuName.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuName.java index 306cf49fc131..8cc78c04f1d9 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuName.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,12 +12,14 @@ */ public final class ManagedClusterSkuName extends ExpandableStringEnum { /** - * Static value Base for ManagedClusterSkuName. + * Base option for the AKS control plane. */ public static final ManagedClusterSkuName BASE = fromString("Base"); /** - * Static value Automatic for ManagedClusterSkuName. + * Automatic clusters are optimized to run most production workloads with configuration that follows AKS best + * practices and recommendations for cluster and workload setup, scalability, and security. For more details about + * Automatic clusters see aka.ms/aks/automatic. */ public static final ManagedClusterSkuName AUTOMATIC = fromString("Automatic"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuTier.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuTier.java index dda63fccb506..b6068595e15d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuTier.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuTier.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -13,17 +13,22 @@ */ public final class ManagedClusterSkuTier extends ExpandableStringEnum { /** - * Static value Premium for ManagedClusterSkuTier. + * Cluster has premium capabilities in addition to all of the capabilities included in 'Standard'. Premium enables + * selection of LongTermSupport (aka.ms/aks/lts) for certain Kubernetes versions. */ public static final ManagedClusterSkuTier PREMIUM = fromString("Premium"); /** - * Static value Standard for ManagedClusterSkuTier. + * Recommended for mission-critical and production workloads. Includes Kubernetes control plane autoscaling, + * workload-intensive testing, and up to 5,000 nodes per cluster. Guarantees 99.95% availability of the Kubernetes + * API server endpoint for clusters that use Availability Zones and 99.9% of availability for clusters that don't + * use Availability Zones. */ public static final ManagedClusterSkuTier STANDARD = fromString("Standard"); /** - * Static value Free for ManagedClusterSkuTier. + * The cluster management is free, but charged for VM, storage, and networking usage. Best for experimenting, + * learning, simple testing, or workloads with fewer than 10 nodes. Not recommended for production use cases. */ public static final ManagedClusterSkuTier FREE = fromString("Free"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStaticEgressGatewayProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStaticEgressGatewayProfile.java index c75598f87142..798615972376 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStaticEgressGatewayProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStaticEgressGatewayProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStatus.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStatus.java index 753a202164b9..bc5724c5f4eb 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStatus.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfile.java index 4597f55159a4..adfdf8e2b7c4 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -19,12 +19,12 @@ public final class ManagedClusterStorageProfile implements JsonSerializable { /* * The revision of the mesh release. @@ -35,7 +35,7 @@ public class MeshRevision implements JsonSerializable { /** * Creates an instance of MeshRevision class. */ - public MeshRevision() { + protected MeshRevision() { } /** @@ -53,7 +53,7 @@ public String revision() { * @param revision the revision value to set. * @return the MeshRevision object itself. */ - public MeshRevision withRevision(String revision) { + MeshRevision withRevision(String revision) { this.revision = revision; return this; } @@ -73,7 +73,7 @@ public List upgrades() { * @param upgrades the upgrades value to set. * @return the MeshRevision object itself. */ - public MeshRevision withUpgrades(List upgrades) { + MeshRevision withUpgrades(List upgrades) { this.upgrades = upgrades; return this; } @@ -95,7 +95,7 @@ public List compatibleWith() { * @param compatibleWith the compatibleWith value to set. * @return the MeshRevision object itself. */ - public MeshRevision withCompatibleWith(List compatibleWith) { + MeshRevision withCompatibleWith(List compatibleWith) { this.compatibleWith = compatibleWith; return this; } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileProperties.java index 2276a2a34925..bea5686f3113 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Mesh revision profile properties for a mesh. */ -@Fluent +@Immutable public final class MeshRevisionProfileProperties implements JsonSerializable { /* * Available mesh revisions. @@ -25,7 +25,7 @@ public final class MeshRevisionProfileProperties implements JsonSerializable meshRevisions() { return this.meshRevisions; } - /** - * Set the meshRevisions property: Available mesh revisions. - * - * @param meshRevisions the meshRevisions value to set. - * @return the MeshRevisionProfileProperties object itself. - */ - public MeshRevisionProfileProperties withMeshRevisions(List meshRevisions) { - this.meshRevisions = meshRevisions; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileProperties.java index 82eb185db101..100a0262ff04 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -14,39 +14,58 @@ /** * Mesh upgrade profile properties for a major.minor release. */ -@Fluent +@Immutable public final class MeshUpgradeProfileProperties extends MeshRevision { + /* + * List of items this revision of service mesh is compatible with, and their associated versions. + */ + private List compatibleWith; + + /* + * List of revisions available for upgrade of a specific mesh revision + */ + private List upgrades; + + /* + * The revision of the mesh release. + */ + private String revision; + /** * Creates an instance of MeshUpgradeProfileProperties class. */ - public MeshUpgradeProfileProperties() { + private MeshUpgradeProfileProperties() { } /** - * {@inheritDoc} + * Get the compatibleWith property: List of items this revision of service mesh is compatible with, and their + * associated versions. + * + * @return the compatibleWith value. */ @Override - public MeshUpgradeProfileProperties withRevision(String revision) { - super.withRevision(revision); - return this; + public List compatibleWith() { + return this.compatibleWith; } /** - * {@inheritDoc} + * Get the upgrades property: List of revisions available for upgrade of a specific mesh revision. + * + * @return the upgrades value. */ @Override - public MeshUpgradeProfileProperties withUpgrades(List upgrades) { - super.withUpgrades(upgrades); - return this; + public List upgrades() { + return this.upgrades; } /** - * {@inheritDoc} + * Get the revision property: The revision of the mesh release. + * + * @return the revision value. */ @Override - public MeshUpgradeProfileProperties withCompatibleWith(List compatibleWith) { - super.withCompatibleWith(compatibleWith); - return this; + public String revision() { + return this.revision; } /** @@ -89,14 +108,14 @@ public static MeshUpgradeProfileProperties fromJson(JsonReader jsonReader) throw reader.nextToken(); if ("revision".equals(fieldName)) { - deserializedMeshUpgradeProfileProperties.withRevision(reader.getString()); + deserializedMeshUpgradeProfileProperties.revision = reader.getString(); } else if ("upgrades".equals(fieldName)) { List upgrades = reader.readArray(reader1 -> reader1.getString()); - deserializedMeshUpgradeProfileProperties.withUpgrades(upgrades); + deserializedMeshUpgradeProfileProperties.upgrades = upgrades; } else if ("compatibleWith".equals(fieldName)) { List compatibleWith = reader.readArray(reader1 -> CompatibleVersions.fromJson(reader1)); - deserializedMeshUpgradeProfileProperties.withCompatibleWith(compatibleWith); + deserializedMeshUpgradeProfileProperties.compatibleWith = compatibleWith; } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProperties.java index 4abf775728e9..92dec9d16908 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProvisioningState.java index c52c72d0eefd..c72a34d79e18 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProvisioningState.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,32 +12,32 @@ */ public final class NamespaceProvisioningState extends ExpandableStringEnum { /** - * Static value Updating for NamespaceProvisioningState. + * The namespace is being updated. */ public static final NamespaceProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for NamespaceProvisioningState. + * The namespace is being deleted. */ public static final NamespaceProvisioningState DELETING = fromString("Deleting"); /** - * Static value Creating for NamespaceProvisioningState. + * The namespace is being created. */ public static final NamespaceProvisioningState CREATING = fromString("Creating"); /** - * Static value Succeeded for NamespaceProvisioningState. + * The namespace provisioning succeeded. */ public static final NamespaceProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for NamespaceProvisioningState. + * The namespace provisioning failed. */ public static final NamespaceProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for NamespaceProvisioningState. + * The namespace provisioning was canceled. */ public static final NamespaceProvisioningState CANCELED = fromString("Canceled"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkDataplane.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkDataplane.java index aba8540b5e7e..36bb59da593d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkDataplane.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkDataplane.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,12 +12,13 @@ */ public final class NetworkDataplane extends ExpandableStringEnum { /** - * Static value azure for NetworkDataplane. + * Use Azure network dataplane. */ public static final NetworkDataplane AZURE = fromString("azure"); /** - * Static value cilium for NetworkDataplane. + * Use Cilium network dataplane. See [Azure CNI Powered by + * Cilium](https://learn.microsoft.com/azure/aks/azure-cni-powered-by-cilium) for more information. */ public static final NetworkDataplane CILIUM = fromString("cilium"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkMode.java index d6fb206936a3..daa4a5f04d4f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkMode.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -13,12 +13,13 @@ */ public final class NetworkMode extends ExpandableStringEnum { /** - * Static value transparent for NetworkMode. + * No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure CNI. See + * [Transparent Mode](https://docs.microsoft.com/azure/aks/faq#transparent-mode) for more information. */ public static final NetworkMode TRANSPARENT = fromString("transparent"); /** - * Static value bridge for NetworkMode. + * This is no longer supported. */ public static final NetworkMode BRIDGE = fromString("bridge"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPlugin.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPlugin.java index ac78ed293a37..6292a28f8fc8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPlugin.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPlugin.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,17 +12,21 @@ */ public final class NetworkPlugin extends ExpandableStringEnum { /** - * Static value azure for NetworkPlugin. + * Use the Azure CNI network plugin. See [Azure CNI (advanced) + * networking](https://docs.microsoft.com/azure/aks/concepts-network#azure-cni-advanced-networking) for more + * information. */ public static final NetworkPlugin AZURE = fromString("azure"); /** - * Static value kubenet for NetworkPlugin. + * Use the Kubenet network plugin. See [Kubenet (basic) + * networking](https://docs.microsoft.com/azure/aks/concepts-network#kubenet-basic-networking) for more information. */ public static final NetworkPlugin KUBENET = fromString("kubenet"); /** - * Static value none for NetworkPlugin. + * No CNI plugin is pre-installed. See [BYO CNI](https://docs.microsoft.com/en-us/azure/aks/use-byo-cni) for more + * information. */ public static final NetworkPlugin NONE = fromString("none"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPluginMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPluginMode.java index eee6c3486d77..9a62262f7627 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPluginMode.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPluginMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,7 +12,8 @@ */ public final class NetworkPluginMode extends ExpandableStringEnum { /** - * Static value overlay for NetworkPluginMode. + * Used with networkPlugin=azure, pods are given IPs from the PodCIDR address space but use Azure Routing Domains + * rather than Kubenet's method of route tables. For more information visit https://aka.ms/aks/azure-cni-overlay. */ public static final NetworkPluginMode OVERLAY = fromString("overlay"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicies.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicies.java index f1bd59a6f87f..b1c057127b97 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicies.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicies.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicy.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicy.java index 7841e4178e79..ca91b169760c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicy.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,22 +12,26 @@ */ public final class NetworkPolicy extends ExpandableStringEnum { /** - * Static value none for NetworkPolicy. + * Network policies will not be enforced. This is the default value when NetworkPolicy is not specified. */ public static final NetworkPolicy NONE = fromString("none"); /** - * Static value calico for NetworkPolicy. + * Use Calico network policies. See [differences between Azure and Calico + * policies](https://docs.microsoft.com/azure/aks/use-network-policies#differences-between-azure-and-calico-policies-and-their-capabilities) + * for more information. */ public static final NetworkPolicy CALICO = fromString("calico"); /** - * Static value azure for NetworkPolicy. + * Use Azure network policies. See [differences between Azure and Calico + * policies](https://docs.microsoft.com/azure/aks/use-network-policies#differences-between-azure-and-calico-policies-and-their-capabilities) + * for more information. */ public static final NetworkPolicy AZURE = fromString("azure"); /** - * Static value cilium for NetworkPolicy. + * Use Cilium to enforce network policies. This requires networkDataplane to be 'cilium'. */ public static final NetworkPolicy CILIUM = fromString("cilium"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NginxIngressControllerType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NginxIngressControllerType.java index ec0dd92c299c..a4b94c1d3d65 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NginxIngressControllerType.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NginxIngressControllerType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,22 +12,26 @@ */ public final class NginxIngressControllerType extends ExpandableStringEnum { /** - * Static value AnnotationControlled for NginxIngressControllerType. + * The default NginxIngressController will be created. Users can edit the default NginxIngressController Custom + * Resource to configure load balancer annotations. */ public static final NginxIngressControllerType ANNOTATION_CONTROLLED = fromString("AnnotationControlled"); /** - * Static value External for NginxIngressControllerType. + * The default NginxIngressController will be created and the operator will provision an external loadbalancer with + * it. Any annotation to make the default loadbalancer internal will be overwritten. */ public static final NginxIngressControllerType EXTERNAL = fromString("External"); /** - * Static value Internal for NginxIngressControllerType. + * The default NginxIngressController will be created and the operator will provision an internal loadbalancer with + * it. Any annotation to make the default loadbalancer external will be overwritten. */ public static final NginxIngressControllerType INTERNAL = fromString("Internal"); /** - * Static value None for NginxIngressControllerType. + * The default Ingress Controller will not be created. It will not be deleted by the system if it exists. Users + * should delete the default NginxIngressController Custom Resource manually if desired. */ public static final NginxIngressControllerType NONE = fromString("None"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java index 8f9de197ee22..21fc73847053 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,22 +12,33 @@ */ public final class NodeOSUpgradeChannel extends ExpandableStringEnum { /** - * Static value None for NodeOSUpgradeChannel. + * No attempt to update your machines OS will be made either by OS or by rolling VHDs. This means you are + * responsible for your security updates. */ public static final NodeOSUpgradeChannel NONE = fromString("None"); /** - * Static value Unmanaged for NodeOSUpgradeChannel. + * OS updates will be applied automatically through the OS built-in patching infrastructure. Newly scaled in + * machines will be unpatched initially and will be patched at some point by the OS's infrastructure. Behavior of + * this option depends on the OS in question. Ubuntu and Mariner apply security patches through unattended upgrade + * roughly once a day around 06:00 UTC. Windows does not apply security patches automatically and so for them this + * option is equivalent to None till further notice. */ public static final NodeOSUpgradeChannel UNMANAGED = fromString("Unmanaged"); /** - * Static value NodeImage for NodeOSUpgradeChannel. + * AKS will update the nodes with a newly patched VHD containing security fixes and bugfixes on a weekly cadence. + * With the VHD update machines will be rolling reimaged to that VHD following maintenance windows and surge + * settings. No extra VHD cost is incurred when choosing this option as AKS hosts the images. */ public static final NodeOSUpgradeChannel NODE_IMAGE = fromString("NodeImage"); /** - * Static value SecurityPatch for NodeOSUpgradeChannel. + * AKS downloads and updates the nodes with tested security updates. These updates honor the maintenance window + * settings and produce a new VHD that is used on new nodes. On some occasions it's not possible to apply the + * updates in place, in such cases the existing nodes will also be re-imaged to the newly produced VHD in order to + * apply the changes. This option incurs an extra cost of hosting the new Security Patch VHDs in your resource group + * for just in time consumption. */ public static final NodeOSUpgradeChannel SECURITY_PATCH = fromString("SecurityPatch"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningDefaultNodePools.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningDefaultNodePools.java index e9eb4ca1aea5..66d89238df62 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningDefaultNodePools.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningDefaultNodePools.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -16,12 +16,13 @@ */ public final class NodeProvisioningDefaultNodePools extends ExpandableStringEnum { /** - * Static value None for NodeProvisioningDefaultNodePools. + * No Karpenter NodePools are provisioned automatically. Automatic scaling will not happen unless the user creates + * one or more NodePool CRD instances. */ public static final NodeProvisioningDefaultNodePools NONE = fromString("None"); /** - * Static value Auto for NodeProvisioningDefaultNodePools. + * A standard set of Karpenter NodePools are provisioned. */ public static final NodeProvisioningDefaultNodePools AUTO = fromString("Auto"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningMode.java index 18a2c360e7fe..4e95396e7505 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningMode.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,12 +12,13 @@ */ public final class NodeProvisioningMode extends ExpandableStringEnum { /** - * Static value Manual for NodeProvisioningMode. + * Nodes are provisioned manually by the user. */ public static final NodeProvisioningMode MANUAL = fromString("Manual"); /** - * Static value Auto for NodeProvisioningMode. + * Nodes are provisioned automatically by AKS using Karpenter (See aka.ms/aks/nap for more details). Fixed size Node + * Pools can still be created, but autoscaling Node Pools cannot be. (See aka.ms/aks/nap for more details). */ public static final NodeProvisioningMode AUTO = fromString("Auto"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSDiskType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSDiskType.java index cea6111635cd..dab29652ba96 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSDiskType.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSDiskType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -15,12 +15,16 @@ */ public final class OSDiskType extends ExpandableStringEnum { /** - * Static value Managed for OSDiskType. + * Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data loss should the + * VM need to be relocated to another host. Since containers aren't designed to have local state persisted, this + * behavior offers limited value while providing some drawbacks, including slower node provisioning and higher + * read/write latency. */ public static final OSDiskType MANAGED = fromString("Managed"); /** - * Static value Ephemeral for OSDiskType. + * Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This provides lower + * read/write latency, along with faster node scaling and cluster upgrades. */ public static final OSDiskType EPHEMERAL = fromString("Ephemeral"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java index 988675bd21e2..fe5bedb17910 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -13,42 +13,49 @@ */ public final class OSSku extends ExpandableStringEnum { /** - * Static value Ubuntu for OSSku. + * Use Ubuntu as the OS for node images. */ public static final OSSku UBUNTU = fromString("Ubuntu"); /** - * Static value AzureLinux for OSSku. + * Use AzureLinux as the OS for node images. Azure Linux is a container-optimized Linux distro built by Microsoft, + * visit https://aka.ms/azurelinux for more information. */ public static final OSSku AZURE_LINUX = fromString("AzureLinux"); /** - * Static value AzureLinux3 for OSSku. + * Use AzureLinux3 as the OS for node images. Azure Linux is a container-optimized Linux distro built by Microsoft, + * visit https://aka.ms/azurelinux for more information. For limitations, visit https://aka.ms/aks/node-images. For + * OS migration guidance, see https://aka.ms/aks/upgrade-os-version. */ public static final OSSku AZURE_LINUX3 = fromString("AzureLinux3"); /** - * Static value CBLMariner for OSSku. + * Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead. */ public static final OSSku CBLMARINER = fromString("CBLMariner"); /** - * Static value Windows2019 for OSSku. + * Use Windows2019 as the OS for node images. Unsupported for system node pools. Windows2019 only supports + * Windows2019 containers; it cannot run Windows2022 containers and vice versa. */ public static final OSSku WINDOWS2019 = fromString("Windows2019"); /** - * Static value Windows2022 for OSSku. + * Use Windows2022 as the OS for node images. Unsupported for system node pools. Windows2022 only supports + * Windows2022 containers; it cannot run Windows2019 containers and vice versa. */ public static final OSSku WINDOWS2022 = fromString("Windows2022"); /** - * Static value Ubuntu2204 for OSSku. + * Use Ubuntu2204 as the OS for node images, however, Ubuntu 22.04 may not be supported for all nodepools. For + * limitations and supported kubernetes versions, see https://aka.ms/aks/supported-ubuntu-versions. */ public static final OSSku UBUNTU2204 = fromString("Ubuntu2204"); /** - * Static value Ubuntu2404 for OSSku. + * Use Ubuntu2404 as the OS for node images, however, Ubuntu 24.04 may not be supported for all nodepools. For + * limitations and supported kubernetes versions, see see https://aka.ms/aks/supported-ubuntu-versions. */ public static final OSSku UBUNTU2404 = fromString("Ubuntu2404"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSType.java index 7fecc4a5ef8e..36db13a0b129 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSType.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,12 +12,12 @@ */ public final class OSType extends ExpandableStringEnum { /** - * Static value Linux for OSType. + * Use Linux. */ public static final OSType LINUX = fromString("Linux"); /** - * Static value Windows for OSType. + * Use Windows. */ public static final OSType WINDOWS = fromString("Windows"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundType.java index c4415e9f4e44..54c470f6aa95 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundType.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -13,27 +13,34 @@ */ public final class OutboundType extends ExpandableStringEnum { /** - * Static value loadBalancer for OutboundType. + * The load balancer is used for egress through an AKS assigned public IP. This supports Kubernetes services of type + * 'loadBalancer'. For more information see [outbound type + * loadbalancer](https://docs.microsoft.com/azure/aks/egress-outboundtype#outbound-type-of-loadbalancer). */ public static final OutboundType LOAD_BALANCER = fromString("loadBalancer"); /** - * Static value userDefinedRouting for OutboundType. + * Egress paths must be defined by the user. This is an advanced scenario and requires proper network configuration. + * For more information see [outbound type + * userDefinedRouting](https://docs.microsoft.com/azure/aks/egress-outboundtype#outbound-type-of-userdefinedrouting). */ public static final OutboundType USER_DEFINED_ROUTING = fromString("userDefinedRouting"); /** - * Static value managedNATGateway for OutboundType. + * The AKS-managed NAT gateway is used for egress. */ public static final OutboundType MANAGED_NATGATEWAY = fromString("managedNATGateway"); /** - * Static value userAssignedNATGateway for OutboundType. + * The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an advanced scenario + * and requires proper network configuration. */ public static final OutboundType USER_ASSIGNED_NATGATEWAY = fromString("userAssignedNATGateway"); /** - * Static value none for OutboundType. + * The AKS cluster is not set with any outbound-type. All AKS nodes follows Azure VM default outbound behavior. + * Please refer to + * https://azure.microsoft.com/en-us/updates/default-outbound-access-for-vms-in-azure-will-be-retired-transition-to-a-new-method-of-internet-access/. */ public static final OutboundType NONE = fromString("none"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodIpAllocationMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodIpAllocationMode.java index f04f79bc76d1..767ae6ce7b6c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodIpAllocationMode.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodIpAllocationMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -13,12 +13,17 @@ */ public final class PodIpAllocationMode extends ExpandableStringEnum { /** - * Static value DynamicIndividual for PodIpAllocationMode. + * Each node gets allocated with a non-contiguous list of IP addresses assignable to pods. This is better for + * maximizing a small to medium subnet of size /16 or smaller. The Azure CNI cluster with dynamic IP allocation + * defaults to this mode if the customer does not explicitly specify a podIPAllocationMode. */ public static final PodIpAllocationMode DYNAMIC_INDIVIDUAL = fromString("DynamicIndividual"); /** - * Static value StaticBlock for PodIpAllocationMode. + * Each node is statically allocated CIDR block(s) of size /28 = 16 IPs per block to satisfy the maxPods per node. + * Number of CIDR blocks >= (maxPods / 16). The block, rather than a single IP, counts against the Azure Vnet + * Private IP limit of 65K. Therefore block mode is suitable for running larger workloads with more than the current + * limit of 65K pods in a cluster. This mode is better suited to scale with larger subnets of /15 or bigger. */ public static final PodIpAllocationMode STATIC_BLOCK = fromString("StaticBlock"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PolicyRule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PolicyRule.java index e0be3112b570..6a313bae0d5e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PolicyRule.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PolicyRule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,17 +12,17 @@ */ public final class PolicyRule extends ExpandableStringEnum { /** - * Static value DenyAll for PolicyRule. + * Deny all network traffic. */ public static final PolicyRule DENY_ALL = fromString("DenyAll"); /** - * Static value AllowAll for PolicyRule. + * Allow all network traffic. */ public static final PolicyRule ALLOW_ALL = fromString("AllowAll"); /** - * Static value AllowSameNamespace for PolicyRule. + * Allow traffic within the same namespace. */ public static final PolicyRule ALLOW_SAME_NAMESPACE = fromString("AllowSameNamespace"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PortRange.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PortRange.java index 4747a3ebbaaf..b484fee56f8b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PortRange.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PortRange.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PowerState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PowerState.java index 0343811403b8..3b0e9dc594ee 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PowerState.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PowerState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpoint.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpoint.java index 727c95cdda56..762a0500f952 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpoint.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpoint.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpointConnectionProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpointConnectionProvisioningState.java index 5c68c55a7c6a..8fbe0a07f045 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpointConnectionProvisioningState.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpointConnectionProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -13,27 +13,27 @@ public final class PrivateEndpointConnectionProvisioningState extends ExpandableStringEnum { /** - * Static value Canceled for PrivateEndpointConnectionProvisioningState. + * Private endpoint connection provisioning was canceled. */ public static final PrivateEndpointConnectionProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Creating for PrivateEndpointConnectionProvisioningState. + * Private endpoint connection is being created. */ public static final PrivateEndpointConnectionProvisioningState CREATING = fromString("Creating"); /** - * Static value Deleting for PrivateEndpointConnectionProvisioningState. + * Private endpoint connection is being deleted. */ public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); /** - * Static value Failed for PrivateEndpointConnectionProvisioningState. + * Private endpoint connection provisioning failed. */ public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); /** - * Static value Succeeded for PrivateEndpointConnectionProvisioningState. + * Private endpoint connection provisioning succeeded. */ public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateLinkServiceConnectionState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateLinkServiceConnectionState.java index 372d754fa982..38e420c5139b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateLinkServiceConnectionState.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PrivateLinkServiceConnectionState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Protocol.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Protocol.java index 6254a5bf8b22..2a2192426165 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Protocol.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Protocol.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,12 +12,12 @@ */ public final class Protocol extends ExpandableStringEnum { /** - * Static value TCP for Protocol. + * TCP protocol. */ public static final Protocol TCP = fromString("TCP"); /** - * Static value UDP for Protocol. + * UDP protocol. */ public static final Protocol UDP = fromString("UDP"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ProxyRedirectionMechanism.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ProxyRedirectionMechanism.java new file mode 100644 index 000000000000..5e757981d275 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ProxyRedirectionMechanism.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.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Mode of traffic redirection. + */ +public final class ProxyRedirectionMechanism extends ExpandableStringEnum { + /** + * Istio will inject an init container into each pod to redirect traffic (requires NET_ADMIN and NET_RAW). + */ + public static final ProxyRedirectionMechanism INIT_CONTAINERS = fromString("InitContainers"); + + /** + * Istio will install a chained CNI plugin to redirect traffic (recommended). + */ + public static final ProxyRedirectionMechanism CNICHAINING = fromString("CNIChaining"); + + /** + * Creates a new instance of ProxyRedirectionMechanism value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProxyRedirectionMechanism() { + } + + /** + * Creates or finds a ProxyRedirectionMechanism from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProxyRedirectionMechanism. + */ + public static ProxyRedirectionMechanism fromString(String name) { + return fromString(name, ProxyRedirectionMechanism.class); + } + + /** + * Gets known ProxyRedirectionMechanism values. + * + * @return known ProxyRedirectionMechanism values. + */ + public static Collection values() { + return values(ProxyRedirectionMechanism.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java index fbe44e756c02..d0f973ce2392 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,12 +12,12 @@ */ public final class PublicNetworkAccess extends ExpandableStringEnum { /** - * Static value Enabled for PublicNetworkAccess. + * Inbound/Outbound to the managedCluster is allowed. */ public static final PublicNetworkAccess ENABLED = fromString("Enabled"); /** - * Static value Disabled for PublicNetworkAccess. + * Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed. */ public static final PublicNetworkAccess DISABLED = fromString("Disabled"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java index aa8addd1d0cf..a3d9b8769c9e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceIdentityType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceIdentityType.java index 1899d9067344..7c9e76a92268 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceIdentityType.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceIdentityType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -13,17 +13,20 @@ */ public final class ResourceIdentityType extends ExpandableStringEnum { /** - * Static value SystemAssigned for ResourceIdentityType. + * Use an implicitly created system assigned managed identity to manage cluster resources. Master components in the + * control plane such as kube-controller-manager will use the system assigned managed identity to manipulate Azure + * resources. */ public static final ResourceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); /** - * Static value UserAssigned for ResourceIdentityType. + * Use a user-specified identity to manage cluster resources. Master components in the control plane such as + * kube-controller-manager will use the specified user assigned managed identity to manipulate Azure resources. */ public static final ResourceIdentityType USER_ASSIGNED = fromString("UserAssigned"); /** - * Static value None for ResourceIdentityType. + * Do not use a managed identity for the Managed Cluster, service principal will be used instead. */ public static final ResourceIdentityType NONE = fromString("None"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceQuota.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceQuota.java index 0864b9f04fc2..6f11b8e12ab9 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceQuota.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceQuota.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceReference.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceReference.java index 85d638939747..62789d111853 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceReference.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceReference.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java index 70664c2e4cac..25ee3b5ea85d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,12 +12,12 @@ */ public final class RestrictionLevel extends ExpandableStringEnum { /** - * Static value Unrestricted for RestrictionLevel. + * All RBAC permissions are allowed on the managed node resource group. */ public static final RestrictionLevel UNRESTRICTED = fromString("Unrestricted"); /** - * Static value ReadOnly for RestrictionLevel. + * Only \*\/read RBAC permissions allowed on the managed node resource group. */ public static final RestrictionLevel READ_ONLY = fromString("ReadOnly"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RunCommandRequest.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RunCommandRequest.java index ff3faecec4df..2a883d51da23 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RunCommandRequest.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RunCommandRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleDownMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleDownMode.java index 94132cc69826..459818b8be5d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleDownMode.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleDownMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -13,12 +13,13 @@ */ public final class ScaleDownMode extends ExpandableStringEnum { /** - * Static value Delete for ScaleDownMode. + * Create new instances during scale up and remove instances during scale down. */ public static final ScaleDownMode DELETE = fromString("Delete"); /** - * Static value Deallocate for ScaleDownMode. + * Attempt to start deallocated instances (if they exist) during scale up and deallocate instances during scale + * down. */ public static final ScaleDownMode DEALLOCATE = fromString("Deallocate"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java index 1796156c2698..b0dba05240f5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetEvictionPolicy.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetEvictionPolicy.java index 741e98374bbd..e506ab56577a 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetEvictionPolicy.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetEvictionPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -14,12 +14,14 @@ */ public final class ScaleSetEvictionPolicy extends ExpandableStringEnum { /** - * Static value Delete for ScaleSetEvictionPolicy. + * Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. */ public static final ScaleSetEvictionPolicy DELETE = fromString("Delete"); /** - * Static value Deallocate for ScaleSetEvictionPolicy. + * Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state upon eviction. Nodes + * in the stopped-deallocated state count against your compute quota and can cause issues with cluster scaling or + * upgrading. */ public static final ScaleSetEvictionPolicy DEALLOCATE = fromString("Deallocate"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetPriority.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetPriority.java index 05fc6bce3ab4..8083f61d0a63 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetPriority.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetPriority.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,12 +12,13 @@ */ public final class ScaleSetPriority extends ExpandableStringEnum { /** - * Static value Spot for ScaleSetPriority. + * Spot priority VMs will be used. There is no SLA for spot nodes. See [spot on + * AKS](https://docs.microsoft.com/azure/aks/spot-node-pool) for more information. */ public static final ScaleSetPriority SPOT = fromString("Spot"); /** - * Static value Regular for ScaleSetPriority. + * Regular VMs will be used. */ public static final ScaleSetPriority REGULAR = fromString("Regular"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Schedule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Schedule.java index 777d7a00dbcb..2603a0a4c54a 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Schedule.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Schedule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshMode.java index 1f586d09055c..8f1d85fad325 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshMode.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,12 +12,12 @@ */ public final class ServiceMeshMode extends ExpandableStringEnum { /** - * Static value Istio for ServiceMeshMode. + * Istio deployed as an AKS addon. */ public static final ServiceMeshMode ISTIO = fromString("Istio"); /** - * Static value Disabled for ServiceMeshMode. + * Mesh is disabled. */ public static final ServiceMeshMode DISABLED = fromString("Disabled"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshProfile.java index f66122abba02..17525faea4c5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java index f538d165b648..6539cbbd4092 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,7 +12,7 @@ */ public final class SnapshotType extends ExpandableStringEnum { /** - * Static value NodePool for SnapshotType. + * The snapshot is a snapshot of a node pool. */ public static final SnapshotType NODE_POOL = fromString("NodePool"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SysctlConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SysctlConfig.java index 54dd49cd01f0..dcda0484a190 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SysctlConfig.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SysctlConfig.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TagsObject.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TagsObject.java index 02794c06addb..2ae67b417e56 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TagsObject.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TagsObject.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeInWeek.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeInWeek.java index f4a9a9081f29..d174785fd5cc 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeInWeek.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeInWeek.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeSpan.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeSpan.java index 3da892c49cd7..81d1c47ea800 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeSpan.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TimeSpan.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java new file mode 100644 index 000000000000..588980d9452c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.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.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Configures pod-to-pod encryption. This can be enabled only on Cilium-based clusters. If not specified, the default + * value is None. + */ +public final class TransitEncryptionType extends ExpandableStringEnum { + /** + * Enable WireGuard encryption. Refer to https://docs.cilium.io/en/latest/security/network/encryption-wireguard/ on + * use cases and implementation details. + */ + public static final TransitEncryptionType WIRE_GUARD = fromString("WireGuard"); + + /** + * Disable Transit encryption. + */ + public static final TransitEncryptionType NONE = fromString("None"); + + /** + * Creates a new instance of TransitEncryptionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TransitEncryptionType() { + } + + /** + * Creates or finds a TransitEncryptionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding TransitEncryptionType. + */ + public static TransitEncryptionType fromString(String name) { + return fromString(name, TransitEncryptionType.class); + } + + /** + * Gets known TransitEncryptionType values. + * + * @return known TransitEncryptionType values. + */ + public static Collection values() { + return values(TransitEncryptionType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingProvisioningState.java index ca55418c59ed..f3074028bfc0 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingProvisioningState.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -13,27 +13,27 @@ public final class TrustedAccessRoleBindingProvisioningState extends ExpandableStringEnum { /** - * Static value Canceled for TrustedAccessRoleBindingProvisioningState. + * Trusted access role binding provisioning was canceled. */ public static final TrustedAccessRoleBindingProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Deleting for TrustedAccessRoleBindingProvisioningState. + * Trusted access role binding is being deleted. */ public static final TrustedAccessRoleBindingProvisioningState DELETING = fromString("Deleting"); /** - * Static value Failed for TrustedAccessRoleBindingProvisioningState. + * Trusted access role binding provisioning failed. */ public static final TrustedAccessRoleBindingProvisioningState FAILED = fromString("Failed"); /** - * Static value Succeeded for TrustedAccessRoleBindingProvisioningState. + * Trusted access role binding provisioning succeeded. */ public static final TrustedAccessRoleBindingProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Updating for TrustedAccessRoleBindingProvisioningState. + * Trusted access role binding is being updated. */ public static final TrustedAccessRoleBindingProvisioningState UPDATING = fromString("Updating"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleRule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleRule.java index dc33e53e3b71..93fe0efb4fa7 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleRule.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleRule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -45,7 +45,7 @@ public final class TrustedAccessRoleRule implements JsonSerializable { /** - * Static value First for Type. + * First week of the month. */ public static final Type FIRST = fromString("First"); /** - * Static value Second for Type. + * Second week of the month. */ public static final Type SECOND = fromString("Second"); /** - * Static value Third for Type. + * Third week of the month. */ public static final Type THIRD = fromString("Third"); /** - * Static value Fourth for Type. + * Fourth week of the month. */ public static final Type FOURTH = fromString("Fourth"); /** - * Static value Last for Type. + * Last week of the month. */ public static final Type LAST = fromString("Last"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UndrainableNodeBehavior.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UndrainableNodeBehavior.java index 979e48929968..6278559cdbec 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UndrainableNodeBehavior.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UndrainableNodeBehavior.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -14,12 +14,19 @@ */ public final class UndrainableNodeBehavior extends ExpandableStringEnum { /** - * Static value Cordon for UndrainableNodeBehavior. + * AKS will cordon the blocked nodes and replace them with surge nodes during upgrade. The blocked nodes will be + * cordoned and replaced by surge nodes. The blocked nodes will have label + * 'kubernetes.azure.com/upgrade-status:Quarantined'. A surge node will be retained for each blocked node. A + * best-effort attempt will be made to delete all other surge nodes. If there are enough surge nodes to replace + * blocked nodes, then the upgrade operation and the managed cluster will be in failed state. Otherwise, the upgrade + * operation and the managed cluster will be in canceled state. */ public static final UndrainableNodeBehavior CORDON = fromString("Cordon"); /** - * Static value Schedule for UndrainableNodeBehavior. + * AKS will mark the blocked nodes schedulable, but the blocked nodes are not upgraded. A best-effort attempt will + * be made to delete all surge nodes. The upgrade operation and the managed cluster will be in failed state if there + * are any blocked nodes. */ public static final UndrainableNodeBehavior SCHEDULE = fromString("Schedule"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeChannel.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeChannel.java index 5132dbf5f0d9..731d1dbb649f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeChannel.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeChannel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -13,27 +13,36 @@ */ public final class UpgradeChannel extends ExpandableStringEnum { /** - * Static value rapid for UpgradeChannel. + * Automatically upgrade the cluster to the latest supported patch release on the latest supported minor version. In + * cases where the cluster is at a version of Kubernetes that is at an N-2 minor version where N is the latest + * supported minor version, the cluster first upgrades to the latest supported patch version on N-1 minor version. + * For example, if a cluster is running version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are + * available, your cluster first is upgraded to 1.18.6, then is upgraded to 1.19.1. */ public static final UpgradeChannel RAPID = fromString("rapid"); /** - * Static value stable for UpgradeChannel. + * Automatically upgrade the cluster to the latest supported patch release on minor version N-1, where N is the + * latest supported minor version. For example, if a cluster is running version 1.17.7 and versions 1.17.9, 1.18.4, + * 1.18.6, and 1.19.1 are available, your cluster is upgraded to 1.18.6. */ public static final UpgradeChannel STABLE = fromString("stable"); /** - * Static value patch for UpgradeChannel. + * Automatically upgrade the cluster to the latest supported patch version when it becomes available while keeping + * the minor version the same. For example, if a cluster is running version 1.17.7 and versions 1.17.9, 1.18.4, + * 1.18.6, and 1.19.1 are available, your cluster is upgraded to 1.17.9. */ public static final UpgradeChannel PATCH = fromString("patch"); /** - * Static value node-image for UpgradeChannel. + * Automatically upgrade the node image to the latest version available. Consider using nodeOSUpgradeChannel instead + * as that allows you to configure node OS patching separate from Kubernetes version patching. */ public static final UpgradeChannel NODE_IMAGE = fromString("node-image"); /** - * Static value none for UpgradeChannel. + * Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. */ public static final UpgradeChannel NONE = fromString("none"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeOverrideSettings.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeOverrideSettings.java index 67d3dbaf8e85..f9938b8c9f91 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeOverrideSettings.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeOverrideSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UserAssignedIdentity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UserAssignedIdentity.java index 83dd93d2e7d5..ad0c278b1a02 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UserAssignedIdentity.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UserAssignedIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachineNodes.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachineNodes.java index 45f1918e4829..3835a34f0526 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachineNodes.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachineNodes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachinesProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachinesProfile.java index c4468e5d41ab..84aa5c1adf73 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachinesProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachinesProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeekDay.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeekDay.java index b70d6cc8b94c..b03d35e0092d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeekDay.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeekDay.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,37 +12,37 @@ */ public final class WeekDay extends ExpandableStringEnum { /** - * Static value Sunday for WeekDay. + * Represents Sunday. */ public static final WeekDay SUNDAY = fromString("Sunday"); /** - * Static value Monday for WeekDay. + * Represents Monday. */ public static final WeekDay MONDAY = fromString("Monday"); /** - * Static value Tuesday for WeekDay. + * Represents Tuesday. */ public static final WeekDay TUESDAY = fromString("Tuesday"); /** - * Static value Wednesday for WeekDay. + * Represents Wednesday. */ public static final WeekDay WEDNESDAY = fromString("Wednesday"); /** - * Static value Thursday for WeekDay. + * Represents Thursday. */ public static final WeekDay THURSDAY = fromString("Thursday"); /** - * Static value Friday for WeekDay. + * Represents Friday. */ public static final WeekDay FRIDAY = fromString("Friday"); /** - * Static value Saturday for WeekDay. + * Represents Saturday. */ public static final WeekDay SATURDAY = fromString("Saturday"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeeklySchedule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeeklySchedule.java index 4ac454d7716d..6e6a54d6366d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeeklySchedule.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WeeklySchedule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WindowsGmsaProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WindowsGmsaProfile.java index f0d2dfb1cb07..140e8a353f02 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WindowsGmsaProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WindowsGmsaProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java index c87728fe2b08..2a39c6c56762 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.models; @@ -12,17 +12,19 @@ */ public final class WorkloadRuntime extends ExpandableStringEnum { /** - * Static value OCIContainer for WorkloadRuntime. + * Nodes will use Kubelet to run standard OCI container workloads. */ public static final WorkloadRuntime OCICONTAINER = fromString("OCIContainer"); /** - * Static value WasmWasi for WorkloadRuntime. + * Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). */ public static final WorkloadRuntime WASM_WASI = fromString("WasmWasi"); /** - * Static value KataVmIsolation for WorkloadRuntime. + * Nodes can use (Kata + Cloud Hypervisor + Hyper-V) to enable Nested VM-based pods. Due to the use Hyper-V, AKS + * node OS itself is a nested VM (the root OS) of Hyper-V. Thus it can only be used with VM series that support + * Nested Virtualization such as Dv3 series. */ public static final WorkloadRuntime KATA_VM_ISOLATION = fromString("KataVmIsolation"); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java index c6aca495bc2a..d9fae19c4167 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the data models for ContainerServiceManagementClient. - * Container Service Client. + * Package containing the data models for ContainerService. + * The Container Service Client. */ package com.azure.resourcemanager.containerservice.models; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/package-info.java index 430f80b01e1c..f243985d93a7 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/package-info.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the classes for ContainerServiceManagementClient. - * Container Service Client. + * Package containing the classes for ContainerService. + * The Container Service Client. */ package com.azure.resourcemanager.containerservice; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/azure-resourcemanager-containerservice_metadata.json b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/azure-resourcemanager-containerservice_metadata.json new file mode 100644 index 000000000000..51d801ccc6a6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/azure-resourcemanager-containerservice_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersions":{"Microsoft.ContainerService":"2026-01-01"},"generatedFiles":["src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceConfigurationsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedNamespacesClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/ResolvePrivateLinkServiceIdsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/SnapshotsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRoleBindingsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRolesClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AccessProfile.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CommandResultProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CredentialResultsInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/KubernetesVersionListResultInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAccessProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedNamespaceInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshRevisionProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshUpgradeProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueDisplay.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OutboundEnvironmentEndpointInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionListResultInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourceInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourcesListResultInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/RunCommandResultInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/package-info.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/AgentPoolListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MachineListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MaintenanceConfigurationListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedClusterListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedNamespaceListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshRevisionProfileList.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshUpgradeProfileList.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OutboundEnvironmentEndpointCollection.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/SnapshotListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/TrustedAccessRoleBindingListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/TrustedAccessRoleListResult.java","src/main/java/com/azure/resourcemanager/containerservice/models/AbsoluteMonthlySchedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/AccelerationMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdoptionPolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkPolicies.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingObservability.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingPerformance.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurityTransitEncryption.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolDeleteMachinesParameter.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolGatewayProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolStatus.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolType.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolWindowsProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ArtifactSource.java","src/main/java/com/azure/resourcemanager/containerservice/models/AzureKeyVaultKms.java","src/main/java/com/azure/resourcemanager/containerservice/models/BackendPoolType.java","src/main/java/com/azure/resourcemanager/containerservice/models/ClusterUpgradeSettings.java","src/main/java/com/azure/resourcemanager/containerservice/models/Code.java","src/main/java/com/azure/resourcemanager/containerservice/models/CompatibleVersions.java","src/main/java/com/azure/resourcemanager/containerservice/models/ConnectionStatus.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceLinuxProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshConfiguration.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshPublicKey.java","src/main/java/com/azure/resourcemanager/containerservice/models/CreationData.java","src/main/java/com/azure/resourcemanager/containerservice/models/CredentialResult.java","src/main/java/com/azure/resourcemanager/containerservice/models/DailySchedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/DateSpan.java","src/main/java/com/azure/resourcemanager/containerservice/models/DelegatedResource.java","src/main/java/com/azure/resourcemanager/containerservice/models/DeletePolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDependency.java","src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDetail.java","src/main/java/com/azure/resourcemanager/containerservice/models/Expander.java","src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocation.java","src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocationTypes.java","src/main/java/com/azure/resourcemanager/containerservice/models/Format.java","src/main/java/com/azure/resourcemanager/containerservice/models/GpuDriver.java","src/main/java/com/azure/resourcemanager/containerservice/models/GpuInstanceProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java","src/main/java/com/azure/resourcemanager/containerservice/models/IpTag.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioCertificateAuthority.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioEgressGateway.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGateway.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGatewayMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioPluginCertificateAuthority.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioServiceMesh.java","src/main/java/com/azure/resourcemanager/containerservice/models/KeyVaultNetworkAccessTypes.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubeletDiskType.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesPatchVersion.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesSupportPlan.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersion.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersionCapabilities.java","src/main/java/com/azure/resourcemanager/containerservice/models/LicenseType.java","src/main/java/com/azure/resourcemanager/containerservice/models/LinuxOSConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerSku.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardDestination.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardPolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsOverride.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProtocol.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsQueryLogging.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsServeStale.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsState.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineIpAddress.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceWindow.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAIToolchainOperatorProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAadProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfileIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterBootstrapProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterCostAnalysis.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileNginx.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIPs.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterManagedOutboundIpProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterMetricsProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNatGatewayProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeProvisioningProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterOidcIssuerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityException.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningError.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningErrorBody.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningInfo.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageCleaner.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileWorkloadIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterServicePrincipalProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSku.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuName.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuTier.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStaticEgressGatewayProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStatus.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileBlobCsiDriver.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileFileCsiDriver.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileSnapshotController.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWindowsProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileKeda.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultHeaders.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultResponse.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedServiceIdentityUserAssignedIdentitiesValue.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManualScaleProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevision.java","src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkDataplane.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPlugin.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPluginMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicies.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/NginxIngressControllerType.java","src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java","src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningDefaultNodePools.java","src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/OSDiskType.java","src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java","src/main/java/com/azure/resourcemanager/containerservice/models/OSType.java","src/main/java/com/azure/resourcemanager/containerservice/models/OutboundType.java","src/main/java/com/azure/resourcemanager/containerservice/models/PodIpAllocationMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/PolicyRule.java","src/main/java/com/azure/resourcemanager/containerservice/models/PortRange.java","src/main/java/com/azure/resourcemanager/containerservice/models/PowerState.java","src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpointConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/containerservice/models/Protocol.java","src/main/java/com/azure/resourcemanager/containerservice/models/ProxyRedirectionMechanism.java","src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceIdentityType.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceQuota.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceReference.java","src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java","src/main/java/com/azure/resourcemanager/containerservice/models/RunCommandRequest.java","src/main/java/com/azure/resourcemanager/containerservice/models/ScaleDownMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetEvictionPolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetPriority.java","src/main/java/com/azure/resourcemanager/containerservice/models/Schedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java","src/main/java/com/azure/resourcemanager/containerservice/models/SysctlConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/TagsObject.java","src/main/java/com/azure/resourcemanager/containerservice/models/TimeInWeek.java","src/main/java/com/azure/resourcemanager/containerservice/models/TimeSpan.java","src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java","src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleRule.java","src/main/java/com/azure/resourcemanager/containerservice/models/Type.java","src/main/java/com/azure/resourcemanager/containerservice/models/UndrainableNodeBehavior.java","src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeChannel.java","src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeOverrideSettings.java","src/main/java/com/azure/resourcemanager/containerservice/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachineNodes.java","src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachinesProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/WeekDay.java","src/main/java/com/azure/resourcemanager/containerservice/models/WeeklySchedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/WindowsGmsaProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java","src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java","src/main/java/com/azure/resourcemanager/containerservice/package-info.java"]} \ No newline at end of file diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsAbortLatestOperationSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsAbortLatestOperationSamples.java index efe712e2c47b..3a221644cd2e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsAbortLatestOperationSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsAbortLatestOperationSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class AgentPoolsAbortLatestOperationSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsAbortOperation.json + * x-ms-original-file: 2026-01-01/AgentPoolsAbortOperation.json */ /** * Sample code: Abort operation on agent pool. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCreateOrUpdateSamples.java index 57089a5352b5..ebf948ab6656 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCreateOrUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -33,9 +33,7 @@ */ public final class AgentPoolsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsCreate_EnableFIPS.json + * x-ms-original-file: 2026-01-01/AgentPoolsCreate_EnableFIPS.json */ /** * Sample code: Create Agent Pool with FIPS enabled OS. @@ -56,9 +54,7 @@ public final class AgentPoolsCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPools_Update.json + * x-ms-original-file: 2026-01-01/AgentPools_Update.json */ /** * Sample code: Update Agent Pool. @@ -83,9 +79,7 @@ public static void updateAgentPool(com.azure.resourcemanager.containerservice.Co } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsCreate_GPUMIG.json + * x-ms-original-file: 2026-01-01/AgentPoolsCreate_GPUMIG.json */ /** * Sample code: Create Agent Pool with GPUMIG. @@ -122,9 +116,7 @@ public static void updateAgentPool(com.azure.resourcemanager.containerservice.Co } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsCreate_WindowsOSSKU.json + * x-ms-original-file: 2026-01-01/AgentPoolsCreate_WindowsOSSKU.json */ /** * Sample code: Create Agent Pool with Windows OSSKU. @@ -145,9 +137,7 @@ public static void updateAgentPool(com.azure.resourcemanager.containerservice.Co } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsCreate_DedicatedHostGroup.json + * x-ms-original-file: 2026-01-01/AgentPoolsCreate_DedicatedHostGroup.json */ /** * Sample code: Create Agent Pool with Dedicated Host Group. @@ -168,9 +158,7 @@ public static void createAgentPoolWithDedicatedHostGroup( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsCreate_Update.json + * x-ms-original-file: 2026-01-01/AgentPoolsCreate_Update.json */ /** * Sample code: Create/Update Agent Pool. @@ -196,9 +184,7 @@ public static void createAgentPoolWithDedicatedHostGroup( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsCreate_WindowsDisableOutboundNAT.json + * x-ms-original-file: 2026-01-01/AgentPoolsCreate_WindowsDisableOutboundNAT.json */ /** * Sample code: Create Windows Agent Pool with disabling OutboundNAT. @@ -220,9 +206,7 @@ public static void createWindowsAgentPoolWithDisablingOutboundNAT( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPools_Start.json + * x-ms-original-file: 2026-01-01/AgentPools_Start.json */ /** * Sample code: Start Agent Pool. @@ -238,9 +222,7 @@ public static void startAgentPool(com.azure.resourcemanager.containerservice.Con } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsCreate_Spot.json + * x-ms-original-file: 2026-01-01/AgentPoolsCreate_Spot.json */ /** * Sample code: Create Spot Agent Pool. @@ -264,9 +246,7 @@ public static void createSpotAgentPool(com.azure.resourcemanager.containerservic } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsCreate_Ephemeral.json + * x-ms-original-file: 2026-01-01/AgentPoolsCreate_Ephemeral.json */ /** * Sample code: Create Agent Pool with Ephemeral OS Disk. @@ -288,9 +268,7 @@ public static void createSpotAgentPool(com.azure.resourcemanager.containerservic } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsCreate_EnableEncryptionAtHost.json + * x-ms-original-file: 2026-01-01/AgentPoolsCreate_EnableEncryptionAtHost.json */ /** * Sample code: Create Agent Pool with EncryptionAtHost enabled. @@ -311,9 +289,7 @@ public static void createAgentPoolWithEncryptionAtHostEnabled( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsCreate_EnableUltraSSD.json + * x-ms-original-file: 2026-01-01/AgentPoolsCreate_EnableUltraSSD.json */ /** * Sample code: Create Agent Pool with UltraSSD enabled. @@ -334,9 +310,7 @@ public static void createAgentPoolWithEncryptionAtHostEnabled( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsCreate_WasmWasi.json + * x-ms-original-file: 2026-01-01/AgentPoolsCreate_WasmWasi.json */ /** * Sample code: Create Agent Pool with Krustlet and the WASI runtime. @@ -359,56 +333,50 @@ public static void createAgentPoolWithKrustletAndTheWASIRuntime( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsCreate_Snapshot.json + * x-ms-original-file: 2026-01-01/AgentPoolsCreate_PPG.json */ /** - * Sample code: Create Agent Pool using an agent pool snapshot. + * Sample code: Create Agent Pool with PPG. * * @param manager Entry point to ContainerServiceManager. */ - public static void createAgentPoolUsingAnAgentPoolSnapshot( - com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + public static void + createAgentPoolWithPPG(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getAgentPools() .createOrUpdate("rg1", "clustername1", "agentpool1", new AgentPoolInner().withCount(3) .withVmSize("Standard_DS2_v2") .withOsType(OSType.LINUX) .withOrchestratorVersion("") - .withEnableFips(true) - .withCreationData(new CreationData().withSourceResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1")), + .withProximityPlacementGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1"), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsCreate_PPG.json + * x-ms-original-file: 2026-01-01/AgentPoolsCreate_Snapshot.json */ /** - * Sample code: Create Agent Pool with PPG. + * Sample code: Create Agent Pool using an agent pool snapshot. * * @param manager Entry point to ContainerServiceManager. */ - public static void - createAgentPoolWithPPG(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + public static void createAgentPoolUsingAnAgentPoolSnapshot( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getAgentPools() .createOrUpdate("rg1", "clustername1", "agentpool1", new AgentPoolInner().withCount(3) .withVmSize("Standard_DS2_v2") .withOsType(OSType.LINUX) .withOrchestratorVersion("") - .withProximityPlacementGroupId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1"), + .withEnableFips(true) + .withCreationData(new CreationData().withSourceResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1")), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsCreate_CustomNodeConfig.json + * x-ms-original-file: 2026-01-01/AgentPoolsCreate_CustomNodeConfig.json */ /** * Sample code: Create Agent Pool with KubeletConfig and LinuxOSConfig. @@ -444,9 +412,7 @@ public static void createAgentPoolWithKubeletConfigAndLinuxOSConfig( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPools_Stop.json + * x-ms-original-file: 2026-01-01/AgentPools_Stop.json */ /** * Sample code: Stop Agent Pool. @@ -462,9 +428,7 @@ public static void stopAgentPool(com.azure.resourcemanager.containerservice.Cont } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsCreate_MessageOfTheDay.json + * x-ms-original-file: 2026-01-01/AgentPoolsCreate_MessageOfTheDay.json */ /** * Sample code: Create Agent Pool with Message of the Day. @@ -487,9 +451,7 @@ public static void stopAgentPool(com.azure.resourcemanager.containerservice.Cont } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsCreate_CRG.json + * x-ms-original-file: 2026-01-01/AgentPoolsCreate_CRG.json */ /** * Sample code: Create Agent Pool with Capacity Reservation Group. @@ -510,9 +472,7 @@ public static void createAgentPoolWithCapacityReservationGroup( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsCreate_OSSKU.json + * x-ms-original-file: 2026-01-01/AgentPoolsCreate_OSSKU.json */ /** * Sample code: Create Agent Pool with OSSKU. @@ -549,9 +509,7 @@ public static void createAgentPoolWithCapacityReservationGroup( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsCreate_TypeVirtualMachines.json + * x-ms-original-file: 2026-01-01/AgentPoolsCreate_TypeVirtualMachines.json */ /** * Sample code: Create Agent Pool with VirtualMachines pool type. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteMachinesSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteMachinesSamples.java index 784c31ed2dc6..6086068e56f7 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteMachinesSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteMachinesSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -12,9 +12,7 @@ */ public final class AgentPoolsDeleteMachinesSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsDeleteMachines.json + * x-ms-original-file: 2026-01-01/AgentPoolsDeleteMachines.json */ /** * Sample code: Delete Specific Machines in an Agent Pool. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteSamples.java index 637809f50520..79a9d2db33ea 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class AgentPoolsDeleteSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsDelete.json + * x-ms-original-file: 2026-01-01/AgentPoolsDelete.json */ /** * Sample code: Delete Agent Pool. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetAvailableAgentPoolVersionsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetAvailableAgentPoolVersionsSamples.java index 0bcf72f77c48..dafe9866da1c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetAvailableAgentPoolVersionsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetAvailableAgentPoolVersionsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class AgentPoolsGetAvailableAgentPoolVersionsSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsGetAgentPoolAvailableVersions.json + * x-ms-original-file: 2026-01-01/AgentPoolsGetAgentPoolAvailableVersions.json */ /** * Sample code: Get available versions for agent pool. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetSamples.java index 53517b5e15b7..101a0f335db8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class AgentPoolsGetSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsGet.json + * x-ms-original-file: 2026-01-01/AgentPoolsGet.json */ /** * Sample code: Get Agent Pool. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetUpgradeProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetUpgradeProfileSamples.java index fa384fb1f487..238bb1ac50c0 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetUpgradeProfileSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetUpgradeProfileSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class AgentPoolsGetUpgradeProfileSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsGetUpgradeProfile.json + * x-ms-original-file: 2026-01-01/AgentPoolsGetUpgradeProfile.json */ /** * Sample code: Get Upgrade Profile for Agent Pool. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListSamples.java index f457ae7c0170..ed612ae91415 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class AgentPoolsListSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsList.json + * x-ms-original-file: 2026-01-01/AgentPoolsList.json */ /** * Sample code: List Agent Pools by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpgradeNodeImageVersionSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpgradeNodeImageVersionSamples.java index 755e17b47a26..7ad8c30cbc9c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpgradeNodeImageVersionSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpgradeNodeImageVersionSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class AgentPoolsUpgradeNodeImageVersionSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * AgentPoolsUpgradeNodeImageVersion.json + * x-ms-original-file: 2026-01-01/AgentPoolsUpgradeNodeImageVersion.json */ /** * Sample code: Upgrade Agent Pool Node Image Version. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesGetSamples.java index 4bf631ba9a82..70ba3f7b5c40 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesGetSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class MachinesGetSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * MachineGet.json + * x-ms-original-file: 2026-01-01/MachineGet.json */ /** * Sample code: Get a Machine in an Agent Pools by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesListSamples.java index f2bd504ca65e..522844a3ae44 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class MachinesListSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * MachineList.json + * x-ms-original-file: 2026-01-01/MachineList.json */ /** * Sample code: List Machines in an Agentpool by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsCreateOrUpdateSamples.java index fcbafe00abb7..84c4519714f4 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsCreateOrUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -19,9 +19,7 @@ */ public final class MaintenanceConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json + * x-ms-original-file: 2026-01-01/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json */ /** * Sample code: Create/Update Maintenance Configuration with Maintenance Window. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsDeleteSamples.java index c3a38dd379db..ee0b8d23f743 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class MaintenanceConfigurationsDeleteSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * MaintenanceConfigurationsDelete_MaintenanceWindow.json + * x-ms-original-file: 2026-01-01/MaintenanceConfigurationsDelete_MaintenanceWindow.json */ /** * Sample code: Delete Maintenance Configuration For Node OS Upgrade. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsGetSamples.java index 1b39abf4cd60..369bfbd6ca94 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsGetSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class MaintenanceConfigurationsGetSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * MaintenanceConfigurationsGet_MaintenanceWindow.json + * x-ms-original-file: 2026-01-01/MaintenanceConfigurationsGet_MaintenanceWindow.json */ /** * Sample code: Get Maintenance Configuration Configured With Maintenance Window. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsListByManagedClusterSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsListByManagedClusterSamples.java index 0322fbdb9a52..eca38ce730cb 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsListByManagedClusterSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsListByManagedClusterSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class MaintenanceConfigurationsListByManagedClusterSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * MaintenanceConfigurationsList_MaintenanceWindow.json + * x-ms-original-file: 2026-01-01/MaintenanceConfigurationsList_MaintenanceWindow.json */ /** * Sample code: List maintenance configurations configured with maintenance window by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersAbortLatestOperationSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersAbortLatestOperationSamples.java index d3bd2ad072d3..f00ede3b507e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersAbortLatestOperationSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersAbortLatestOperationSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedClustersAbortLatestOperationSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersAbortOperation.json + * x-ms-original-file: 2026-01-01/ManagedClustersAbortOperation.json */ /** * Sample code: Abort operation on managed cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersCreateOrUpdateSamples.java index 72d520ed96b3..7f44361c1639 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersCreateOrUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersCreateOrUpdateSamples.java @@ -1,10 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterInner; +import com.azure.resourcemanager.containerservice.models.AdvancedNetworkPolicies; +import com.azure.resourcemanager.containerservice.models.AdvancedNetworking; +import com.azure.resourcemanager.containerservice.models.AdvancedNetworkingObservability; +import com.azure.resourcemanager.containerservice.models.AdvancedNetworkingSecurity; +import com.azure.resourcemanager.containerservice.models.AdvancedNetworkingSecurityTransitEncryption; import com.azure.resourcemanager.containerservice.models.AgentPoolMode; import com.azure.resourcemanager.containerservice.models.AgentPoolType; import com.azure.resourcemanager.containerservice.models.ClusterUpgradeSettings; @@ -50,6 +55,9 @@ import com.azure.resourcemanager.containerservice.models.ManagedClusterSkuTier; import com.azure.resourcemanager.containerservice.models.ManagedClusterWindowsProfile; import com.azure.resourcemanager.containerservice.models.ManagedServiceIdentityUserAssignedIdentitiesValue; +import com.azure.resourcemanager.containerservice.models.NetworkDataplane; +import com.azure.resourcemanager.containerservice.models.NetworkPlugin; +import com.azure.resourcemanager.containerservice.models.NetworkPluginMode; import com.azure.resourcemanager.containerservice.models.OSSku; import com.azure.resourcemanager.containerservice.models.OSType; import com.azure.resourcemanager.containerservice.models.OutboundType; @@ -57,6 +65,7 @@ import com.azure.resourcemanager.containerservice.models.ScaleDownMode; import com.azure.resourcemanager.containerservice.models.ServiceMeshMode; import com.azure.resourcemanager.containerservice.models.ServiceMeshProfile; +import com.azure.resourcemanager.containerservice.models.TransitEncryptionType; import com.azure.resourcemanager.containerservice.models.UpgradeOverrideSettings; import com.azure.resourcemanager.containerservice.models.WindowsGmsaProfile; import java.time.OffsetDateTime; @@ -69,9 +78,7 @@ */ public final class ManagedClustersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_CRG.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_CRG.json */ /** * Sample code: Create Managed Cluster with Capacity Reservation Group. @@ -108,7 +115,7 @@ public static void createManagedClusterWithCapacityReservationGroup( .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) @@ -118,9 +125,7 @@ public static void createManagedClusterWithCapacityReservationGroup( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_CustomCATrustCertificates.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_CustomCATrustCertificates.json */ /** * Sample code: Create Managed Cluster with Custom CA Trust Certificates. @@ -155,7 +160,7 @@ public static void createManagedClusterWithCustomCATrustCertificates( .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) @@ -167,9 +172,7 @@ public static void createManagedClusterWithCustomCATrustCertificates( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_DualStackNetworking.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_DualStackNetworking.json */ /** * Sample code: Create/Update Managed Cluster with dual-stack networking. @@ -211,7 +214,7 @@ public static void createUpdateManagedClusterWithDualStackNetworking( .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile() - .withManagedOutboundIPs(new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2))) + .withManagedOutboundIps(new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2))) .withIpFamilies(Arrays.asList(IpFamily.IPV4, IpFamily.IPV6))) .withAutoScalerProfile( new ManagedClusterPropertiesAutoScalerProfile().withBalanceSimilarNodeGroups("true") @@ -227,9 +230,7 @@ public static void createUpdateManagedClusterWithDualStackNetworking( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_PodIdentity.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_PodIdentity.json */ /** * Sample code: Create Managed Cluster with PodIdentity enabled. @@ -266,7 +267,7 @@ public static void createManagedClusterWithPodIdentityEnabled( .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) @@ -276,9 +277,7 @@ public static void createManagedClusterWithPodIdentityEnabled( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_UserAssignedNATGateway.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_UserAssignedNATGateway.json */ /** * Sample code: Create Managed Cluster with user-assigned NAT gateway as outbound type. @@ -322,9 +321,7 @@ public static void createManagedClusterWithUserAssignedNATGatewayAsOutboundType( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_Update.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_Update.json */ /** * Sample code: Create/Update Managed Cluster. @@ -365,7 +362,7 @@ public static void createManagedClusterWithUserAssignedNATGatewayAsOutboundType( .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withUpgradeSettings(new ClusterUpgradeSettings() .withOverrideSettings(new UpgradeOverrideSettings().withForceUpgrade(false) @@ -384,9 +381,7 @@ public static void createManagedClusterWithUserAssignedNATGatewayAsOutboundType( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_PrivateClusterFQDNSubdomain.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json */ /** * Sample code: Create Managed Private Cluster with fqdn subdomain specified. @@ -422,7 +417,7 @@ public static void createManagedPrivateClusterWithFqdnSubdomainSpecified( .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) @@ -433,9 +428,7 @@ public static void createManagedPrivateClusterWithFqdnSubdomainSpecified( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_ManagedNATGateway.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_ManagedNATGateway.json */ /** * Sample code: Create Managed Cluster with AKS-managed NAT gateway as outbound type. @@ -481,9 +474,7 @@ public static void createManagedClusterWithAKSManagedNATGatewayAsOutboundType( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_Premium.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_Premium.json */ /** * Sample code: Create Managed Cluster with LongTermSupport. @@ -520,7 +511,7 @@ public static void createManagedClusterWithLongTermSupport( .withSupportPlan(KubernetesSupportPlan.AKSLONG_TERM_SUPPORT) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) @@ -529,9 +520,7 @@ public static void createManagedClusterWithLongTermSupport( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_NodePublicIPPrefix.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_NodePublicIPPrefix.json */ /** * Sample code: Create Managed Cluster with Node Public IP Prefix. @@ -568,7 +557,7 @@ public static void createManagedClusterWithNodePublicIPPrefix( .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) @@ -578,9 +567,7 @@ public static void createManagedClusterWithNodePublicIPPrefix( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_EnableEncryptionAtHost.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_EnableEncryptionAtHost.json */ /** * Sample code: Create Managed Cluster with EncryptionAtHost enabled. @@ -616,7 +603,7 @@ public static void createManagedClusterWithEncryptionAtHostEnabled( .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) @@ -626,9 +613,7 @@ public static void createManagedClusterWithEncryptionAtHostEnabled( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_PrivateClusterPublicFQDN.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_PrivateClusterPublicFQDN.json */ /** * Sample code: Create Managed Private Cluster with Public FQDN specified. @@ -664,19 +649,17 @@ public static void createManagedPrivateClusterWithPublicFQDNSpecified( .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) .withApiServerAccessProfile(new ManagedClusterApiServerAccessProfile().withEnablePrivateCluster(true) - .withEnablePrivateClusterPublicFqdn(true)), + .withEnablePrivateClusterPublicFQDN(true)), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_HTTPProxy.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_HTTPProxy.json */ /** * Sample code: Create Managed Cluster with HTTP proxy configured. @@ -711,7 +694,7 @@ public static void createManagedClusterWithHTTPProxyConfigured( .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) @@ -725,9 +708,7 @@ public static void createManagedClusterWithHTTPProxyConfigured( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_DedicatedHostGroup.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_DedicatedHostGroup.json */ /** * Sample code: Create Managed Cluster with Dedicated Host Group. @@ -763,7 +744,7 @@ public static void createManagedClusterWithDedicatedHostGroup( .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) @@ -773,9 +754,7 @@ public static void createManagedClusterWithDedicatedHostGroup( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_EnabledFIPS.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_EnabledFIPS.json */ /** * Sample code: Create Managed Cluster with FIPS enabled OS. @@ -811,7 +790,7 @@ public static void createManagedClusterWithFIPSEnabledOS( .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) @@ -821,9 +800,7 @@ public static void createManagedClusterWithFIPSEnabledOS( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_SecurityProfile.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_SecurityProfile.json */ /** * Sample code: Create Managed Cluster with Security Profile configured. @@ -852,7 +829,7 @@ public static void createManagedClusterWithSecurityProfileConfigured( Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withSecurityProfile(new ManagedClusterSecurityProfile() .withDefender(new ManagedClusterSecurityProfileDefender().withLogAnalyticsWorkspaceResourceId( @@ -864,9 +841,7 @@ public static void createManagedClusterWithSecurityProfileConfigured( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_PPG.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_PPG.json */ /** * Sample code: Create Managed Cluster with PPG. @@ -903,7 +878,7 @@ public static void createManagedClusterWithSecurityProfileConfigured( .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) @@ -913,9 +888,7 @@ public static void createManagedClusterWithSecurityProfileConfigured( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_IngressProfile_WebAppRouting.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_IngressProfile_WebAppRouting.json */ /** * Sample code: Create Managed Cluster with Web App Routing Ingress Profile configured. @@ -944,7 +917,7 @@ public static void createManagedClusterWithWebAppRoutingIngressProfileConfigured Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withIngressProfile(new ManagedClusterIngressProfile() .withWebAppRouting(new ManagedClusterIngressProfileWebAppRouting().withEnabled(true) @@ -954,9 +927,7 @@ public static void createManagedClusterWithWebAppRoutingIngressProfileConfigured } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_UpdateWithAHUB.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_UpdateWithAHUB.json */ /** * Sample code: Create/Update Managed Cluster with EnableAHUB. @@ -997,7 +968,7 @@ public static void createUpdateManagedClusterWithEnableAHUB( .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) @@ -1007,9 +978,7 @@ public static void createUpdateManagedClusterWithEnableAHUB( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_DisableRunCommand.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_DisableRunCommand.json */ /** * Sample code: Create Managed Cluster with RunCommand disabled. @@ -1045,7 +1014,7 @@ public static void createManagedClusterWithRunCommandDisabled( .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) @@ -1054,59 +1023,7 @@ public static void createManagedClusterWithRunCommandDisabled( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_Snapshot.json - */ - /** - * Sample code: Create Managed Cluster using an agent pool snapshot. - * - * @param manager Entry point to ContainerServiceManager. - */ - public static void createManagedClusterUsingAnAgentPoolSnapshot( - com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { - manager.serviceClient() - .getManagedClusters() - .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") - .withTags(mapOf("archv2", "", "tier", "production")) - .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) - .withTier(ManagedClusterSkuTier.FREE)) - .withKubernetesVersion("") - .withDnsPrefix("dnsprefix1") - .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) - .withVmSize("Standard_DS2_v2") - .withOsType(OSType.LINUX) - .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) - .withMode(AgentPoolMode.SYSTEM) - .withEnableNodePublicIp(true) - .withEnableFips(true) - .withCreationData(new CreationData().withSourceResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1")) - .withName("nodepool1"))) - .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") - .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( - Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) - .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") - .withAdminPassword("fakeTokenPlaceholder")) - .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") - .withSecret("fakeTokenPlaceholder")) - .withAddonProfiles(mapOf()) - .withEnableRbac(true) - .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) - .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( - new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) - .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") - .withScaleDownDelayAfterAdd("15m")) - .withDiskEncryptionSetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), - null, null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_AzureServiceMesh.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_AzureServiceMesh.json */ /** * Sample code: Create/Update Managed Cluster with Azure Service Mesh. @@ -1147,7 +1064,7 @@ public static void createUpdateManagedClusterWithAzureServiceMesh( .withNetworkProfile( new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile() .withScanInterval("20s") @@ -1173,9 +1090,55 @@ public static void createUpdateManagedClusterWithAzureServiceMesh( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_AzureKeyvaultSecretsProvider.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_Snapshot.json + */ + /** + * Sample code: Create Managed Cluster using an agent pool snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterUsingAnAgentPoolSnapshot( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableFips(true) + .withCreationData(new CreationData().withSourceResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1")) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json */ /** * Sample code: Create Managed Cluster with Azure KeyVault Secrets Provider Addon. @@ -1216,7 +1179,7 @@ public static void createManagedClusterWithAzureKeyVaultSecretsProviderAddon( .withNetworkProfile( new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile() .withScanInterval("20s") @@ -1227,9 +1190,7 @@ public static void createManagedClusterWithAzureKeyVaultSecretsProviderAddon( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_OSSKU.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_OSSKU.json */ /** * Sample code: Create Managed Cluster with OSSKU. @@ -1265,7 +1226,7 @@ public static void createManagedClusterWithAzureKeyVaultSecretsProviderAddon( .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) @@ -1279,9 +1240,56 @@ public static void createManagedClusterWithAzureKeyVaultSecretsProviderAddon( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_UpdateWithEnableAzureRBAC.json + * x-ms-original-file: 2026-01-01/AdvancedNetworkingTransitEncryption.json + */ + /** + * Sample code: Create Managed Cluster with Advanced Networking Transit Encryption. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithAdvancedNetworkingTransitEncryption( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", + new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withNetworkPlugin(NetworkPlugin.AZURE) + .withNetworkPluginMode(NetworkPluginMode.OVERLAY) + .withNetworkDataplane(NetworkDataplane.CILIUM) + .withAdvancedNetworking(new AdvancedNetworking().withEnabled(true) + .withObservability(new AdvancedNetworkingObservability().withEnabled(false)) + .withSecurity(new AdvancedNetworkingSecurity().withEnabled(true) + .withAdvancedNetworkPolicies(AdvancedNetworkPolicies.FQDN) + .withTransitEncryption(new AdvancedNetworkingSecurityTransitEncryption() + .withType(TransitEncryptionType.WIRE_GUARD)))) + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json */ /** * Sample code: Create/Update AAD Managed Cluster with EnableAzureRBAC. @@ -1317,7 +1325,7 @@ public static void createUpdateAADManagedClusterWithEnableAzureRBAC( .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAadProfile(new ManagedClusterAadProfile().withManaged(true).withEnableAzureRbac(true)) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") @@ -1328,9 +1336,7 @@ public static void createUpdateAADManagedClusterWithEnableAzureRBAC( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_EnableUltraSSD.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_EnableUltraSSD.json */ /** * Sample code: Create Managed Cluster with UltraSSD enabled. @@ -1366,7 +1372,7 @@ public static void createManagedClusterWithUltraSSDEnabled( .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) @@ -1376,9 +1382,7 @@ public static void createManagedClusterWithUltraSSDEnabled( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_UpdateWindowsGmsa.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_UpdateWindowsGmsa.json */ /** * Sample code: Create/Update Managed Cluster with Windows gMSA enabled. @@ -1419,7 +1423,7 @@ public static void createUpdateManagedClusterWithWindowsGMSAEnabled( .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) @@ -1429,9 +1433,7 @@ public static void createUpdateManagedClusterWithWindowsGMSAEnabled( } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersCreate_GPUMIG.json + * x-ms-original-file: 2026-01-01/ManagedClustersCreate_GPUMIG.json */ /** * Sample code: Create Managed Cluster with GPUMIG. @@ -1467,7 +1469,7 @@ public static void createUpdateManagedClusterWithWindowsGMSAEnabled( .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIps( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java index 711ba46d6120..b855fa47bdf3 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedClustersDeleteSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersDelete.json + * x-ms-original-file: 2026-01-01/ManagedClustersDelete.json */ /** * Sample code: Delete Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetAccessProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetAccessProfileSamples.java index 8d866422e011..823b97755fc8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetAccessProfileSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetAccessProfileSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedClustersGetAccessProfileSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersGetAccessProfile.json + * x-ms-original-file: 2026-01-01/ManagedClustersGetAccessProfile.json */ /** * Sample code: Get Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetByResourceGroupSamples.java index 9692c0491b0a..f2868b90a38b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetByResourceGroupSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedClustersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersGet.json + * x-ms-original-file: 2026-01-01/ManagedClustersGet.json */ /** * Sample code: Get Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetCommandResultSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetCommandResultSamples.java index 42ea9c5e11bf..dec4cf4da33f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetCommandResultSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetCommandResultSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedClustersGetCommandResultSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * RunCommandResultFailed.json + * x-ms-original-file: 2026-01-01/RunCommandResultFailed.json */ /** * Sample code: commandFailedResult. @@ -26,9 +24,7 @@ public static void commandFailedResult(com.azure.resourcemanager.containerservic } /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * RunCommandResultSucceed.json + * x-ms-original-file: 2026-01-01/RunCommandResultSucceed.json */ /** * Sample code: commandSucceedResult. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshRevisionProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshRevisionProfileSamples.java index 01d6fe744880..24c247dfc0df 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshRevisionProfileSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshRevisionProfileSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedClustersGetMeshRevisionProfileSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersGet_MeshRevisionProfile.json + * x-ms-original-file: 2026-01-01/ManagedClustersGet_MeshRevisionProfile.json */ /** * Sample code: Get a mesh revision profile for a mesh mode. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshUpgradeProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshUpgradeProfileSamples.java index e71709922ed1..419ab416ea49 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshUpgradeProfileSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshUpgradeProfileSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedClustersGetMeshUpgradeProfileSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersGet_MeshUpgradeProfile.json + * x-ms-original-file: 2026-01-01/ManagedClustersGet_MeshUpgradeProfile.json */ /** * Sample code: Gets version compatibility and upgrade profile for a service mesh in a cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetUpgradeProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetUpgradeProfileSamples.java index 33555a2b3f3a..0fb48ef2d164 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetUpgradeProfileSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetUpgradeProfileSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedClustersGetUpgradeProfileSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersGetUpgradeProfile.json + * x-ms-original-file: 2026-01-01/ManagedClustersGetUpgradeProfile.json */ /** * Sample code: Get Upgrade Profile for Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListByResourceGroupSamples.java index 7115e6d1912c..21c2aa7f9b12 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListByResourceGroupSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedClustersListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersListByResourceGroup.json + * x-ms-original-file: 2026-01-01/ManagedClustersListByResourceGroup.json */ /** * Sample code: Get Managed Clusters by Resource Group. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterAdminCredentialsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterAdminCredentialsSamples.java index e3886fa4b73e..b00ea1e8fb39 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterAdminCredentialsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterAdminCredentialsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedClustersListClusterAdminCredentialsSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersListClusterAdminCredentials.json + * x-ms-original-file: 2026-01-01/ManagedClustersListClusterAdminCredentials.json */ /** * Sample code: Get Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterMonitoringUserCredentialsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterMonitoringUserCredentialsSamples.java index c4fbc8cdd632..f031e7efc233 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterMonitoringUserCredentialsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterMonitoringUserCredentialsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedClustersListClusterMonitoringUserCredentialsSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersListClusterMonitoringUserCredentials.json + * x-ms-original-file: 2026-01-01/ManagedClustersListClusterMonitoringUserCredentials.json */ /** * Sample code: Get Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterUserCredentialsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterUserCredentialsSamples.java index 473535db309b..2d432ba4a463 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterUserCredentialsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterUserCredentialsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedClustersListClusterUserCredentialsSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersListClusterUserCredentials.json + * x-ms-original-file: 2026-01-01/ManagedClustersListClusterUserCredentials.json */ /** * Sample code: Get Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListKubernetesVersionsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListKubernetesVersionsSamples.java index 789de44bd3f1..452319a9912b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListKubernetesVersionsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListKubernetesVersionsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedClustersListKubernetesVersionsSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * KubernetesVersions_List.json + * x-ms-original-file: 2026-01-01/KubernetesVersions_List.json */ /** * Sample code: List Kubernetes Versions. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshRevisionProfilesSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshRevisionProfilesSamples.java index 147c60498d5e..29a13ed9c659 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshRevisionProfilesSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshRevisionProfilesSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedClustersListMeshRevisionProfilesSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersList_MeshRevisionProfiles.json + * x-ms-original-file: 2026-01-01/ManagedClustersList_MeshRevisionProfiles.json */ /** * Sample code: List mesh revision profiles in a location. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshUpgradeProfilesSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshUpgradeProfilesSamples.java index 311ec833aa0c..d040b241b365 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshUpgradeProfilesSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshUpgradeProfilesSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedClustersListMeshUpgradeProfilesSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersList_MeshUpgradeProfiles.json + * x-ms-original-file: 2026-01-01/ManagedClustersList_MeshUpgradeProfiles.json */ /** * Sample code: Lists version compatibility and upgrade profile for all service meshes in a cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListOutboundNetworkDependenciesEndpointsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListOutboundNetworkDependenciesEndpointsSamples.java index eb55f6f796c7..d5360a760a2d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListOutboundNetworkDependenciesEndpointsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListOutboundNetworkDependenciesEndpointsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedClustersListOutboundNetworkDependenciesEndpointsSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * OutboundNetworkDependenciesEndpointsList.json + * x-ms-original-file: 2026-01-01/OutboundNetworkDependenciesEndpointsList.json */ /** * Sample code: List OutboundNetworkDependenciesEndpoints by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSamples.java index 2abc7fa02123..c5aac6242eac 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedClustersListSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersList.json + * x-ms-original-file: 2026-01-01/ManagedClustersList.json */ /** * Sample code: List Managed Clusters. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAadProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAadProfileSamples.java index 4aeb8177a902..e2f3c2f305ab 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAadProfileSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAadProfileSamples.java @@ -1,19 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; /** - * Samples for ManagedClusters ResetAadProfile. + * Samples for ManagedClusters ResetAADProfile. */ -public final class ManagedClustersResetAadProfileSamples { +public final class ManagedClustersResetAADProfileSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersResetAADProfile.json + * x-ms-original-file: 2026-01-01/ManagedClustersResetAADProfile.json */ /** * Sample code: Reset AAD Profile. @@ -23,7 +21,7 @@ public final class ManagedClustersResetAadProfileSamples { public static void resetAADProfile(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() - .resetAadProfile("rg1", "clustername1", + .resetAADProfile("rg1", "clustername1", new ManagedClusterAadProfile().withClientAppId("clientappid") .withServerAppId("serverappid") .withServerAppSecret("fakeTokenPlaceholder") diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetServicePrincipalProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetServicePrincipalProfileSamples.java index 6556e8a37592..467258a0a28c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetServicePrincipalProfileSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetServicePrincipalProfileSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -11,9 +11,7 @@ */ public final class ManagedClustersResetServicePrincipalProfileSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersResetServicePrincipalProfile.json + * x-ms-original-file: 2026-01-01/ManagedClustersResetServicePrincipalProfile.json */ /** * Sample code: Reset Service Principal Profile. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateClusterCertificatesSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateClusterCertificatesSamples.java index 57e4d8eee24b..b0097b551351 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateClusterCertificatesSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateClusterCertificatesSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedClustersRotateClusterCertificatesSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersRotateClusterCertificates.json + * x-ms-original-file: 2026-01-01/ManagedClustersRotateClusterCertificates.json */ /** * Sample code: Rotate Cluster Certificates. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateServiceAccountSigningKeysSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateServiceAccountSigningKeysSamples.java index dad4a5e64814..7a9458adae45 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateServiceAccountSigningKeysSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateServiceAccountSigningKeysSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedClustersRotateServiceAccountSigningKeysSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersRotateServiceAccountSigningKeys.json + * x-ms-original-file: 2026-01-01/ManagedClustersRotateServiceAccountSigningKeys.json */ /** * Sample code: Rotate Cluster Service Account Signing Keys. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRunCommandSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRunCommandSamples.java index 348ff1ae1420..fc330019deff 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRunCommandSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRunCommandSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -11,9 +11,7 @@ */ public final class ManagedClustersRunCommandSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * RunCommandRequest.json + * x-ms-original-file: 2026-01-01/RunCommandRequest.json */ /** * Sample code: submitNewCommand. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStartSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStartSamples.java index 3cd4d6079d8b..981a1aa55cd4 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStartSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStartSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedClustersStartSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersStart.json + * x-ms-original-file: 2026-01-01/ManagedClustersStart.json */ /** * Sample code: Start Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStopSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStopSamples.java index 1602aee622f6..95a7524f9a67 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStopSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStopSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedClustersStopSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersStop.json + * x-ms-original-file: 2026-01-01/ManagedClustersStop.json */ /** * Sample code: Stop Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersUpdateTagsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersUpdateTagsSamples.java index dcb0a75203e6..1c95e2171980 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersUpdateTagsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersUpdateTagsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -13,9 +13,7 @@ */ public final class ManagedClustersUpdateTagsSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedClustersUpdateTags.json + * x-ms-original-file: 2026-01-01/ManagedClustersUpdateTags.json */ /** * Sample code: Update Managed Cluster Tags. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesCreateOrUpdateSamples.java index 487c62fcbf1f..ae638481bb27 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesCreateOrUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -19,9 +19,7 @@ */ public final class ManagedNamespacesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedNamespacesCreate_Update.json + * x-ms-original-file: 2026-01-01/ManagedNamespacesCreate_Update.json */ /** * Sample code: Create/Update Managed Namespace. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesDeleteSamples.java index de70f3fe9ab1..f13cd71a1376 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedNamespacesDeleteSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedNamespacesDelete.json + * x-ms-original-file: 2026-01-01/ManagedNamespacesDelete.json */ /** * Sample code: Delete Managed Namespace. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesGetSamples.java index 217cc33af966..9e1e372173df 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesGetSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedNamespacesGetSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedNamespacesGet.json + * x-ms-original-file: 2026-01-01/ManagedNamespacesGet.json */ /** * Sample code: Get Managed Namespace. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListByManagedClusterSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListByManagedClusterSamples.java index 50f5393d06d7..8830945eb16e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListByManagedClusterSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListByManagedClusterSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedNamespacesListByManagedClusterSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedNamespacesList.json + * x-ms-original-file: 2026-01-01/ManagedNamespacesList.json */ /** * Sample code: List namespaces by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListCredentialSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListCredentialSamples.java index b7ed7c6bc380..1adc4c53a894 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListCredentialSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListCredentialSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class ManagedNamespacesListCredentialSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedNamespacesListCredentialResult.json + * x-ms-original-file: 2026-01-01/ManagedNamespacesListCredentialResult.json */ /** * Sample code: List managed namespace credentials. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesUpdateSamples.java index 9ca2e67b98fe..da9f9d17c3bd 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -13,9 +13,7 @@ */ public final class ManagedNamespacesUpdateSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ManagedNamespacesUpdateTags.json + * x-ms-original-file: 2026-01-01/ManagedNamespacesUpdateTags.json */ /** * Sample code: Update Managed Namespace Tags. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationsListSamples.java index 213fdbc75e45..e5c103ca5583 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationsListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * Operation_List.json + * x-ms-original-file: 2026-01-01/Operation_List.json */ /** * Sample code: List available operations for the container service resource provider. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsDeleteSamples.java index 8dc4ba16afa2..816af44c1415 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * PrivateEndpointConnectionsDelete.json + * x-ms-original-file: 2026-01-01/PrivateEndpointConnectionsDelete.json */ /** * Sample code: Delete Private Endpoint Connection. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsGetSamples.java index f649f692467f..ec1637507718 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * PrivateEndpointConnectionsGet.json + * x-ms-original-file: 2026-01-01/PrivateEndpointConnectionsGet.json */ /** * Sample code: Get Private Endpoint Connection. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsListSamples.java index ebdf5308f72c..bfcfc180fb06 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * PrivateEndpointConnectionsList.json + * x-ms-original-file: 2026-01-01/PrivateEndpointConnectionsList.json */ /** * Sample code: List Private Endpoint Connections by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsUpdateSamples.java index 596d761fbaa7..e1904068656b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -13,9 +13,7 @@ */ public final class PrivateEndpointConnectionsUpdateSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * PrivateEndpointConnectionsUpdate.json + * x-ms-original-file: 2026-01-01/PrivateEndpointConnectionsUpdate.json */ /** * Sample code: Update Private Endpoint Connection. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateLinkResourcesListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateLinkResourcesListSamples.java index 8806d72f613a..803d07cfd397 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateLinkResourcesListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateLinkResourcesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class PrivateLinkResourcesListSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * PrivateLinkResourcesList.json + * x-ms-original-file: 2026-01-01/PrivateLinkResourcesList.json */ /** * Sample code: List Private Link Resources by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPostSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPostSamples.java index 93db85f4eeac..9cb0902a0f9d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPostSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPostSamples.java @@ -1,19 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; import com.azure.resourcemanager.containerservice.fluent.models.PrivateLinkResourceInner; /** - * Samples for ResolvePrivateLinkServiceId Post. + * Samples for ResolvePrivateLinkServiceId POST. */ -public final class ResolvePrivateLinkServiceIdPostSamples { +public final class ResolvePrivateLinkServiceIdPOSTSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * ResolvePrivateLinkServiceId.json + * x-ms-original-file: 2026-01-01/ResolvePrivateLinkServiceId.json */ /** * Sample code: Resolve the Private Link Service ID for Managed Cluster. @@ -24,7 +22,7 @@ public static void resolveThePrivateLinkServiceIDForManagedCluster( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getResolvePrivateLinkServiceIds() - .postWithResponse("rg1", "clustername1", new PrivateLinkResourceInner().withName("management"), + .pOSTWithResponse("rg1", "clustername1", new PrivateLinkResourceInner().withName("management"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsCreateOrUpdateSamples.java index 9b56acefe003..500ab99290ee 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsCreateOrUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -14,9 +14,7 @@ */ public final class SnapshotsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * SnapshotsCreate.json + * x-ms-original-file: 2026-01-01/SnapshotsCreate.json */ /** * Sample code: Create/Update Snapshot. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsDeleteSamples.java index 0436c265bde7..8c73c3dc38fa 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class SnapshotsDeleteSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * SnapshotsDelete.json + * x-ms-original-file: 2026-01-01/SnapshotsDelete.json */ /** * Sample code: Delete Snapshot. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsGetByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsGetByResourceGroupSamples.java index 0589c9f0daed..7049ab1e0b62 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsGetByResourceGroupSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class SnapshotsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * SnapshotsGet.json + * x-ms-original-file: 2026-01-01/SnapshotsGet.json */ /** * Sample code: Get Snapshot. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListByResourceGroupSamples.java index 92c2f4def55d..4346aee473b2 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListByResourceGroupSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class SnapshotsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * SnapshotsListByResourceGroup.json + * x-ms-original-file: 2026-01-01/SnapshotsListByResourceGroup.json */ /** * Sample code: List Snapshots by Resource Group. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListSamples.java index 75ea26aae2bb..83dab7c1bf68 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class SnapshotsListSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * SnapshotsList.json + * x-ms-original-file: 2026-01-01/SnapshotsList.json */ /** * Sample code: List Snapshots. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsUpdateTagsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsUpdateTagsSamples.java index 51f1e0d4c70c..e42639836765 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsUpdateTagsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsUpdateTagsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -13,9 +13,7 @@ */ public final class SnapshotsUpdateTagsSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * SnapshotsUpdateTags.json + * x-ms-original-file: 2026-01-01/SnapshotsUpdateTags.json */ /** * Sample code: Update Snapshot Tags. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsCreateOrUpdateSamples.java index 1d256d7d8c91..a6329f59144e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsCreateOrUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -12,9 +12,7 @@ */ public final class TrustedAccessRoleBindingsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * TrustedAccessRoleBindings_CreateOrUpdate.json + * x-ms-original-file: 2026-01-01/TrustedAccessRoleBindings_CreateOrUpdate.json */ /** * Sample code: Create or update a trusted access role binding. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsDeleteSamples.java index 7add67ac781a..18fdd4ec6ae4 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class TrustedAccessRoleBindingsDeleteSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * TrustedAccessRoleBindings_Delete.json + * x-ms-original-file: 2026-01-01/TrustedAccessRoleBindings_Delete.json */ /** * Sample code: Delete a trusted access role binding. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsGetSamples.java index 93ea394a13f3..d2dc2a7d6d91 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsGetSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class TrustedAccessRoleBindingsGetSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * TrustedAccessRoleBindings_Get.json + * x-ms-original-file: 2026-01-01/TrustedAccessRoleBindings_Get.json */ /** * Sample code: Get a trusted access role binding. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsListSamples.java index 3f4de183f670..99936b960a20 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class TrustedAccessRoleBindingsListSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * TrustedAccessRoleBindings_List.json + * x-ms-original-file: 2026-01-01/TrustedAccessRoleBindings_List.json */ /** * Sample code: List trusted access role bindings. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRolesListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRolesListSamples.java index 6104934e386d..540e8203b0ce 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRolesListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRolesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservice.generated; @@ -9,9 +9,7 @@ */ public final class TrustedAccessRolesListSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ - * TrustedAccessRoles_List.json + * x-ms-original-file: 2026-01-01/TrustedAccessRoles_List.json */ /** * Sample code: List trusted access roles. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/tsp-location.yaml b/sdk/containerservice/azure-resourcemanager-containerservice/tsp-location.yaml new file mode 100644 index 000000000000..134c92480d97 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/containerservice/resource-manager/Microsoft.ContainerService/aks +commit: HEAD +repo: Azure/azure-rest-api-specs +additionalDirectories: From db56fa52f604be1f9c4a30565249187d53c4d365 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 20 Mar 2026 15:19:23 +0800 Subject: [PATCH 09/19] record --- .../azure-resourcemanager-containerservice/assets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/assets.json b/sdk/containerservice/azure-resourcemanager-containerservice/assets.json index 9cdfac192547..5c7a496f5057 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/assets.json +++ b/sdk/containerservice/azure-resourcemanager-containerservice/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/containerservice/azure-resourcemanager-containerservice", - "Tag": "java/containerservice/azure-resourcemanager-containerservice_a6036916c8" + "Tag": "java/containerservice/azure-resourcemanager-containerservice_9340dca8d8" } From 3b377eb7a620a935d66685df5518056d64a27b17 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 20 Mar 2026 15:29:42 +0800 Subject: [PATCH 10/19] Regenerate SDK after ResourceIdentityType kept as enum, remove unnecessary revapi suppressions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/lintingconfigs/revapi/track2/revapi.json | 69 --- .../CHANGELOG.md | 579 +++++++++++++++++- .../models/ResourceIdentityType.java | 49 +- 3 files changed, 602 insertions(+), 95 deletions(-) diff --git a/eng/lintingconfigs/revapi/track2/revapi.json b/eng/lintingconfigs/revapi/track2/revapi.json index 88a230f6ef7f..4ea836949154 100644 --- a/eng/lintingconfigs/revapi/track2/revapi.json +++ b/eng/lintingconfigs/revapi/track2/revapi.json @@ -733,43 +733,6 @@ }, "justification": "Pageable models moved to implementation package." }, - { - "ignore": true, - "code": "java.missing.newSuperType", - "new" : "class com.azure.resourcemanager.containerservice.models.ResourceIdentityType", - "justification": "ResourceIdentityType changed from enum to expandable string union." - }, - { - "ignore": true, - "code": "java.class.kindChanged", - "old" : "enum com.azure.resourcemanager.containerservice.models.ResourceIdentityType", - "new" : "class com.azure.resourcemanager.containerservice.models.ResourceIdentityType", - "justification": "ResourceIdentityType changed from enum to expandable string union." - }, - { - "ignore": true, - "code": "java.class.noLongerImplementsInterface", - "old" : "enum com.azure.resourcemanager.containerservice.models.ResourceIdentityType", - "justification": "ResourceIdentityType changed from enum to expandable string union." - }, - { - "ignore": true, - "code": "java.method.removed", - "old" : { - "matcher": "regex", - "match": "method .* java\\.lang\\.Enum.*\\:\\:.*\\(.*\\) @ com\\.azure\\.resourcemanager\\.containerservice\\.models\\.ResourceIdentityType" - }, - "justification": "ResourceIdentityType changed from enum to expandable string union." - }, - { - "ignore": true, - "code": "java.method.visibilityIncreased", - "old" : { - "matcher": "regex", - "match": "method .* com\\.azure\\.resourcemanager\\.containerservice\\.models\\.ResourceIdentityType\\:\\:.*\\(.*\\)" - }, - "justification": "ResourceIdentityType changed from enum to expandable string union." - }, { "ignore": true, "code": "java.method.removed", @@ -788,12 +751,6 @@ }, "justification": "ManagedClusterAddonProfileIdentity covariant overrides removed, inherited methods return parent type." }, - { - "ignore": true, - "code": "java.method.returnTypeChanged", - "old": "method com.azure.resourcemanager.containerservice.models.ResourceIdentityType[] com.azure.resourcemanager.containerservice.models.ResourceIdentityType::values()", - "justification": "ResourceIdentityType changed from enum to expandable string union." - }, { "ignore": true, "code": "java.method.visibilityReduced", @@ -821,32 +778,6 @@ }, "justification": "Pageable models moved to implementation package. Unlikely used by user." }, - { - "regex": true, - "ignore": true, - "code": "java\\.missing\\.(oldSuperType|newSuperType)", - "old" : "class com\\.azure\\.resourcemanager\\.containerservice\\.models\\..*", - "justification": "TypeSpec fix for base resource class." - }, - { - "ignore": true, - "code": "java.missing.newSuperType", - "new" : "class com.azure.resourcemanager.containerservice.models.ResourceIdentityType", - "justification": "ResourceIdentityType changed from enum to expandable string union." - }, - { - "ignore": true, - "code": "java.class.kindChanged", - "old" : "enum com.azure.resourcemanager.containerservice.models.ResourceIdentityType", - "new" : "class com.azure.resourcemanager.containerservice.models.ResourceIdentityType", - "justification": "ResourceIdentityType changed from enum to expandable string union." - }, - { - "ignore": true, - "code": "java.class.noLongerImplementsInterface", - "old" : "enum com.azure.resourcemanager.containerservice.models.ResourceIdentityType", - "justification": "ResourceIdentityType changed from enum to expandable string union." - }, { "ignore": true, "code": "java.method.removed", diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md index fb1952145c7d..c49ac3d45403 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md +++ b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md @@ -1,14 +1,585 @@ # Release History -## 2.58.0-beta.2 (Unreleased) +## 2.58.0-beta.2 (2026-03-20) + +### Breaking Changes + +#### `models.OperationListResult` was removed + +#### `models.AgentPoolBlueGreenUpgradeSettings` was removed + +#### `models.UpgradeStrategy` was removed + +#### `models.MeshMembershipProperties` was removed + +#### `models.SeccompDefault` was removed + +#### `models.JwtAuthenticatorProvisioningState` was removed + +#### `models.ManagedClusterSecurityProfileImageIntegrity` was removed + +#### `models.ManagedClusterListResult` was removed + +#### `models.ComponentsByRelease` was removed + +#### `models.VmState` was removed + +#### `models.JwtAuthenticatorClaimMappings` was removed + +#### `models.ManagedClusterSecurityProfileNodeRestriction` was removed + +#### `models.AgentPoolListResult` was removed + +#### `models.MachineOSProfileLinuxProfile` was removed + +#### `models.GuardrailsAvailableVersionsProperties` was removed + +#### `models.ManagedClusterSecurityProfileDefenderSecurityGating` was removed + +#### `models.SchedulerInstanceProfile` was removed + +#### `models.MachineOSProfile` was removed + +#### `models.Operator` was removed + +#### `models.ClusterServiceLoadBalancerHealthProbeMode` was removed + +#### `models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig` was removed + +#### `models.GuardrailsSupport` was removed + +#### `models.MeshMembershipsListResult` was removed + +#### `models.SchedulerProfileSchedulerInstanceProfiles` was removed + +#### `models.GuardrailsAvailableVersionsList` was removed + +#### `models.SafeguardsAvailableVersionsList` was removed + +#### `models.DriftAction` was removed + +#### `models.IdentityBindingProperties` was removed + +#### `models.SafeguardsSupport` was removed + +#### `models.ManagedClusterAzureMonitorProfileContainerInsights` was removed + +#### `models.InfrastructureEncryption` was removed + +#### `models.SchedulerConfigMode` was removed + +#### `models.SchedulerProfile` was removed + +#### `models.MeshUpgradeProfileList` was removed + +#### `models.MachineKubernetesProfile` was removed + +#### `models.JwtAuthenticatorIssuer` was removed + +#### `models.IdentityBindingOidcIssuerProfile` was removed + +#### `models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics` was removed + +#### `models.TrustedAccessRoleListResult` was removed + +#### `models.OperationStatusResultList` was removed + +#### `models.JwtAuthenticatorExtraClaimMappingExpression` was removed + +#### `models.SafeguardsAvailableVersionsProperties` was removed + +#### `models.MachineSecurityProfile` was removed + +#### `models.ManagedNamespaceListResult` was removed + +#### `models.LabelSelectorRequirement` was removed + +#### `models.TrustedAccessRoleBindingListResult` was removed + +#### `models.ManagedClusterIngressProfileGatewayConfiguration` was removed + +#### `models.ContainerServiceNetworkProfileKubeProxyConfig` was removed + +#### `models.AgentPoolRecentlyUsedVersion` was removed + +#### `models.MachineHardwareProfile` was removed + +#### `models.IdentityBindingManagedIdentityProfile` was removed + +#### `models.JwtAuthenticatorValidationRule` was removed + +#### `models.DriverType` was removed + +#### `models.ManagedClusterAzureMonitorProfileAppMonitoring` was removed + +#### `models.ManagedClusterPropertiesForSnapshot` was removed + +#### `models.MeshMembershipProvisioningState` was removed + +#### `models.OutboundEnvironmentEndpointCollection` was removed + +#### `models.IdentityBindingListResult` was removed + +#### `models.ManagedClusterIngressDefaultDomainProfile` was removed + +#### `models.IpvsScheduler` was removed + +#### `models.ManagedClusterIngressProfileApplicationLoadBalancer` was removed + +#### `models.AgentPoolArtifactStreamingProfile` was removed + +#### `models.NodeCustomizationProfile` was removed + +#### `models.LabelSelector` was removed + +#### `models.KubernetesResourceObjectEncryptionProfile` was removed + +#### `models.Component` was removed + +#### `models.LoadBalancerListResult` was removed + +#### `models.NodeImageVersionsListResult` was removed + +#### `models.SnapshotListResult` was removed + +#### `models.JwtAuthenticatorClaimMappingExpression` was removed + +#### `models.MachineStatus` was removed + +#### `models.AutoScaleProfile` was removed + +#### `models.RebalanceLoadBalancersRequestBody` was removed + +#### `models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs` was removed + +#### `models.ManagedClusterSnapshotListResult` was removed + +#### `models.IdentityBindingProvisioningState` was removed + +#### `models.JwtAuthenticatorListResult` was removed + +#### `models.ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem` was removed + +#### `models.MeshRevisionProfileList` was removed + +#### `models.MachineListResult` was removed + +#### `models.Mode` was removed + +#### `models.AddonAutoscaling` was removed + +#### `models.NetworkProfileForSnapshot` was removed + +#### `models.ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation` was removed + +#### `models.ManagedClusterHostedSystemProfile` was removed + +#### `models.MaintenanceConfigurationListResult` was removed + +#### `models.ManagedGatewayType` was removed + +#### `models.JwtAuthenticatorProperties` was removed + +#### `models.PodLinkLocalAccess` was removed + +#### `models.ScaleProfile` was modified + +* `autoscale()` was removed +* `withAutoscale(models.AutoScaleProfile)` was removed + +#### `models.ManagedClusterSecurityProfileDefender` was modified + +* `withSecurityGating(models.ManagedClusterSecurityProfileDefenderSecurityGating)` was removed +* `securityGating()` was removed + +#### `models.LocalDnsProfile` was modified + +* `withVnetDnsOverrides(java.util.Map)` was removed +* `kubeDnsOverrides()` was removed +* `withKubeDnsOverrides(java.util.Map)` was removed +* `vnetDnsOverrides()` was removed + +#### `models.ManagedClustersGetCommandResultHeaders` was modified + +* `withLocation(java.lang.String)` was removed + +#### `models.ManagedClusterPodIdentityProvisioningErrorBody` was modified + +* `ManagedClusterPodIdentityProvisioningErrorBody()` was changed to private access +* `withDetails(java.util.List)` was removed +* `withMessage(java.lang.String)` was removed +* `withTarget(java.lang.String)` was removed +* `withCode(java.lang.String)` was removed + +#### `models.ManagedClusterIngressProfile` was modified + +* `withApplicationLoadBalancer(models.ManagedClusterIngressProfileApplicationLoadBalancer)` was removed +* `applicationLoadBalancer()` was removed +* `withGatewayApi(models.ManagedClusterIngressProfileGatewayConfiguration)` was removed +* `gatewayApi()` was removed + +#### `models.ContainerServiceNetworkProfile` was modified + +* `podLinkLocalAccess()` was removed +* `withPodLinkLocalAccess(models.PodLinkLocalAccess)` was removed +* `kubeProxyConfig()` was removed +* `withKubeProxyConfig(models.ContainerServiceNetworkProfileKubeProxyConfig)` was removed + +#### `models.AgentPoolMode` was modified + +* `MACHINES` was removed +* `MANAGED_SYSTEM` was removed + +#### `models.ManagedClusterHttpProxyConfig` was modified + +* `effectiveNoProxy()` was removed + +#### `models.SnapshotType` was modified + +* `MANAGED_CLUSTER` was removed + +#### `models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem` was modified + +* `AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem()` was changed to private access +* `withDefaultProperty(java.lang.Boolean)` was removed +* `withKubernetesVersion(java.lang.String)` was removed +* `withIsPreview(java.lang.Boolean)` was removed + +#### `models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler` was modified + +* `addonAutoscaling()` was removed +* `withAddonAutoscaling(models.AddonAutoscaling)` was removed + +#### `models.ManagedClusterAgentPoolProfile` was modified + +* `etag()` was removed +* `withUpgradeSettingsBlueGreen(models.AgentPoolBlueGreenUpgradeSettings)` was removed +* `withArtifactStreamingProfile(models.AgentPoolArtifactStreamingProfile)` was removed +* `withNodeInitializationTaints(java.util.List)` was removed +* `withNodeImageVersion(java.lang.String)` was removed +* `withNodeCustomizationProfile(models.NodeCustomizationProfile)` was removed +* `withLocalDnsProfile(models.LocalDnsProfile)` was removed +* `withUpgradeStrategy(models.UpgradeStrategy)` was removed + +#### `models.ManagedClusterSecurityProfile` was modified + +* `withKubernetesResourceObjectEncryptionProfile(models.KubernetesResourceObjectEncryptionProfile)` was removed +* `withImageIntegrity(models.ManagedClusterSecurityProfileImageIntegrity)` was removed +* `imageIntegrity()` was removed +* `nodeRestriction()` was removed +* `withNodeRestriction(models.ManagedClusterSecurityProfileNodeRestriction)` was removed +* `kubernetesResourceObjectEncryptionProfile()` was removed + +#### `models.ManagedClusterStorageProfile` was modified + +* `blobCsiDriver()` was removed +* `diskCsiDriver()` was removed +* `withDiskCsiDriver(models.ManagedClusterStorageProfileDiskCsiDriver)` was removed +* `withFileCsiDriver(models.ManagedClusterStorageProfileFileCsiDriver)` was removed +* `withBlobCsiDriver(models.ManagedClusterStorageProfileBlobCsiDriver)` was removed +* `fileCsiDriver()` was removed + +#### `models.ManagedClusterIngressProfileWebAppRouting` was modified + +* `defaultDomain()` was removed +* `withDefaultDomain(models.ManagedClusterIngressDefaultDomainProfile)` was removed + +#### `models.ManagedClusterPodIdentityProvisioningInfo` was modified + +* `ManagedClusterPodIdentityProvisioningInfo()` was changed to private access +* `withError(models.ManagedClusterPodIdentityProvisioningError)` was removed + +#### `models.ManagedClusterLoadBalancerProfile` was modified + +* `withClusterServiceLoadBalancerHealthProbeMode(models.ClusterServiceLoadBalancerHealthProbeMode)` was removed +* `outboundIPs()` was removed +* `managedOutboundIPs()` was removed +* `clusterServiceLoadBalancerHealthProbeMode()` was removed +* `withOutboundIPs(models.ManagedClusterLoadBalancerProfileOutboundIPs)` was removed +* `withManagedOutboundIPs(models.ManagedClusterLoadBalancerProfileManagedOutboundIPs)` was removed +* `effectiveOutboundIPs()` was removed + +#### `models.ManagedClusterApiServerAccessProfile` was modified + +* `withEnablePrivateClusterPublicFqdn(java.lang.Boolean)` was removed +* `enablePrivateClusterPublicFqdn()` was removed + +#### `models.PublicNetworkAccess` was modified + +* `SECURED_BY_PERIMETER` was removed + +#### `models.MeshRevision` was modified + +* `models.MeshRevision withCompatibleWith(java.util.List)` -> `models.MeshRevision withCompatibleWith(java.util.List)` +* `models.MeshRevision withUpgrades(java.util.List)` -> `models.MeshRevision withUpgrades(java.util.List)` +* `models.MeshRevision withRevision(java.lang.String)` -> `models.MeshRevision withRevision(java.lang.String)` + +#### `models.AgentPoolSshAccess` was modified + +* `ENTRA_ID` was removed + +#### `models.KubernetesVersion` was modified + +* `KubernetesVersion()` was changed to private access +* `withCapabilities(models.KubernetesVersionCapabilities)` was removed +* `withIsDefault(java.lang.Boolean)` was removed +* `withPatchVersions(java.util.Map)` was removed +* `withVersion(java.lang.String)` was removed +* `withIsPreview(java.lang.Boolean)` was removed + +#### `models.EndpointDependency` was modified + +* `EndpointDependency()` was changed to private access +* `withDomainName(java.lang.String)` was removed +* `withEndpointDetails(java.util.List)` was removed + +#### `models.KubernetesPatchVersion` was modified + +* `KubernetesPatchVersion()` was changed to private access +* `withUpgrades(java.util.List)` was removed + +#### `models.ManagedClusterAddonProfileIdentity` was modified + +* `ManagedClusterAddonProfileIdentity()` was changed to private access +* `withObjectId(java.lang.String)` was removed +* `withClientId(java.lang.String)` was removed +* `withResourceId(java.lang.String)` was removed + +#### `models.AgentPoolSecurityProfile` was modified + +* `enableVtpm()` was removed +* `withEnableVtpm(java.lang.Boolean)` was removed + +#### `models.EndpointDetail` was modified + +* `EndpointDetail()` was changed to private access +* `withProtocol(java.lang.String)` was removed +* `withPort(java.lang.Integer)` was removed +* `withDescription(java.lang.String)` was removed +* `withIpAddress(java.lang.String)` was removed + +#### `models.ManagedClusterStorageProfileDiskCsiDriver` was modified + +* `withVersion(java.lang.String)` was removed +* `version()` was removed + +#### `models.MeshRevisionProfileProperties` was modified + +* `MeshRevisionProfileProperties()` was changed to private access +* `withMeshRevisions(java.util.List)` was removed + +#### `models.ManagedClusterPoolUpgradeProfileUpgradesItem` was modified + +* `ManagedClusterPoolUpgradeProfileUpgradesItem()` was changed to private access +* `withIsPreview(java.lang.Boolean)` was removed +* `withIsOutOfSupport(java.lang.Boolean)` was removed +* `isOutOfSupport()` was removed +* `withKubernetesVersion(java.lang.String)` was removed + +#### `models.ManagedClusterWindowsProfile` was modified + +* `withEnableCsiProxy(java.lang.Boolean)` was removed +* `enableCsiProxy()` was removed + +#### `models.MachineNetworkProperties` was modified + +* `MachineNetworkProperties()` was changed to private access +* `withEnableNodePublicIp(java.lang.Boolean)` was removed +* `withPodSubnetId(java.lang.String)` was removed +* `withNodePublicIpPrefixId(java.lang.String)` was removed +* `nodePublicIpTags()` was removed +* `podSubnetId()` was removed +* `enableNodePublicIp()` was removed +* `nodePublicIpPrefixId()` was removed +* `vnetSubnetId()` was removed +* `withNodePublicIpTags(java.util.List)` was removed +* `withVnetSubnetId(java.lang.String)` was removed + +#### `models.WorkloadRuntime` was modified + +* `KATA_MSHV_VM_ISOLATION` was removed + +#### `models.OSSku` was modified + +* `MARINER` was removed +* `FLATCAR` was removed +* `WINDOWS2025` was removed +* `WINDOWS_ANNUAL` was removed + +#### `models.AgentPoolUpgradeProfilePropertiesUpgradesItem` was modified + +* `AgentPoolUpgradeProfilePropertiesUpgradesItem()` was changed to private access +* `withKubernetesVersion(java.lang.String)` was removed +* `withIsPreview(java.lang.Boolean)` was removed +* `withIsOutOfSupport(java.lang.Boolean)` was removed +* `isOutOfSupport()` was removed + +#### `models.ManagedClusterLoadBalancerProfileOutboundIPs` was modified + +* `withPublicIPs(java.util.List)` was removed +* `publicIPs()` was removed + +#### `models.ManagedClusterPodIdentityProvisioningError` was modified + +* `ManagedClusterPodIdentityProvisioningError()` was changed to private access +* `withError(models.ManagedClusterPodIdentityProvisioningErrorBody)` was removed + +#### `models.MachineIpAddress` was modified + +* `MachineIpAddress()` was changed to private access + +#### `models.GpuProfile` was modified + +* `driverType()` was removed +* `withDriverType(models.DriverType)` was removed + +#### `models.KubernetesVersionCapabilities` was modified + +* `KubernetesVersionCapabilities()` was changed to private access +* `withSupportPlan(java.util.List)` was removed + +#### `models.AgentPoolUpgradeSettings` was modified + +* `maxBlockedNodes()` was removed +* `withMaxBlockedNodes(java.lang.String)` was removed + +#### `models.CompatibleVersions` was modified + +* `CompatibleVersions()` was changed to private access +* `withName(java.lang.String)` was removed +* `withVersions(java.util.List)` was removed + +#### `models.ManagedClusterAzureMonitorProfile` was modified + +* `appMonitoring()` was removed +* `withContainerInsights(models.ManagedClusterAzureMonitorProfileContainerInsights)` was removed +* `containerInsights()` was removed +* `withAppMonitoring(models.ManagedClusterAzureMonitorProfileAppMonitoring)` was removed + +#### `models.ManagedClusterNatGatewayProfile` was modified + +* `effectiveOutboundIPs()` was removed + +#### `models.MeshUpgradeProfileProperties` was modified + +* `MeshUpgradeProfileProperties()` was changed to private access +* `withRevision(java.lang.String)` was removed +* `withCompatibleWith(java.util.List)` was removed +* `withUpgrades(java.util.List)` was removed + +#### `models.ManagedClusterPoolUpgradeProfile` was modified + +* `ManagedClusterPoolUpgradeProfile()` was changed to private access +* `withComponentsByReleases(java.util.List)` was removed +* `withOsType(models.OSType)` was removed +* `componentsByReleases()` was removed +* `withUpgrades(java.util.List)` was removed +* `withName(java.lang.String)` was removed +* `withKubernetesVersion(java.lang.String)` was removed + +#### `models.TrustedAccessRoleRule` was modified + +* `TrustedAccessRoleRule()` was changed to private access + +#### `models.KubeletConfig` was modified + +* `withSeccompDefault(models.SeccompDefault)` was removed +* `seccompDefault()` was removed + +#### `models.MachineProperties` was modified + +* `MachineProperties()` was changed to private access +* `withNetwork(models.MachineNetworkProperties)` was removed +* `mode()` was removed +* `security()` was removed +* `withOperatingSystem(models.MachineOSProfile)` was removed +* `priority()` was removed +* `withPriority(models.ScaleSetPriority)` was removed +* `withHardware(models.MachineHardwareProfile)` was removed +* `withNodeImageVersion(java.lang.String)` was removed +* `tags()` was removed +* `status()` was removed +* `kubernetes()` was removed +* `hardware()` was removed +* `operatingSystem()` was removed +* `withSecurity(models.MachineSecurityProfile)` was removed +* `etag()` was removed +* `nodeImageVersion()` was removed +* `provisioningState()` was removed +* `withTags(java.util.Map)` was removed +* `withKubernetes(models.MachineKubernetesProfile)` was removed +* `withMode(models.AgentPoolMode)` was removed + +#### `models.CredentialResult` was modified + +* `CredentialResult()` was changed to private access ### Features Added -### Breaking Changes +#### `models.LocalDnsProfile` was modified -### Bugs Fixed +* `withKubeDNSOverrides(java.util.Map)` was added +* `withVnetDNSOverrides(java.util.Map)` was added +* `kubeDNSOverrides()` was added +* `vnetDNSOverrides()` was added -### Other Changes +#### `models.ManagedClusterAgentPoolProfile` was modified + +* `withLocalDNSProfile(models.LocalDnsProfile)` was added +* `nodeImageVersion()` was added +* `eTag()` was added + +#### `models.ManagedClusterStorageProfile` was modified + +* `withFileCSIDriver(models.ManagedClusterStorageProfileFileCsiDriver)` was added +* `withBlobCSIDriver(models.ManagedClusterStorageProfileBlobCsiDriver)` was added +* `diskCSIDriver()` was added +* `withDiskCSIDriver(models.ManagedClusterStorageProfileDiskCsiDriver)` was added +* `blobCSIDriver()` was added +* `fileCSIDriver()` was added + +#### `models.ManagedClusterLoadBalancerProfile` was modified + +* `outboundIps()` was added +* `managedOutboundIps()` was added +* `effectiveOutboundIps()` was added +* `withOutboundIps(models.ManagedClusterLoadBalancerProfileOutboundIPs)` was added +* `withManagedOutboundIps(models.ManagedClusterLoadBalancerProfileManagedOutboundIPs)` was added + +#### `models.ManagedClusterApiServerAccessProfile` was modified + +* `enablePrivateClusterPublicFQDN()` was added +* `withEnablePrivateClusterPublicFQDN(java.lang.Boolean)` was added + +#### `models.AgentPoolSecurityProfile` was modified + +* `withEnableVTPM(java.lang.Boolean)` was added +* `enableVTPM()` was added + +#### `models.ManagedClusterWindowsProfile` was modified + +* `withEnableCSIProxy(java.lang.Boolean)` was added +* `enableCSIProxy()` was added + +#### `models.ManagedClusterLoadBalancerProfileOutboundIPs` was modified + +* `withPublicIps(java.util.List)` was added +* `publicIps()` was added + +#### `ContainerServiceManager` was modified + +* `orchestratorClient()` was added +* `openShiftClient()` was added + +#### `models.ManagedClusterNatGatewayProfile` was modified + +* `effectiveOutboundIps()` was added + +#### `models.MeshUpgradeProfileProperties` was modified + +* `upgrades()` was added +* `compatibleWith()` was added +* `revision()` was added ## 2.57.1 (2026-01-29) diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceIdentityType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceIdentityType.java index 7c9e76a92268..3e9c91554f79 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceIdentityType.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceIdentityType.java @@ -4,57 +4,62 @@ package com.azure.resourcemanager.containerservice.models; -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - /** * The type of identity used for the managed cluster. For more information see [use managed identities in * AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). */ -public final class ResourceIdentityType extends ExpandableStringEnum { +public enum ResourceIdentityType { /** * Use an implicitly created system assigned managed identity to manage cluster resources. Master components in the * control plane such as kube-controller-manager will use the system assigned managed identity to manipulate Azure * resources. */ - public static final ResourceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); + SYSTEM_ASSIGNED("SystemAssigned"), /** * Use a user-specified identity to manage cluster resources. Master components in the control plane such as * kube-controller-manager will use the specified user assigned managed identity to manipulate Azure resources. */ - public static final ResourceIdentityType USER_ASSIGNED = fromString("UserAssigned"); + USER_ASSIGNED("UserAssigned"), /** * Do not use a managed identity for the Managed Cluster, service principal will be used instead. */ - public static final ResourceIdentityType NONE = fromString("None"); + NONE("None"); /** - * Creates a new instance of ResourceIdentityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. + * The actual serialized value for a ResourceIdentityType instance. */ - @Deprecated - public ResourceIdentityType() { + private final String value; + + ResourceIdentityType(String value) { + this.value = value; } /** - * Creates or finds a ResourceIdentityType from its string representation. + * Parses a serialized value to a ResourceIdentityType instance. * - * @param name a name to look for. - * @return the corresponding ResourceIdentityType. + * @param value the serialized value to parse. + * @return the parsed ResourceIdentityType object, or null if unable to parse. */ - public static ResourceIdentityType fromString(String name) { - return fromString(name, ResourceIdentityType.class); + 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; } /** - * Gets known ResourceIdentityType values. - * - * @return known ResourceIdentityType values. + * {@inheritDoc} */ - public static Collection values() { - return values(ResourceIdentityType.class); + @Override + public String toString() { + return this.value; } } From 747513ad72c6ed371a9c85c77a8c11cb7f4827ca Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 20 Mar 2026 15:42:59 +0800 Subject: [PATCH 11/19] Update CHANGELOG.md and tsp-location.yaml Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../CHANGELOG.md | 583 +----------------- .../tsp-location.yaml | 4 +- 2 files changed, 9 insertions(+), 578 deletions(-) diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md index c49ac3d45403..f86b22e2de89 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md +++ b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md @@ -2,584 +2,15 @@ ## 2.58.0-beta.2 (2026-03-20) -### Breaking Changes - -#### `models.OperationListResult` was removed - -#### `models.AgentPoolBlueGreenUpgradeSettings` was removed - -#### `models.UpgradeStrategy` was removed - -#### `models.MeshMembershipProperties` was removed - -#### `models.SeccompDefault` was removed - -#### `models.JwtAuthenticatorProvisioningState` was removed - -#### `models.ManagedClusterSecurityProfileImageIntegrity` was removed - -#### `models.ManagedClusterListResult` was removed - -#### `models.ComponentsByRelease` was removed - -#### `models.VmState` was removed - -#### `models.JwtAuthenticatorClaimMappings` was removed - -#### `models.ManagedClusterSecurityProfileNodeRestriction` was removed - -#### `models.AgentPoolListResult` was removed - -#### `models.MachineOSProfileLinuxProfile` was removed - -#### `models.GuardrailsAvailableVersionsProperties` was removed - -#### `models.ManagedClusterSecurityProfileDefenderSecurityGating` was removed - -#### `models.SchedulerInstanceProfile` was removed - -#### `models.MachineOSProfile` was removed - -#### `models.Operator` was removed - -#### `models.ClusterServiceLoadBalancerHealthProbeMode` was removed - -#### `models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig` was removed - -#### `models.GuardrailsSupport` was removed - -#### `models.MeshMembershipsListResult` was removed - -#### `models.SchedulerProfileSchedulerInstanceProfiles` was removed - -#### `models.GuardrailsAvailableVersionsList` was removed - -#### `models.SafeguardsAvailableVersionsList` was removed - -#### `models.DriftAction` was removed - -#### `models.IdentityBindingProperties` was removed - -#### `models.SafeguardsSupport` was removed - -#### `models.ManagedClusterAzureMonitorProfileContainerInsights` was removed - -#### `models.InfrastructureEncryption` was removed - -#### `models.SchedulerConfigMode` was removed - -#### `models.SchedulerProfile` was removed - -#### `models.MeshUpgradeProfileList` was removed - -#### `models.MachineKubernetesProfile` was removed - -#### `models.JwtAuthenticatorIssuer` was removed - -#### `models.IdentityBindingOidcIssuerProfile` was removed - -#### `models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics` was removed - -#### `models.TrustedAccessRoleListResult` was removed - -#### `models.OperationStatusResultList` was removed - -#### `models.JwtAuthenticatorExtraClaimMappingExpression` was removed - -#### `models.SafeguardsAvailableVersionsProperties` was removed - -#### `models.MachineSecurityProfile` was removed - -#### `models.ManagedNamespaceListResult` was removed - -#### `models.LabelSelectorRequirement` was removed - -#### `models.TrustedAccessRoleBindingListResult` was removed - -#### `models.ManagedClusterIngressProfileGatewayConfiguration` was removed - -#### `models.ContainerServiceNetworkProfileKubeProxyConfig` was removed - -#### `models.AgentPoolRecentlyUsedVersion` was removed - -#### `models.MachineHardwareProfile` was removed - -#### `models.IdentityBindingManagedIdentityProfile` was removed - -#### `models.JwtAuthenticatorValidationRule` was removed - -#### `models.DriverType` was removed - -#### `models.ManagedClusterAzureMonitorProfileAppMonitoring` was removed - -#### `models.ManagedClusterPropertiesForSnapshot` was removed - -#### `models.MeshMembershipProvisioningState` was removed - -#### `models.OutboundEnvironmentEndpointCollection` was removed - -#### `models.IdentityBindingListResult` was removed - -#### `models.ManagedClusterIngressDefaultDomainProfile` was removed - -#### `models.IpvsScheduler` was removed - -#### `models.ManagedClusterIngressProfileApplicationLoadBalancer` was removed - -#### `models.AgentPoolArtifactStreamingProfile` was removed - -#### `models.NodeCustomizationProfile` was removed - -#### `models.LabelSelector` was removed - -#### `models.KubernetesResourceObjectEncryptionProfile` was removed - -#### `models.Component` was removed - -#### `models.LoadBalancerListResult` was removed - -#### `models.NodeImageVersionsListResult` was removed - -#### `models.SnapshotListResult` was removed - -#### `models.JwtAuthenticatorClaimMappingExpression` was removed - -#### `models.MachineStatus` was removed - -#### `models.AutoScaleProfile` was removed - -#### `models.RebalanceLoadBalancersRequestBody` was removed - -#### `models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs` was removed - -#### `models.ManagedClusterSnapshotListResult` was removed - -#### `models.IdentityBindingProvisioningState` was removed - -#### `models.JwtAuthenticatorListResult` was removed - -#### `models.ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem` was removed - -#### `models.MeshRevisionProfileList` was removed - -#### `models.MachineListResult` was removed - -#### `models.Mode` was removed - -#### `models.AddonAutoscaling` was removed - -#### `models.NetworkProfileForSnapshot` was removed - -#### `models.ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation` was removed - -#### `models.ManagedClusterHostedSystemProfile` was removed - -#### `models.MaintenanceConfigurationListResult` was removed - -#### `models.ManagedGatewayType` was removed - -#### `models.JwtAuthenticatorProperties` was removed - -#### `models.PodLinkLocalAccess` was removed - -#### `models.ScaleProfile` was modified - -* `autoscale()` was removed -* `withAutoscale(models.AutoScaleProfile)` was removed - -#### `models.ManagedClusterSecurityProfileDefender` was modified - -* `withSecurityGating(models.ManagedClusterSecurityProfileDefenderSecurityGating)` was removed -* `securityGating()` was removed - -#### `models.LocalDnsProfile` was modified - -* `withVnetDnsOverrides(java.util.Map)` was removed -* `kubeDnsOverrides()` was removed -* `withKubeDnsOverrides(java.util.Map)` was removed -* `vnetDnsOverrides()` was removed - -#### `models.ManagedClustersGetCommandResultHeaders` was modified - -* `withLocation(java.lang.String)` was removed - -#### `models.ManagedClusterPodIdentityProvisioningErrorBody` was modified - -* `ManagedClusterPodIdentityProvisioningErrorBody()` was changed to private access -* `withDetails(java.util.List)` was removed -* `withMessage(java.lang.String)` was removed -* `withTarget(java.lang.String)` was removed -* `withCode(java.lang.String)` was removed - -#### `models.ManagedClusterIngressProfile` was modified - -* `withApplicationLoadBalancer(models.ManagedClusterIngressProfileApplicationLoadBalancer)` was removed -* `applicationLoadBalancer()` was removed -* `withGatewayApi(models.ManagedClusterIngressProfileGatewayConfiguration)` was removed -* `gatewayApi()` was removed - -#### `models.ContainerServiceNetworkProfile` was modified - -* `podLinkLocalAccess()` was removed -* `withPodLinkLocalAccess(models.PodLinkLocalAccess)` was removed -* `kubeProxyConfig()` was removed -* `withKubeProxyConfig(models.ContainerServiceNetworkProfileKubeProxyConfig)` was removed - -#### `models.AgentPoolMode` was modified - -* `MACHINES` was removed -* `MANAGED_SYSTEM` was removed - -#### `models.ManagedClusterHttpProxyConfig` was modified - -* `effectiveNoProxy()` was removed +- This release migrates the SDK from AutoRest to TypeSpec, based on API version `2026-01-01`. -#### `models.SnapshotType` was modified - -* `MANAGED_CLUSTER` was removed - -#### `models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem` was modified - -* `AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem()` was changed to private access -* `withDefaultProperty(java.lang.Boolean)` was removed -* `withKubernetesVersion(java.lang.String)` was removed -* `withIsPreview(java.lang.Boolean)` was removed - -#### `models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler` was modified - -* `addonAutoscaling()` was removed -* `withAddonAutoscaling(models.AddonAutoscaling)` was removed - -#### `models.ManagedClusterAgentPoolProfile` was modified - -* `etag()` was removed -* `withUpgradeSettingsBlueGreen(models.AgentPoolBlueGreenUpgradeSettings)` was removed -* `withArtifactStreamingProfile(models.AgentPoolArtifactStreamingProfile)` was removed -* `withNodeInitializationTaints(java.util.List)` was removed -* `withNodeImageVersion(java.lang.String)` was removed -* `withNodeCustomizationProfile(models.NodeCustomizationProfile)` was removed -* `withLocalDnsProfile(models.LocalDnsProfile)` was removed -* `withUpgradeStrategy(models.UpgradeStrategy)` was removed - -#### `models.ManagedClusterSecurityProfile` was modified - -* `withKubernetesResourceObjectEncryptionProfile(models.KubernetesResourceObjectEncryptionProfile)` was removed -* `withImageIntegrity(models.ManagedClusterSecurityProfileImageIntegrity)` was removed -* `imageIntegrity()` was removed -* `nodeRestriction()` was removed -* `withNodeRestriction(models.ManagedClusterSecurityProfileNodeRestriction)` was removed -* `kubernetesResourceObjectEncryptionProfile()` was removed - -#### `models.ManagedClusterStorageProfile` was modified - -* `blobCsiDriver()` was removed -* `diskCsiDriver()` was removed -* `withDiskCsiDriver(models.ManagedClusterStorageProfileDiskCsiDriver)` was removed -* `withFileCsiDriver(models.ManagedClusterStorageProfileFileCsiDriver)` was removed -* `withBlobCsiDriver(models.ManagedClusterStorageProfileBlobCsiDriver)` was removed -* `fileCsiDriver()` was removed - -#### `models.ManagedClusterIngressProfileWebAppRouting` was modified - -* `defaultDomain()` was removed -* `withDefaultDomain(models.ManagedClusterIngressDefaultDomainProfile)` was removed - -#### `models.ManagedClusterPodIdentityProvisioningInfo` was modified - -* `ManagedClusterPodIdentityProvisioningInfo()` was changed to private access -* `withError(models.ManagedClusterPodIdentityProvisioningError)` was removed - -#### `models.ManagedClusterLoadBalancerProfile` was modified - -* `withClusterServiceLoadBalancerHealthProbeMode(models.ClusterServiceLoadBalancerHealthProbeMode)` was removed -* `outboundIPs()` was removed -* `managedOutboundIPs()` was removed -* `clusterServiceLoadBalancerHealthProbeMode()` was removed -* `withOutboundIPs(models.ManagedClusterLoadBalancerProfileOutboundIPs)` was removed -* `withManagedOutboundIPs(models.ManagedClusterLoadBalancerProfileManagedOutboundIPs)` was removed -* `effectiveOutboundIPs()` was removed - -#### `models.ManagedClusterApiServerAccessProfile` was modified - -* `withEnablePrivateClusterPublicFqdn(java.lang.Boolean)` was removed -* `enablePrivateClusterPublicFqdn()` was removed - -#### `models.PublicNetworkAccess` was modified - -* `SECURED_BY_PERIMETER` was removed - -#### `models.MeshRevision` was modified - -* `models.MeshRevision withCompatibleWith(java.util.List)` -> `models.MeshRevision withCompatibleWith(java.util.List)` -* `models.MeshRevision withUpgrades(java.util.List)` -> `models.MeshRevision withUpgrades(java.util.List)` -* `models.MeshRevision withRevision(java.lang.String)` -> `models.MeshRevision withRevision(java.lang.String)` - -#### `models.AgentPoolSshAccess` was modified - -* `ENTRA_ID` was removed - -#### `models.KubernetesVersion` was modified - -* `KubernetesVersion()` was changed to private access -* `withCapabilities(models.KubernetesVersionCapabilities)` was removed -* `withIsDefault(java.lang.Boolean)` was removed -* `withPatchVersions(java.util.Map)` was removed -* `withVersion(java.lang.String)` was removed -* `withIsPreview(java.lang.Boolean)` was removed - -#### `models.EndpointDependency` was modified - -* `EndpointDependency()` was changed to private access -* `withDomainName(java.lang.String)` was removed -* `withEndpointDetails(java.util.List)` was removed - -#### `models.KubernetesPatchVersion` was modified - -* `KubernetesPatchVersion()` was changed to private access -* `withUpgrades(java.util.List)` was removed - -#### `models.ManagedClusterAddonProfileIdentity` was modified - -* `ManagedClusterAddonProfileIdentity()` was changed to private access -* `withObjectId(java.lang.String)` was removed -* `withClientId(java.lang.String)` was removed -* `withResourceId(java.lang.String)` was removed - -#### `models.AgentPoolSecurityProfile` was modified - -* `enableVtpm()` was removed -* `withEnableVtpm(java.lang.Boolean)` was removed - -#### `models.EndpointDetail` was modified - -* `EndpointDetail()` was changed to private access -* `withProtocol(java.lang.String)` was removed -* `withPort(java.lang.Integer)` was removed -* `withDescription(java.lang.String)` was removed -* `withIpAddress(java.lang.String)` was removed - -#### `models.ManagedClusterStorageProfileDiskCsiDriver` was modified - -* `withVersion(java.lang.String)` was removed -* `version()` was removed - -#### `models.MeshRevisionProfileProperties` was modified - -* `MeshRevisionProfileProperties()` was changed to private access -* `withMeshRevisions(java.util.List)` was removed - -#### `models.ManagedClusterPoolUpgradeProfileUpgradesItem` was modified - -* `ManagedClusterPoolUpgradeProfileUpgradesItem()` was changed to private access -* `withIsPreview(java.lang.Boolean)` was removed -* `withIsOutOfSupport(java.lang.Boolean)` was removed -* `isOutOfSupport()` was removed -* `withKubernetesVersion(java.lang.String)` was removed - -#### `models.ManagedClusterWindowsProfile` was modified - -* `withEnableCsiProxy(java.lang.Boolean)` was removed -* `enableCsiProxy()` was removed - -#### `models.MachineNetworkProperties` was modified - -* `MachineNetworkProperties()` was changed to private access -* `withEnableNodePublicIp(java.lang.Boolean)` was removed -* `withPodSubnetId(java.lang.String)` was removed -* `withNodePublicIpPrefixId(java.lang.String)` was removed -* `nodePublicIpTags()` was removed -* `podSubnetId()` was removed -* `enableNodePublicIp()` was removed -* `nodePublicIpPrefixId()` was removed -* `vnetSubnetId()` was removed -* `withNodePublicIpTags(java.util.List)` was removed -* `withVnetSubnetId(java.lang.String)` was removed - -#### `models.WorkloadRuntime` was modified - -* `KATA_MSHV_VM_ISOLATION` was removed - -#### `models.OSSku` was modified - -* `MARINER` was removed -* `FLATCAR` was removed -* `WINDOWS2025` was removed -* `WINDOWS_ANNUAL` was removed - -#### `models.AgentPoolUpgradeProfilePropertiesUpgradesItem` was modified - -* `AgentPoolUpgradeProfilePropertiesUpgradesItem()` was changed to private access -* `withKubernetesVersion(java.lang.String)` was removed -* `withIsPreview(java.lang.Boolean)` was removed -* `withIsOutOfSupport(java.lang.Boolean)` was removed -* `isOutOfSupport()` was removed - -#### `models.ManagedClusterLoadBalancerProfileOutboundIPs` was modified - -* `withPublicIPs(java.util.List)` was removed -* `publicIPs()` was removed - -#### `models.ManagedClusterPodIdentityProvisioningError` was modified - -* `ManagedClusterPodIdentityProvisioningError()` was changed to private access -* `withError(models.ManagedClusterPodIdentityProvisioningErrorBody)` was removed - -#### `models.MachineIpAddress` was modified - -* `MachineIpAddress()` was changed to private access - -#### `models.GpuProfile` was modified - -* `driverType()` was removed -* `withDriverType(models.DriverType)` was removed - -#### `models.KubernetesVersionCapabilities` was modified - -* `KubernetesVersionCapabilities()` was changed to private access -* `withSupportPlan(java.util.List)` was removed - -#### `models.AgentPoolUpgradeSettings` was modified - -* `maxBlockedNodes()` was removed -* `withMaxBlockedNodes(java.lang.String)` was removed - -#### `models.CompatibleVersions` was modified - -* `CompatibleVersions()` was changed to private access -* `withName(java.lang.String)` was removed -* `withVersions(java.util.List)` was removed - -#### `models.ManagedClusterAzureMonitorProfile` was modified - -* `appMonitoring()` was removed -* `withContainerInsights(models.ManagedClusterAzureMonitorProfileContainerInsights)` was removed -* `containerInsights()` was removed -* `withAppMonitoring(models.ManagedClusterAzureMonitorProfileAppMonitoring)` was removed - -#### `models.ManagedClusterNatGatewayProfile` was modified - -* `effectiveOutboundIPs()` was removed - -#### `models.MeshUpgradeProfileProperties` was modified - -* `MeshUpgradeProfileProperties()` was changed to private access -* `withRevision(java.lang.String)` was removed -* `withCompatibleWith(java.util.List)` was removed -* `withUpgrades(java.util.List)` was removed - -#### `models.ManagedClusterPoolUpgradeProfile` was modified - -* `ManagedClusterPoolUpgradeProfile()` was changed to private access -* `withComponentsByReleases(java.util.List)` was removed -* `withOsType(models.OSType)` was removed -* `componentsByReleases()` was removed -* `withUpgrades(java.util.List)` was removed -* `withName(java.lang.String)` was removed -* `withKubernetesVersion(java.lang.String)` was removed - -#### `models.TrustedAccessRoleRule` was modified - -* `TrustedAccessRoleRule()` was changed to private access - -#### `models.KubeletConfig` was modified - -* `withSeccompDefault(models.SeccompDefault)` was removed -* `seccompDefault()` was removed - -#### `models.MachineProperties` was modified - -* `MachineProperties()` was changed to private access -* `withNetwork(models.MachineNetworkProperties)` was removed -* `mode()` was removed -* `security()` was removed -* `withOperatingSystem(models.MachineOSProfile)` was removed -* `priority()` was removed -* `withPriority(models.ScaleSetPriority)` was removed -* `withHardware(models.MachineHardwareProfile)` was removed -* `withNodeImageVersion(java.lang.String)` was removed -* `tags()` was removed -* `status()` was removed -* `kubernetes()` was removed -* `hardware()` was removed -* `operatingSystem()` was removed -* `withSecurity(models.MachineSecurityProfile)` was removed -* `etag()` was removed -* `nodeImageVersion()` was removed -* `provisioningState()` was removed -* `withTags(java.util.Map)` was removed -* `withKubernetes(models.MachineKubernetesProfile)` was removed -* `withMode(models.AgentPoolMode)` was removed - -#### `models.CredentialResult` was modified - -* `CredentialResult()` was changed to private access - -### Features Added - -#### `models.LocalDnsProfile` was modified - -* `withKubeDNSOverrides(java.util.Map)` was added -* `withVnetDNSOverrides(java.util.Map)` was added -* `kubeDNSOverrides()` was added -* `vnetDNSOverrides()` was added - -#### `models.ManagedClusterAgentPoolProfile` was modified - -* `withLocalDNSProfile(models.LocalDnsProfile)` was added -* `nodeImageVersion()` was added -* `eTag()` was added - -#### `models.ManagedClusterStorageProfile` was modified - -* `withFileCSIDriver(models.ManagedClusterStorageProfileFileCsiDriver)` was added -* `withBlobCSIDriver(models.ManagedClusterStorageProfileBlobCsiDriver)` was added -* `diskCSIDriver()` was added -* `withDiskCSIDriver(models.ManagedClusterStorageProfileDiskCsiDriver)` was added -* `blobCSIDriver()` was added -* `fileCSIDriver()` was added - -#### `models.ManagedClusterLoadBalancerProfile` was modified - -* `outboundIps()` was added -* `managedOutboundIps()` was added -* `effectiveOutboundIps()` was added -* `withOutboundIps(models.ManagedClusterLoadBalancerProfileOutboundIPs)` was added -* `withManagedOutboundIps(models.ManagedClusterLoadBalancerProfileManagedOutboundIPs)` was added - -#### `models.ManagedClusterApiServerAccessProfile` was modified - -* `enablePrivateClusterPublicFQDN()` was added -* `withEnablePrivateClusterPublicFQDN(java.lang.Boolean)` was added - -#### `models.AgentPoolSecurityProfile` was modified - -* `withEnableVTPM(java.lang.Boolean)` was added -* `enableVTPM()` was added - -#### `models.ManagedClusterWindowsProfile` was modified - -* `withEnableCSIProxy(java.lang.Boolean)` was added -* `enableCSIProxy()` was added - -#### `models.ManagedClusterLoadBalancerProfileOutboundIPs` was modified - -* `withPublicIps(java.util.List)` was added -* `publicIps()` was added - -#### `ContainerServiceManager` was modified - -* `orchestratorClient()` was added -* `openShiftClient()` was added - -#### `models.ManagedClusterNatGatewayProfile` was modified - -* `effectiveOutboundIps()` was added - -#### `models.MeshUpgradeProfileProperties` was modified +### Breaking Changes -* `upgrades()` was added -* `compatibleWith()` was added -* `revision()` was added +- Pageable model classes (`AgentPoolListResult`, `ManagedClusterListResult`, `SnapshotListResult`, `TrustedAccessRoleBindingListResult`, `TrustedAccessRoleListResult`, `MachineListResult`, `MaintenanceConfigurationListResult`, `ManagedNamespaceListResult`, `MeshRevisionProfileList`, `MeshUpgradeProfileList`, `OperationListResult`, `OutboundEnvironmentEndpointCollection`) were moved to `implementation.models` package. +- Constructors of output-only models (`CompatibleVersions`, `CredentialResult`, `EndpointDependency`, `EndpointDetail`, `KubernetesPatchVersion`, `KubernetesVersion`, `MachineIpAddress`, `MachineNetworkProperties`, `MachineProperties`, `TrustedAccessRoleRule`) are now private. +- Setters (`with*` methods) were removed from output-only immutable models. +- Some read-only properties' getters were removed from output-only models. +- `ManagedClusterAddonProfileIdentity::withClientId`, `withObjectId`, `withResourceId` return type changed from `ManagedClusterAddonProfileIdentity` to `UserAssignedIdentity`. ## 2.57.1 (2026-01-29) diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/tsp-location.yaml b/sdk/containerservice/azure-resourcemanager-containerservice/tsp-location.yaml index 134c92480d97..b62e4938f3ca 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/tsp-location.yaml +++ b/sdk/containerservice/azure-resourcemanager-containerservice/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/containerservice/resource-manager/Microsoft.ContainerService/aks -commit: HEAD +commit: 0098526e913 repo: Azure/azure-rest-api-specs -additionalDirectories: +additionalDirectories: From 19f454359281ee21d28d5474bb6feb37a577de19 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 20 Mar 2026 15:51:44 +0800 Subject: [PATCH 12/19] update changelog --- .../CHANGELOG.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md index f86b22e2de89..ca7d26806003 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md +++ b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md @@ -6,11 +6,14 @@ ### Breaking Changes -- Pageable model classes (`AgentPoolListResult`, `ManagedClusterListResult`, `SnapshotListResult`, `TrustedAccessRoleBindingListResult`, `TrustedAccessRoleListResult`, `MachineListResult`, `MaintenanceConfigurationListResult`, `ManagedNamespaceListResult`, `MeshRevisionProfileList`, `MeshUpgradeProfileList`, `OperationListResult`, `OutboundEnvironmentEndpointCollection`) were moved to `implementation.models` package. -- Constructors of output-only models (`CompatibleVersions`, `CredentialResult`, `EndpointDependency`, `EndpointDetail`, `KubernetesPatchVersion`, `KubernetesVersion`, `MachineIpAddress`, `MachineNetworkProperties`, `MachineProperties`, `TrustedAccessRoleRule`) are now private. -- Setters (`with*` methods) were removed from output-only immutable models. -- Some read-only properties' getters were removed from output-only models. -- `ManagedClusterAddonProfileIdentity::withClientId`, `withObjectId`, `withResourceId` return type changed from `ManagedClusterAddonProfileIdentity` to `UserAssignedIdentity`. +- Moved `ContainerServiceManager.serviceClient().getOpenShiftManagedClusters()` to `ContainerServiceManager.openShiftClient().getOpenShiftManagedClusters()`. +- Moved `ContainerServiceManager.serviceClient().getContainerServices()` to `ContainerServiceManager.orchestratorClient().getContainerServices()`. + +### Other Changes + +#### Dependency Updates + +- Updated `api-version` to `2026-01-01`. ## 2.57.1 (2026-01-29) From e3012a2e437e05ac77ad0dfb9d40cc585107b75c Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 20 Mar 2026 15:53:08 +0800 Subject: [PATCH 13/19] Mirror containerservice changelog to azure-resourcemanager Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md index 3c10408197c1..8885ea56b9b2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md @@ -10,6 +10,15 @@ ### Other Changes +### azure-resourcemanager-containerservice + +- This release migrates the SDK from AutoRest to TypeSpec, based on API version `2026-01-01`. + +#### Breaking Changes + +- Moved `ContainerServiceManager.serviceClient().getOpenShiftManagedClusters()` to `ContainerServiceManager.openShiftClient().getOpenShiftManagedClusters()`. +- Moved `ContainerServiceManager.serviceClient().getContainerServices()` to `ContainerServiceManager.orchestratorClient().getContainerServices()`. + ### azure-resourcemanager-resources - Updated `api-version` of policy to `2025-03-01`. From 1b0fab829dabe1bda54286b1b684157730cbcc7f Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 20 Mar 2026 15:54:35 +0800 Subject: [PATCH 14/19] Update CHANGELOG.md --- .../azure-resourcemanager-containerservice/CHANGELOG.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md index ca7d26806003..02c4a2d894ce 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md +++ b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md @@ -2,8 +2,6 @@ ## 2.58.0-beta.2 (2026-03-20) -- This release migrates the SDK from AutoRest to TypeSpec, based on API version `2026-01-01`. - ### Breaking Changes - Moved `ContainerServiceManager.serviceClient().getOpenShiftManagedClusters()` to `ContainerServiceManager.openShiftClient().getOpenShiftManagedClusters()`. From 7875e55a63059d1ecde8e8e22401146c704b14a2 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 20 Mar 2026 15:55:01 +0800 Subject: [PATCH 15/19] Update CHANGELOG.md --- sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md index 8885ea56b9b2..ac9ac5199947 100644 --- a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md @@ -12,13 +12,15 @@ ### azure-resourcemanager-containerservice -- This release migrates the SDK from AutoRest to TypeSpec, based on API version `2026-01-01`. - #### Breaking Changes - Moved `ContainerServiceManager.serviceClient().getOpenShiftManagedClusters()` to `ContainerServiceManager.openShiftClient().getOpenShiftManagedClusters()`. - Moved `ContainerServiceManager.serviceClient().getContainerServices()` to `ContainerServiceManager.orchestratorClient().getContainerServices()`. +#### Dependency Updates + +- Updated `api-version` to `2026-01-01`. + ### azure-resourcemanager-resources - Updated `api-version` of policy to `2025-03-01`. From edd94473236bcbcd95d78c4bca0088fc9972eca7 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 20 Mar 2026 16:20:39 +0800 Subject: [PATCH 16/19] Revert sdk/resourcemanager changes per finalize checklist Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../azure-resourcemanager/CHANGELOG.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md index ac9ac5199947..3c10408197c1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md @@ -10,17 +10,6 @@ ### Other Changes -### azure-resourcemanager-containerservice - -#### Breaking Changes - -- Moved `ContainerServiceManager.serviceClient().getOpenShiftManagedClusters()` to `ContainerServiceManager.openShiftClient().getOpenShiftManagedClusters()`. -- Moved `ContainerServiceManager.serviceClient().getContainerServices()` to `ContainerServiceManager.orchestratorClient().getContainerServices()`. - -#### Dependency Updates - -- Updated `api-version` to `2026-01-01`. - ### azure-resourcemanager-resources - Updated `api-version` of policy to `2025-03-01`. From 3c1ebb5bb25732eae06f5bd9469b4dfca97e2012 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 20 Mar 2026 16:31:26 +0800 Subject: [PATCH 17/19] Fix filename case for ManagedClustersResetAADProfileSamples and ResolvePrivateLinkServiceIdPOSTSamples Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...ileSamples.java => ManagedClustersResetAADProfileSamples.java} | 0 ...stSamples.java => ResolvePrivateLinkServiceIdPOSTSamples.java} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/{ManagedClustersResetAadProfileSamples.java => ManagedClustersResetAADProfileSamples.java} (100%) rename sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/{ResolvePrivateLinkServiceIdPostSamples.java => ResolvePrivateLinkServiceIdPOSTSamples.java} (100%) diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAadProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAADProfileSamples.java similarity index 100% rename from sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAadProfileSamples.java rename to sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAADProfileSamples.java diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPostSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPOSTSamples.java similarity index 100% rename from sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPostSamples.java rename to sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPOSTSamples.java From 06dc8dae911ae97c4bd0ec382d2f8e4083a54d11 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 20 Mar 2026 16:39:31 +0800 Subject: [PATCH 18/19] fix commit --- .../azure-resourcemanager-containerservice/tsp-location.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/tsp-location.yaml b/sdk/containerservice/azure-resourcemanager-containerservice/tsp-location.yaml index b62e4938f3ca..8831911b15df 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/tsp-location.yaml +++ b/sdk/containerservice/azure-resourcemanager-containerservice/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/containerservice/resource-manager/Microsoft.ContainerService/aks -commit: 0098526e913 +commit: "0098526e91369ebc55660b8b745c26865a66e5e8" repo: Azure/azure-rest-api-specs additionalDirectories: From ccf89a0acdf75c2c2dcbf06e43de76dca727c209 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 20 Mar 2026 16:59:18 +0800 Subject: [PATCH 19/19] Add opens implementation.models to module-info.java Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../src/main/java/module-info.java | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/module-info.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/module-info.java index 4401bcf98a41..03050b7b3f61 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/module-info.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/module-info.java @@ -13,4 +13,5 @@ // open packages specifically for azure core opens com.azure.resourcemanager.containerservice.fluent.models to com.azure.core; opens com.azure.resourcemanager.containerservice.models to com.azure.core; + opens com.azure.resourcemanager.containerservice.implementation.models to com.azure.core; }