From 51c0c3f650f7a7cd4c2043958e3296a081bf803a Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 27 Dec 2023 18:03:37 +0000 Subject: [PATCH] CodeGen from PR 26774 in Azure/azure-rest-api-specs Merge c372214af5fbf0af96d4640c4776f7c2e9d059fe into 0207d128404678e875b8d8c7e8684faea8adfcd7 --- eng/versioning/version_client.txt | 1 + pom.xml | 1 + .../CHANGELOG.md | 5 + .../README.md | 107 + .../SAMPLE.md | 2814 ++++++++ .../pom.xml | 62 + .../generated/ContainerServiceManager.java | 511 ++ .../generated/fluent/AgentPoolsClient.java | 486 ++ .../ContainerServiceManagementClient.java | 154 + .../fluent/ContainerServicesClient.java | 49 + .../generated/fluent/MachinesClient.java | 79 + .../MaintenanceConfigurationsClient.java | 140 + .../fluent/ManagedClusterSnapshotsClient.java | 184 + .../fluent/ManagedClustersClient.java | 1363 ++++ .../OpenShiftManagedClustersClient.java | 315 + .../fluent/OperationStatusResultsClient.java | 107 + .../generated/fluent/OperationsClient.java | 38 + .../PrivateEndpointConnectionsClient.java | 177 + .../fluent/PrivateLinkResourcesClient.java | 48 + .../ResolvePrivateLinkServiceIdsClient.java | 46 + .../fluent/ScheduledEventsClient.java | 48 + .../generated/fluent/SnapshotsClient.java | 179 + .../TrustedAccessRoleBindingsClient.java | 203 + .../fluent/TrustedAccessRolesClient.java | 41 + .../fluent/models/AccessProfile.java | 55 + .../AgentPoolAvailableVersionsInner.java | 123 + .../AgentPoolAvailableVersionsProperties.java | 60 + .../fluent/models/AgentPoolInner.java | 1458 ++++ .../models/AgentPoolUpgradeProfileInner.java | 192 + .../AgentPoolUpgradeProfileProperties.java | 150 + .../models/CommandResultProperties.java | 119 + .../fluent/models/CredentialResultsInner.java | 48 + .../GuardrailsAvailableVersionInner.java | 81 + .../KubernetesVersionListResultInner.java | 59 + .../generated/fluent/models/MachineInner.java | 89 + .../models/MaintenanceConfigurationInner.java | 185 + .../MaintenanceConfigurationProperties.java | 128 + .../ManagedClusterAccessProfileInner.java | 107 + ...agedClusterAgentPoolProfileProperties.java | 1703 +++++ .../fluent/models/ManagedClusterInner.java | 1251 ++++ .../models/ManagedClusterProperties.java | 1409 ++++ .../models/ManagedClusterSnapshotInner.java | 143 + .../ManagedClusterSnapshotProperties.java | 107 + .../ManagedClusterUpgradeProfileInner.java | 147 + ...anagedClusterUpgradeProfileProperties.java | 99 + .../models/MeshRevisionProfileInner.java | 75 + .../models/MeshUpgradeProfileInner.java | 75 + .../fluent/models/OSOptionProfileInner.java | 122 + .../fluent/models/OSOptionPropertyList.java | 65 + .../models/OpenShiftManagedClusterInner.java | 279 + .../OpenShiftManagedClusterProperties.java | 275 + .../models/OperationStatusResultInner.java | 265 + .../fluent/models/OperationValueDisplay.java | 88 + .../fluent/models/OperationValueInner.java | 112 + ...estratorVersionProfileListResultInner.java | 122 + .../OrchestratorVersionProfileProperties.java | 65 + .../OutboundEnvironmentEndpointInner.java | 87 + .../PrivateEndpointConnectionInner.java | 108 + ...vateEndpointConnectionListResultInner.java | 58 + .../PrivateEndpointConnectionProperties.java | 113 + .../models/PrivateLinkResourceInner.java | 175 + .../PrivateLinkResourcesListResultInner.java | 58 + .../fluent/models/RunCommandResultInner.java | 116 + .../SafeguardsAvailableVersionInner.java | 81 + .../fluent/models/ScheduledEventInner.java | 266 + .../fluent/models/SnapshotInner.java | 190 + .../fluent/models/SnapshotProperties.java | 183 + .../models/TrustedAccessRoleBindingInner.java | 128 + .../TrustedAccessRoleBindingProperties.java | 111 + .../fluent/models/TrustedAccessRoleInner.java | 80 + .../generated/fluent/models/package-info.java | 9 + .../generated/fluent/package-info.java | 9 + .../AgentPoolAvailableVersionsImpl.java | 53 + .../implementation/AgentPoolImpl.java | 635 ++ .../AgentPoolUpgradeProfileImpl.java | 66 + .../implementation/AgentPoolsClientImpl.java | 2097 ++++++ .../implementation/AgentPoolsImpl.java | 249 + ...ntainerServiceManagementClientBuilder.java | 138 + .../ContainerServiceManagementClientImpl.java | 515 ++ .../ContainerServicesClientImpl.java | 198 + .../implementation/ContainerServicesImpl.java | 58 + .../implementation/CredentialResultsImpl.java | 41 + .../GuardrailsAvailableVersionImpl.java | 51 + .../KubernetesVersionListResultImpl.java | 41 + .../generated/implementation/MachineImpl.java | 46 + .../implementation/MachinesClientImpl.java | 449 ++ .../implementation/MachinesImpl.java | 71 + .../MaintenanceConfigurationImpl.java | 160 + .../MaintenanceConfigurationsClientImpl.java | 742 ++ .../MaintenanceConfigurationsImpl.java | 161 + .../ManagedClusterAccessProfileImpl.java | 65 + .../implementation/ManagedClusterImpl.java | 725 ++ .../ManagedClusterSnapshotImpl.java | 187 + .../ManagedClusterSnapshotsClientImpl.java | 1016 +++ .../ManagedClusterSnapshotsImpl.java | 149 + .../ManagedClusterUpgradeProfileImpl.java | 57 + .../ManagedClustersClientImpl.java | 6228 +++++++++++++++++ .../implementation/ManagedClustersImpl.java | 572 ++ .../MeshRevisionProfileImpl.java | 51 + .../MeshUpgradeProfileImpl.java | 51 + .../implementation/OSOptionProfileImpl.java | 53 + .../OpenShiftManagedClusterImpl.java | 255 + .../OpenShiftManagedClustersClientImpl.java | 1414 ++++ .../OpenShiftManagedClustersImpl.java | 148 + .../OperationStatusResultImpl.java | 76 + .../OperationStatusResultsClientImpl.java | 585 ++ .../OperationStatusResultsImpl.java | 93 + .../implementation/OperationValueImpl.java | 53 + .../implementation/OperationsClientImpl.java | 167 + .../implementation/OperationsImpl.java | 46 + ...hestratorVersionProfileListResultImpl.java | 53 + .../OutboundEnvironmentEndpointImpl.java | 45 + .../PrivateEndpointConnectionImpl.java | 56 + ...ivateEndpointConnectionListResultImpl.java | 44 + .../PrivateEndpointConnectionsClientImpl.java | 769 ++ .../PrivateEndpointConnectionsImpl.java | 115 + .../PrivateLinkResourceImpl.java | 60 + .../PrivateLinkResourcesClientImpl.java | 198 + .../PrivateLinkResourcesImpl.java | 58 + .../PrivateLinkResourcesListResultImpl.java | 44 + ...esolvePrivateLinkServiceIdsClientImpl.java | 210 + .../ResolvePrivateLinkServiceIdsImpl.java | 59 + .../implementation/RunCommandResultImpl.java | 58 + .../SafeguardsAvailableVersionImpl.java | 51 + .../implementation/ScheduledEventImpl.java | 75 + .../ScheduledEventsClientImpl.java | 209 + .../implementation/ScheduledEventsImpl.java | 58 + .../implementation/SnapshotImpl.java | 207 + .../implementation/SnapshotsClientImpl.java | 1003 +++ .../implementation/SnapshotsImpl.java | 148 + .../TrustedAccessRoleBindingImpl.java | 144 + .../TrustedAccessRoleBindingsClientImpl.java | 956 +++ .../TrustedAccessRoleBindingsImpl.java | 163 + .../implementation/TrustedAccessRoleImpl.java | 49 + .../TrustedAccessRolesClientImpl.java | 259 + .../TrustedAccessRolesImpl.java | 46 + .../generated/implementation/Utils.java | 197 + .../implementation/package-info.java | 9 + .../models/AbsoluteMonthlySchedule.java | 80 + .../generated/models/AddonAutoscaling.java | 53 + .../generated/models/AgentPool.java | 2367 +++++++ .../AgentPoolArtifactStreamingProfile.java | 59 + .../models/AgentPoolAvailableVersions.java | 50 + ...rsionsPropertiesAgentPoolVersionsItem.java | 106 + .../AgentPoolDeleteMachinesParameter.java | 62 + .../generated/models/AgentPoolGpuProfile.java | 69 + .../generated/models/AgentPoolListResult.java | 74 + .../generated/models/AgentPoolMode.java | 56 + .../models/AgentPoolNetworkProfile.java | 117 + .../models/AgentPoolSecurityProfile.java | 116 + .../generated/models/AgentPoolSshAccess.java | 53 + .../generated/models/AgentPoolType.java | 58 + .../models/AgentPoolUpgradeProfile.java | 71 + ...lUpgradeProfilePropertiesUpgradesItem.java | 80 + .../models/AgentPoolUpgradeSettings.java | 142 + .../models/AgentPoolWindowsProfile.java | 63 + .../generated/models/AgentPools.java | 307 + .../generated/models/AzureKeyVaultKms.java | 159 + .../generated/models/BackendPoolType.java | 53 + .../models/ClusterUpgradeSettings.java | 57 + .../generated/models/Code.java | 53 + .../generated/models/CompatibleVersions.java | 81 + .../generated/models/ConnectionStatus.java | 63 + .../models/ContainerServiceLinuxProfile.java | 93 + .../ContainerServiceNetworkProfile.java | 555 ++ ...rServiceNetworkProfileKubeProxyConfig.java | 118 + ...tworkProfileKubeProxyConfigIpvsConfig.java | 141 + .../ContainerServiceSshConfiguration.java | 66 + .../models/ContainerServiceSshPublicKey.java | 64 + .../generated/models/ContainerServices.java | 44 + .../generated/models/CreationData.java | 56 + .../generated/models/CredentialResult.java | 59 + .../generated/models/CredentialResults.java | 29 + .../generated/models/DailySchedule.java | 54 + .../generated/models/DateSpan.java | 94 + .../generated/models/DelegatedResource.java | 133 + .../generated/models/EndpointDependency.java | 84 + .../generated/models/EndpointDetail.java | 132 + .../generated/models/EventStatus.java | 68 + .../generated/models/Expander.java | 67 + .../generated/models/ExtendedLocation.java | 80 + .../models/ExtendedLocationTypes.java | 48 + .../generated/models/Format.java | 53 + .../generated/models/GpuInstanceProfile.java | 68 + .../models/GuardrailsAvailableVersion.java | 57 + .../GuardrailsAvailableVersionsList.java | 74 + ...GuardrailsAvailableVersionsProperties.java | 58 + .../generated/models/GuardrailsSupport.java | 53 + .../generated/models/IpFamily.java | 53 + .../generated/models/IpTag.java | 80 + .../generated/models/IpvsScheduler.java | 53 + .../models/IstioCertificateAuthority.java | 58 + .../generated/models/IstioComponents.java | 87 + .../generated/models/IstioEgressGateway.java | 83 + .../generated/models/IstioIngressGateway.java | 88 + .../models/IstioIngressGatewayMode.java | 53 + .../IstioPluginCertificateAuthority.java | 158 + .../generated/models/IstioServiceMesh.java | 122 + .../models/KeyVaultNetworkAccessTypes.java | 57 + .../generated/models/KubeletConfig.java | 377 + .../generated/models/KubeletDiskType.java | 53 + .../models/KubernetesPatchVersion.java | 55 + .../models/KubernetesSupportPlan.java | 53 + .../generated/models/KubernetesVersion.java | 145 + .../models/KubernetesVersionCapabilities.java | 55 + .../models/KubernetesVersionListResult.java | 29 + .../generated/models/Level.java | 59 + .../generated/models/LicenseType.java | 54 + .../generated/models/LinuxOSConfig.java | 164 + .../generated/models/LoadBalancerSku.java | 56 + .../generated/models/Machine.java | 50 + .../generated/models/MachineIpAddress.java | 58 + .../generated/models/MachineListResult.java | 74 + .../models/MachineNetworkProperties.java | 47 + .../generated/models/MachineProperties.java | 61 + .../generated/models/Machines.java | 71 + .../models/MaintenanceConfiguration.java | 278 + .../MaintenanceConfigurationListResult.java | 74 + .../models/MaintenanceConfigurations.java | 150 + .../generated/models/MaintenanceWindow.java | 221 + .../generated/models/ManagedCluster.java | 1510 ++++ ...agedClusterAIToolchainOperatorProfile.java | 62 + .../models/ManagedClusterAadProfile.java | 222 + .../models/ManagedClusterAccessProfile.java | 72 + .../models/ManagedClusterAddonProfile.java | 101 + .../ManagedClusterAddonProfileIdentity.java | 56 + .../ManagedClusterAgentPoolProfile.java | 517 ++ .../ManagedClusterApiServerAccessProfile.java | 253 + .../ManagedClusterAutoUpgradeProfile.java | 95 + .../ManagedClusterAzureMonitorProfile.java | 92 + ...usterAzureMonitorProfileAppMonitoring.java | 56 + ...fileAppMonitoringOpenTelemetryMetrics.java | 56 + ...rAzureMonitorProfileContainerInsights.java | 118 + ...erAzureMonitorProfileKubeStateMetrics.java | 85 + ...ManagedClusterAzureMonitorProfileLogs.java | 99 + ...agedClusterAzureMonitorProfileMetrics.java | 124 + ...terAzureMonitorProfileWindowsHostLogs.java | 57 + .../models/ManagedClusterCostAnalysis.java | 66 + .../models/ManagedClusterHttpProxyConfig.java | 150 + .../models/ManagedClusterIdentity.java | 174 + .../models/ManagedClusterIngressProfile.java | 57 + ...gedClusterIngressProfileWebAppRouting.java | 113 + .../models/ManagedClusterListResult.java | 74 + .../ManagedClusterLoadBalancerProfile.java | 262 + ...LoadBalancerProfileManagedOutboundIPs.java | 88 + ...ClusterLoadBalancerProfileOutboundIPs.java | 58 + ...LoadBalancerProfileOutboundIpPrefixes.java | 59 + ...anagedClusterManagedOutboundIpProfile.java | 57 + .../models/ManagedClusterMetricsProfile.java | 57 + .../ManagedClusterNatGatewayProfile.java | 119 + ...ManagedClusterNodeProvisioningProfile.java | 60 + ...anagedClusterNodeResourceGroupProfile.java | 54 + .../ManagedClusterOidcIssuerProfile.java | 69 + .../models/ManagedClusterPodIdentity.java | 182 + .../ManagedClusterPodIdentityException.java | 128 + .../ManagedClusterPodIdentityProfile.java | 162 + ...edClusterPodIdentityProvisioningError.java | 57 + ...usterPodIdentityProvisioningErrorBody.java | 141 + ...gedClusterPodIdentityProvisioningInfo.java | 57 + ...edClusterPodIdentityProvisioningState.java | 74 + .../ManagedClusterPoolUpgradeProfile.java | 147 + ...ClusterPoolUpgradeProfileUpgradesItem.java | 80 + ...gedClusterPropertiesAutoScalerProfile.java | 734 ++ .../ManagedClusterPropertiesForSnapshot.java | 127 + .../models/ManagedClusterSecurityProfile.java | 267 + ...ManagedClusterSecurityProfileDefender.java | 93 + ...rityProfileDefenderSecurityMonitoring.java | 54 + ...gedClusterSecurityProfileImageCleaner.java | 81 + ...dClusterSecurityProfileImageIntegrity.java | 54 + ...ClusterSecurityProfileNodeRestriction.java | 54 + ...lusterSecurityProfileWorkloadIdentity.java | 54 + ...ManagedClusterServicePrincipalProfile.java | 87 + .../generated/models/ManagedClusterSku.java | 89 + .../models/ManagedClusterSkuName.java | 48 + .../models/ManagedClusterSkuTier.java | 61 + .../models/ManagedClusterSnapshot.java | 285 + .../ManagedClusterSnapshotListResult.java | 74 + .../models/ManagedClusterSnapshots.java | 164 + .../models/ManagedClusterStorageProfile.java | 145 + ...gedClusterStorageProfileBlobCsiDriver.java | 54 + ...gedClusterStorageProfileDiskCsiDriver.java | 80 + ...gedClusterStorageProfileFileCsiDriver.java | 54 + ...usterStorageProfileSnapshotController.java | 54 + .../models/ManagedClusterUpgradeProfile.java | 57 + .../models/ManagedClusterWindowsProfile.java | 205 + ...nagedClusterWorkloadAutoScalerProfile.java | 87 + ...dClusterWorkloadAutoScalerProfileKeda.java | 54 + ...utoScalerProfileVerticalPodAutoscaler.java | 81 + .../generated/models/ManagedClusters.java | 906 +++ ...anagedClustersGetCommandResultHeaders.java | 60 + ...nagedClustersGetCommandResultResponse.java | 40 + ...ceIdentityUserAssignedIdentitiesValue.java | 58 + .../generated/models/ManualScaleProfile.java | 84 + .../generated/models/MeshRevision.java | 112 + .../generated/models/MeshRevisionProfile.java | 57 + .../models/MeshRevisionProfileList.java | 74 + .../models/MeshRevisionProfileProperties.java | 58 + .../generated/models/MeshUpgradeProfile.java | 57 + .../models/MeshUpgradeProfileList.java | 74 + .../models/MeshUpgradeProfileProperties.java | 57 + .../generated/models/Mode.java | 53 + .../generated/models/NetworkDataplane.java | 53 + .../generated/models/NetworkMode.java | 55 + .../generated/models/NetworkMonitoring.java | 54 + .../generated/models/NetworkPlugin.java | 58 + .../generated/models/NetworkPluginMode.java | 48 + .../generated/models/NetworkPolicy.java | 63 + .../generated/models/NetworkProfile.java | 106 + .../models/NetworkProfileForSnapshot.java | 170 + .../models/NodeOSUpgradeChannel.java | 65 + .../models/NodeProvisioningMode.java | 55 + .../generated/models/OSDiskType.java | 57 + .../generated/models/OSOptionProfile.java | 50 + .../generated/models/OSOptionProperty.java | 87 + .../generated/models/OSType.java | 53 + .../models/OpenShiftAgentPoolProfileRole.java | 53 + .../OpenShiftContainerServiceVMSize.java | 208 + .../models/OpenShiftManagedCluster.java | 399 ++ ...hiftManagedClusterAadIdentityProvider.java | 138 + ...enShiftManagedClusterAgentPoolProfile.java | 195 + .../OpenShiftManagedClusterAuthProfile.java | 59 + ...iftManagedClusterBaseIdentityProvider.java | 38 + ...enShiftManagedClusterIdentityProvider.java | 83 + .../OpenShiftManagedClusterListResult.java | 74 + ...nShiftManagedClusterMasterPoolProfile.java | 167 + .../models/OpenShiftManagedClusters.java | 193 + .../models/OpenShiftRouterProfile.java | 84 + .../generated/models/OperationListResult.java | 48 + .../models/OperationStatusResult.java | 88 + .../models/OperationStatusResultList.java | 63 + .../models/OperationStatusResults.java | 98 + .../generated/models/OperationValue.java | 63 + .../generated/models/Operations.java | 33 + .../generated/models/OrchestratorProfile.java | 113 + .../models/OrchestratorVersionProfile.java | 173 + .../OrchestratorVersionProfileListResult.java | 50 + .../generated/models/Ossku.java | 79 + .../models/OutboundEnvironmentEndpoint.java | 37 + ...OutboundEnvironmentEndpointCollection.java | 80 + .../generated/models/OutboundType.java | 66 + .../generated/models/PortRange.java | 112 + .../generated/models/PowerState.java | 54 + .../generated/models/PrivateEndpoint.java | 54 + .../models/PrivateEndpointConnection.java | 64 + .../PrivateEndpointConnectionListResult.java | 29 + ...teEndpointConnectionProvisioningState.java | 69 + .../models/PrivateEndpointConnections.java | 132 + .../generated/models/PrivateLinkResource.java | 65 + .../models/PrivateLinkResources.java | 43 + .../PrivateLinkResourcesListResult.java | 29 + .../PrivateLinkServiceConnectionState.java | 80 + .../generated/models/Protocol.java | 53 + .../generated/models/PublicNetworkAccess.java | 60 + .../generated/models/PurchasePlan.java | 135 + .../models/RelativeMonthlySchedule.java | 123 + .../models/ResolvePrivateLinkServiceIds.java | 42 + .../models/ResourceIdentityType.java | 68 + .../generated/models/ResourceReference.java | 54 + .../generated/models/ResourceType.java | 53 + .../generated/models/RestrictionLevel.java | 53 + .../generated/models/RunCommandRequest.java | 113 + .../generated/models/RunCommandResult.java | 71 + .../models/SafeguardsAvailableVersion.java | 57 + .../SafeguardsAvailableVersionsList.java | 74 + ...SafeguardsAvailableVersionsProperties.java | 58 + .../generated/models/SafeguardsProfile.java | 132 + .../generated/models/SafeguardsSupport.java | 53 + .../generated/models/ScaleDownMode.java | 54 + .../generated/models/ScaleProfile.java | 58 + .../models/ScaleSetEvictionPolicy.java | 56 + .../generated/models/ScaleSetPriority.java | 53 + .../generated/models/Schedule.java | 149 + .../generated/models/ScheduledEvent.java | 86 + .../generated/models/ScheduledEvents.java | 43 + .../generated/models/ServiceMeshMode.java | 53 + .../generated/models/ServiceMeshProfile.java | 90 + .../generated/models/Snapshot.java | 322 + .../generated/models/SnapshotListResult.java | 74 + .../generated/models/SnapshotType.java | 53 + .../generated/models/Snapshots.java | 159 + .../generated/models/SysctlConfig.java | 756 ++ .../generated/models/TagsObject.java | 57 + .../generated/models/TimeInWeek.java | 93 + .../generated/models/TimeSpan.java | 83 + .../generated/models/TrustedAccessRole.java | 44 + .../models/TrustedAccessRoleBinding.java | 239 + .../TrustedAccessRoleBindingListResult.java | 74 + ...tedAccessRoleBindingProvisioningState.java | 69 + .../models/TrustedAccessRoleBindings.java | 144 + .../models/TrustedAccessRoleListResult.java | 63 + .../models/TrustedAccessRoleRule.java | 104 + .../generated/models/TrustedAccessRoles.java | 36 + .../generated/models/Type.java | 70 + .../generated/models/UpgradeChannel.java | 71 + .../models/UpgradeOverrideSettings.java | 92 + .../models/UserAssignedIdentity.java | 106 + .../generated/models/VirtualMachineNodes.java | 80 + .../models/VirtualMachinesProfile.java | 57 + .../generated/models/WeekDay.java | 78 + .../generated/models/WeeklySchedule.java | 87 + .../generated/models/WindowsGmsaProfile.java | 118 + .../generated/models/WorkloadRuntime.java | 58 + .../generated/models/package-info.java | 9 + .../generated/package-info.java | 9 + .../src/main/java/module-info.java | 17 + .../proxy-config.json | 1 + .../reflect-config.json | 1316 ++++ .../generated/generated/AgentPoolsAbor.java | 26 + .../generated/generated/AgentPoolsCrea.java | 470 ++ .../generated/generated/AgentPoolsDele.java | 31 + .../generated/generated/AgentPoolsGetA.java | 26 + .../generated/generated/AgentPoolsGetS.java | 25 + .../generated/generated/AgentPoolsGetU.java | 26 + .../generated/generated/AgentPoolsList.java | 25 + .../generated/generated/AgentPoolsUpgr.java | 26 + .../generated/generated/ContainerServi.java | 25 + .../generated/generated/MachinesGetSam.java | 26 + .../generated/generated/MachinesListSa.java | 25 + .../generated/generated/MaintenanceCon.java | 42 + .../generated/generated/ManagedCluster.java | 43 + .../generated/generated/OpenShiftManag.java | 43 + .../generated/generated/OperationStatu.java | 25 + .../generated/generated/OperationsList.java | 25 + .../generated/generated/PrivateEndpoin.java | 32 + .../generated/generated/PrivateLinkRes.java | 25 + .../generated/generated/ResolvePrivate.java | 28 + .../generated/generated/ScheduledEvent.java | 25 + .../generated/generated/SnapshotsCreat.java | 45 + .../generated/generated/SnapshotsDelet.java | 25 + .../generated/generated/SnapshotsGetBy.java | 25 + .../generated/generated/SnapshotsListB.java | 25 + .../generated/generated/SnapshotsListS.java | 25 + .../generated/generated/SnapshotsUpdat.java | 43 + .../generated/generated/TrustedAccessR.java | 25 + .../ci.yml | 47 + .../pom.xml | 15 + 436 files changed, 74232 insertions(+) create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/CHANGELOG.md create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/README.md create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/SAMPLE.md create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/pom.xml create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/ContainerServiceManager.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/AgentPoolsClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ContainerServiceManagementClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ContainerServicesClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/MachinesClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/MaintenanceConfigurationsClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ManagedClusterSnapshotsClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ManagedClustersClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/OpenShiftManagedClustersClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/OperationStatusResultsClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/OperationsClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/PrivateEndpointConnectionsClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/PrivateLinkResourcesClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ResolvePrivateLinkServiceIdsClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ScheduledEventsClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/SnapshotsClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/TrustedAccessRoleBindingsClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/TrustedAccessRolesClient.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AccessProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolAvailableVersionsInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolAvailableVersionsProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolUpgradeProfileInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolUpgradeProfileProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/CommandResultProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/CredentialResultsInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/GuardrailsAvailableVersionInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/KubernetesVersionListResultInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MachineInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MaintenanceConfigurationInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MaintenanceConfigurationProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterAccessProfileInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterAgentPoolProfileProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterSnapshotInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterSnapshotProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterUpgradeProfileInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterUpgradeProfileProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MeshRevisionProfileInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MeshUpgradeProfileInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OSOptionProfileInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OSOptionPropertyList.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OpenShiftManagedClusterInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OpenShiftManagedClusterProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OperationStatusResultInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OperationValueDisplay.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OperationValueInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OrchestratorVersionProfileListResultInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OrchestratorVersionProfileProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OutboundEnvironmentEndpointInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionListResultInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateLinkResourceInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateLinkResourcesListResultInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/RunCommandResultInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/SafeguardsAvailableVersionInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ScheduledEventInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/SnapshotInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/SnapshotProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleBindingInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleBindingProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleInner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/package-info.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/package-info.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolAvailableVersionsImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolUpgradeProfileImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolsClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolsImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServiceManagementClientBuilder.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServiceManagementClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServicesClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServicesImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/CredentialResultsImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/GuardrailsAvailableVersionImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/KubernetesVersionListResultImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MachineImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MachinesClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MachinesImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationsClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationsImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterAccessProfileImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterSnapshotImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterSnapshotsClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterSnapshotsImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterUpgradeProfileImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClustersClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClustersImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MeshRevisionProfileImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MeshUpgradeProfileImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OSOptionProfileImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClusterImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClustersClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClustersImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationStatusResultImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationStatusResultsClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationStatusResultsImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationValueImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationsClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationsImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OrchestratorVersionProfileListResultImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OutboundEnvironmentEndpointImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionListResultImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionsClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionsImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourceImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesListResultImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ResolvePrivateLinkServiceIdsClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ResolvePrivateLinkServiceIdsImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/RunCommandResultImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SafeguardsAvailableVersionImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ScheduledEventImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ScheduledEventsClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ScheduledEventsImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotsClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotsImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingsClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingsImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRolesClientImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRolesImpl.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/Utils.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/package-info.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AbsoluteMonthlySchedule.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AddonAutoscaling.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPool.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolArtifactStreamingProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolAvailableVersions.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolDeleteMachinesParameter.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolGpuProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolMode.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolNetworkProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolSecurityProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolSshAccess.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolType.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeSettings.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolWindowsProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPools.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AzureKeyVaultKms.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/BackendPoolType.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ClusterUpgradeSettings.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Code.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CompatibleVersions.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ConnectionStatus.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceLinuxProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceNetworkProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceNetworkProfileKubeProxyConfig.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceSshConfiguration.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceSshPublicKey.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServices.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CreationData.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CredentialResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CredentialResults.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DailySchedule.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DateSpan.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DelegatedResource.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/EndpointDependency.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/EndpointDetail.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/EventStatus.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Expander.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ExtendedLocation.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ExtendedLocationTypes.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Format.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GpuInstanceProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GuardrailsAvailableVersion.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GuardrailsAvailableVersionsList.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GuardrailsAvailableVersionsProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GuardrailsSupport.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IpFamily.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IpTag.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IpvsScheduler.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioCertificateAuthority.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioComponents.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioEgressGateway.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioIngressGateway.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioIngressGatewayMode.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioPluginCertificateAuthority.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioServiceMesh.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KeyVaultNetworkAccessTypes.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubeletConfig.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubeletDiskType.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesPatchVersion.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesSupportPlan.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersion.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersionCapabilities.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersionListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Level.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LicenseType.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LinuxOSConfig.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LoadBalancerSku.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Machine.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MachineIpAddress.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MachineListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MachineNetworkProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MachineProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Machines.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfiguration.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfigurationListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfigurations.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceWindow.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedCluster.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAIToolchainOperatorProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAadProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAccessProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAddonProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAddonProfileIdentity.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAgentPoolProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterApiServerAccessProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAutoUpgradeProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileAppMonitoring.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileContainerInsights.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileLogs.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileMetrics.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileWindowsHostLogs.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterCostAnalysis.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterHttpProxyConfig.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterIdentity.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterIngressProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterIngressProfileWebAppRouting.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileOutboundIPs.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterManagedOutboundIpProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterMetricsProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterNatGatewayProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterNodeProvisioningProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterNodeResourceGroupProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterOidcIssuerProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentity.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityException.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningError.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningErrorBody.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningInfo.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningState.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPoolUpgradeProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPropertiesAutoScalerProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPropertiesForSnapshot.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileDefender.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileImageCleaner.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileImageIntegrity.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileNodeRestriction.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileWorkloadIdentity.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterServicePrincipalProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSku.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSkuName.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSkuTier.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSnapshot.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSnapshotListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSnapshots.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileBlobCsiDriver.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileDiskCsiDriver.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileFileCsiDriver.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileSnapshotController.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterUpgradeProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWindowsProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfileKeda.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusters.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClustersGetCommandResultHeaders.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClustersGetCommandResultResponse.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedServiceIdentityUserAssignedIdentitiesValue.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManualScaleProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevision.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfileList.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfileProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfileList.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfileProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Mode.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkDataplane.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkMode.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkMonitoring.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPlugin.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPluginMode.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPolicy.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkProfileForSnapshot.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NodeOSUpgradeChannel.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NodeProvisioningMode.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSDiskType.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSOptionProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSOptionProperty.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSType.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftAgentPoolProfileRole.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftContainerServiceVMSize.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedCluster.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAadIdentityProvider.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAgentPoolProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAuthProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterBaseIdentityProvider.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterIdentityProvider.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterMasterPoolProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusters.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftRouterProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationStatusResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationStatusResultList.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationStatusResults.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationValue.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Operations.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorVersionProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorVersionProfileListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Ossku.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundEnvironmentEndpoint.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundEnvironmentEndpointCollection.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundType.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PortRange.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PowerState.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpoint.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnection.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnectionListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnectionProvisioningState.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnections.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResource.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResources.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResourcesListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkServiceConnectionState.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Protocol.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PublicNetworkAccess.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PurchasePlan.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RelativeMonthlySchedule.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResolvePrivateLinkServiceIds.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResourceIdentityType.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResourceReference.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResourceType.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RestrictionLevel.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RunCommandRequest.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RunCommandResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SafeguardsAvailableVersion.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SafeguardsAvailableVersionsList.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SafeguardsAvailableVersionsProperties.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SafeguardsProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SafeguardsSupport.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleDownMode.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleSetEvictionPolicy.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleSetPriority.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Schedule.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScheduledEvent.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScheduledEvents.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ServiceMeshMode.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ServiceMeshProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Snapshot.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SnapshotListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SnapshotType.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Snapshots.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SysctlConfig.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TagsObject.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TimeInWeek.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TimeSpan.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRole.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBinding.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindingListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindingProvisioningState.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindings.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleListResult.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleRule.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoles.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Type.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UpgradeChannel.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UpgradeOverrideSettings.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UserAssignedIdentity.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/VirtualMachineNodes.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/VirtualMachinesProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WeekDay.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WeeklySchedule.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WindowsGmsaProfile.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WorkloadRuntime.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/package-info.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/package-info.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/module-info.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/proxy-config.json create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/reflect-config.json create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsAbor.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsCrea.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsDele.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetA.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetS.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetU.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsList.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsUpgr.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ContainerServi.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/MachinesGetSam.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/MachinesListSa.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/MaintenanceCon.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ManagedCluster.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/OpenShiftManag.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/OperationStatu.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/OperationsList.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/PrivateEndpoin.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/PrivateLinkRes.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ResolvePrivate.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ScheduledEvent.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsCreat.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsDelet.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsGetBy.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsListB.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsListS.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsUpdat.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/TrustedAccessR.java create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/ci.yml create mode 100644 sdk/containerservicemicrosoftcontainerserviceaks/pom.xml diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 205f2b9f83931..3018bb1b917fc 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -438,6 +438,7 @@ com.azure.resourcemanager:azure-resourcemanager-hybridconnectivity;1.0.0;1.1.0-b com.azure.resourcemanager:azure-resourcemanager-playwrighttesting;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-recoveryservicesdatareplication;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-networkanalytics;1.0.0-beta.1;1.0.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated;1.0.0-beta.1;1.0.0-beta.1 com.azure.tools:azure-sdk-archetype;1.0.0;1.2.0-beta.1 com.azure.tools:azure-sdk-build-tool;1.0.0;1.1.0-beta.1 diff --git a/pom.xml b/pom.xml index 538d965a8d765..63ddeef61fb13 100644 --- a/pom.xml +++ b/pom.xml @@ -48,6 +48,7 @@ sdk/consumption sdk/containerregistry sdk/containerservicefleet + sdk/containerservicemicrosoftcontainerserviceaks sdk/contentsafety sdk/core sdk/cosmos diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/CHANGELOG.md b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/CHANGELOG.md new file mode 100644 index 0000000000000..2555c079e567b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0-beta.1 (2023-12-27) + +- Azure Resource Manager ContainerService client library for Java. This package contains Microsoft Azure SDK for ContainerService Management SDK. Container Service Client. Package tag package-preview-2023-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/README.md b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/README.md new file mode 100644 index 0000000000000..4e476400afc14 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/README.md @@ -0,0 +1,107 @@ +# Azure Resource Manager ContainerService client library for Java + +Azure Resource Manager ContainerService client library for Java. + +This package contains Microsoft Azure SDK for ContainerService Management SDK. Container Service Client. Package tag package-preview-2023-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +## We'd love to hear your feedback + +We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better. + +If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together. + +Thank you in advance for your collaboration. We really appreciate your time! + +## Documentation + +Various documentation is available to help you get started + +- [API reference documentation][docs] + +## Getting started + +### Prerequisites + +- [Java Development Kit (JDK)][jdk] with version 8 or above +- [Azure Subscription][azure_subscription] + +### Adding the package to your product + +[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated;current}) +```xml + + com.azure.resourcemanager + azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated + 1.0.0-beta.1 + +``` +[//]: # ({x-version-update-end}) + +### Include the recommended packages + +Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. + +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. + +### Authentication + +By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables. + +- `AZURE_CLIENT_ID` for Azure client ID. +- `AZURE_TENANT_ID` for Azure tenant ID. +- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. + +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. + +With above configuration, `azure` client can be authenticated using the following code: + +```java +AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +TokenCredential credential = new DefaultAzureCredentialBuilder() + .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) + .build(); +ContainerServiceManager manager = ContainerServiceManager + .authenticate(credential, profile); +``` + +The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. + +See [Authentication][authenticate] for more options. + +## Key concepts + +See [API design][design] for general introduction on design and key concepts on Azure Management Libraries. + +## Examples + +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/SAMPLE.md) + + +## Troubleshooting + +## Next steps + +## Contributing + +For details on contributing to this repository, see the [contributing guide][cg]. + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. + + +[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS +[docs]: https://azure.github.io/azure-sdk-for-java/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ +[azure_subscription]: https://azure.microsoft.com/free/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity +[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty +[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md +[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fcontainerservicemicrosoftcontainerserviceaks%2Fazure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated%2FREADME.png) diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/SAMPLE.md b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/SAMPLE.md new file mode 100644 index 0000000000000..5ca9ae4fc7d21 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/SAMPLE.md @@ -0,0 +1,2814 @@ +# Code snippets and samples + + +## AgentPools + +- [AbortLatestOperation](#agentpools_abortlatestoperation) +- [CreateOrUpdate](#agentpools_createorupdate) +- [Delete](#agentpools_delete) +- [DeleteMachines](#agentpools_deletemachines) +- [Get](#agentpools_get) +- [GetAvailableAgentPoolVersions](#agentpools_getavailableagentpoolversions) +- [GetUpgradeProfile](#agentpools_getupgradeprofile) +- [List](#agentpools_list) +- [UpgradeNodeImageVersion](#agentpools_upgradenodeimageversion) + +## ContainerServices + +- [ListOrchestrators](#containerservices_listorchestrators) + +## Machines + +- [Get](#machines_get) +- [List](#machines_list) + +## MaintenanceConfigurations + +- [CreateOrUpdate](#maintenanceconfigurations_createorupdate) +- [Delete](#maintenanceconfigurations_delete) +- [Get](#maintenanceconfigurations_get) +- [ListByManagedCluster](#maintenanceconfigurations_listbymanagedcluster) + +## ManagedClusterSnapshots + +- [CreateOrUpdate](#managedclustersnapshots_createorupdate) +- [Delete](#managedclustersnapshots_delete) +- [GetByResourceGroup](#managedclustersnapshots_getbyresourcegroup) +- [List](#managedclustersnapshots_list) +- [ListByResourceGroup](#managedclustersnapshots_listbyresourcegroup) +- [UpdateTags](#managedclustersnapshots_updatetags) + +## ManagedClusters + +- [AbortLatestOperation](#managedclusters_abortlatestoperation) +- [CreateOrUpdate](#managedclusters_createorupdate) +- [Delete](#managedclusters_delete) +- [GetAccessProfile](#managedclusters_getaccessprofile) +- [GetByResourceGroup](#managedclusters_getbyresourcegroup) +- [GetCommandResult](#managedclusters_getcommandresult) +- [GetGuardrailsVersions](#managedclusters_getguardrailsversions) +- [GetMeshRevisionProfile](#managedclusters_getmeshrevisionprofile) +- [GetMeshUpgradeProfile](#managedclusters_getmeshupgradeprofile) +- [GetOSOptions](#managedclusters_getosoptions) +- [GetSafeguardsVersions](#managedclusters_getsafeguardsversions) +- [GetUpgradeProfile](#managedclusters_getupgradeprofile) +- [List](#managedclusters_list) +- [ListByResourceGroup](#managedclusters_listbyresourcegroup) +- [ListClusterAdminCredentials](#managedclusters_listclusteradmincredentials) +- [ListClusterMonitoringUserCredentials](#managedclusters_listclustermonitoringusercredentials) +- [ListClusterUserCredentials](#managedclusters_listclusterusercredentials) +- [ListGuardrailsVersions](#managedclusters_listguardrailsversions) +- [ListKubernetesVersions](#managedclusters_listkubernetesversions) +- [ListMeshRevisionProfiles](#managedclusters_listmeshrevisionprofiles) +- [ListMeshUpgradeProfiles](#managedclusters_listmeshupgradeprofiles) +- [ListOutboundNetworkDependenciesEndpoints](#managedclusters_listoutboundnetworkdependenciesendpoints) +- [ListSafeguardsVersions](#managedclusters_listsafeguardsversions) +- [ResetAadProfile](#managedclusters_resetaadprofile) +- [ResetServicePrincipalProfile](#managedclusters_resetserviceprincipalprofile) +- [RotateClusterCertificates](#managedclusters_rotateclustercertificates) +- [RotateServiceAccountSigningKeys](#managedclusters_rotateserviceaccountsigningkeys) +- [RunCommand](#managedclusters_runcommand) +- [Start](#managedclusters_start) +- [Stop](#managedclusters_stop) +- [UpdateTags](#managedclusters_updatetags) + +## OpenShiftManagedClusters + +- [CreateOrUpdate](#openshiftmanagedclusters_createorupdate) +- [Delete](#openshiftmanagedclusters_delete) +- [GetByResourceGroup](#openshiftmanagedclusters_getbyresourcegroup) +- [List](#openshiftmanagedclusters_list) +- [ListByResourceGroup](#openshiftmanagedclusters_listbyresourcegroup) +- [UpdateTags](#openshiftmanagedclusters_updatetags) + +## OperationStatusResult + +- [Get](#operationstatusresult_get) +- [GetByAgentPool](#operationstatusresult_getbyagentpool) +- [List](#operationstatusresult_list) + +## Operations + +- [List](#operations_list) + +## PrivateEndpointConnections + +- [Delete](#privateendpointconnections_delete) +- [Get](#privateendpointconnections_get) +- [List](#privateendpointconnections_list) +- [Update](#privateendpointconnections_update) + +## PrivateLinkResources + +- [List](#privatelinkresources_list) + +## ResolvePrivateLinkServiceId + +- [Post](#resolveprivatelinkserviceid_post) + +## ScheduledEvents + +- [Get](#scheduledevents_get) + +## Snapshots + +- [CreateOrUpdate](#snapshots_createorupdate) +- [Delete](#snapshots_delete) +- [GetByResourceGroup](#snapshots_getbyresourcegroup) +- [List](#snapshots_list) +- [ListByResourceGroup](#snapshots_listbyresourcegroup) +- [UpdateTags](#snapshots_updatetags) + +## TrustedAccessRoleBindings + +- [CreateOrUpdate](#trustedaccessrolebindings_createorupdate) +- [Delete](#trustedaccessrolebindings_delete) +- [Get](#trustedaccessrolebindings_get) +- [List](#trustedaccessrolebindings_list) + +## TrustedAccessRoles + +- [List](#trustedaccessroles_list) +### AgentPools_AbortLatestOperation + +```java +/** + * Samples for AgentPools AbortLatestOperation. + */ +public final class AgentPoolsAbor { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsAbortOperation.json + */ + /** + * Sample code: Abort operation on agent pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void abortOperationOnAgentPool(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().abortLatestOperation("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} +``` + +### AgentPools_CreateOrUpdate + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPool; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolWindowsProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Code; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.GpuInstanceProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubeletConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.LinuxOSConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManualScaleProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSDiskType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Ossku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PowerState; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetEvictionPolicy; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetPriority; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SysctlConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.VirtualMachinesProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WorkloadRuntime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * Samples for AgentPools CreateOrUpdate. + */ +public final class AgentPoolsCrea { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withCount(3).withVmSize("Standard_DS2_v2").withOsType(OSType.LINUX).withOrchestratorVersion("").withEnableFips(true).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_GPUMIG.json + */ + /** + * Sample code: Create Agent Pool with GPUMIG. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithGPUMIG(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").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).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("wnp2").withExistingManagedCluster("rg1", "clustername1").withCount(3).withVmSize("Standard_D4s_v3").withOsType(OSType.WINDOWS).withOsSku(Ossku.WINDOWS2022).withOrchestratorVersion("1.23.3").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withCount(3).withVmSize("Standard_DS2_v2").withOsType(OSType.LINUX).withOrchestratorVersion("").withHostGroupId("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_Update.json + */ + /** + * Sample code: Create/Update Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateAgentPool(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withTags(mapOf("name1", "val1")).withCount(3).withVmSize("Standard_DS1_v2").withOsType(OSType.LINUX).withMode(AgentPoolMode.USER).withOrchestratorVersion("").withScaleSetPriority(ScaleSetPriority.SPOT).withScaleSetEvictionPolicy(ScaleSetEvictionPolicy.DELETE).withNodeLabels(mapOf("key1", "fakeTokenPlaceholder")).withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("wnp2").withExistingManagedCluster("rg1", "clustername1").withCount(3).withVmSize("Standard_D4s_v3").withOsType(OSType.WINDOWS).withOsSku(Ossku.WINDOWS2022).withOrchestratorVersion("1.23.8").withWindowsProfile(new AgentPoolWindowsProfile().withDisableOutboundNat(true)).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPools_Start.json + */ + /** + * Sample code: Start Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void startAgentPool(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withPowerState(new PowerState().withCode(Code.RUNNING)).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_EnableCustomCATrust.json + */ + /** + * Sample code: Create Agent Pool with CustomCATrust enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithCustomCATrustEnabled(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withCount(3).withVmSize("Standard_DS2_v2").withOsType(OSType.LINUX).withOrchestratorVersion("").withEnableCustomCATrust(true).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_Spot.json + */ + /** + * Sample code: Create Spot Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createSpotAgentPool(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withTags(mapOf("name1", "val1")).withCount(3).withVmSize("Standard_DS1_v2").withOsType(OSType.LINUX).withOrchestratorVersion("").withScaleSetPriority(ScaleSetPriority.SPOT).withScaleSetEvictionPolicy(ScaleSetEvictionPolicy.DELETE).withNodeLabels(mapOf("key1", "fakeTokenPlaceholder")).withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withCount(3).withVmSize("Standard_DS2_v2").withOsDiskSizeGB(64).withOsDiskType(OSDiskType.EPHEMERAL).withOsType(OSType.LINUX).withOrchestratorVersion("").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsAssociate_CRG.json + */ + /** + * Sample code: Associate Agent Pool with Capacity Reservation Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void associateAgentPoolWithCapacityReservationGroup(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withCount(3).withVmSize("Standard_DS2_v2").withOsType(OSType.LINUX).withOrchestratorVersion("").withCapacityReservationGroupId("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withCount(3).withVmSize("Standard_DS2_v2").withOsType(OSType.LINUX).withOrchestratorVersion("").withEnableEncryptionAtHost(true).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withCount(3).withVmSize("Standard_DS2_v2").withOsType(OSType.LINUX).withOrchestratorVersion("").withEnableUltraSsd(true).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withCount(3).withVmSize("Standard_DS2_v2").withOsDiskSizeGB(64).withWorkloadRuntime(WorkloadRuntime.WASM_WASI).withOsType(OSType.LINUX).withMode(AgentPoolMode.USER).withOrchestratorVersion("").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").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")).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_PPG.json + */ + /** + * Sample code: Create Agent Pool with PPG. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithPPG(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withCount(3).withVmSize("Standard_DS2_v2").withOsType(OSType.LINUX).withOrchestratorVersion("").withProximityPlacementGroupId("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").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)).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPools_Stop.json + */ + /** + * Sample code: Stop Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void stopAgentPool(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withPowerState(new PowerState().withCode(Code.STOPPED)).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withCount(3).withVmSize("Standard_DS2_v2").withOsDiskSizeGB(64).withMessageOfTheDay("Zm9vCg==").withOsType(OSType.LINUX).withMode(AgentPoolMode.USER).withOrchestratorVersion("").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_OSSKU.json + */ + /** + * Sample code: Create Agent Pool with OSSKU. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithOSSKU(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").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)).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withTags(mapOf("name1", "val1")).withOsType(OSType.LINUX).withTypePropertiesType(AgentPoolType.VIRTUAL_MACHINES).withOrchestratorVersion("1.9.6").withNodeLabels(mapOf("key1", "fakeTokenPlaceholder")).withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")).withVirtualMachinesProfile(new VirtualMachinesProfile().withScale(new ScaleProfile().withManual(Arrays.asList(new ManualScaleProfile().withSizes(Arrays.asList("Standard_D2_v2", "Standard_D2_v3")).withCount(5))))).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPools_Update.json + */ + /** + * Sample code: Update Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updateAgentPool(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + AgentPool resource = manager.agentPools().getWithResponse("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE).getValue(); + resource.update().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")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### AgentPools_Delete + +```java +/** + * Samples for AgentPools Delete. + */ +public final class AgentPoolsDele { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsDelete_IgnorePodDisruptionBudget.json + */ + /** + * Sample code: Delete Agent Pool by ignoring PodDisruptionBudget. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteAgentPoolByIgnoringPodDisruptionBudget(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().delete("rg1", "clustername1", "agentpool1", null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsDelete.json + */ + /** + * Sample code: Delete Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteAgentPool(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().delete("rg1", "clustername1", "agentpool1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### AgentPools_DeleteMachines + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolDeleteMachinesParameter; +import java.util.Arrays; + +/** + * Samples for AgentPools DeleteMachines. + */ +public final class AgentPoolsDele { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().deleteMachines("rg1", "clustername1", "agentpool1", new AgentPoolDeleteMachinesParameter().withMachineNames(Arrays.asList("aks-nodepool1-42263519-vmss00000a", "aks-nodepool1-42263519-vmss00000b")), com.azure.core.util.Context.NONE); + } +} +``` + +### AgentPools_Get + +```java +/** + * Samples for AgentPools Get. + */ +public final class AgentPoolsGetS { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsGet.json + */ + /** + * Sample code: Get Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getAgentPool(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().getWithResponse("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} +``` + +### AgentPools_GetAvailableAgentPoolVersions + +```java +/** + * Samples for AgentPools GetAvailableAgentPoolVersions. + */ +public final class AgentPoolsGetA { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsGetAgentPoolAvailableVersions.json + */ + /** + * Sample code: Get available versions for agent pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getAvailableVersionsForAgentPool(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().getAvailableAgentPoolVersionsWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### AgentPools_GetUpgradeProfile + +```java +/** + * Samples for AgentPools GetUpgradeProfile. + */ +public final class AgentPoolsGetU { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsGetUpgradeProfile.json + */ + /** + * Sample code: Get Upgrade Profile for Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getUpgradeProfileForAgentPool(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().getUpgradeProfileWithResponse("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} +``` + +### AgentPools_List + +```java +/** + * Samples for AgentPools List. + */ +public final class AgentPoolsList { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsList.json + */ + /** + * Sample code: List Agent Pools by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listAgentPoolsByManagedCluster(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().list("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### AgentPools_UpgradeNodeImageVersion + +```java +/** + * Samples for AgentPools UpgradeNodeImageVersion. + */ +public final class AgentPoolsUpgr { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsUpgradeNodeImageVersion.json + */ + /** + * Sample code: Upgrade Agent Pool Node Image Version. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void upgradeAgentPoolNodeImageVersion(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().upgradeNodeImageVersion("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerServices_ListOrchestrators + +```java +/** + * Samples for ContainerServices ListOrchestrators. + */ +public final class ContainerServi { + /* + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.containerServices().listOrchestratorsWithResponse("location1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### Machines_Get + +```java +/** + * Samples for Machines Get. + */ +public final class MachinesGetSam { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.machines().getWithResponse("rg1", "clustername1", "agentpool1", "aks-nodepool1-42263519-vmss00000t", com.azure.core.util.Context.NONE); + } +} +``` + +### Machines_List + +```java +/** + * Samples for Machines List. + */ +public final class MachinesListSa { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.machines().list("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} +``` + +### MaintenanceConfigurations_CreateOrUpdate + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.DateSpan; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MaintenanceWindow; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RelativeMonthlySchedule; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Schedule; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TimeInWeek; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TimeSpan; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Type; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WeekDay; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.stream.Collectors; + +/** + * Samples for MaintenanceConfigurations CreateOrUpdate. + */ +public final class MaintenanceCon { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/MaintenanceConfigurationsCreate_Update.json + */ + /** + * Sample code: Create/Update Maintenance Configuration. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateMaintenanceConfiguration(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.maintenanceConfigurations().define("default").withExistingManagedCluster("rg1", "clustername1").withTimeInWeek(Arrays.asList(new TimeInWeek().withDay(WeekDay.MONDAY).withHourSlots(Arrays.asList(1, 2)))).withNotAllowedTime(Arrays.asList(new TimeSpan().withStart(OffsetDateTime.parse("2020-11-26T03:00:00Z")).withEnd(OffsetDateTime.parse("2020-11-30T12:00:00Z")))).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.maintenanceConfigurations().define("aksManagedAutoUpgradeSchedule").withExistingManagedCluster("rg1", "clustername1").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"))))).create(); + } +} +``` + +### MaintenanceConfigurations_Delete + +```java +/** + * Samples for MaintenanceConfigurations Delete. + */ +public final class MaintenanceCon { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/MaintenanceConfigurationsDelete.json + */ + /** + * Sample code: Delete Maintenance Configuration. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteMaintenanceConfiguration(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.maintenanceConfigurations().deleteWithResponse("rg1", "clustername1", "default", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.maintenanceConfigurations().deleteWithResponse("rg1", "clustername1", "aksManagedNodeOSUpgradeSchedule", com.azure.core.util.Context.NONE); + } +} +``` + +### MaintenanceConfigurations_Get + +```java +/** + * Samples for MaintenanceConfigurations Get. + */ +public final class MaintenanceCon { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/MaintenanceConfigurationsGet.json + */ + /** + * Sample code: Get Maintenance Configuration. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getMaintenanceConfiguration(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.maintenanceConfigurations().getWithResponse("rg1", "clustername1", "default", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.maintenanceConfigurations().getWithResponse("rg1", "clustername1", "aksManagedNodeOSUpgradeSchedule", com.azure.core.util.Context.NONE); + } +} +``` + +### MaintenanceConfigurations_ListByManagedCluster + +```java +/** + * Samples for MaintenanceConfigurations ListByManagedCluster. + */ +public final class MaintenanceCon { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.maintenanceConfigurations().listByManagedCluster("rg1", "clustername1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/MaintenanceConfigurationsList.json + */ + /** + * Sample code: List maintenance configurations by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listMaintenanceConfigurationsByManagedCluster(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.maintenanceConfigurations().listByManagedCluster("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusterSnapshots_CreateOrUpdate + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ManagedClusterSnapshots CreateOrUpdate. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClusterSnapshotsCreate.json + */ + /** + * Sample code: Create/Update Managed Cluster Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateManagedClusterSnapshot(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusterSnapshots().define("snapshot1").withRegion("westus").withExistingResourceGroup("rg1").withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")).withCreationData(new CreationData().withSourceResourceId("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1")).create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### ManagedClusterSnapshots_Delete + +```java +/** + * Samples for ManagedClusterSnapshots Delete. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClusterSnapshotsDelete.json + */ + /** + * Sample code: Delete Managed Cluster Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteManagedClusterSnapshot(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusterSnapshots().deleteByResourceGroupWithResponse("rg1", "snapshot1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusterSnapshots_GetByResourceGroup + +```java +/** + * Samples for ManagedClusterSnapshots GetByResourceGroup. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClusterSnapshotsGet.json + */ + /** + * Sample code: Get Managed Cluster Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getManagedClusterSnapshot(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusterSnapshots().getByResourceGroupWithResponse("rg1", "snapshot1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusterSnapshots_List + +```java +/** + * Samples for ManagedClusterSnapshots List. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClusterSnapshotsList.json + */ + /** + * Sample code: List Managed Cluster Snapshots. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listManagedClusterSnapshots(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusterSnapshots().list(com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusterSnapshots_ListByResourceGroup + +```java +/** + * Samples for ManagedClusterSnapshots ListByResourceGroup. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClusterSnapshotsListByResourceGroup.json + */ + /** + * Sample code: List Managed Cluster Snapshots by Resource Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listManagedClusterSnapshotsByResourceGroup(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusterSnapshots().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusterSnapshots_UpdateTags + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSnapshot; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ManagedClusterSnapshots UpdateTags. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClusterSnapshotsUpdateTags.json + */ + /** + * Sample code: Update Managed Cluster Snapshot Tags. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updateManagedClusterSnapshotTags(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + ManagedClusterSnapshot resource = manager.managedClusterSnapshots().getByResourceGroupWithResponse("rg1", "snapshot1", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf("key2", "fakeTokenPlaceholder", "key3", "fakeTokenPlaceholder")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### ManagedClusters_AbortLatestOperation + +```java +/** + * Samples for ManagedClusters AbortLatestOperation. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersAbortOperation.json + */ + /** + * Sample code: Abort operation on managed cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void abortOperationOnManagedCluster(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().abortLatestOperation("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_CreateOrUpdate + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ClusterUpgradeSettings; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceLinuxProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceNetworkProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceSshConfiguration; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceSshPublicKey; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Expander; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.GpuInstanceProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IpFamily; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioCertificateAuthority; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioComponents; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioEgressGateway; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioIngressGateway; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioIngressGatewayMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioPluginCertificateAuthority; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioServiceMesh; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesSupportPlan; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.LicenseType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.LoadBalancerSku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAddonProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAIToolchainOperatorProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterApiServerAccessProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterHttpProxyConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterIdentity; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterIngressProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterIngressProfileWebAppRouting; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterLoadBalancerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterManagedOutboundIpProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterNatGatewayProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentityProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPropertiesAutoScalerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfileDefender; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSkuName; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSkuTier; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWindowsProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedServiceIdentityUserAssignedIdentitiesValue; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkDataplane; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkPlugin; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkPluginMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Ossku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OutboundType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ResourceIdentityType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleDownMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ServiceMeshMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ServiceMeshProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.UpgradeOverrideSettings; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WindowsGmsaProfile; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * Samples for ManagedClusters CreateOrUpdate. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(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").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(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").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(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").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_MCSnapshot.json + */ + /** + * Sample code: Create Managed Cluster using a managed cluster snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterUsingAManagedClusterSnapshot(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").withTags(mapOf("archv2", "", "tier", "production")).withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")).withTier(ManagedClusterSkuTier.FREE)).withCreationData(new CreationData().withSourceResourceId("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1")).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"))))).withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder")).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_Update.json + */ + /** + * Sample code: Create/Update Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateManagedCluster(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(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(true).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").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(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")).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(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").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_Premium.json + */ + /** + * Sample code: Create Managed Cluster with LongTermSupport. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithLongTermSupport(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(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)).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json + */ + /** + * Sample code: Create Managed Cluster with Azure Key Vault Secrets Provider Addon. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithAzureKeyVaultSecretsProviderAddon(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(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").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersAssociate_CRG.json + */ + /** + * Sample code: Associate Managed Cluster with Capacity Reservation Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void associateManagedClusterWithCapacityReservationGroup(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(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").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_EnableCustomCATrust.json + */ + /** + * Sample code: Create Managed Cluster with CustomCATrustCertificates populated and CustomCATrust enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithCustomCATrustCertificatesPopulatedAndCustomCATrustEnabled(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnableCustomCATrust(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).withEnablePodSecurityPolicy(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()))).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_NodeAutoProvisioning.json + */ + /** + * Sample code: Create Managed Cluster with Node Auto Provisioning. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithNodeAutoProvisioning(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(true).withNetworkProfile(new ContainerServiceNetworkProfile().withNetworkPlugin(NetworkPlugin.AZURE).withNetworkPluginMode(NetworkPluginMode.OVERLAY).withNetworkDataplane(NetworkDataplane.CILIUM).withOutboundType(OutboundType.LOAD_BALANCER).withLoadBalancerSku(LoadBalancerSku.STANDARD).withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs(new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(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").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(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").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(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)).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(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=")).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_UpdateWithEnableNamespaceResources.json + */ + /** + * Sample code: Create/Update Managed Cluster with EnableNamespaceResources. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateManagedClusterWithEnableNamespaceResources(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(true).withEnableNamespaceResources(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").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(false).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").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_EnableAIToolchainOperator.json + */ + /** + * Sample code: Create Managed Cluster with AI Toolchain Operator enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithAIToolchainOperatorEnabled(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withOutboundType(OutboundType.LOAD_BALANCER).withLoadBalancerSku(LoadBalancerSku.STANDARD).withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs(new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))).withAiToolchainOperatorProfile(new ManagedClusterAIToolchainOperatorProfile().withEnabled(true)).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(false).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").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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)))).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_PPG.json + */ + /** + * Sample code: Create Managed Cluster with PPG. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithPPG(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(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").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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")))).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(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").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(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)).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(false).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").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(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).withNodeSelector(mapOf("istio", "egress"))))).withCertificateAuthority(new IstioCertificateAuthority().withPlugin(new IstioPluginCertificateAuthority().withKeyVaultId("fakeTokenPlaceholder").withCertObjectName("ca-cert").withKeyObjectName("fakeTokenPlaceholder").withRootCertObjectName("root-cert").withCertChainObjectName("cert-chain"))))).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_OSSKU.json + */ + /** + * Sample code: Create Managed Cluster with OSSKU. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithOSSKU(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(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=")).create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_VirtualMachines.json + */ + /** + * Sample code: Create Managed Cluster with VirtualMachines pool type. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithVirtualMachinesPoolType(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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_MACHINES).withMode(AgentPoolMode.SYSTEM).withEnableFips(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).withEnablePodSecurityPolicy(false).withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER).withLoadBalancerSku(LoadBalancerSku.STANDARD).withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs(new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))).withDiskEncryptionSetId("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(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").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(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").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(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").create(); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_GPUMIG.json + */ + /** + * Sample code: Create Managed Cluster with GPUMIG. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithGPUMIG(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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).withEnablePodSecurityPolicy(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=")).create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### ManagedClusters_Delete + +```java +/** + * Samples for ManagedClusters Delete. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersDelete.json + */ + /** + * Sample code: Delete Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteManagedCluster(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().delete("rg1", "clustername1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_GetAccessProfile + +```java +/** + * Samples for ManagedClusters GetAccessProfile. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersGetAccessProfile.json + */ + /** + * Sample code: Get Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getManagedCluster(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().getAccessProfileWithResponse("rg1", "clustername1", "clusterUser", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_GetByResourceGroup + +```java +/** + * Samples for ManagedClusters GetByResourceGroup. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersGet.json + */ + /** + * Sample code: Get Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getManagedCluster(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().getByResourceGroupWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_GetCommandResult + +```java +/** + * Samples for ManagedClusters GetCommandResult. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/RunCommandResultFailed.json + */ + /** + * Sample code: commandFailedResult. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void commandFailedResult(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().getCommandResultWithResponse("rg1", "clustername1", "def7b3ea71bd4f7e9d226ddbc0f00ad9", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/RunCommandResultSucceed.json + */ + /** + * Sample code: commandSucceedResult. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void commandSucceedResult(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().getCommandResultWithResponse("rg1", "clustername1", "def7b3ea71bd4f7e9d226ddbc0f00ad9", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_GetGuardrailsVersions + +```java +/** + * Samples for ManagedClusters GetGuardrailsVersions. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/GetGuardrailsVersions.json + */ + /** + * Sample code: Get guardrails available versions. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getGuardrailsAvailableVersions(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().getGuardrailsVersionsWithResponse("location1", "v1.0.0", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_GetMeshRevisionProfile + +```java +/** + * Samples for ManagedClusters GetMeshRevisionProfile. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().getMeshRevisionProfileWithResponse("location1", "istio", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_GetMeshUpgradeProfile + +```java +/** + * Samples for ManagedClusters GetMeshUpgradeProfile. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().getMeshUpgradeProfileWithResponse("rg1", "clustername1", "istio", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_GetOSOptions + +```java +/** + * Samples for ManagedClusters GetOSOptions. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ContainerServiceGetOSOptions.json + */ + /** + * Sample code: Get Container Service OS Options. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getContainerServiceOSOptions(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().getOSOptionsWithResponse("location1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_GetSafeguardsVersions + +```java +/** + * Samples for ManagedClusters GetSafeguardsVersions. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/GetSafeguardsVersions.json + */ + /** + * Sample code: Get Safeguards available versions. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getSafeguardsAvailableVersions(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().getSafeguardsVersionsWithResponse("location1", "v1.0.0", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_GetUpgradeProfile + +```java +/** + * Samples for ManagedClusters GetUpgradeProfile. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersGetUpgradeProfile.json + */ + /** + * Sample code: Get Upgrade Profile for Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getUpgradeProfileForManagedCluster(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().getUpgradeProfileWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_List + +```java +/** + * Samples for ManagedClusters List. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersList.json + */ + /** + * Sample code: List Managed Clusters. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listManagedClusters(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().list(com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_ListByResourceGroup + +```java +/** + * Samples for ManagedClusters ListByResourceGroup. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersListByResourceGroup.json + */ + /** + * Sample code: Get Managed Clusters by Resource Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getManagedClustersByResourceGroup(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_ListClusterAdminCredentials + +```java +/** + * Samples for ManagedClusters ListClusterAdminCredentials. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersListClusterCredentialResult.json + */ + /** + * Sample code: Get Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getManagedCluster(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().listClusterAdminCredentialsWithResponse("rg1", "clustername1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_ListClusterMonitoringUserCredentials + +```java +/** + * Samples for ManagedClusters ListClusterMonitoringUserCredentials. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersListClusterCredentialResult.json + */ + /** + * Sample code: Get Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getManagedCluster(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().listClusterMonitoringUserCredentialsWithResponse("rg1", "clustername1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_ListClusterUserCredentials + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Format; +import java.util.stream.Collectors; + +/** + * Samples for ManagedClusters ListClusterUserCredentials. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersListClusterCredentialResult.json + */ + /** + * Sample code: Get Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getManagedCluster(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().listClusterUserCredentialsWithResponse("rg1", "clustername1", null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_ListGuardrailsVersions + +```java +/** + * Samples for ManagedClusters ListGuardrailsVersions. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ListGuardrailsVersions.json + */ + /** + * Sample code: List Guardrails Versions. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listGuardrailsVersions(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().listGuardrailsVersions("location1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_ListKubernetesVersions + +```java +/** + * Samples for ManagedClusters ListKubernetesVersions. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/KubernetesVersions_List.json + */ + /** + * Sample code: List Kubernetes Versions. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listKubernetesVersions(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().listKubernetesVersionsWithResponse("location1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_ListMeshRevisionProfiles + +```java +/** + * Samples for ManagedClusters ListMeshRevisionProfiles. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().listMeshRevisionProfiles("location1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_ListMeshUpgradeProfiles + +```java +/** + * Samples for ManagedClusters ListMeshUpgradeProfiles. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().listMeshUpgradeProfiles("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_ListOutboundNetworkDependenciesEndpoints + +```java +/** + * Samples for ManagedClusters ListOutboundNetworkDependenciesEndpoints. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/OutboundNetworkDependenciesEndpointsList.json + */ + /** + * Sample code: List OutboundNetworkDependenciesEndpoints by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listOutboundNetworkDependenciesEndpointsByManagedCluster(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().listOutboundNetworkDependenciesEndpoints("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_ListSafeguardsVersions + +```java +/** + * Samples for ManagedClusters ListSafeguardsVersions. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ListSafeguardsVersions.json + */ + /** + * Sample code: List Safeguards Versions. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listSafeguardsVersions(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().listSafeguardsVersions("location1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_ResetAadProfile + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAadProfile; + +/** + * Samples for ManagedClusters ResetAadProfile. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersResetAADProfile.json + */ + /** + * Sample code: Reset AAD Profile. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void resetAADProfile(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().resetAadProfile("rg1", "clustername1", new ManagedClusterAadProfile().withClientAppId("clientappid").withServerAppId("serverappid").withServerAppSecret("fakeTokenPlaceholder").withTenantId("tenantid"), com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_ResetServicePrincipalProfile + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterServicePrincipalProfile; + +/** + * Samples for ManagedClusters ResetServicePrincipalProfile. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersResetServicePrincipalProfile.json + */ + /** + * Sample code: Reset Service Principal Profile. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void resetServicePrincipalProfile(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().resetServicePrincipalProfile("rg1", "clustername1", new ManagedClusterServicePrincipalProfile().withClientId("clientid").withSecret("fakeTokenPlaceholder"), com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_RotateClusterCertificates + +```java +/** + * Samples for ManagedClusters RotateClusterCertificates. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersRotateClusterCertificates.json + */ + /** + * Sample code: Rotate Cluster Certificates. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void rotateClusterCertificates(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().rotateClusterCertificates("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_RotateServiceAccountSigningKeys + +```java +/** + * Samples for ManagedClusters RotateServiceAccountSigningKeys. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersRotateServiceAccountSigningKeys.json + */ + /** + * Sample code: Rotate Cluster Service Account Signing Keys. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void rotateClusterServiceAccountSigningKeys(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().rotateServiceAccountSigningKeys("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_RunCommand + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RunCommandRequest; + +/** + * Samples for ManagedClusters RunCommand. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/RunCommandRequest.json + */ + /** + * Sample code: submitNewCommand. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void submitNewCommand(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().runCommand("rg1", "clustername1", new RunCommandRequest().withCommand("kubectl apply -f ns.yaml").withContext("").withClusterToken("fakeTokenPlaceholder"), com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_Start + +```java +/** + * Samples for ManagedClusters Start. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersStart.json + */ + /** + * Sample code: Start Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void startManagedCluster(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().start("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_Stop + +```java +/** + * Samples for ManagedClusters Stop. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersStop.json + */ + /** + * Sample code: Stop Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void stopManagedCluster(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.managedClusters().stop("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedClusters_UpdateTags + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedCluster; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ManagedClusters UpdateTags. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersUpdateTags.json + */ + /** + * Sample code: Update Managed Cluster Tags. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updateManagedClusterTags(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + ManagedCluster resource = manager.managedClusters().getByResourceGroupWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf("archv3", "", "tier", "testing")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### OpenShiftManagedClusters_CreateOrUpdate + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftAgentPoolProfileRole; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftContainerServiceVMSize; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAadIdentityProvider; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAuthProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterIdentityProvider; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterMasterPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftRouterProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * Samples for OpenShiftManagedClusters CreateOrUpdate. + */ +public final class OpenShiftManag { + /* + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.openShiftManagedClusters().define("clustername1").withRegion("location1").withExistingResourceGroup("rg1").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"))))).create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### OpenShiftManagedClusters_Delete + +```java +/** + * Samples for OpenShiftManagedClusters Delete. + */ +public final class OpenShiftManag { + /* + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.openShiftManagedClusters().delete("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### OpenShiftManagedClusters_GetByResourceGroup + +```java +/** + * Samples for OpenShiftManagedClusters GetByResourceGroup. + */ +public final class OpenShiftManag { + /* + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.openShiftManagedClusters().getByResourceGroupWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### OpenShiftManagedClusters_List + +```java +/** + * Samples for OpenShiftManagedClusters List. + */ +public final class OpenShiftManag { + /* + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.openShiftManagedClusters().list(com.azure.core.util.Context.NONE); + } +} +``` + +### OpenShiftManagedClusters_ListByResourceGroup + +```java +/** + * Samples for OpenShiftManagedClusters ListByResourceGroup. + */ +public final class OpenShiftManag { + /* + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.openShiftManagedClusters().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); + } +} +``` + +### OpenShiftManagedClusters_UpdateTags + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedCluster; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for OpenShiftManagedClusters UpdateTags. + */ +public final class OpenShiftManag { + /* + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + OpenShiftManagedCluster resource = manager.openShiftManagedClusters().getByResourceGroupWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf("archv3", "", "tier", "testing")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### OperationStatusResult_Get + +```java +/** + * Samples for OperationStatusResult Get. + */ +public final class OperationStatu { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/OperationStatusResultGet.json + */ + /** + * Sample code: Get OperationStatusResult. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getOperationStatusResult(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.operationStatusResults().getWithResponse("rg1", "clustername1", "00000000-0000-0000-0000-000000000001", com.azure.core.util.Context.NONE); + } +} +``` + +### OperationStatusResult_GetByAgentPool + +```java +/** + * Samples for OperationStatusResult GetByAgentPool. + */ +public final class OperationStatu { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/OperationStatusResultGetByAgentPool.json + */ + /** + * Sample code: Get OperationStatusResult. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getOperationStatusResult(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.operationStatusResults().getByAgentPoolWithResponse("rg1", "clustername1", "agentpool1", "00000000-0000-0000-0000-000000000001", com.azure.core.util.Context.NONE); + } +} +``` + +### OperationStatusResult_List + +```java +/** + * Samples for OperationStatusResult List. + */ +public final class OperationStatu { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/OperationStatusResultList.json + */ + /** + * Sample code: List of OperationStatusResult. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listOfOperationStatusResult(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.operationStatusResults().list("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### Operations_List + +```java +/** + * Samples for Operations List. + */ +public final class OperationsList { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_Delete + +```java +/** + * Samples for PrivateEndpointConnections Delete. + */ +public final class PrivateEndpoin { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/PrivateEndpointConnectionsDelete.json + */ + /** + * Sample code: Delete Private Endpoint Connection. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deletePrivateEndpointConnection(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.privateEndpointConnections().delete("rg1", "clustername1", "privateendpointconnection1", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_Get + +```java +/** + * Samples for PrivateEndpointConnections Get. + */ +public final class PrivateEndpoin { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/PrivateEndpointConnectionsGet.json + */ + /** + * Sample code: Get Private Endpoint Connection. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getPrivateEndpointConnection(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.privateEndpointConnections().getWithResponse("rg1", "clustername1", "privateendpointconnection1", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_List + +```java +/** + * Samples for PrivateEndpointConnections List. + */ +public final class PrivateEndpoin { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.privateEndpointConnections().listWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_Update + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ConnectionStatus; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkServiceConnectionState; +import java.util.stream.Collectors; + +/** + * Samples for PrivateEndpointConnections Update. + */ +public final class PrivateEndpoin { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/PrivateEndpointConnectionsUpdate.json + */ + /** + * Sample code: Update Private Endpoint Connection. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updatePrivateEndpointConnection(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.privateEndpointConnections().updateWithResponse("rg1", "clustername1", "privateendpointconnection1", new PrivateEndpointConnectionInner().withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.APPROVED)), com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateLinkResources_List + +```java +/** + * Samples for PrivateLinkResources List. + */ +public final class PrivateLinkRes { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.privateLinkResources().listWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### ResolvePrivateLinkServiceId_Post + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner; + +/** + * Samples for ResolvePrivateLinkServiceId Post. + */ +public final class ResolvePrivate { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.resolvePrivateLinkServiceIds().postWithResponse("rg1", "clustername1", new PrivateLinkResourceInner().withName("management"), com.azure.core.util.Context.NONE); + } +} +``` + +### ScheduledEvents_Get + +```java +/** + * Samples for ScheduledEvents Get. + */ +public final class ScheduledEvent { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ScheduledEventsGet.json + */ + /** + * Sample code: Get Scheduled Event. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getScheduledEvent(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.scheduledEvents().getWithResponse("rg1", "clustername1", "event1", com.azure.core.util.Context.NONE); + } +} +``` + +### Snapshots_CreateOrUpdate + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Snapshots CreateOrUpdate. + */ +public final class SnapshotsCreat { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/SnapshotsCreate.json + */ + /** + * Sample code: Create/Update Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateSnapshot(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.snapshots().define("snapshot1").withRegion("westus").withExistingResourceGroup("rg1").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")).create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Snapshots_Delete + +```java +/** + * Samples for Snapshots Delete. + */ +public final class SnapshotsDelet { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/SnapshotsDelete.json + */ + /** + * Sample code: Delete Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteSnapshot(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.snapshots().deleteByResourceGroupWithResponse("rg1", "snapshot1", com.azure.core.util.Context.NONE); + } +} +``` + +### Snapshots_GetByResourceGroup + +```java +/** + * Samples for Snapshots GetByResourceGroup. + */ +public final class SnapshotsGetBy { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/SnapshotsGet.json + */ + /** + * Sample code: Get Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getSnapshot(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.snapshots().getByResourceGroupWithResponse("rg1", "snapshot1", com.azure.core.util.Context.NONE); + } +} +``` + +### Snapshots_List + +```java +/** + * Samples for Snapshots List. + */ +public final class SnapshotsListS { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/SnapshotsList.json + */ + /** + * Sample code: List Snapshots. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listSnapshots(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.snapshots().list(com.azure.core.util.Context.NONE); + } +} +``` + +### Snapshots_ListByResourceGroup + +```java +/** + * Samples for Snapshots ListByResourceGroup. + */ +public final class SnapshotsListB { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/SnapshotsListByResourceGroup.json + */ + /** + * Sample code: List Snapshots by Resource Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listSnapshotsByResourceGroup(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.snapshots().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); + } +} +``` + +### Snapshots_UpdateTags + +```java +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Snapshot; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Snapshots UpdateTags. + */ +public final class SnapshotsUpdat { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/SnapshotsUpdateTags.json + */ + /** + * Sample code: Update Snapshot Tags. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updateSnapshotTags(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + Snapshot resource = manager.snapshots().getByResourceGroupWithResponse("rg1", "snapshot1", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf("key2", "fakeTokenPlaceholder", "key3", "fakeTokenPlaceholder")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### TrustedAccessRoleBindings_CreateOrUpdate + +```java +import java.util.Arrays; + +/** + * Samples for TrustedAccessRoleBindings CreateOrUpdate. + */ +public final class TrustedAccessR { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.trustedAccessRoleBindings().define("binding1").withExistingManagedCluster("rg1", "clustername1").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")).create(); + } +} +``` + +### TrustedAccessRoleBindings_Delete + +```java +/** + * Samples for TrustedAccessRoleBindings Delete. + */ +public final class TrustedAccessR { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.trustedAccessRoleBindings().delete("rg1", "clustername1", "binding1", com.azure.core.util.Context.NONE); + } +} +``` + +### TrustedAccessRoleBindings_Get + +```java +/** + * Samples for TrustedAccessRoleBindings Get. + */ +public final class TrustedAccessR { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.trustedAccessRoleBindings().getWithResponse("rg1", "clustername1", "binding1", com.azure.core.util.Context.NONE); + } +} +``` + +### TrustedAccessRoleBindings_List + +```java +/** + * Samples for TrustedAccessRoleBindings List. + */ +public final class TrustedAccessR { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/TrustedAccessRoleBindings_List.json + */ + /** + * Sample code: List trusted access role bindings. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listTrustedAccessRoleBindings(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.trustedAccessRoleBindings().list("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} +``` + +### TrustedAccessRoles_List + +```java +/** + * Samples for TrustedAccessRoles List. + */ +public final class TrustedAccessR { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/TrustedAccessRoles_List.json + */ + /** + * Sample code: List trusted access roles. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listTrustedAccessRoles(com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.trustedAccessRoles().list("westus2", com.azure.core.util.Context.NONE); + } +} +``` + diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/pom.xml b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/pom.xml new file mode 100644 index 0000000000000..55dcdb06f455f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/pom.xml @@ -0,0 +1,62 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure.resourcemanager + azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated + 1.0.0-beta.1 + jar + + Microsoft Azure SDK for ContainerService Management + This package contains Microsoft Azure SDK for ContainerService Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Container Service Client. Package tag package-preview-2023-11. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + 0 + 0 + true + + + + com.azure + azure-core + 1.45.1 + + + com.azure + azure-core-management + 1.11.9 + + + diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/ContainerServiceManager.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/ContainerServiceManager.java new file mode 100644 index 0000000000000..98110b339e6b9 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/ContainerServiceManager.java @@ -0,0 +1,511 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.util.Configuration; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ContainerServiceManagementClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.AgentPoolsImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.ContainerServiceManagementClientBuilder; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.ContainerServicesImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.MachinesImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.MaintenanceConfigurationsImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.ManagedClusterSnapshotsImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.ManagedClustersImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.OpenShiftManagedClustersImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.OperationStatusResultsImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.OperationsImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.PrivateEndpointConnectionsImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.PrivateLinkResourcesImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.ResolvePrivateLinkServiceIdsImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.ScheduledEventsImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.SnapshotsImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.TrustedAccessRoleBindingsImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.TrustedAccessRolesImpl; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPools; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServices; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Machines; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MaintenanceConfigurations; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSnapshots; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusters; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusters; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OperationStatusResults; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Operations; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpointConnections; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkResources; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ResolvePrivateLinkServiceIds; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScheduledEvents; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Snapshots; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleBindings; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoles; +import java.time.Duration; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * Entry point to ContainerServiceManager. + * Container Service Client. + */ +public final class ContainerServiceManager { + private OpenShiftManagedClusters openShiftManagedClusters; + + private ContainerServices containerServices; + + private Operations operations; + + private ManagedClusters managedClusters; + + private MaintenanceConfigurations maintenanceConfigurations; + + private AgentPools agentPools; + + private Machines machines; + + private PrivateEndpointConnections privateEndpointConnections; + + private PrivateLinkResources privateLinkResources; + + private ResolvePrivateLinkServiceIds resolvePrivateLinkServiceIds; + + private OperationStatusResults operationStatusResults; + + private Snapshots snapshots; + + private ManagedClusterSnapshots managedClusterSnapshots; + + private TrustedAccessRoles trustedAccessRoles; + + private TrustedAccessRoleBindings trustedAccessRoleBindings; + + private ScheduledEvents scheduledEvents; + + private final ContainerServiceManagementClient clientObject; + + private ContainerServiceManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + this.clientObject = new ContainerServiceManagementClientBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval).buildClient(); + } + + /** + * Creates an instance of ContainerService service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the ContainerService service API instance. + */ + public static ContainerServiceManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return configure().authenticate(credential, profile); + } + + /** + * Creates an instance of ContainerService service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the ContainerService service API instance. + */ + public static ContainerServiceManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new ContainerServiceManager(httpPipeline, profile, null); + } + + /** + * Gets a Configurable instance that can be used to create ContainerServiceManager with optional configuration. + * + * @return the Configurable instance allowing configurations. + */ + public static Configurable configure() { + return new ContainerServiceManager.Configurable(); + } + + /** + * The Configurable allowing configurations to be set. + */ + public static final class Configurable { + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + + private HttpClient httpClient; + private HttpLogOptions httpLogOptions; + private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); + private RetryPolicy retryPolicy; + private RetryOptions retryOptions; + private Duration defaultPollInterval; + + private Configurable() { + } + + /** + * Sets the http client. + * + * @param httpClient the HTTP client. + * @return the configurable object itself. + */ + public Configurable withHttpClient(HttpClient httpClient) { + this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); + return this; + } + + /** + * Sets the logging options to the HTTP pipeline. + * + * @param httpLogOptions the HTTP log options. + * @return the configurable object itself. + */ + public Configurable withLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); + return this; + } + + /** + * Adds the pipeline policy to the HTTP pipeline. + * + * @param policy the HTTP pipeline policy. + * @return the configurable object itself. + */ + public Configurable withPolicy(HttpPipelinePolicy policy) { + this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); + return this; + } + + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + + /** + * Sets the retry policy to the HTTP pipeline. + * + * @param retryPolicy the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); + return this; + } + + /** + * Sets the retry options for the HTTP pipeline retry policy. + *

+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + * + * @param retryOptions the retry options for the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + + /** + * Sets the default poll interval, used when service does not provide "Retry-After" header. + * + * @param defaultPollInterval the default poll interval. + * @return the configurable object itself. + */ + public Configurable withDefaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + if (this.defaultPollInterval.isNegative()) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); + } + return this; + } + + /** + * Creates an instance of ContainerService service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the ContainerService service API instance. + */ + public ContainerServiceManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + + StringBuilder userAgentBuilder = new StringBuilder(); + userAgentBuilder.append("azsdk-java").append("-") + .append("com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated").append("/") + .append("1.0.0-beta.1"); + if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { + userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)"); + } else { + userAgentBuilder.append(" (auto-generated)"); + } + + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } + if (retryPolicy == null) { + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } + } + List policies = new ArrayList<>(); + policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); + policies.add(new RequestIdPolicy()); + policies.addAll(this.policies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(retryPolicy); + policies.add(new AddDatePolicy()); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList())); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])).build(); + return new ContainerServiceManager(httpPipeline, profile, defaultPollInterval); + } + } + + /** + * Gets the resource collection API of OpenShiftManagedClusters. It manages OpenShiftManagedCluster. + * + * @return Resource collection API of OpenShiftManagedClusters. + */ + public OpenShiftManagedClusters openShiftManagedClusters() { + if (this.openShiftManagedClusters == null) { + this.openShiftManagedClusters + = new OpenShiftManagedClustersImpl(clientObject.getOpenShiftManagedClusters(), this); + } + return openShiftManagedClusters; + } + + /** + * Gets the resource collection API of ContainerServices. + * + * @return Resource collection API of ContainerServices. + */ + public ContainerServices containerServices() { + if (this.containerServices == null) { + this.containerServices = new ContainerServicesImpl(clientObject.getContainerServices(), this); + } + return containerServices; + } + + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + + /** + * Gets the resource collection API of ManagedClusters. It manages ManagedCluster. + * + * @return Resource collection API of ManagedClusters. + */ + public ManagedClusters managedClusters() { + if (this.managedClusters == null) { + this.managedClusters = new ManagedClustersImpl(clientObject.getManagedClusters(), this); + } + return managedClusters; + } + + /** + * Gets the resource collection API of MaintenanceConfigurations. It manages MaintenanceConfiguration. + * + * @return Resource collection API of MaintenanceConfigurations. + */ + public MaintenanceConfigurations maintenanceConfigurations() { + if (this.maintenanceConfigurations == null) { + this.maintenanceConfigurations + = new MaintenanceConfigurationsImpl(clientObject.getMaintenanceConfigurations(), this); + } + return maintenanceConfigurations; + } + + /** + * Gets the resource collection API of AgentPools. It manages AgentPool. + * + * @return Resource collection API of AgentPools. + */ + public AgentPools agentPools() { + if (this.agentPools == null) { + this.agentPools = new AgentPoolsImpl(clientObject.getAgentPools(), this); + } + return agentPools; + } + + /** + * Gets the resource collection API of Machines. + * + * @return Resource collection API of Machines. + */ + public Machines machines() { + if (this.machines == null) { + this.machines = new MachinesImpl(clientObject.getMachines(), this); + } + return machines; + } + + /** + * Gets the resource collection API of PrivateEndpointConnections. + * + * @return Resource collection API of PrivateEndpointConnections. + */ + public PrivateEndpointConnections privateEndpointConnections() { + if (this.privateEndpointConnections == null) { + this.privateEndpointConnections + = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); + } + return privateEndpointConnections; + } + + /** + * Gets the resource collection API of PrivateLinkResources. + * + * @return Resource collection API of PrivateLinkResources. + */ + public PrivateLinkResources privateLinkResources() { + if (this.privateLinkResources == null) { + this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); + } + return privateLinkResources; + } + + /** + * Gets the resource collection API of ResolvePrivateLinkServiceIds. + * + * @return Resource collection API of ResolvePrivateLinkServiceIds. + */ + public ResolvePrivateLinkServiceIds resolvePrivateLinkServiceIds() { + if (this.resolvePrivateLinkServiceIds == null) { + this.resolvePrivateLinkServiceIds + = new ResolvePrivateLinkServiceIdsImpl(clientObject.getResolvePrivateLinkServiceIds(), this); + } + return resolvePrivateLinkServiceIds; + } + + /** + * Gets the resource collection API of OperationStatusResults. + * + * @return Resource collection API of OperationStatusResults. + */ + public OperationStatusResults operationStatusResults() { + if (this.operationStatusResults == null) { + this.operationStatusResults + = new OperationStatusResultsImpl(clientObject.getOperationStatusResults(), this); + } + return operationStatusResults; + } + + /** + * Gets the resource collection API of Snapshots. It manages Snapshot. + * + * @return Resource collection API of Snapshots. + */ + public Snapshots snapshots() { + if (this.snapshots == null) { + this.snapshots = new SnapshotsImpl(clientObject.getSnapshots(), this); + } + return snapshots; + } + + /** + * Gets the resource collection API of ManagedClusterSnapshots. It manages ManagedClusterSnapshot. + * + * @return Resource collection API of ManagedClusterSnapshots. + */ + public ManagedClusterSnapshots managedClusterSnapshots() { + if (this.managedClusterSnapshots == null) { + this.managedClusterSnapshots + = new ManagedClusterSnapshotsImpl(clientObject.getManagedClusterSnapshots(), this); + } + return managedClusterSnapshots; + } + + /** + * Gets the resource collection API of TrustedAccessRoles. + * + * @return Resource collection API of TrustedAccessRoles. + */ + public TrustedAccessRoles trustedAccessRoles() { + if (this.trustedAccessRoles == null) { + this.trustedAccessRoles = new TrustedAccessRolesImpl(clientObject.getTrustedAccessRoles(), this); + } + return trustedAccessRoles; + } + + /** + * Gets the resource collection API of TrustedAccessRoleBindings. It manages TrustedAccessRoleBinding. + * + * @return Resource collection API of TrustedAccessRoleBindings. + */ + public TrustedAccessRoleBindings trustedAccessRoleBindings() { + if (this.trustedAccessRoleBindings == null) { + this.trustedAccessRoleBindings + = new TrustedAccessRoleBindingsImpl(clientObject.getTrustedAccessRoleBindings(), this); + } + return trustedAccessRoleBindings; + } + + /** + * Gets the resource collection API of ScheduledEvents. + * + * @return Resource collection API of ScheduledEvents. + */ + public ScheduledEvents scheduledEvents() { + if (this.scheduledEvents == null) { + this.scheduledEvents = new ScheduledEventsImpl(clientObject.getScheduledEvents(), this); + } + return scheduledEvents; + } + + /** + * Gets wrapped service client ContainerServiceManagementClient providing direct access to the underlying + * auto-generated API implementation, based on Azure REST API. + * + * @return Wrapped service client ContainerServiceManagementClient. + */ + public ContainerServiceManagementClient serviceClient() { + return this.clientObject; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/AgentPoolsClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/AgentPoolsClient.java new file mode 100644 index 0000000000000..ad03046dfd626 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/AgentPoolsClient.java @@ -0,0 +1,486 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolAvailableVersionsInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolDeleteMachinesParameter; + +/** + * 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, an error 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, an error 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, an error 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, an error 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 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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, + 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 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. + */ + @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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 {@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. + */ + @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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ContainerServiceManagementClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ContainerServiceManagementClient.java new file mode 100644 index 0000000000000..402bbeed0a158 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ContainerServiceManagementClient.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.http.HttpPipeline; +import java.time.Duration; + +/** + * The interface for ContainerServiceManagementClient class. + */ +public interface ContainerServiceManagementClient { + /** + * 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 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 OpenShiftManagedClustersClient object to access its operations. + * + * @return the OpenShiftManagedClustersClient object. + */ + OpenShiftManagedClustersClient getOpenShiftManagedClusters(); + + /** + * Gets the ContainerServicesClient object to access its operations. + * + * @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 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 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 OperationStatusResultsClient object to access its operations. + * + * @return the OperationStatusResultsClient object. + */ + OperationStatusResultsClient getOperationStatusResults(); + + /** + * Gets the SnapshotsClient object to access its operations. + * + * @return the SnapshotsClient object. + */ + SnapshotsClient getSnapshots(); + + /** + * Gets the ManagedClusterSnapshotsClient object to access its operations. + * + * @return the ManagedClusterSnapshotsClient object. + */ + ManagedClusterSnapshotsClient getManagedClusterSnapshots(); + + /** + * Gets the TrustedAccessRolesClient object to access its operations. + * + * @return the TrustedAccessRolesClient object. + */ + TrustedAccessRolesClient getTrustedAccessRoles(); + + /** + * Gets the TrustedAccessRoleBindingsClient object to access its operations. + * + * @return the TrustedAccessRoleBindingsClient object. + */ + TrustedAccessRoleBindingsClient getTrustedAccessRoleBindings(); + + /** + * Gets the ScheduledEventsClient object to access its operations. + * + * @return the ScheduledEventsClient object. + */ + ScheduledEventsClient getScheduledEvents(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ContainerServicesClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ContainerServicesClient.java new file mode 100644 index 0000000000000..fd7c3342c1527 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ContainerServicesClient.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.containerservicemicrosoftcontainerserviceaks.generated.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OrchestratorVersionProfileListResultInner; + +/** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/MachinesClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/MachinesClient.java new file mode 100644 index 0000000000000..b081f502eccab --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/MachinesClient.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MachineInner; + +/** + * 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 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/MaintenanceConfigurationsClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/MaintenanceConfigurationsClient.java new file mode 100644 index 0000000000000..3a47ea3545e75 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/MaintenanceConfigurationsClient.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.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MaintenanceConfigurationInner; + +/** + * 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 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + * @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. + * @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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ManagedClusterSnapshotsClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ManagedClusterSnapshotsClient.java new file mode 100644 index 0000000000000..e690472d7e45e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ManagedClusterSnapshotsClient.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterSnapshotInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TagsObject; + +/** + * An instance of this class provides access to all the operations defined in ManagedClusterSnapshotsClient. + */ +public interface ManagedClusterSnapshotsClient { + /** + * Gets a list of managed cluster 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 managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets a list of managed cluster 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 managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Lists managed cluster 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 Managed Cluster Snapshots operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists managed cluster 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 Managed Cluster Snapshots operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets a managed cluster 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 managed cluster snapshot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context); + + /** + * Gets a managed cluster 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 managed cluster snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterSnapshotInner getByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Creates or updates a managed cluster 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 managed cluster 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 managed cluster snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, + ManagedClusterSnapshotInner parameters, Context context); + + /** + * Creates or updates a managed cluster 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 managed cluster 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 managed cluster snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterSnapshotInner createOrUpdate(String resourceGroupName, String resourceName, + ManagedClusterSnapshotInner parameters); + + /** + * Updates tags on a managed cluster 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 managed cluster 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 managed cluster snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateTagsWithResponse(String resourceGroupName, String resourceName, + TagsObject parameters, Context context); + + /** + * Updates tags on a managed cluster 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 managed cluster 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 managed cluster snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterSnapshotInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters); + + /** + * Deletes a managed cluster 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 managed cluster 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ManagedClustersClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ManagedClustersClient.java new file mode 100644 index 0000000000000..bda66b3fb6281 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ManagedClustersClient.java @@ -0,0 +1,1363 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.CredentialResultsInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.GuardrailsAvailableVersionInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.KubernetesVersionListResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterAccessProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshRevisionProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OSOptionProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OutboundEnvironmentEndpointInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.RunCommandResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SafeguardsAvailableVersionInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Format; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClustersGetCommandResultResponse; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RunCommandRequest; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TagsObject; + +/** + * An instance of this class provides access to all the operations defined in ManagedClustersClient. + */ +public interface ManagedClustersClient { + /** + * Gets supported OS options in the specified subscription. + * + * @param location The name of the Azure region. + * @param resourceType The resource type for which the OS options 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 supported OS options in the specified subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getOSOptionsWithResponse(String location, String resourceType, Context context); + + /** + * Gets supported OS options in the specified subscription. + * + * @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 supported OS options in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OSOptionProfileInner getOSOptions(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 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 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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, + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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, + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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, + Boolean ignorePodDisruptionBudget, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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, Boolean ignorePodDisruptionBudget, 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 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. + */ + @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 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. + */ + @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); + + /** + * 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, an error 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, an error 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, an error 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, an error 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 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. + */ + @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 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. + */ + @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 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. + */ + @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 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. + */ + @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 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. + */ + @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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 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); + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 Guardrails Version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getGuardrailsVersionsWithResponse(String location, String version, + Context context); + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 Guardrails Version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GuardrailsAvailableVersionInner getGuardrailsVersions(String location, String version); + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default 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 GuardrailsVersions as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listGuardrailsVersions(String location); + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default 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 GuardrailsVersions as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listGuardrailsVersions(String location, Context context); + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 Safeguards Version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSafeguardsVersionsWithResponse(String location, String version, + Context context); + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 Safeguards Version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SafeguardsAvailableVersionInner getSafeguardsVersions(String location, String version); + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default 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 SafeguardsVersions as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSafeguardsVersions(String location); + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default 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 SafeguardsVersions as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSafeguardsVersions(String location, 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 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/OpenShiftManagedClustersClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/OpenShiftManagedClustersClient.java new file mode 100644 index 0000000000000..eb3eef292aff5 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/OpenShiftManagedClustersClient.java @@ -0,0 +1,315 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OpenShiftManagedClusterInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TagsObject; + +/** + * An instance of this class provides access to all the operations defined in OpenShiftManagedClustersClient. + */ +public interface OpenShiftManagedClustersClient { + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * + * Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of each + * OpenShift managed cluster. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of OpenShift managed clusters in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * + * Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of each + * OpenShift 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 a list of OpenShift managed clusters in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * + * Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns + * properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 OpenShift Managed Clusters operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * + * Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns + * properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 OpenShift Managed Clusters operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets a OpenShift managed cluster. + * + * Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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 details of the managed OpenShift cluster with a specified resource group and name along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context); + + /** + * Gets a OpenShift managed cluster. + * + * Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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 details of the managed OpenShift cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OpenShiftManagedClusterInner getByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Creates or updates an OpenShift managed cluster. + * + * Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OpenShiftManagedClusterInner> + beginCreateOrUpdate(String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters); + + /** + * Creates or updates an OpenShift managed cluster. + * + * Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster 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 the {@link SyncPoller} for polling of openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OpenShiftManagedClusterInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters, Context context); + + /** + * Creates or updates an OpenShift managed cluster. + * + * Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OpenShiftManagedClusterInner createOrUpdate(String resourceGroupName, String resourceName, + OpenShiftManagedClusterInner parameters); + + /** + * Creates or updates an OpenShift managed cluster. + * + * Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster 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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OpenShiftManagedClusterInner createOrUpdate(String resourceGroupName, String resourceName, + OpenShiftManagedClusterInner parameters, Context context); + + /** + * Updates tags on an OpenShift managed cluster. + * + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift 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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OpenShiftManagedClusterInner> + beginUpdateTags(String resourceGroupName, String resourceName, TagsObject parameters); + + /** + * Updates tags on an OpenShift managed cluster. + * + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster 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 the {@link SyncPoller} for polling of openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OpenShiftManagedClusterInner> + beginUpdateTags(String resourceGroupName, String resourceName, TagsObject parameters, Context context); + + /** + * Updates tags on an OpenShift managed cluster. + * + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift 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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OpenShiftManagedClusterInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters); + + /** + * Updates tags on an OpenShift managed cluster. + * + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster 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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OpenShiftManagedClusterInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters, + Context context); + + /** + * Deletes an OpenShift managed cluster. + * + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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 an OpenShift managed cluster. + * + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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> beginDelete(String resourceGroupName, String resourceName, Context context); + + /** + * Deletes an OpenShift managed cluster. + * + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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 an OpenShift managed cluster. + * + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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 delete(String resourceGroupName, String resourceName, Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/OperationStatusResultsClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/OperationStatusResultsClient.java new file mode 100644 index 0000000000000..e19956eefbee4 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/OperationStatusResultsClient.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationStatusResultInner; + +/** + * An instance of this class provides access to all the operations defined in OperationStatusResultsClient. + */ +public interface OperationStatusResultsClient { + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource 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 operations in the specified managedCluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * Gets a list of operations in the specified managedCluster. + * + * @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 operations in the specified managedCluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName, Context context); + + /** + * Get the status of a specific operation 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 operationId The ID of an ongoing async 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 the status of a specific operation in the specified managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, + String operationId, Context context); + + /** + * Get the status of a specific operation 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 operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner get(String resourceGroupName, String resourceName, String operationId); + + /** + * Get the status of a specific operation 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 operationId The ID of an ongoing async 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 the status of a specific operation in the specified agent pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByAgentPoolWithResponse(String resourceGroupName, String resourceName, + String agentPoolName, String operationId, Context context); + + /** + * Get the status of a specific operation 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 operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner getByAgentPool(String resourceGroupName, String resourceName, String agentPoolName, + String operationId); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/OperationsClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/OperationsClient.java new file mode 100644 index 0000000000000..da9f8b2a59b7f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/OperationsClient.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/PrivateEndpointConnectionsClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/PrivateEndpointConnectionsClient.java new file mode 100644 index 0000000000000..a9eaa5ea185e0 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/PrivateEndpointConnectionsClient.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.containerservicemicrosoftcontainerserviceaks.generated.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.SyncPoller; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionListResultInner; + +/** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 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. + */ + @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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/PrivateLinkResourcesClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/PrivateLinkResourcesClient.java new file mode 100644 index 0000000000000..8e674d7108ac6 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/PrivateLinkResourcesClient.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.containerservicemicrosoftcontainerserviceaks.generated.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourcesListResultInner; + +/** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ResolvePrivateLinkServiceIdsClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ResolvePrivateLinkServiceIdsClient.java new file mode 100644 index 0000000000000..6a085ec96ee91 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ResolvePrivateLinkServiceIdsClient.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.containerservicemicrosoftcontainerserviceaks.generated.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner; + +/** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ScheduledEventsClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ScheduledEventsClient.java new file mode 100644 index 0000000000000..31f4526a7f707 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/ScheduledEventsClient.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.containerservicemicrosoftcontainerserviceaks.generated.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ScheduledEventInner; + +/** + * An instance of this class provides access to all the operations defined in ScheduledEventsClient. + */ +public interface ScheduledEventsClient { + /** + * Access to this resource type is not currently available via GET. To consume please use System Topics or Azure + * Resource Graph. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param scheduledEventName The name of the scheduled event. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, + String scheduledEventName, Context context); + + /** + * Access to this resource type is not currently available via GET. To consume please use System Topics or Azure + * Resource Graph. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param scheduledEventName The name of the scheduled event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + ScheduledEventInner get(String resourceGroupName, String resourceName, String scheduledEventName); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/SnapshotsClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/SnapshotsClient.java new file mode 100644 index 0000000000000..fab12564673c5 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/SnapshotsClient.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SnapshotInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TagsObject; + +/** + * An instance of this class provides access to all the operations defined in SnapshotsClient. + */ +public interface SnapshotsClient { + /** + * 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 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/TrustedAccessRoleBindingsClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/TrustedAccessRoleBindingsClient.java new file mode 100644 index 0000000000000..7a0887442a209 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/TrustedAccessRoleBindingsClient.java @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleBindingInner; + +/** + * 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 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 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. + */ + @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 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. + */ + @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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/TrustedAccessRolesClient.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/TrustedAccessRolesClient.java new file mode 100644 index 0000000000000..1591dc722359d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/TrustedAccessRolesClient.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AccessProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AccessProfile.java new file mode 100644 index 0000000000000..fe4a8038a8576 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AccessProfile.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Profile for enabling a user to access a managed cluster. + */ +@Fluent +public final class AccessProfile { + /* + * Base64-encoded Kubernetes configuration file. + */ + @JsonProperty(value = "kubeConfig") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolAvailableVersionsInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolAvailableVersionsInner.java new file mode 100644 index 0000000000000..9a68e9d404f8b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolAvailableVersionsInner.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The list of available versions for an agent pool. + */ +@Fluent +public final class AgentPoolAvailableVersionsInner { + /* + * The ID of the agent pool version list. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * The name of the agent pool version list. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Type of the agent pool version list. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * Properties of agent pool available versions. + */ + @JsonProperty(value = "properties", required = true) + 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.logExceptionAsError(new IllegalArgumentException( + "Missing required property innerProperties in model AgentPoolAvailableVersionsInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AgentPoolAvailableVersionsInner.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolAvailableVersionsProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolAvailableVersionsProperties.java new file mode 100644 index 0000000000000..80040c5e88db6 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolAvailableVersionsProperties.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The list of available agent pool versions. + */ +@Fluent +public final class AgentPoolAvailableVersionsProperties { + /* + * List of versions available for agent pool. + */ + @JsonProperty(value = "agentPoolVersions") + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolInner.java new file mode 100644 index 0000000000000..c0b806e6f334c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolInner.java @@ -0,0 +1,1458 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SubResource; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolArtifactStreamingProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolGpuProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolNetworkProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolSecurityProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolUpgradeSettings; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolWindowsProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.GpuInstanceProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubeletConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubeletDiskType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.LinuxOSConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSDiskType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Ossku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PowerState; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleDownMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetEvictionPolicy; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetPriority; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.VirtualMachineNodes; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.VirtualMachinesProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WorkloadRuntime; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** + * Agent Pool. + */ +@Fluent +public final class AgentPoolInner extends SubResource { + /* + * Properties of an agent pool. + */ + @JsonProperty(value = "properties") + private ManagedClusterAgentPoolProfileProperties innerProperties; + + /* + * The name of the resource that is unique within a resource group. This name can be used to access the resource. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Resource type + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + 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 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 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. If not specified, the default is Ubuntu if + * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 + * after Windows2019 is deprecated. + * + * @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. If not specified, the default is Ubuntu if + * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 + * after Windows2019 is deprecated. + * + * @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: 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: 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> and <major.minor> are supported. When <major.minor> is + * specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same + * <major.minor> once it has been created 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> and <major.minor> are supported. When <major.minor> is + * specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same + * <major.minor> once it has been created 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 running on the Agent Pool. + * + * If orchestratorVersion was a fully specified version <major.minor.patch>, this field will be exactly equal + * to it. If orchestratorVersion was <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: 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: 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 enableCustomCATrust property: Whether to enable Custom CA Trust feature. + * + * When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a daemonset + * along with host services to sync custom certificate authorities from user-provided list of base64 encoded + * certificates into node trust stores. Defaults to false. + * + * @return the enableCustomCATrust value. + */ + public Boolean enableCustomCATrust() { + return this.innerProperties() == null ? null : this.innerProperties().enableCustomCATrust(); + } + + /** + * Set the enableCustomCATrust property: Whether to enable Custom CA Trust feature. + * + * When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a daemonset + * along with host services to sync custom certificate authorities from user-provided list of base64 encoded + * certificates into node trust stores. Defaults to false. + * + * @param enableCustomCATrust the enableCustomCATrust value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withEnableCustomCATrust(Boolean enableCustomCATrust) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withEnableCustomCATrust(enableCustomCATrust); + 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. + * + * 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. + * + * 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 nodeInitializationTaints property: Taints added on the nodes during creation that will not be reconciled + * by AKS. + * + * These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be modified + * after node pool is created, but nodes will not be recreated with new taints until another operation that + * requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run + * before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with + * `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @return the nodeInitializationTaints value. + */ + public List nodeInitializationTaints() { + return this.innerProperties() == null ? null : this.innerProperties().nodeInitializationTaints(); + } + + /** + * Set the nodeInitializationTaints property: Taints added on the nodes during creation that will not be reconciled + * by AKS. + * + * These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be modified + * after node pool is created, but nodes will not be recreated with new taints until another operation that + * requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run + * before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with + * `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @param nodeInitializationTaints the nodeInitializationTaints value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withNodeInitializationTaints(List nodeInitializationTaints) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withNodeInitializationTaints(nodeInitializationTaints); + 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: Kubelet configurations of agent nodes. + * + * 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: Kubelet configurations of agent nodes. + * + * 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: OS configurations of Linux agent nodes. + * + * 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: OS configurations of Linux agent nodes. + * + * 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. + * + * 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: The fully qualified resource ID of the Capacity Reservation Group + * to provide virtual machines from a reserved group of Virtual Machines. + * + * 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 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 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 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: The GPU settings of an agent pool. + * + * @return the gpuProfile value. + */ + public AgentPoolGpuProfile gpuProfile() { + return this.innerProperties() == null ? null : this.innerProperties().gpuProfile(); + } + + /** + * Set the gpuProfile property: The GPU settings of an agent pool. + * + * @param gpuProfile the gpuProfile value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withGpuProfile(AgentPoolGpuProfile gpuProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withGpuProfile(gpuProfile); + return this; + } + + /** + * Get the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. + * + * @return the artifactStreamingProfile value. + */ + public AgentPoolArtifactStreamingProfile artifactStreamingProfile() { + return this.innerProperties() == null ? null : this.innerProperties().artifactStreamingProfile(); + } + + /** + * Set the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. + * + * @param artifactStreamingProfile the artifactStreamingProfile value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withArtifactStreamingProfile(AgentPoolArtifactStreamingProfile artifactStreamingProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withArtifactStreamingProfile(artifactStreamingProfile); + 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolUpgradeProfileInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolUpgradeProfileInner.java new file mode 100644 index 0000000000000..69988678063be --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolUpgradeProfileInner.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolUpgradeProfilePropertiesUpgradesItem; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The list of available upgrades for an agent pool. + */ +@Fluent +public final class AgentPoolUpgradeProfileInner { + /* + * The ID of the agent pool upgrade profile. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * The name of the agent pool upgrade profile. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * The type of the agent pool upgrade profile. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * The properties of the agent pool upgrade profile. + */ + @JsonProperty(value = "properties", required = true) + 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.logExceptionAsError(new IllegalArgumentException( + "Missing required property innerProperties in model AgentPoolUpgradeProfileInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AgentPoolUpgradeProfileInner.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolUpgradeProfileProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolUpgradeProfileProperties.java new file mode 100644 index 0000000000000..000b9ba544cbd --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/AgentPoolUpgradeProfileProperties.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolUpgradeProfilePropertiesUpgradesItem; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The list of available upgrade versions. + */ +@Fluent +public final class AgentPoolUpgradeProfileProperties { + /* + * The Kubernetes version (major.minor.patch). + */ + @JsonProperty(value = "kubernetesVersion", required = true) + private String kubernetesVersion; + + /* + * OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + */ + @JsonProperty(value = "osType", required = true) + private OSType osType; + + /* + * List of orchestrator types and versions available for upgrade. + */ + @JsonProperty(value = "upgrades") + private List upgrades; + + /* + * The latest AKS supported node image version. + */ + @JsonProperty(value = "latestNodeImageVersion") + 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.logExceptionAsError(new IllegalArgumentException( + "Missing required property kubernetesVersion in model AgentPoolUpgradeProfileProperties")); + } + if (osType() == null) { + throw LOGGER.logExceptionAsError(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); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/CommandResultProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/CommandResultProperties.java new file mode 100644 index 0000000000000..83061a9799485 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/CommandResultProperties.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * The results of a run command. + */ +@Immutable +public final class CommandResultProperties { + /* + * provisioning State + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The exit code of the command + */ + @JsonProperty(value = "exitCode", access = JsonProperty.Access.WRITE_ONLY) + private Integer exitCode; + + /* + * The time when the command started. + */ + @JsonProperty(value = "startedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime startedAt; + + /* + * The time when the command finished. + */ + @JsonProperty(value = "finishedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime finishedAt; + + /* + * The command output. + */ + @JsonProperty(value = "logs", access = JsonProperty.Access.WRITE_ONLY) + private String logs; + + /* + * An explanation of why provisioningState is set to failed (if so). + */ + @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY) + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/CredentialResultsInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/CredentialResultsInner.java new file mode 100644 index 0000000000000..b71cac07562e8 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/CredentialResultsInner.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CredentialResult; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The list credential result response. + */ +@Immutable +public final class CredentialResultsInner { + /* + * Base64-encoded Kubernetes configuration file. + */ + @JsonProperty(value = "kubeconfigs", access = JsonProperty.Access.WRITE_ONLY) + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/GuardrailsAvailableVersionInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/GuardrailsAvailableVersionInner.java new file mode 100644 index 0000000000000..cfde3d18e9b58 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/GuardrailsAvailableVersionInner.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.GuardrailsAvailableVersionsProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Available Guardrails Version. + */ +@Fluent +public final class GuardrailsAvailableVersionInner extends ProxyResource { + /* + * Whether the version is default or not and support info. + */ + @JsonProperty(value = "properties", required = true) + private GuardrailsAvailableVersionsProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of GuardrailsAvailableVersionInner class. + */ + public GuardrailsAvailableVersionInner() { + } + + /** + * Get the properties property: Whether the version is default or not and support info. + * + * @return the properties value. + */ + public GuardrailsAvailableVersionsProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Whether the version is default or not and support info. + * + * @param properties the properties value to set. + * @return the GuardrailsAvailableVersionInner object itself. + */ + public GuardrailsAvailableVersionInner withProperties(GuardrailsAvailableVersionsProperties 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property properties in model GuardrailsAvailableVersionInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GuardrailsAvailableVersionInner.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/KubernetesVersionListResultInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/KubernetesVersionListResultInner.java new file mode 100644 index 0000000000000..0a55116d962c8 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/KubernetesVersionListResultInner.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesVersion; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Hold values properties, which is array of KubernetesVersion. + */ +@Fluent +public final class KubernetesVersionListResultInner { + /* + * Array of AKS supported Kubernetes versions. + */ + @JsonProperty(value = "values") + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MachineInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MachineInner.java new file mode 100644 index 0000000000000..e877d23b477db --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MachineInner.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SubResource; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MachineProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * 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 properties of the machine + */ + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private MachineProperties properties; + + /* + * The name of the resource that is unique within a resource group. This name can be used to access the resource. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Resource type + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * 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; + } + + /** + * 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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MaintenanceConfigurationInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MaintenanceConfigurationInner.java new file mode 100644 index 0000000000000..657442f90413c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MaintenanceConfigurationInner.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SubResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MaintenanceWindow; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TimeInWeek; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TimeSpan; +import com.fasterxml.jackson.annotation.JsonProperty; +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. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * Properties of a default maintenance configuration. + */ + @JsonProperty(value = "properties") + private MaintenanceConfigurationProperties innerProperties; + + /* + * The name of the resource that is unique within a resource group. This name can be used to access the resource. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Resource type + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + 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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MaintenanceConfigurationProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MaintenanceConfigurationProperties.java new file mode 100644 index 0000000000000..a6b5b35c154fa --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MaintenanceConfigurationProperties.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MaintenanceWindow; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TimeInWeek; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TimeSpan; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Properties used to configure planned maintenance for a Managed Cluster. + */ +@Fluent +public final class MaintenanceConfigurationProperties { + /* + * 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. + */ + @JsonProperty(value = "timeInWeek") + private List timeInWeek; + + /* + * Time slots on which upgrade is not allowed. + */ + @JsonProperty(value = "notAllowedTime") + private List notAllowedTime; + + /* + * Maintenance window for the maintenance configuration. + */ + @JsonProperty(value = "maintenanceWindow") + 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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterAccessProfileInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterAccessProfileInner.java new file mode 100644 index 0000000000000..56d1664b2aac1 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterAccessProfileInner.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.fasterxml.jackson.annotation.JsonProperty; +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. + */ + @JsonProperty(value = "properties") + private AccessProfile innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of 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; + } + + /** + * {@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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterAgentPoolProfileProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterAgentPoolProfileProperties.java new file mode 100644 index 0000000000000..5b53568937851 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterAgentPoolProfileProperties.java @@ -0,0 +1,1703 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolArtifactStreamingProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolGpuProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolNetworkProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolSecurityProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolUpgradeSettings; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolWindowsProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.GpuInstanceProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubeletConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubeletDiskType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.LinuxOSConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSDiskType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Ossku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PowerState; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleDownMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetEvictionPolicy; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetPriority; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.VirtualMachineNodes; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.VirtualMachinesProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WorkloadRuntime; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** + * Properties for the container service agent pool profile. + */ +@Fluent +public class ManagedClusterAgentPoolProfileProperties { + /* + * 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. + */ + @JsonProperty(value = "count") + 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 + */ + @JsonProperty(value = "vmSize") + 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. + */ + @JsonProperty(value = "osDiskSizeGB") + 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). + */ + @JsonProperty(value = "osDiskType") + private OSDiskType osDiskType; + + /* + * Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. + */ + @JsonProperty(value = "kubeletDiskType") + private KubeletDiskType kubeletDiskType; + + /* + * Determines the type of workload a node can run. + */ + @JsonProperty(value = "workloadRuntime") + 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). + */ + @JsonProperty(value = "messageOfTheDay") + 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} + */ + @JsonProperty(value = "vnetSubnetID") + 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} + */ + @JsonProperty(value = "podSubnetID") + private String podSubnetId; + + /* + * The maximum number of pods that can run on a node. + */ + @JsonProperty(value = "maxPods") + private Integer maxPods; + + /* + * OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + */ + @JsonProperty(value = "osType") + private OSType osType; + + /* + * Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or + * Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is + * deprecated. + */ + @JsonProperty(value = "osSKU") + private Ossku osSku; + + /* + * The maximum number of nodes for auto-scaling + */ + @JsonProperty(value = "maxCount") + private Integer maxCount; + + /* + * The minimum number of nodes for auto-scaling + */ + @JsonProperty(value = "minCount") + private Integer minCount; + + /* + * Whether to enable auto-scaler + */ + @JsonProperty(value = "enableAutoScaling") + private Boolean enableAutoScaling; + + /* + * This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. + */ + @JsonProperty(value = "scaleDownMode") + private ScaleDownMode scaleDownMode; + + /* + * The type of Agent Pool. + */ + @JsonProperty(value = "type") + 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 + */ + @JsonProperty(value = "mode") + private AgentPoolMode mode; + + /* + * The version of Kubernetes specified by the user. + * + * Both patch version and are supported. When is specified, the + * latest supported patch version is chosen automatically. Updating the agent pool with the same once + * it has been created 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). + */ + @JsonProperty(value = "orchestratorVersion") + private String orchestratorVersion; + + /* + * The version of Kubernetes running on the Agent Pool. + * + * If orchestratorVersion was a fully specified version , this field will be exactly equal to + * it. If orchestratorVersion was , this field will contain the full version being + * used. + */ + @JsonProperty(value = "currentOrchestratorVersion", access = JsonProperty.Access.WRITE_ONLY) + private String currentOrchestratorVersion; + + /* + * The version of node image + */ + @JsonProperty(value = "nodeImageVersion", access = JsonProperty.Access.WRITE_ONLY) + private String nodeImageVersion; + + /* + * Settings for upgrading the agentpool + */ + @JsonProperty(value = "upgradeSettings") + private AgentPoolUpgradeSettings upgradeSettings; + + /* + * The current deployment or provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * 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 + */ + @JsonProperty(value = "powerState") + private PowerState powerState; + + /* + * The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is + * 'VirtualMachineScaleSets'. + */ + @JsonProperty(value = "availabilityZones") + 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. + */ + @JsonProperty(value = "enableNodePublicIP") + private Boolean enableNodePublicIp; + + /* + * Whether to enable Custom CA Trust feature. + * + * When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a daemonset + * along with host services to sync custom certificate authorities from user-provided list of base64 encoded + * certificates into node trust stores. Defaults to false. + */ + @JsonProperty(value = "enableCustomCATrust") + private Boolean enableCustomCATrust; + + /* + * 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} + */ + @JsonProperty(value = "nodePublicIPPrefixID") + private String nodePublicIpPrefixId; + + /* + * The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. + */ + @JsonProperty(value = "scaleSetPriority") + private ScaleSetPriority scaleSetPriority; + + /* + * The Virtual Machine Scale Set eviction policy. + * + * This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + */ + @JsonProperty(value = "scaleSetEvictionPolicy") + 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) + */ + @JsonProperty(value = "spotMaxPrice") + private Float spotMaxPrice; + + /* + * The tags to be persisted on the agent pool virtual machine scale set. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * The node labels to be persisted across all nodes in agent pool. + */ + @JsonProperty(value = "nodeLabels") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map nodeLabels; + + /* + * The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. + */ + @JsonProperty(value = "nodeTaints") + private List nodeTaints; + + /* + * Taints added on the nodes during creation that will not be reconciled by AKS. + * + * These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be modified + * after node pool is created, but nodes will not be recreated with new taints until another operation that + * requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run + * before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with + * `kubectl taint nodes node1 key1=value1:NoSchedule-` + */ + @JsonProperty(value = "nodeInitializationTaints") + private List nodeInitializationTaints; + + /* + * The ID for Proximity Placement Group. + */ + @JsonProperty(value = "proximityPlacementGroupID") + private String proximityPlacementGroupId; + + /* + * Kubelet configurations of agent nodes. + * + * The Kubelet configuration on the agent pool nodes. + */ + @JsonProperty(value = "kubeletConfig") + private KubeletConfig kubeletConfig; + + /* + * OS configurations of Linux agent nodes. + * + * The OS configuration of Linux agent nodes. + */ + @JsonProperty(value = "linuxOSConfig") + 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 + */ + @JsonProperty(value = "enableEncryptionAtHost") + private Boolean enableEncryptionAtHost; + + /* + * Whether to enable UltraSSD + */ + @JsonProperty(value = "enableUltraSSD") + 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. + */ + @JsonProperty(value = "enableFIPS") + private Boolean enableFips; + + /* + * GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. + */ + @JsonProperty(value = "gpuInstanceProfile") + private GpuInstanceProfile gpuInstanceProfile; + + /* + * CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a + * snapshot. + */ + @JsonProperty(value = "creationData") + private CreationData creationData; + + /* + * The fully qualified resource ID of the Capacity Reservation Group to provide virtual machines from a reserved + * group of Virtual Machines. + * + * AKS will associate the specified agent pool with the Capacity Reservation Group. + */ + @JsonProperty(value = "capacityReservationGroupID") + 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). + */ + @JsonProperty(value = "hostGroupID") + private String hostGroupId; + + /* + * The Windows agent pool's specific profile. + */ + @JsonProperty(value = "windowsProfile") + private AgentPoolWindowsProfile windowsProfile; + + /* + * Network-related settings of an agent pool. + */ + @JsonProperty(value = "networkProfile") + private AgentPoolNetworkProfile networkProfile; + + /* + * The security settings of an agent pool. + */ + @JsonProperty(value = "securityProfile") + private AgentPoolSecurityProfile securityProfile; + + /* + * The GPU settings of an agent pool. + */ + @JsonProperty(value = "gpuProfile") + private AgentPoolGpuProfile gpuProfile; + + /* + * Configuration for using artifact streaming on AKS. + */ + @JsonProperty(value = "artifactStreamingProfile") + private AgentPoolArtifactStreamingProfile artifactStreamingProfile; + + /* + * Specifications on VirtualMachines agent pool. + */ + @JsonProperty(value = "virtualMachinesProfile") + private VirtualMachinesProfile virtualMachinesProfile; + + /* + * The status of nodes in a VirtualMachines agent pool. + */ + @JsonProperty(value = "virtualMachineNodesStatus") + private List virtualMachineNodesStatus; + + /** + * Creates an instance of ManagedClusterAgentPoolProfileProperties class. + */ + public ManagedClusterAgentPoolProfileProperties() { + } + + /** + * 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 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. If not specified, the default is Ubuntu if + * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 + * after Windows2019 is deprecated. + * + * @return the osSku value. + */ + public Ossku osSku() { + return this.osSku; + } + + /** + * Set the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if + * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 + * after Windows2019 is deprecated. + * + * @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: 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: 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> and <major.minor> are supported. When <major.minor> is + * specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same + * <major.minor> once it has been created 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> and <major.minor> are supported. When <major.minor> is + * specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same + * <major.minor> once it has been created 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 running on the Agent Pool. + * + * If orchestratorVersion was a fully specified version <major.minor.patch>, this field will be exactly equal + * to it. If orchestratorVersion was <major.minor>, this field will contain the full + * <major.minor.patch> version being used. + * + * @return the currentOrchestratorVersion value. + */ + public String currentOrchestratorVersion() { + return this.currentOrchestratorVersion; + } + + /** + * Get the nodeImageVersion property: The version of node image. + * + * @return the nodeImageVersion value. + */ + public String nodeImageVersion() { + return this.nodeImageVersion; + } + + /** + * 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; + } + + /** + * Get the powerState property: 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: 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 enableCustomCATrust property: Whether to enable Custom CA Trust feature. + * + * When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a daemonset + * along with host services to sync custom certificate authorities from user-provided list of base64 encoded + * certificates into node trust stores. Defaults to false. + * + * @return the enableCustomCATrust value. + */ + public Boolean enableCustomCATrust() { + return this.enableCustomCATrust; + } + + /** + * Set the enableCustomCATrust property: Whether to enable Custom CA Trust feature. + * + * When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a daemonset + * along with host services to sync custom certificate authorities from user-provided list of base64 encoded + * certificates into node trust stores. Defaults to false. + * + * @param enableCustomCATrust the enableCustomCATrust value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withEnableCustomCATrust(Boolean enableCustomCATrust) { + this.enableCustomCATrust = enableCustomCATrust; + 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. + * + * 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. + * + * 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 nodeInitializationTaints property: Taints added on the nodes during creation that will not be reconciled + * by AKS. + * + * These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be modified + * after node pool is created, but nodes will not be recreated with new taints until another operation that + * requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run + * before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with + * `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @return the nodeInitializationTaints value. + */ + public List nodeInitializationTaints() { + return this.nodeInitializationTaints; + } + + /** + * Set the nodeInitializationTaints property: Taints added on the nodes during creation that will not be reconciled + * by AKS. + * + * These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be modified + * after node pool is created, but nodes will not be recreated with new taints until another operation that + * requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run + * before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with + * `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @param nodeInitializationTaints the nodeInitializationTaints value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties + withNodeInitializationTaints(List nodeInitializationTaints) { + this.nodeInitializationTaints = nodeInitializationTaints; + 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: Kubelet configurations of agent nodes. + * + * The Kubelet configuration on the agent pool nodes. + * + * @return the kubeletConfig value. + */ + public KubeletConfig kubeletConfig() { + return this.kubeletConfig; + } + + /** + * Set the kubeletConfig property: Kubelet configurations of agent nodes. + * + * 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: OS configurations of Linux agent nodes. + * + * The OS configuration of Linux agent nodes. + * + * @return the linuxOSConfig value. + */ + public LinuxOSConfig linuxOSConfig() { + return this.linuxOSConfig; + } + + /** + * Set the linuxOSConfig property: OS configurations of Linux agent nodes. + * + * 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. + * + * 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: The fully qualified resource ID of the Capacity Reservation Group + * to provide virtual machines from a reserved group of Virtual Machines. + * + * 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 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 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 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: The GPU settings of an agent pool. + * + * @return the gpuProfile value. + */ + public AgentPoolGpuProfile gpuProfile() { + return this.gpuProfile; + } + + /** + * Set the gpuProfile property: The GPU settings of an agent pool. + * + * @param gpuProfile the gpuProfile value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withGpuProfile(AgentPoolGpuProfile gpuProfile) { + this.gpuProfile = gpuProfile; + return this; + } + + /** + * Get the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. + * + * @return the artifactStreamingProfile value. + */ + public AgentPoolArtifactStreamingProfile artifactStreamingProfile() { + return this.artifactStreamingProfile; + } + + /** + * Set the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. + * + * @param artifactStreamingProfile the artifactStreamingProfile value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties + withArtifactStreamingProfile(AgentPoolArtifactStreamingProfile artifactStreamingProfile) { + this.artifactStreamingProfile = artifactStreamingProfile; + 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; + } + + /** + * 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 (windowsProfile() != null) { + windowsProfile().validate(); + } + if (networkProfile() != null) { + networkProfile().validate(); + } + if (securityProfile() != null) { + securityProfile().validate(); + } + if (gpuProfile() != null) { + gpuProfile().validate(); + } + if (artifactStreamingProfile() != null) { + artifactStreamingProfile().validate(); + } + if (virtualMachinesProfile() != null) { + virtualMachinesProfile().validate(); + } + if (virtualMachineNodesStatus() != null) { + virtualMachineNodesStatus().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterInner.java new file mode 100644 index 0000000000000..c96757e3523a0 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterInner.java @@ -0,0 +1,1251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ClusterUpgradeSettings; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceLinuxProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceNetworkProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ExtendedLocation; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesSupportPlan; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAIToolchainOperatorProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAddonProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterApiServerAccessProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAutoUpgradeProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAzureMonitorProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterHttpProxyConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterIdentity; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterIngressProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterMetricsProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterNodeProvisioningProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterNodeResourceGroupProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterOidcIssuerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentityProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPropertiesAutoScalerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterStorageProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWindowsProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWorkloadAutoScalerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PowerState; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PublicNetworkAccess; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SafeguardsProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ServiceMeshProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.UserAssignedIdentity; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** + * Managed cluster. + */ +@Fluent +public final class ManagedClusterInner extends Resource { + /* + * The managed cluster SKU. + */ + @JsonProperty(value = "sku") + private ManagedClusterSku sku; + + /* + * The extended location of the Virtual Machine. + */ + @JsonProperty(value = "extendedLocation") + private ExtendedLocation extendedLocation; + + /* + * The identity of the managed cluster, if configured. + */ + @JsonProperty(value = "identity") + private ManagedClusterIdentity identity; + + /* + * Properties of a managed cluster. + */ + @JsonProperty(value = "properties") + private ManagedClusterProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ManagedClusterInner class. + */ + public ManagedClusterInner() { + } + + /** + * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * {@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 creationData property: CreationData to be used to specify the source Snapshot ID if the cluster 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 cluster will be + * created/upgraded using a snapshot. + * + * @param creationData the creationData value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withCreationData(CreationData creationData) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withCreationData(creationData); + return this; + } + + /** + * 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 the Managed Cluster is requested to run. + * + * 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 the Managed Cluster is requested to run. + * + * 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. + * + * @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: The node resource group configuration profile. + * + * @return the nodeResourceGroupProfile value. + */ + public ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile() { + return this.innerProperties() == null ? null : this.innerProperties().nodeResourceGroupProfile(); + } + + /** + * Set the nodeResourceGroupProfile property: The node resource group configuration profile. + * + * @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 enablePodSecurityPolicy property: (DEPRECATED) Whether to enable Kubernetes pod security policy + * (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn + * more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. + * + * @return the enablePodSecurityPolicy value. + */ + public Boolean enablePodSecurityPolicy() { + return this.innerProperties() == null ? null : this.innerProperties().enablePodSecurityPolicy(); + } + + /** + * Set the enablePodSecurityPolicy property: (DEPRECATED) Whether to enable Kubernetes pod security policy + * (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn + * more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. + * + * @param enablePodSecurityPolicy the enablePodSecurityPolicy value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withEnablePodSecurityPolicy(Boolean enablePodSecurityPolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withEnablePodSecurityPolicy(enablePodSecurityPolicy); + return this; + } + + /** + * Get the enableNamespaceResources property: Enable namespace as Azure resource. + * + * The default value is false. It can be enabled/disabled on creation and updating of the managed cluster. See + * [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a + * ARM Resource. + * + * @return the enableNamespaceResources value. + */ + public Boolean enableNamespaceResources() { + return this.innerProperties() == null ? null : this.innerProperties().enableNamespaceResources(); + } + + /** + * Set the enableNamespaceResources property: Enable namespace as Azure resource. + * + * The default value is false. It can be enabled/disabled on creation and updating of the managed cluster. See + * [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a + * ARM Resource. + * + * @param enableNamespaceResources the enableNamespaceResources value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withEnableNamespaceResources(Boolean enableNamespaceResources) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withEnableNamespaceResources(enableNamespaceResources); + 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: AADProfile specifies attributes for Azure Active Directory integration. + * + * The Azure Active Directory configuration. + * + * @return the aadProfile value. + */ + public ManagedClusterAadProfile aadProfile() { + return this.innerProperties() == null ? null : this.innerProperties().aadProfile(); + } + + /** + * Set the aadProfile property: AADProfile specifies attributes for Azure Active Directory integration. + * + * 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: Identities associated with the cluster. + * + * @return the identityProfile value. + */ + public Map identityProfile() { + return this.innerProperties() == null ? null : this.innerProperties().identityProfile(); + } + + /** + * Set the identityProfile property: Identities associated with the cluster. + * + * @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: Prometheus addon profile for the container service cluster. + * + * @return the azureMonitorProfile value. + */ + public ManagedClusterAzureMonitorProfile azureMonitorProfile() { + return this.innerProperties() == null ? null : this.innerProperties().azureMonitorProfile(); + } + + /** + * Set the azureMonitorProfile property: Prometheus addon profile for the container service 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 safeguardsProfile property: The Safeguards profile holds all the safeguards information for a given + * cluster. + * + * @return the safeguardsProfile value. + */ + public SafeguardsProfile safeguardsProfile() { + return this.innerProperties() == null ? null : this.innerProperties().safeguardsProfile(); + } + + /** + * Set the safeguardsProfile property: The Safeguards profile holds all the safeguards information for a given + * cluster. + * + * @param safeguardsProfile the safeguardsProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withSafeguardsProfile(SafeguardsProfile safeguardsProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withSafeguardsProfile(safeguardsProfile); + 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 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 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; + } + + /** + * 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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterProperties.java new file mode 100644 index 0000000000000..335c2a47e1977 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterProperties.java @@ -0,0 +1,1409 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ClusterUpgradeSettings; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceLinuxProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceNetworkProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesSupportPlan; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAIToolchainOperatorProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAddonProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterApiServerAccessProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAutoUpgradeProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAzureMonitorProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterHttpProxyConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterIngressProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterMetricsProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterNodeProvisioningProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterNodeResourceGroupProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterOidcIssuerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentityProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPropertiesAutoScalerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterStorageProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWindowsProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWorkloadAutoScalerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PowerState; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PublicNetworkAccess; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SafeguardsProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ServiceMeshProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.UserAssignedIdentity; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** + * Properties of the managed cluster. + */ +@Fluent +public final class ManagedClusterProperties { + /* + * The current provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The Power State of the cluster. + */ + @JsonProperty(value = "powerState", access = JsonProperty.Access.WRITE_ONLY) + private PowerState powerState; + + /* + * CreationData to be used to specify the source Snapshot ID if the cluster will be created/upgraded using a + * snapshot. + */ + @JsonProperty(value = "creationData") + private CreationData creationData; + + /* + * The max number of agent pools for the managed cluster. + */ + @JsonProperty(value = "maxAgentPools", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxAgentPools; + + /* + * The version of Kubernetes the Managed Cluster is requested to run. + * + * 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. + */ + @JsonProperty(value = "kubernetesVersion") + private String kubernetesVersion; + + /* + * The version of Kubernetes the Managed Cluster is running. + */ + @JsonProperty(value = "currentKubernetesVersion", access = JsonProperty.Access.WRITE_ONLY) + private String currentKubernetesVersion; + + /* + * The DNS prefix of the Managed Cluster. + * + * This cannot be updated once the Managed Cluster has been created. + */ + @JsonProperty(value = "dnsPrefix") + 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. + */ + @JsonProperty(value = "fqdnSubdomain") + private String fqdnSubdomain; + + /* + * The FQDN of the master pool. + */ + @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) + private String fqdn; + + /* + * The FQDN of private cluster. + */ + @JsonProperty(value = "privateFQDN", access = JsonProperty.Access.WRITE_ONLY) + 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. + */ + @JsonProperty(value = "azurePortalFQDN", access = JsonProperty.Access.WRITE_ONLY) + private String azurePortalFqdn; + + /* + * The agent pool properties. + */ + @JsonProperty(value = "agentPoolProfiles") + private List agentPoolProfiles; + + /* + * The profile for Linux VMs in the Managed Cluster. + */ + @JsonProperty(value = "linuxProfile") + private ContainerServiceLinuxProfile linuxProfile; + + /* + * The profile for Windows VMs in the Managed Cluster. + */ + @JsonProperty(value = "windowsProfile") + private ManagedClusterWindowsProfile windowsProfile; + + /* + * Information about a service principal identity for the cluster to use for manipulating Azure APIs. + */ + @JsonProperty(value = "servicePrincipalProfile") + private ManagedClusterServicePrincipalProfile servicePrincipalProfile; + + /* + * The profile of managed cluster add-on. + */ + @JsonProperty(value = "addonProfiles") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + 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. + */ + @JsonProperty(value = "podIdentityProfile") + private ManagedClusterPodIdentityProfile podIdentityProfile; + + /* + * The OIDC issuer profile of the Managed Cluster. + */ + @JsonProperty(value = "oidcIssuerProfile") + private ManagedClusterOidcIssuerProfile oidcIssuerProfile; + + /* + * The name of the resource group containing agent pool nodes. + */ + @JsonProperty(value = "nodeResourceGroup") + private String nodeResourceGroup; + + /* + * The node resource group configuration profile. + */ + @JsonProperty(value = "nodeResourceGroupProfile") + private ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile; + + /* + * Whether to enable Kubernetes Role-Based Access Control. + */ + @JsonProperty(value = "enableRBAC") + private Boolean enableRbac; + + /* + * The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'. + */ + @JsonProperty(value = "supportPlan") + private KubernetesSupportPlan supportPlan; + + /* + * (DEPRECATED) Whether to enable Kubernetes pod security policy (preview). PodSecurityPolicy was deprecated in + * Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and + * https://aka.ms/aks/psp. + */ + @JsonProperty(value = "enablePodSecurityPolicy") + private Boolean enablePodSecurityPolicy; + + /* + * Enable namespace as Azure resource. + * + * The default value is false. It can be enabled/disabled on creation and updating of the managed cluster. See + * [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a + * ARM Resource. + */ + @JsonProperty(value = "enableNamespaceResources") + private Boolean enableNamespaceResources; + + /* + * The network configuration profile. + */ + @JsonProperty(value = "networkProfile") + private ContainerServiceNetworkProfile networkProfile; + + /* + * AADProfile specifies attributes for Azure Active Directory integration. + * + * The Azure Active Directory configuration. + */ + @JsonProperty(value = "aadProfile") + private ManagedClusterAadProfile aadProfile; + + /* + * The auto upgrade configuration. + */ + @JsonProperty(value = "autoUpgradeProfile") + private ManagedClusterAutoUpgradeProfile autoUpgradeProfile; + + /* + * Settings for upgrading a cluster. + */ + @JsonProperty(value = "upgradeSettings") + private ClusterUpgradeSettings upgradeSettings; + + /* + * Parameters to be applied to the cluster-autoscaler when enabled + */ + @JsonProperty(value = "autoScalerProfile") + private ManagedClusterPropertiesAutoScalerProfile autoScalerProfile; + + /* + * The access profile for managed cluster API server. + */ + @JsonProperty(value = "apiServerAccessProfile") + 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}' + */ + @JsonProperty(value = "diskEncryptionSetID") + private String diskEncryptionSetId; + + /* + * Identities associated with the cluster. + */ + @JsonProperty(value = "identityProfile") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map identityProfile; + + /* + * Private link resources associated with the cluster. + */ + @JsonProperty(value = "privateLinkResources") + 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). + */ + @JsonProperty(value = "disableLocalAccounts") + private Boolean disableLocalAccounts; + + /* + * Configurations for provisioning the cluster with HTTP proxy servers. + */ + @JsonProperty(value = "httpProxyConfig") + private ManagedClusterHttpProxyConfig httpProxyConfig; + + /* + * Security profile for the managed cluster. + */ + @JsonProperty(value = "securityProfile") + private ManagedClusterSecurityProfile securityProfile; + + /* + * Storage profile for the managed cluster. + */ + @JsonProperty(value = "storageProfile") + private ManagedClusterStorageProfile storageProfile; + + /* + * Ingress profile for the managed cluster. + */ + @JsonProperty(value = "ingressProfile") + private ManagedClusterIngressProfile ingressProfile; + + /* + * PublicNetworkAccess of the managedCluster + * + * Allow or deny public network access for AKS + */ + @JsonProperty(value = "publicNetworkAccess") + private PublicNetworkAccess publicNetworkAccess; + + /* + * Workload Auto-scaler profile for the managed cluster. + */ + @JsonProperty(value = "workloadAutoScalerProfile") + private ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile; + + /* + * Prometheus addon profile for the container service cluster + */ + @JsonProperty(value = "azureMonitorProfile") + private ManagedClusterAzureMonitorProfile azureMonitorProfile; + + /* + * The Safeguards profile holds all the safeguards information for a given cluster + */ + @JsonProperty(value = "safeguardsProfile") + private SafeguardsProfile safeguardsProfile; + + /* + * Service mesh profile for a managed cluster. + */ + @JsonProperty(value = "serviceMeshProfile") + private ServiceMeshProfile serviceMeshProfile; + + /* + * The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds (i.e: create, delete, create + * sequence) + */ + @JsonProperty(value = "resourceUID", access = JsonProperty.Access.WRITE_ONLY) + private String resourceUid; + + /* + * Optional cluster metrics configuration. + */ + @JsonProperty(value = "metricsProfile") + private ManagedClusterMetricsProfile metricsProfile; + + /* + * AI toolchain operator settings that apply to the whole cluster. + */ + @JsonProperty(value = "aiToolchainOperatorProfile") + private ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile; + + /* + * Node provisioning settings that apply to the whole cluster. + */ + @JsonProperty(value = "nodeProvisioningProfile") + private ManagedClusterNodeProvisioningProfile nodeProvisioningProfile; + + /** + * 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 creationData property: CreationData to be used to specify the source Snapshot ID if the cluster 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 cluster will be + * created/upgraded using a snapshot. + * + * @param creationData the creationData value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withCreationData(CreationData creationData) { + this.creationData = creationData; + return this; + } + + /** + * 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 the Managed Cluster is requested to run. + * + * 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 the Managed Cluster is requested to run. + * + * 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. + * + * @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: The node resource group configuration profile. + * + * @return the nodeResourceGroupProfile value. + */ + public ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile() { + return this.nodeResourceGroupProfile; + } + + /** + * Set the nodeResourceGroupProfile property: The node resource group configuration profile. + * + * @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 enablePodSecurityPolicy property: (DEPRECATED) Whether to enable Kubernetes pod security policy + * (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn + * more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. + * + * @return the enablePodSecurityPolicy value. + */ + public Boolean enablePodSecurityPolicy() { + return this.enablePodSecurityPolicy; + } + + /** + * Set the enablePodSecurityPolicy property: (DEPRECATED) Whether to enable Kubernetes pod security policy + * (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn + * more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. + * + * @param enablePodSecurityPolicy the enablePodSecurityPolicy value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withEnablePodSecurityPolicy(Boolean enablePodSecurityPolicy) { + this.enablePodSecurityPolicy = enablePodSecurityPolicy; + return this; + } + + /** + * Get the enableNamespaceResources property: Enable namespace as Azure resource. + * + * The default value is false. It can be enabled/disabled on creation and updating of the managed cluster. See + * [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a + * ARM Resource. + * + * @return the enableNamespaceResources value. + */ + public Boolean enableNamespaceResources() { + return this.enableNamespaceResources; + } + + /** + * Set the enableNamespaceResources property: Enable namespace as Azure resource. + * + * The default value is false. It can be enabled/disabled on creation and updating of the managed cluster. See + * [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a + * ARM Resource. + * + * @param enableNamespaceResources the enableNamespaceResources value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withEnableNamespaceResources(Boolean enableNamespaceResources) { + this.enableNamespaceResources = enableNamespaceResources; + 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: AADProfile specifies attributes for Azure Active Directory integration. + * + * The Azure Active Directory configuration. + * + * @return the aadProfile value. + */ + public ManagedClusterAadProfile aadProfile() { + return this.aadProfile; + } + + /** + * Set the aadProfile property: AADProfile specifies attributes for Azure Active Directory integration. + * + * 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: Identities associated with the cluster. + * + * @return the identityProfile value. + */ + public Map identityProfile() { + return this.identityProfile; + } + + /** + * Set the identityProfile property: Identities associated with the cluster. + * + * @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: Prometheus addon profile for the container service cluster. + * + * @return the azureMonitorProfile value. + */ + public ManagedClusterAzureMonitorProfile azureMonitorProfile() { + return this.azureMonitorProfile; + } + + /** + * Set the azureMonitorProfile property: Prometheus addon profile for the container service 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 safeguardsProfile property: The Safeguards profile holds all the safeguards information for a given + * cluster. + * + * @return the safeguardsProfile value. + */ + public SafeguardsProfile safeguardsProfile() { + return this.safeguardsProfile; + } + + /** + * Set the safeguardsProfile property: The Safeguards profile holds all the safeguards information for a given + * cluster. + * + * @param safeguardsProfile the safeguardsProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withSafeguardsProfile(SafeguardsProfile safeguardsProfile) { + this.safeguardsProfile = safeguardsProfile; + 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 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 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (powerState() != null) { + powerState().validate(); + } + if (creationData() != null) { + creationData().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 (safeguardsProfile() != null) { + safeguardsProfile().validate(); + } + if (serviceMeshProfile() != null) { + serviceMeshProfile().validate(); + } + if (metricsProfile() != null) { + metricsProfile().validate(); + } + if (aiToolchainOperatorProfile() != null) { + aiToolchainOperatorProfile().validate(); + } + if (nodeProvisioningProfile() != null) { + nodeProvisioningProfile().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterSnapshotInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterSnapshotInner.java new file mode 100644 index 0000000000000..d0533e18a06a0 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterSnapshotInner.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPropertiesForSnapshot; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SnapshotType; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * A managed cluster snapshot resource. + */ +@Fluent +public final class ManagedClusterSnapshotInner extends Resource { + /* + * Properties of a managed cluster snapshot. + */ + @JsonProperty(value = "properties") + private ManagedClusterSnapshotProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ManagedClusterSnapshotInner class. + */ + public ManagedClusterSnapshotInner() { + } + + /** + * Get the innerProperties property: Properties of a managed cluster snapshot. + * + * @return the innerProperties value. + */ + private ManagedClusterSnapshotProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterSnapshotInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterSnapshotInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the creationData property: CreationData to be used to specify the source 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 resource ID to create this + * snapshot. + * + * @param creationData the creationData value to set. + * @return the ManagedClusterSnapshotInner object itself. + */ + public ManagedClusterSnapshotInner withCreationData(CreationData creationData) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterSnapshotProperties(); + } + 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 ManagedClusterSnapshotInner object itself. + */ + public ManagedClusterSnapshotInner withSnapshotType(SnapshotType snapshotType) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterSnapshotProperties(); + } + this.innerProperties().withSnapshotType(snapshotType); + return this; + } + + /** + * Get the managedClusterPropertiesReadOnly property: What the properties will be showed when getting managed + * cluster snapshot. Those properties are read-only. + * + * @return the managedClusterPropertiesReadOnly value. + */ + public ManagedClusterPropertiesForSnapshot managedClusterPropertiesReadOnly() { + return this.innerProperties() == null ? null : this.innerProperties().managedClusterPropertiesReadOnly(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterSnapshotProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterSnapshotProperties.java new file mode 100644 index 0000000000000..2e4b65770ca92 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterSnapshotProperties.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPropertiesForSnapshot; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SnapshotType; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties for a managed cluster snapshot. + */ +@Fluent +public final class ManagedClusterSnapshotProperties { + /* + * CreationData to be used to specify the source resource ID to create this snapshot. + */ + @JsonProperty(value = "creationData") + private CreationData creationData; + + /* + * The type of a snapshot. The default is NodePool. + */ + @JsonProperty(value = "snapshotType") + private SnapshotType snapshotType; + + /* + * What the properties will be showed when getting managed cluster snapshot. Those properties are read-only. + */ + @JsonProperty(value = "managedClusterPropertiesReadOnly", access = JsonProperty.Access.WRITE_ONLY) + private ManagedClusterPropertiesForSnapshot managedClusterPropertiesReadOnly; + + /** + * Creates an instance of ManagedClusterSnapshotProperties class. + */ + public ManagedClusterSnapshotProperties() { + } + + /** + * Get the creationData property: CreationData to be used to specify the source 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 resource ID to create this + * snapshot. + * + * @param creationData the creationData value to set. + * @return the ManagedClusterSnapshotProperties object itself. + */ + public ManagedClusterSnapshotProperties 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 ManagedClusterSnapshotProperties object itself. + */ + public ManagedClusterSnapshotProperties withSnapshotType(SnapshotType snapshotType) { + this.snapshotType = snapshotType; + return this; + } + + /** + * Get the managedClusterPropertiesReadOnly property: What the properties will be showed when getting managed + * cluster snapshot. Those properties are read-only. + * + * @return the managedClusterPropertiesReadOnly value. + */ + public ManagedClusterPropertiesForSnapshot managedClusterPropertiesReadOnly() { + return this.managedClusterPropertiesReadOnly; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (creationData() != null) { + creationData().validate(); + } + if (managedClusterPropertiesReadOnly() != null) { + managedClusterPropertiesReadOnly().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterUpgradeProfileInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterUpgradeProfileInner.java new file mode 100644 index 0000000000000..b6f633d509bce --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterUpgradeProfileInner.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPoolUpgradeProfile; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The list of available upgrades for compute pools. + */ +@Fluent +public final class ManagedClusterUpgradeProfileInner { + /* + * The ID of the upgrade profile. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * The name of the upgrade profile. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * The type of the upgrade profile. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * The properties of the upgrade profile. + */ + @JsonProperty(value = "properties", required = true) + 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.logExceptionAsError(new IllegalArgumentException( + "Missing required property innerProperties in model ManagedClusterUpgradeProfileInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterUpgradeProfileInner.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterUpgradeProfileProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterUpgradeProfileProperties.java new file mode 100644 index 0000000000000..3066878fb2625 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ManagedClusterUpgradeProfileProperties.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPoolUpgradeProfile; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Control plane and agent pool upgrade profiles. + */ +@Fluent +public final class ManagedClusterUpgradeProfileProperties { + /* + * The list of available upgrade versions for the control plane. + */ + @JsonProperty(value = "controlPlaneProfile", required = true) + private ManagedClusterPoolUpgradeProfile controlPlaneProfile; + + /* + * The list of available upgrade versions for agent pools. + */ + @JsonProperty(value = "agentPoolProfiles", required = true) + 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.logExceptionAsError(new IllegalArgumentException( + "Missing required property controlPlaneProfile in model ManagedClusterUpgradeProfileProperties")); + } else { + controlPlaneProfile().validate(); + } + if (agentPoolProfiles() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property agentPoolProfiles in model ManagedClusterUpgradeProfileProperties")); + } else { + agentPoolProfiles().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterUpgradeProfileProperties.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MeshRevisionProfileInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MeshRevisionProfileInner.java new file mode 100644 index 0000000000000..517f4d49b19b5 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MeshRevisionProfileInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshRevisionProfileProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Mesh revision profile for a mesh. + */ +@Fluent +public final class MeshRevisionProfileInner extends ProxyResource { + /* + * Mesh revision profile properties for a mesh + */ + @JsonProperty(value = "properties") + private MeshRevisionProfileProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MeshUpgradeProfileInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MeshUpgradeProfileInner.java new file mode 100644 index 0000000000000..9633458584cba --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/MeshUpgradeProfileInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshUpgradeProfileProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Upgrade profile for given mesh. + */ +@Fluent +public final class MeshUpgradeProfileInner extends ProxyResource { + /* + * Mesh upgrade profile properties for a major.minor release. + */ + @JsonProperty(value = "properties") + private MeshUpgradeProfileProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OSOptionProfileInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OSOptionProfileInner.java new file mode 100644 index 0000000000000..14b6c0848b8c1 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OSOptionProfileInner.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSOptionProperty; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The OS option profile. + */ +@Fluent +public final class OSOptionProfileInner { + /* + * The ID of the OS option resource. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * The name of the OS option resource. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * The type of the OS option resource. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * The list of OS options. + */ + @JsonProperty(value = "properties", required = true) + private OSOptionPropertyList innerProperties = new OSOptionPropertyList(); + + /** + * Creates an instance of OSOptionProfileInner class. + */ + public OSOptionProfileInner() { + } + + /** + * Get the id property: The ID of the OS option resource. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the OS option resource. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the OS option resource. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the innerProperties property: The list of OS options. + * + * @return the innerProperties value. + */ + private OSOptionPropertyList innerProperties() { + return this.innerProperties; + } + + /** + * Get the osOptionPropertyList property: The list of OS options. + * + * @return the osOptionPropertyList value. + */ + public List osOptionPropertyList() { + return this.innerProperties() == null ? null : this.innerProperties().osOptionPropertyList(); + } + + /** + * Set the osOptionPropertyList property: The list of OS options. + * + * @param osOptionPropertyList the osOptionPropertyList value to set. + * @return the OSOptionProfileInner object itself. + */ + public OSOptionProfileInner withOsOptionPropertyList(List osOptionPropertyList) { + if (this.innerProperties() == null) { + this.innerProperties = new OSOptionPropertyList(); + } + this.innerProperties().withOsOptionPropertyList(osOptionPropertyList); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property innerProperties in model OSOptionProfileInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OSOptionProfileInner.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OSOptionPropertyList.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OSOptionPropertyList.java new file mode 100644 index 0000000000000..5b3d5acb5e406 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OSOptionPropertyList.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSOptionProperty; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The list of OS option properties. + */ +@Fluent +public final class OSOptionPropertyList { + /* + * The list of OS options. + */ + @JsonProperty(value = "osOptionPropertyList", required = true) + private List osOptionPropertyList; + + /** + * Creates an instance of OSOptionPropertyList class. + */ + public OSOptionPropertyList() { + } + + /** + * Get the osOptionPropertyList property: The list of OS options. + * + * @return the osOptionPropertyList value. + */ + public List osOptionPropertyList() { + return this.osOptionPropertyList; + } + + /** + * Set the osOptionPropertyList property: The list of OS options. + * + * @param osOptionPropertyList the osOptionPropertyList value to set. + * @return the OSOptionPropertyList object itself. + */ + public OSOptionPropertyList withOsOptionPropertyList(List osOptionPropertyList) { + this.osOptionPropertyList = osOptionPropertyList; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (osOptionPropertyList() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property osOptionPropertyList in model OSOptionPropertyList")); + } else { + osOptionPropertyList().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OSOptionPropertyList.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OpenShiftManagedClusterInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OpenShiftManagedClusterInner.java new file mode 100644 index 0000000000000..a8c3d5b8b8e41 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OpenShiftManagedClusterInner.java @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAuthProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterMasterPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftRouterProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PurchasePlan; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** + * OpenShift Managed cluster. + */ +@Fluent +public final class OpenShiftManagedClusterInner extends Resource { + /* + * Define the resource plan as required by ARM for billing purposes + */ + @JsonProperty(value = "plan") + private PurchasePlan plan; + + /* + * Properties of a OpenShift managed cluster. + */ + @JsonProperty(value = "properties") + private OpenShiftManagedClusterProperties innerProperties; + + /** + * Creates an instance of OpenShiftManagedClusterInner class. + */ + public OpenShiftManagedClusterInner() { + } + + /** + * Get the plan property: Define the resource plan as required by ARM for billing purposes. + * + * @return the plan value. + */ + public PurchasePlan plan() { + return this.plan; + } + + /** + * Set the plan property: Define the resource plan as required by ARM for billing purposes. + * + * @param plan the plan value to set. + * @return the OpenShiftManagedClusterInner object itself. + */ + public OpenShiftManagedClusterInner withPlan(PurchasePlan plan) { + this.plan = plan; + return this; + } + + /** + * Get the innerProperties property: Properties of a OpenShift managed cluster. + * + * @return the innerProperties value. + */ + private OpenShiftManagedClusterProperties innerProperties() { + return this.innerProperties; + } + + /** + * {@inheritDoc} + */ + @Override + public OpenShiftManagedClusterInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OpenShiftManagedClusterInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: The current deployment or provisioning state, which only appears in the + * response. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the openShiftVersion property: Version of OpenShift specified when creating the cluster. + * + * @return the openShiftVersion value. + */ + public String openShiftVersion() { + return this.innerProperties() == null ? null : this.innerProperties().openShiftVersion(); + } + + /** + * Set the openShiftVersion property: Version of OpenShift specified when creating the cluster. + * + * @param openShiftVersion the openShiftVersion value to set. + * @return the OpenShiftManagedClusterInner object itself. + */ + public OpenShiftManagedClusterInner withOpenShiftVersion(String openShiftVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new OpenShiftManagedClusterProperties(); + } + this.innerProperties().withOpenShiftVersion(openShiftVersion); + return this; + } + + /** + * Get the clusterVersion property: Version of OpenShift specified when creating the cluster. + * + * @return the clusterVersion value. + */ + public String clusterVersion() { + return this.innerProperties() == null ? null : this.innerProperties().clusterVersion(); + } + + /** + * Get the publicHostname property: Service generated FQDN for OpenShift API server. + * + * @return the publicHostname value. + */ + public String publicHostname() { + return this.innerProperties() == null ? null : this.innerProperties().publicHostname(); + } + + /** + * Get the fqdn property: Service generated FQDN for OpenShift API server loadbalancer internal hostname. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.innerProperties() == null ? null : this.innerProperties().fqdn(); + } + + /** + * Get the networkProfile property: Configuration for OpenShift networking. + * + * @return the networkProfile value. + */ + public NetworkProfile networkProfile() { + return this.innerProperties() == null ? null : this.innerProperties().networkProfile(); + } + + /** + * Set the networkProfile property: Configuration for OpenShift networking. + * + * @param networkProfile the networkProfile value to set. + * @return the OpenShiftManagedClusterInner object itself. + */ + public OpenShiftManagedClusterInner withNetworkProfile(NetworkProfile networkProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new OpenShiftManagedClusterProperties(); + } + this.innerProperties().withNetworkProfile(networkProfile); + return this; + } + + /** + * Get the routerProfiles property: Configuration for OpenShift router(s). + * + * @return the routerProfiles value. + */ + public List routerProfiles() { + return this.innerProperties() == null ? null : this.innerProperties().routerProfiles(); + } + + /** + * Set the routerProfiles property: Configuration for OpenShift router(s). + * + * @param routerProfiles the routerProfiles value to set. + * @return the OpenShiftManagedClusterInner object itself. + */ + public OpenShiftManagedClusterInner withRouterProfiles(List routerProfiles) { + if (this.innerProperties() == null) { + this.innerProperties = new OpenShiftManagedClusterProperties(); + } + this.innerProperties().withRouterProfiles(routerProfiles); + return this; + } + + /** + * Get the masterPoolProfile property: Configuration for OpenShift master VMs. + * + * @return the masterPoolProfile value. + */ + public OpenShiftManagedClusterMasterPoolProfile masterPoolProfile() { + return this.innerProperties() == null ? null : this.innerProperties().masterPoolProfile(); + } + + /** + * Set the masterPoolProfile property: Configuration for OpenShift master VMs. + * + * @param masterPoolProfile the masterPoolProfile value to set. + * @return the OpenShiftManagedClusterInner object itself. + */ + public OpenShiftManagedClusterInner + withMasterPoolProfile(OpenShiftManagedClusterMasterPoolProfile masterPoolProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new OpenShiftManagedClusterProperties(); + } + this.innerProperties().withMasterPoolProfile(masterPoolProfile); + return this; + } + + /** + * Get the agentPoolProfiles property: Configuration of OpenShift cluster VMs. + * + * @return the agentPoolProfiles value. + */ + public List agentPoolProfiles() { + return this.innerProperties() == null ? null : this.innerProperties().agentPoolProfiles(); + } + + /** + * Set the agentPoolProfiles property: Configuration of OpenShift cluster VMs. + * + * @param agentPoolProfiles the agentPoolProfiles value to set. + * @return the OpenShiftManagedClusterInner object itself. + */ + public OpenShiftManagedClusterInner + withAgentPoolProfiles(List agentPoolProfiles) { + if (this.innerProperties() == null) { + this.innerProperties = new OpenShiftManagedClusterProperties(); + } + this.innerProperties().withAgentPoolProfiles(agentPoolProfiles); + return this; + } + + /** + * Get the authProfile property: Configures OpenShift authentication. + * + * @return the authProfile value. + */ + public OpenShiftManagedClusterAuthProfile authProfile() { + return this.innerProperties() == null ? null : this.innerProperties().authProfile(); + } + + /** + * Set the authProfile property: Configures OpenShift authentication. + * + * @param authProfile the authProfile value to set. + * @return the OpenShiftManagedClusterInner object itself. + */ + public OpenShiftManagedClusterInner withAuthProfile(OpenShiftManagedClusterAuthProfile authProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new OpenShiftManagedClusterProperties(); + } + this.innerProperties().withAuthProfile(authProfile); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (plan() != null) { + plan().validate(); + } + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OpenShiftManagedClusterProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OpenShiftManagedClusterProperties.java new file mode 100644 index 0000000000000..85b718ac14ec6 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OpenShiftManagedClusterProperties.java @@ -0,0 +1,275 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAuthProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterMasterPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftRouterProfile; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Properties of the OpenShift managed cluster. + */ +@Fluent +public final class OpenShiftManagedClusterProperties { + /* + * The current deployment or provisioning state, which only appears in the response. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * Version of OpenShift specified when creating the cluster. + */ + @JsonProperty(value = "openShiftVersion", required = true) + private String openShiftVersion; + + /* + * Version of OpenShift specified when creating the cluster. + */ + @JsonProperty(value = "clusterVersion", access = JsonProperty.Access.WRITE_ONLY) + private String clusterVersion; + + /* + * Service generated FQDN for OpenShift API server. + */ + @JsonProperty(value = "publicHostname", access = JsonProperty.Access.WRITE_ONLY) + private String publicHostname; + + /* + * Service generated FQDN for OpenShift API server loadbalancer internal hostname. + */ + @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) + private String fqdn; + + /* + * Configuration for OpenShift networking. + */ + @JsonProperty(value = "networkProfile") + private NetworkProfile networkProfile; + + /* + * Configuration for OpenShift router(s). + */ + @JsonProperty(value = "routerProfiles") + private List routerProfiles; + + /* + * Configuration for OpenShift master VMs. + */ + @JsonProperty(value = "masterPoolProfile") + private OpenShiftManagedClusterMasterPoolProfile masterPoolProfile; + + /* + * Configuration of OpenShift cluster VMs. + */ + @JsonProperty(value = "agentPoolProfiles") + private List agentPoolProfiles; + + /* + * Configures OpenShift authentication. + */ + @JsonProperty(value = "authProfile") + private OpenShiftManagedClusterAuthProfile authProfile; + + /** + * Creates an instance of OpenShiftManagedClusterProperties class. + */ + public OpenShiftManagedClusterProperties() { + } + + /** + * Get the provisioningState property: The current deployment or provisioning state, which only appears in the + * response. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the openShiftVersion property: Version of OpenShift specified when creating the cluster. + * + * @return the openShiftVersion value. + */ + public String openShiftVersion() { + return this.openShiftVersion; + } + + /** + * Set the openShiftVersion property: Version of OpenShift specified when creating the cluster. + * + * @param openShiftVersion the openShiftVersion value to set. + * @return the OpenShiftManagedClusterProperties object itself. + */ + public OpenShiftManagedClusterProperties withOpenShiftVersion(String openShiftVersion) { + this.openShiftVersion = openShiftVersion; + return this; + } + + /** + * Get the clusterVersion property: Version of OpenShift specified when creating the cluster. + * + * @return the clusterVersion value. + */ + public String clusterVersion() { + return this.clusterVersion; + } + + /** + * Get the publicHostname property: Service generated FQDN for OpenShift API server. + * + * @return the publicHostname value. + */ + public String publicHostname() { + return this.publicHostname; + } + + /** + * Get the fqdn property: Service generated FQDN for OpenShift API server loadbalancer internal hostname. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Get the networkProfile property: Configuration for OpenShift networking. + * + * @return the networkProfile value. + */ + public NetworkProfile networkProfile() { + return this.networkProfile; + } + + /** + * Set the networkProfile property: Configuration for OpenShift networking. + * + * @param networkProfile the networkProfile value to set. + * @return the OpenShiftManagedClusterProperties object itself. + */ + public OpenShiftManagedClusterProperties withNetworkProfile(NetworkProfile networkProfile) { + this.networkProfile = networkProfile; + return this; + } + + /** + * Get the routerProfiles property: Configuration for OpenShift router(s). + * + * @return the routerProfiles value. + */ + public List routerProfiles() { + return this.routerProfiles; + } + + /** + * Set the routerProfiles property: Configuration for OpenShift router(s). + * + * @param routerProfiles the routerProfiles value to set. + * @return the OpenShiftManagedClusterProperties object itself. + */ + public OpenShiftManagedClusterProperties withRouterProfiles(List routerProfiles) { + this.routerProfiles = routerProfiles; + return this; + } + + /** + * Get the masterPoolProfile property: Configuration for OpenShift master VMs. + * + * @return the masterPoolProfile value. + */ + public OpenShiftManagedClusterMasterPoolProfile masterPoolProfile() { + return this.masterPoolProfile; + } + + /** + * Set the masterPoolProfile property: Configuration for OpenShift master VMs. + * + * @param masterPoolProfile the masterPoolProfile value to set. + * @return the OpenShiftManagedClusterProperties object itself. + */ + public OpenShiftManagedClusterProperties + withMasterPoolProfile(OpenShiftManagedClusterMasterPoolProfile masterPoolProfile) { + this.masterPoolProfile = masterPoolProfile; + return this; + } + + /** + * Get the agentPoolProfiles property: Configuration of OpenShift cluster VMs. + * + * @return the agentPoolProfiles value. + */ + public List agentPoolProfiles() { + return this.agentPoolProfiles; + } + + /** + * Set the agentPoolProfiles property: Configuration of OpenShift cluster VMs. + * + * @param agentPoolProfiles the agentPoolProfiles value to set. + * @return the OpenShiftManagedClusterProperties object itself. + */ + public OpenShiftManagedClusterProperties + withAgentPoolProfiles(List agentPoolProfiles) { + this.agentPoolProfiles = agentPoolProfiles; + return this; + } + + /** + * Get the authProfile property: Configures OpenShift authentication. + * + * @return the authProfile value. + */ + public OpenShiftManagedClusterAuthProfile authProfile() { + return this.authProfile; + } + + /** + * Set the authProfile property: Configures OpenShift authentication. + * + * @param authProfile the authProfile value to set. + * @return the OpenShiftManagedClusterProperties object itself. + */ + public OpenShiftManagedClusterProperties withAuthProfile(OpenShiftManagedClusterAuthProfile authProfile) { + this.authProfile = authProfile; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (openShiftVersion() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property openShiftVersion in model OpenShiftManagedClusterProperties")); + } + if (networkProfile() != null) { + networkProfile().validate(); + } + if (routerProfiles() != null) { + routerProfiles().forEach(e -> e.validate()); + } + if (masterPoolProfile() != null) { + masterPoolProfile().validate(); + } + if (agentPoolProfiles() != null) { + agentPoolProfiles().forEach(e -> e.validate()); + } + if (authProfile() != null) { + authProfile().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OpenShiftManagedClusterProperties.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OperationStatusResultInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OperationStatusResultInner.java new file mode 100644 index 0000000000000..f5c486eaca118 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OperationStatusResultInner.java @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * The current status of an async operation. + */ +@Fluent +public final class OperationStatusResultInner { + /* + * Fully qualified ID for the async operation. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + @JsonProperty(value = "resourceId", access = JsonProperty.Access.WRITE_ONLY) + private String resourceId; + + /* + * Name of the async operation. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Operation status. + */ + @JsonProperty(value = "status", required = true) + private String status; + + /* + * Percent of the operation that is complete. + */ + @JsonProperty(value = "percentComplete") + private Float percentComplete; + + /* + * The start time of the operation. + */ + @JsonProperty(value = "startTime") + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + @JsonProperty(value = "endTime") + private OffsetDateTime endTime; + + /* + * The operations list. + */ + @JsonProperty(value = "operations") + private List operations; + + /* + * If present, details of the operation error. + */ + @JsonProperty(value = "error") + private ManagementError error; + + /** + * Creates an instance of OperationStatusResultInner class. + */ + public OperationStatusResultInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Fully qualified ID for the async operation. + * + * @param id the id value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the async operation. + * + * @param name the name value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Set the status property: Operation status. + * + * @param status the status value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Float percentComplete() { + return this.percentComplete; + } + + /** + * Set the percentComplete property: Percent of the operation that is complete. + * + * @param percentComplete the percentComplete value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withPercentComplete(Float percentComplete) { + this.percentComplete = percentComplete; + return this; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: The start time of the operation. + * + * @param startTime the startTime value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime property: The end time of the operation. + * + * @param endTime the endTime value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Set the operations property: The operations list. + * + * @param operations the operations value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withOperations(List operations) { + this.operations = operations; + return this; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Set the error property: If present, details of the operation error. + * + * @param error the error value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withError(ManagementError error) { + this.error = error; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (status() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property status in model OperationStatusResultInner")); + } + if (operations() != null) { + operations().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OperationStatusResultInner.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OperationValueDisplay.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OperationValueDisplay.java new file mode 100644 index 0000000000000..bb922bd75e1a6 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OperationValueDisplay.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the properties of a Operation Value Display. + */ +@Immutable +public final class OperationValueDisplay { + /* + * The display name of the operation. + */ + @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /* + * The display name of the resource the operation applies to. + */ + @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /* + * The description of the operation. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /* + * The resource provider for the operation. + */ + @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OperationValueInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OperationValueInner.java new file mode 100644 index 0000000000000..bc4d437d72e73 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OperationValueInner.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the properties of a Operation value. + */ +@Immutable +public final class OperationValueInner { + /* + * The origin of the operation. + */ + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) + private String origin; + + /* + * The name of the operation. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Describes the properties of a Operation Value Display. + */ + @JsonProperty(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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OrchestratorVersionProfileListResultInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OrchestratorVersionProfileListResultInner.java new file mode 100644 index 0000000000000..090f82c305a80 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OrchestratorVersionProfileListResultInner.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OrchestratorVersionProfile; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The list of versions for supported orchestrators. + */ +@Fluent +public final class OrchestratorVersionProfileListResultInner { + /* + * Id of the orchestrator version profile list result. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * Name of the orchestrator version profile list result. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Type of the orchestrator version profile list result. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * The properties of an orchestrator version profile. + */ + @JsonProperty(value = "properties", required = true) + 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.logExceptionAsError(new IllegalArgumentException( + "Missing required property innerProperties in model OrchestratorVersionProfileListResultInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OrchestratorVersionProfileListResultInner.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OrchestratorVersionProfileProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OrchestratorVersionProfileProperties.java new file mode 100644 index 0000000000000..7a98b0b2df091 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OrchestratorVersionProfileProperties.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OrchestratorVersionProfile; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The properties of an orchestrator version profile. + */ +@Fluent +public final class OrchestratorVersionProfileProperties { + /* + * List of orchestrator version profiles. + */ + @JsonProperty(value = "orchestrators", required = true) + 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.logExceptionAsError(new IllegalArgumentException( + "Missing required property orchestrators in model OrchestratorVersionProfileProperties")); + } else { + orchestrators().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OrchestratorVersionProfileProperties.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OutboundEnvironmentEndpointInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OutboundEnvironmentEndpointInner.java new file mode 100644 index 0000000000000..03fd130903b68 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/OutboundEnvironmentEndpointInner.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.EndpointDependency; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Egress endpoints which AKS agent nodes connect to for common purpose. + */ +@Fluent +public final class OutboundEnvironmentEndpointInner { + /* + * The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. + */ + @JsonProperty(value = "category") + private String category; + + /* + * The endpoints that AKS agent nodes connect to + */ + @JsonProperty(value = "endpoints") + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionInner.java new file mode 100644 index 0000000000000..0177197baf619 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionInner.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpoint; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkServiceConnectionState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A private endpoint connection. + */ +@Fluent +public final class PrivateEndpointConnectionInner extends ProxyResource { + /* + * The properties of a private endpoint connection. + */ + @JsonProperty(value = "properties") + private PrivateEndpointConnectionProperties innerProperties; + + /** + * 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 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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionListResultInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionListResultInner.java new file mode 100644 index 0000000000000..637b22c85cc93 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionListResultInner.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A list of private endpoint connections. + */ +@Fluent +public final class PrivateEndpointConnectionListResultInner { + /* + * The collection value. + */ + @JsonProperty(value = "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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionProperties.java new file mode 100644 index 0000000000000..8149f32bd2362 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateEndpointConnectionProperties.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpoint; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkServiceConnectionState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of a private endpoint connection. + */ +@Fluent +public final class PrivateEndpointConnectionProperties { + /* + * The current provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private PrivateEndpointConnectionProvisioningState provisioningState; + + /* + * The resource of private endpoint. + */ + @JsonProperty(value = "privateEndpoint") + private PrivateEndpoint privateEndpoint; + + /* + * A collection of information about the state of the connection between service consumer and provider. + */ + @JsonProperty(value = "privateLinkServiceConnectionState", required = true) + 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.logExceptionAsError(new IllegalArgumentException( + "Missing required property privateLinkServiceConnectionState in model PrivateEndpointConnectionProperties")); + } else { + privateLinkServiceConnectionState().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateLinkResourceInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateLinkResourceInner.java new file mode 100644 index 0000000000000..9b0b784966892 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateLinkResourceInner.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A private link resource. + */ +@Fluent +public final class PrivateLinkResourceInner { + /* + * The ID of the private link resource. + */ + @JsonProperty(value = "id") + private String id; + + /* + * The name of the private link resource. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The resource type. + */ + @JsonProperty(value = "type") + private String type; + + /* + * The group ID of the resource. + */ + @JsonProperty(value = "groupId") + private String groupId; + + /* + * The RequiredMembers of the resource + */ + @JsonProperty(value = "requiredMembers") + private List requiredMembers; + + /* + * The private link service ID of the resource, this field is exposed only to NRP internally. + */ + @JsonProperty(value = "privateLinkServiceID", access = JsonProperty.Access.WRITE_ONLY) + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateLinkResourcesListResultInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateLinkResourcesListResultInner.java new file mode 100644 index 0000000000000..d639d6bd8eebe --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/PrivateLinkResourcesListResultInner.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A list of private link resources. + */ +@Fluent +public final class PrivateLinkResourcesListResultInner { + /* + * The collection value. + */ + @JsonProperty(value = "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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/RunCommandResultInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/RunCommandResultInner.java new file mode 100644 index 0000000000000..f2bf88ac55527 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/RunCommandResultInner.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * run command result. + */ +@Immutable +public final class RunCommandResultInner { + /* + * The command id. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * Properties of command result. + */ + @JsonProperty(value = "properties") + 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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/SafeguardsAvailableVersionInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/SafeguardsAvailableVersionInner.java new file mode 100644 index 0000000000000..87d6463f4c2af --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/SafeguardsAvailableVersionInner.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SafeguardsAvailableVersionsProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Available Safeguards Version. + */ +@Fluent +public final class SafeguardsAvailableVersionInner extends ProxyResource { + /* + * Whether the version is default or not and support info. + */ + @JsonProperty(value = "properties", required = true) + private SafeguardsAvailableVersionsProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of SafeguardsAvailableVersionInner class. + */ + public SafeguardsAvailableVersionInner() { + } + + /** + * Get the properties property: Whether the version is default or not and support info. + * + * @return the properties value. + */ + public SafeguardsAvailableVersionsProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Whether the version is default or not and support info. + * + * @param properties the properties value to set. + * @return the SafeguardsAvailableVersionInner object itself. + */ + public SafeguardsAvailableVersionInner withProperties(SafeguardsAvailableVersionsProperties 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property properties in model SafeguardsAvailableVersionInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SafeguardsAvailableVersionInner.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ScheduledEventInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ScheduledEventInner.java new file mode 100644 index 0000000000000..df95980256080 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/ScheduledEventInner.java @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.EventStatus; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ResourceType; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * The ScheduledEvent model. + */ +@Fluent +public final class ScheduledEventInner { + /* + * The description of a scheduled event. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The event id of a scheduled event. + */ + @JsonProperty(value = "eventId") + private String eventId; + + /* + * The source of a scheduled event. + */ + @JsonProperty(value = "eventSource") + private String eventSource; + + /* + * The status of a scheduled event. + */ + @JsonProperty(value = "eventStatus") + private EventStatus eventStatus; + + /* + * The time of a scheduled event. + */ + @JsonProperty(value = "scheduledTime") + private OffsetDateTime scheduledTime; + + /* + * The time of a scheduled event starts. + */ + @JsonProperty(value = "startTime") + private OffsetDateTime startTime; + + /* + * The time of a scheduled event last updates. + */ + @JsonProperty(value = "lastUpdateTime") + private OffsetDateTime lastUpdateTime; + + /* + * The list of resources of a scheduled event. + */ + @JsonProperty(value = "resources") + private List resources; + + /* + * The resource type of a scheduled event. + */ + @JsonProperty(value = "resourceType") + private ResourceType resourceType; + + /** + * Creates an instance of ScheduledEventInner class. + */ + public ScheduledEventInner() { + } + + /** + * Get the description property: The description of a scheduled event. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of a scheduled event. + * + * @param description the description value to set. + * @return the ScheduledEventInner object itself. + */ + public ScheduledEventInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the eventId property: The event id of a scheduled event. + * + * @return the eventId value. + */ + public String eventId() { + return this.eventId; + } + + /** + * Set the eventId property: The event id of a scheduled event. + * + * @param eventId the eventId value to set. + * @return the ScheduledEventInner object itself. + */ + public ScheduledEventInner withEventId(String eventId) { + this.eventId = eventId; + return this; + } + + /** + * Get the eventSource property: The source of a scheduled event. + * + * @return the eventSource value. + */ + public String eventSource() { + return this.eventSource; + } + + /** + * Set the eventSource property: The source of a scheduled event. + * + * @param eventSource the eventSource value to set. + * @return the ScheduledEventInner object itself. + */ + public ScheduledEventInner withEventSource(String eventSource) { + this.eventSource = eventSource; + return this; + } + + /** + * Get the eventStatus property: The status of a scheduled event. + * + * @return the eventStatus value. + */ + public EventStatus eventStatus() { + return this.eventStatus; + } + + /** + * Set the eventStatus property: The status of a scheduled event. + * + * @param eventStatus the eventStatus value to set. + * @return the ScheduledEventInner object itself. + */ + public ScheduledEventInner withEventStatus(EventStatus eventStatus) { + this.eventStatus = eventStatus; + return this; + } + + /** + * Get the scheduledTime property: The time of a scheduled event. + * + * @return the scheduledTime value. + */ + public OffsetDateTime scheduledTime() { + return this.scheduledTime; + } + + /** + * Set the scheduledTime property: The time of a scheduled event. + * + * @param scheduledTime the scheduledTime value to set. + * @return the ScheduledEventInner object itself. + */ + public ScheduledEventInner withScheduledTime(OffsetDateTime scheduledTime) { + this.scheduledTime = scheduledTime; + return this; + } + + /** + * Get the startTime property: The time of a scheduled event starts. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: The time of a scheduled event starts. + * + * @param startTime the startTime value to set. + * @return the ScheduledEventInner object itself. + */ + public ScheduledEventInner withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the lastUpdateTime property: The time of a scheduled event last updates. + * + * @return the lastUpdateTime value. + */ + public OffsetDateTime lastUpdateTime() { + return this.lastUpdateTime; + } + + /** + * Set the lastUpdateTime property: The time of a scheduled event last updates. + * + * @param lastUpdateTime the lastUpdateTime value to set. + * @return the ScheduledEventInner object itself. + */ + public ScheduledEventInner withLastUpdateTime(OffsetDateTime lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + return this; + } + + /** + * Get the resources property: The list of resources of a scheduled event. + * + * @return the resources value. + */ + public List resources() { + return this.resources; + } + + /** + * Set the resources property: The list of resources of a scheduled event. + * + * @param resources the resources value to set. + * @return the ScheduledEventInner object itself. + */ + public ScheduledEventInner withResources(List resources) { + this.resources = resources; + return this; + } + + /** + * Get the resourceType property: The resource type of a scheduled event. + * + * @return the resourceType value. + */ + public ResourceType resourceType() { + return this.resourceType; + } + + /** + * Set the resourceType property: The resource type of a scheduled event. + * + * @param resourceType the resourceType value to set. + * @return the ScheduledEventInner object itself. + */ + public ScheduledEventInner withResourceType(ResourceType resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/SnapshotInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/SnapshotInner.java new file mode 100644 index 0000000000000..95abb36b4ceaf --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/SnapshotInner.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Ossku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SnapshotType; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * A node pool snapshot resource. + */ +@Fluent +public final class SnapshotInner extends Resource { + /* + * Properties of a snapshot. + */ + @JsonProperty(value = "properties") + private SnapshotProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of 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; + } + + /** + * {@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. If not specified, the default is Ubuntu if + * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 + * after Windows2019 is deprecated. + * + * @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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/SnapshotProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/SnapshotProperties.java new file mode 100644 index 0000000000000..9977dccd6c9cd --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/SnapshotProperties.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Ossku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SnapshotType; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties used to configure a node pool snapshot. + */ +@Fluent +public final class SnapshotProperties { + /* + * CreationData to be used to specify the source agent pool resource ID to create this snapshot. + */ + @JsonProperty(value = "creationData") + private CreationData creationData; + + /* + * The type of a snapshot. The default is NodePool. + */ + @JsonProperty(value = "snapshotType") + private SnapshotType snapshotType; + + /* + * The version of Kubernetes. + */ + @JsonProperty(value = "kubernetesVersion", access = JsonProperty.Access.WRITE_ONLY) + private String kubernetesVersion; + + /* + * The version of node image. + */ + @JsonProperty(value = "nodeImageVersion", access = JsonProperty.Access.WRITE_ONLY) + private String nodeImageVersion; + + /* + * OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + */ + @JsonProperty(value = "osType", access = JsonProperty.Access.WRITE_ONLY) + private OSType osType; + + /* + * Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or + * Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is + * deprecated. + */ + @JsonProperty(value = "osSku", access = JsonProperty.Access.WRITE_ONLY) + private Ossku osSku; + + /* + * The size of the VM. + */ + @JsonProperty(value = "vmSize", access = JsonProperty.Access.WRITE_ONLY) + private String vmSize; + + /* + * Whether to use a FIPS-enabled OS. + */ + @JsonProperty(value = "enableFIPS", access = JsonProperty.Access.WRITE_ONLY) + 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. If not specified, the default is Ubuntu if + * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 + * after Windows2019 is deprecated. + * + * @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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleBindingInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleBindingInner.java new file mode 100644 index 0000000000000..d47ea74a78433 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleBindingInner.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.containerservicemicrosoftcontainerserviceaks.generated.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.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleBindingProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Defines binding between a resource and role. + */ +@Fluent +public final class TrustedAccessRoleBindingInner extends ProxyResource { + /* + * Properties for trusted access role binding + */ + @JsonProperty(value = "properties", required = true) + private TrustedAccessRoleBindingProperties innerProperties = new TrustedAccessRoleBindingProperties(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * 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 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.logExceptionAsError(new IllegalArgumentException( + "Missing required property innerProperties in model TrustedAccessRoleBindingInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TrustedAccessRoleBindingInner.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleBindingProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleBindingProperties.java new file mode 100644 index 0000000000000..1f51e65bf3c75 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleBindingProperties.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleBindingProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Properties for trusted access role binding. + */ +@Fluent +public final class TrustedAccessRoleBindingProperties { + /* + * The current provisioning state of trusted access role binding. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private TrustedAccessRoleBindingProvisioningState provisioningState; + + /* + * The ARM resource ID of source resource that trusted access is configured for. + */ + @JsonProperty(value = "sourceResourceId", required = true) + private String sourceResourceId; + + /* + * A list of roles to bind, each item is a resource type qualified role name. For example: + * 'Microsoft.MachineLearningServices/workspaces/reader'. + */ + @JsonProperty(value = "roles", required = true) + 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.logExceptionAsError(new IllegalArgumentException( + "Missing required property sourceResourceId in model TrustedAccessRoleBindingProperties")); + } + if (roles() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property roles in model TrustedAccessRoleBindingProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TrustedAccessRoleBindingProperties.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleInner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleInner.java new file mode 100644 index 0000000000000..a0f1316e4ceec --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/TrustedAccessRoleInner.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleRule; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Trusted access role definition. + */ +@Immutable +public final class TrustedAccessRoleInner { + /* + * Resource type of Azure resource + */ + @JsonProperty(value = "sourceResourceType", access = JsonProperty.Access.WRITE_ONLY) + private String sourceResourceType; + + /* + * Name of role, name is unique under a source resource type + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + 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). + */ + @JsonProperty(value = "rules", access = JsonProperty.Access.WRITE_ONLY) + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/package-info.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/package-info.java new file mode 100644 index 0000000000000..40ccb2791406a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the inner data models for ContainerServiceManagementClient. + * Container Service Client. + */ +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/package-info.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/package-info.java new file mode 100644 index 0000000000000..1e603e70687d4 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/fluent/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the service clients for ContainerServiceManagementClient. + * Container Service Client. + */ +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolAvailableVersionsImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolAvailableVersionsImpl.java new file mode 100644 index 0000000000000..252e2c5972d99 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolAvailableVersionsImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolAvailableVersionsInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolAvailableVersions; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem; +import java.util.Collections; +import java.util.List; + +public final class AgentPoolAvailableVersionsImpl implements AgentPoolAvailableVersions { + private AgentPoolAvailableVersionsInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + AgentPoolAvailableVersionsImpl(AgentPoolAvailableVersionsInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public List agentPoolVersions() { + List inner = this.innerModel().agentPoolVersions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public AgentPoolAvailableVersionsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolImpl.java new file mode 100644 index 0000000000000..e7d5c0d5ce58f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolImpl.java @@ -0,0 +1,635 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPool; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolArtifactStreamingProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolDeleteMachinesParameter; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolGpuProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolNetworkProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolSecurityProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolUpgradeSettings; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolWindowsProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.GpuInstanceProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubeletConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubeletDiskType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.LinuxOSConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSDiskType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Ossku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PowerState; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleDownMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetEvictionPolicy; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetPriority; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.VirtualMachineNodes; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.VirtualMachinesProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WorkloadRuntime; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class AgentPoolImpl implements AgentPool, AgentPool.Definition, AgentPool.Update { + private AgentPoolInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public Integer count() { + return this.innerModel().count(); + } + + public String vmSize() { + return this.innerModel().vmSize(); + } + + public Integer osDiskSizeGB() { + return this.innerModel().osDiskSizeGB(); + } + + public OSDiskType osDiskType() { + return this.innerModel().osDiskType(); + } + + public KubeletDiskType kubeletDiskType() { + return this.innerModel().kubeletDiskType(); + } + + public WorkloadRuntime workloadRuntime() { + return this.innerModel().workloadRuntime(); + } + + public String messageOfTheDay() { + return this.innerModel().messageOfTheDay(); + } + + public String vnetSubnetId() { + return this.innerModel().vnetSubnetId(); + } + + public String podSubnetId() { + return this.innerModel().podSubnetId(); + } + + public Integer maxPods() { + return this.innerModel().maxPods(); + } + + public OSType osType() { + return this.innerModel().osType(); + } + + public Ossku osSku() { + return this.innerModel().osSku(); + } + + public Integer maxCount() { + return this.innerModel().maxCount(); + } + + public Integer minCount() { + return this.innerModel().minCount(); + } + + public Boolean enableAutoScaling() { + return this.innerModel().enableAutoScaling(); + } + + public ScaleDownMode scaleDownMode() { + return this.innerModel().scaleDownMode(); + } + + public AgentPoolType typePropertiesType() { + return this.innerModel().typePropertiesType(); + } + + public AgentPoolMode mode() { + return this.innerModel().mode(); + } + + public String orchestratorVersion() { + return this.innerModel().orchestratorVersion(); + } + + public String currentOrchestratorVersion() { + return this.innerModel().currentOrchestratorVersion(); + } + + public String nodeImageVersion() { + return this.innerModel().nodeImageVersion(); + } + + public AgentPoolUpgradeSettings upgradeSettings() { + return this.innerModel().upgradeSettings(); + } + + public String provisioningState() { + return this.innerModel().provisioningState(); + } + + public PowerState powerState() { + return this.innerModel().powerState(); + } + + public List availabilityZones() { + List inner = this.innerModel().availabilityZones(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Boolean enableNodePublicIp() { + return this.innerModel().enableNodePublicIp(); + } + + public Boolean enableCustomCATrust() { + return this.innerModel().enableCustomCATrust(); + } + + public String nodePublicIpPrefixId() { + return this.innerModel().nodePublicIpPrefixId(); + } + + public ScaleSetPriority scaleSetPriority() { + return this.innerModel().scaleSetPriority(); + } + + public ScaleSetEvictionPolicy scaleSetEvictionPolicy() { + return this.innerModel().scaleSetEvictionPolicy(); + } + + public Float spotMaxPrice() { + return this.innerModel().spotMaxPrice(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public Map nodeLabels() { + Map inner = this.innerModel().nodeLabels(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public List nodeTaints() { + List inner = this.innerModel().nodeTaints(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List nodeInitializationTaints() { + List inner = this.innerModel().nodeInitializationTaints(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String proximityPlacementGroupId() { + return this.innerModel().proximityPlacementGroupId(); + } + + public KubeletConfig kubeletConfig() { + return this.innerModel().kubeletConfig(); + } + + public LinuxOSConfig linuxOSConfig() { + return this.innerModel().linuxOSConfig(); + } + + public Boolean enableEncryptionAtHost() { + return this.innerModel().enableEncryptionAtHost(); + } + + public Boolean enableUltraSsd() { + return this.innerModel().enableUltraSsd(); + } + + public Boolean enableFips() { + return this.innerModel().enableFips(); + } + + public GpuInstanceProfile gpuInstanceProfile() { + return this.innerModel().gpuInstanceProfile(); + } + + public CreationData creationData() { + return this.innerModel().creationData(); + } + + public String capacityReservationGroupId() { + return this.innerModel().capacityReservationGroupId(); + } + + public String hostGroupId() { + return this.innerModel().hostGroupId(); + } + + public AgentPoolWindowsProfile windowsProfile() { + return this.innerModel().windowsProfile(); + } + + public AgentPoolNetworkProfile networkProfile() { + return this.innerModel().networkProfile(); + } + + public AgentPoolSecurityProfile securityProfile() { + return this.innerModel().securityProfile(); + } + + public AgentPoolGpuProfile gpuProfile() { + return this.innerModel().gpuProfile(); + } + + public AgentPoolArtifactStreamingProfile artifactStreamingProfile() { + return this.innerModel().artifactStreamingProfile(); + } + + public VirtualMachinesProfile virtualMachinesProfile() { + return this.innerModel().virtualMachinesProfile(); + } + + public List virtualMachineNodesStatus() { + List inner = this.innerModel().virtualMachineNodesStatus(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public AgentPoolInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String resourceName; + + private String agentPoolName; + + public AgentPoolImpl withExistingManagedCluster(String resourceGroupName, String resourceName) { + this.resourceGroupName = resourceGroupName; + this.resourceName = resourceName; + return this; + } + + public AgentPool create() { + this.innerObject = serviceManager.serviceClient().getAgentPools().createOrUpdate(resourceGroupName, + resourceName, agentPoolName, this.innerModel(), Context.NONE); + return this; + } + + public AgentPool create(Context context) { + this.innerObject = serviceManager.serviceClient().getAgentPools().createOrUpdate(resourceGroupName, + resourceName, agentPoolName, this.innerModel(), context); + return this; + } + + AgentPoolImpl(String name, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = new AgentPoolInner(); + this.serviceManager = serviceManager; + this.agentPoolName = name; + } + + public AgentPoolImpl update() { + return this; + } + + public AgentPool apply() { + this.innerObject = serviceManager.serviceClient().getAgentPools().createOrUpdate(resourceGroupName, + resourceName, agentPoolName, this.innerModel(), Context.NONE); + return this; + } + + public AgentPool apply(Context context) { + this.innerObject = serviceManager.serviceClient().getAgentPools().createOrUpdate(resourceGroupName, + resourceName, agentPoolName, this.innerModel(), context); + return this; + } + + AgentPoolImpl(AgentPoolInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "managedClusters"); + this.agentPoolName = Utils.getValueFromIdByName(innerObject.id(), "agentPools"); + } + + public AgentPool refresh() { + this.innerObject = serviceManager.serviceClient().getAgentPools() + .getWithResponse(resourceGroupName, resourceName, agentPoolName, Context.NONE).getValue(); + return this; + } + + public AgentPool refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getAgentPools() + .getWithResponse(resourceGroupName, resourceName, agentPoolName, context).getValue(); + return this; + } + + public void deleteMachines(AgentPoolDeleteMachinesParameter machines) { + serviceManager.agentPools().deleteMachines(resourceGroupName, resourceName, agentPoolName, machines); + } + + public void deleteMachines(AgentPoolDeleteMachinesParameter machines, Context context) { + serviceManager.agentPools().deleteMachines(resourceGroupName, resourceName, agentPoolName, machines, context); + } + + public AgentPool upgradeNodeImageVersion() { + return serviceManager.agentPools().upgradeNodeImageVersion(resourceGroupName, resourceName, agentPoolName); + } + + public AgentPool upgradeNodeImageVersion(Context context) { + return serviceManager.agentPools().upgradeNodeImageVersion(resourceGroupName, resourceName, agentPoolName, + context); + } + + public AgentPoolImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public AgentPoolImpl withCount(Integer count) { + this.innerModel().withCount(count); + return this; + } + + public AgentPoolImpl withVmSize(String vmSize) { + this.innerModel().withVmSize(vmSize); + return this; + } + + public AgentPoolImpl withOsDiskSizeGB(Integer osDiskSizeGB) { + this.innerModel().withOsDiskSizeGB(osDiskSizeGB); + return this; + } + + public AgentPoolImpl withOsDiskType(OSDiskType osDiskType) { + this.innerModel().withOsDiskType(osDiskType); + return this; + } + + public AgentPoolImpl withKubeletDiskType(KubeletDiskType kubeletDiskType) { + this.innerModel().withKubeletDiskType(kubeletDiskType); + return this; + } + + public AgentPoolImpl withWorkloadRuntime(WorkloadRuntime workloadRuntime) { + this.innerModel().withWorkloadRuntime(workloadRuntime); + return this; + } + + public AgentPoolImpl withMessageOfTheDay(String messageOfTheDay) { + this.innerModel().withMessageOfTheDay(messageOfTheDay); + return this; + } + + public AgentPoolImpl withVnetSubnetId(String vnetSubnetId) { + this.innerModel().withVnetSubnetId(vnetSubnetId); + return this; + } + + public AgentPoolImpl withPodSubnetId(String podSubnetId) { + this.innerModel().withPodSubnetId(podSubnetId); + return this; + } + + public AgentPoolImpl withMaxPods(Integer maxPods) { + this.innerModel().withMaxPods(maxPods); + return this; + } + + public AgentPoolImpl withOsType(OSType osType) { + this.innerModel().withOsType(osType); + return this; + } + + public AgentPoolImpl withOsSku(Ossku osSku) { + this.innerModel().withOsSku(osSku); + return this; + } + + public AgentPoolImpl withMaxCount(Integer maxCount) { + this.innerModel().withMaxCount(maxCount); + return this; + } + + public AgentPoolImpl withMinCount(Integer minCount) { + this.innerModel().withMinCount(minCount); + return this; + } + + public AgentPoolImpl withEnableAutoScaling(Boolean enableAutoScaling) { + this.innerModel().withEnableAutoScaling(enableAutoScaling); + return this; + } + + public AgentPoolImpl withScaleDownMode(ScaleDownMode scaleDownMode) { + this.innerModel().withScaleDownMode(scaleDownMode); + return this; + } + + public AgentPoolImpl withTypePropertiesType(AgentPoolType typePropertiesType) { + this.innerModel().withTypePropertiesType(typePropertiesType); + return this; + } + + public AgentPoolImpl withMode(AgentPoolMode mode) { + this.innerModel().withMode(mode); + return this; + } + + public AgentPoolImpl withOrchestratorVersion(String orchestratorVersion) { + this.innerModel().withOrchestratorVersion(orchestratorVersion); + return this; + } + + public AgentPoolImpl withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings) { + this.innerModel().withUpgradeSettings(upgradeSettings); + return this; + } + + public AgentPoolImpl withPowerState(PowerState powerState) { + this.innerModel().withPowerState(powerState); + return this; + } + + public AgentPoolImpl withAvailabilityZones(List availabilityZones) { + this.innerModel().withAvailabilityZones(availabilityZones); + return this; + } + + public AgentPoolImpl withEnableNodePublicIp(Boolean enableNodePublicIp) { + this.innerModel().withEnableNodePublicIp(enableNodePublicIp); + return this; + } + + public AgentPoolImpl withEnableCustomCATrust(Boolean enableCustomCATrust) { + this.innerModel().withEnableCustomCATrust(enableCustomCATrust); + return this; + } + + public AgentPoolImpl withNodePublicIpPrefixId(String nodePublicIpPrefixId) { + this.innerModel().withNodePublicIpPrefixId(nodePublicIpPrefixId); + return this; + } + + public AgentPoolImpl withScaleSetPriority(ScaleSetPriority scaleSetPriority) { + this.innerModel().withScaleSetPriority(scaleSetPriority); + return this; + } + + public AgentPoolImpl withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy) { + this.innerModel().withScaleSetEvictionPolicy(scaleSetEvictionPolicy); + return this; + } + + public AgentPoolImpl withSpotMaxPrice(Float spotMaxPrice) { + this.innerModel().withSpotMaxPrice(spotMaxPrice); + return this; + } + + public AgentPoolImpl withNodeLabels(Map nodeLabels) { + this.innerModel().withNodeLabels(nodeLabels); + return this; + } + + public AgentPoolImpl withNodeTaints(List nodeTaints) { + this.innerModel().withNodeTaints(nodeTaints); + return this; + } + + public AgentPoolImpl withNodeInitializationTaints(List nodeInitializationTaints) { + this.innerModel().withNodeInitializationTaints(nodeInitializationTaints); + return this; + } + + public AgentPoolImpl withProximityPlacementGroupId(String proximityPlacementGroupId) { + this.innerModel().withProximityPlacementGroupId(proximityPlacementGroupId); + return this; + } + + public AgentPoolImpl withKubeletConfig(KubeletConfig kubeletConfig) { + this.innerModel().withKubeletConfig(kubeletConfig); + return this; + } + + public AgentPoolImpl withLinuxOSConfig(LinuxOSConfig linuxOSConfig) { + this.innerModel().withLinuxOSConfig(linuxOSConfig); + return this; + } + + public AgentPoolImpl withEnableEncryptionAtHost(Boolean enableEncryptionAtHost) { + this.innerModel().withEnableEncryptionAtHost(enableEncryptionAtHost); + return this; + } + + public AgentPoolImpl withEnableUltraSsd(Boolean enableUltraSsd) { + this.innerModel().withEnableUltraSsd(enableUltraSsd); + return this; + } + + public AgentPoolImpl withEnableFips(Boolean enableFips) { + this.innerModel().withEnableFips(enableFips); + return this; + } + + public AgentPoolImpl withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile) { + this.innerModel().withGpuInstanceProfile(gpuInstanceProfile); + return this; + } + + public AgentPoolImpl withCreationData(CreationData creationData) { + this.innerModel().withCreationData(creationData); + return this; + } + + public AgentPoolImpl withCapacityReservationGroupId(String capacityReservationGroupId) { + this.innerModel().withCapacityReservationGroupId(capacityReservationGroupId); + return this; + } + + public AgentPoolImpl withHostGroupId(String hostGroupId) { + this.innerModel().withHostGroupId(hostGroupId); + return this; + } + + public AgentPoolImpl withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { + this.innerModel().withWindowsProfile(windowsProfile); + return this; + } + + public AgentPoolImpl withNetworkProfile(AgentPoolNetworkProfile networkProfile) { + this.innerModel().withNetworkProfile(networkProfile); + return this; + } + + public AgentPoolImpl withSecurityProfile(AgentPoolSecurityProfile securityProfile) { + this.innerModel().withSecurityProfile(securityProfile); + return this; + } + + public AgentPoolImpl withGpuProfile(AgentPoolGpuProfile gpuProfile) { + this.innerModel().withGpuProfile(gpuProfile); + return this; + } + + public AgentPoolImpl withArtifactStreamingProfile(AgentPoolArtifactStreamingProfile artifactStreamingProfile) { + this.innerModel().withArtifactStreamingProfile(artifactStreamingProfile); + return this; + } + + public AgentPoolImpl withVirtualMachinesProfile(VirtualMachinesProfile virtualMachinesProfile) { + this.innerModel().withVirtualMachinesProfile(virtualMachinesProfile); + return this; + } + + public AgentPoolImpl withVirtualMachineNodesStatus(List virtualMachineNodesStatus) { + this.innerModel().withVirtualMachineNodesStatus(virtualMachineNodesStatus); + return this; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolUpgradeProfileImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolUpgradeProfileImpl.java new file mode 100644 index 0000000000000..eda0239277dd8 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolUpgradeProfileImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolUpgradeProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolUpgradeProfilePropertiesUpgradesItem; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import java.util.Collections; +import java.util.List; + +public final class AgentPoolUpgradeProfileImpl implements AgentPoolUpgradeProfile { + private AgentPoolUpgradeProfileInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + AgentPoolUpgradeProfileImpl(AgentPoolUpgradeProfileInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String kubernetesVersion() { + return this.innerModel().kubernetesVersion(); + } + + public OSType osType() { + return this.innerModel().osType(); + } + + public List upgrades() { + List inner = this.innerModel().upgrades(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String latestNodeImageVersion() { + return this.innerModel().latestNodeImageVersion(); + } + + public AgentPoolUpgradeProfileInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolsClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolsClientImpl.java new file mode 100644 index 0000000000000..e5f1f91e49726 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolsClientImpl.java @@ -0,0 +1,2097 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.AgentPoolsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolAvailableVersionsInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolDeleteMachinesParameter; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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 = "ContainerServiceMana") + 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, @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("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, an error 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) + private 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 = "2023-11-02-preview"; + 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, an error 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 = "2023-11-02-preview"; + 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, an error 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) + private 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, an error 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, an error 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, an error 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, an error 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) + private 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, an error 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, an error 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, an error 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 = "2023-11-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, 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 = "2023-11-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, agentPoolName, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, agentPoolName, parameters); + 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, agentPoolName, parameters, 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) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters) + .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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters).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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, 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) { + return createOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters).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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 = "2023-11-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, 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 = "2023-11-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + resourceName, agentPoolName, ignorePodDisruptionBudget, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget); + 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) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String agentPoolName) { + final Boolean ignorePodDisruptionBudget = null; + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget); + 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, agentPoolName, + ignorePodDisruptionBudget, 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; + return this.beginDeleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget) + .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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) { + return beginDeleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget).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) + private Mono deleteAsync(String resourceGroupName, String resourceName, String agentPoolName) { + final Boolean ignorePodDisruptionBudget = null; + return beginDeleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget).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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, 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; + deleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget).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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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, Context context) { + deleteAsync(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Agent Pools 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 + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Agent Pools 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolsImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolsImpl.java new file mode 100644 index 0000000000000..1862ad72ee30d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/AgentPoolsImpl.java @@ -0,0 +1,249 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.AgentPoolsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolAvailableVersionsInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPool; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolAvailableVersions; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolDeleteMachinesParameter; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolUpgradeProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPools; + +public final class AgentPoolsImpl implements AgentPools { + private static final ClientLogger LOGGER = new ClientLogger(AgentPoolsImpl.class); + + private final AgentPoolsClient innerClient; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public AgentPoolsImpl(AgentPoolsClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void abortLatestOperation(String resourceGroupName, String resourceName, String agentPoolName) { + this.serviceClient().abortLatestOperation(resourceGroupName, resourceName, agentPoolName); + } + + public void abortLatestOperation(String resourceGroupName, String resourceName, String agentPoolName, + Context context) { + this.serviceClient().abortLatestOperation(resourceGroupName, resourceName, agentPoolName, context); + } + + public PagedIterable list(String resourceGroupName, String resourceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, resourceName); + return Utils.mapPage(inner, inner1 -> new AgentPoolImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String resourceName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, resourceName, context); + return Utils.mapPage(inner, inner1 -> new AgentPoolImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String resourceName, String agentPoolName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, resourceName, agentPoolName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AgentPoolImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AgentPool get(String resourceGroupName, String resourceName, String agentPoolName) { + AgentPoolInner inner = this.serviceClient().get(resourceGroupName, resourceName, agentPoolName); + if (inner != null) { + return new AgentPoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String resourceName, String agentPoolName) { + this.serviceClient().delete(resourceGroupName, resourceName, agentPoolName); + } + + public void delete(String resourceGroupName, String resourceName, String agentPoolName, + Boolean ignorePodDisruptionBudget, Context context) { + this.serviceClient().delete(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, context); + } + + public Response getUpgradeProfileWithResponse(String resourceGroupName, + String resourceName, String agentPoolName, Context context) { + Response inner = this.serviceClient() + .getUpgradeProfileWithResponse(resourceGroupName, resourceName, agentPoolName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AgentPoolUpgradeProfileImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AgentPoolUpgradeProfile getUpgradeProfile(String resourceGroupName, String resourceName, + String agentPoolName) { + AgentPoolUpgradeProfileInner inner + = this.serviceClient().getUpgradeProfile(resourceGroupName, resourceName, agentPoolName); + if (inner != null) { + return new AgentPoolUpgradeProfileImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteMachines(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolDeleteMachinesParameter machines) { + this.serviceClient().deleteMachines(resourceGroupName, resourceName, agentPoolName, machines); + } + + public void deleteMachines(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolDeleteMachinesParameter machines, Context context) { + this.serviceClient().deleteMachines(resourceGroupName, resourceName, agentPoolName, machines, context); + } + + public Response getAvailableAgentPoolVersionsWithResponse(String resourceGroupName, + String resourceName, Context context) { + Response inner + = this.serviceClient().getAvailableAgentPoolVersionsWithResponse(resourceGroupName, resourceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AgentPoolAvailableVersionsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AgentPoolAvailableVersions getAvailableAgentPoolVersions(String resourceGroupName, String resourceName) { + AgentPoolAvailableVersionsInner inner + = this.serviceClient().getAvailableAgentPoolVersions(resourceGroupName, resourceName); + if (inner != null) { + return new AgentPoolAvailableVersionsImpl(inner, this.manager()); + } else { + return null; + } + } + + public AgentPool upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName) { + AgentPoolInner inner + = this.serviceClient().upgradeNodeImageVersion(resourceGroupName, resourceName, agentPoolName); + if (inner != null) { + return new AgentPoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public AgentPool upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName, + Context context) { + AgentPoolInner inner + = this.serviceClient().upgradeNodeImageVersion(resourceGroupName, resourceName, agentPoolName, context); + if (inner != null) { + return new AgentPoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public AgentPool getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String agentPoolName = Utils.getValueFromIdByName(id, "agentPools"); + if (agentPoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'agentPools'.", id))); + } + return this.getWithResponse(resourceGroupName, resourceName, agentPoolName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String agentPoolName = Utils.getValueFromIdByName(id, "agentPools"); + if (agentPoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'agentPools'.", id))); + } + return this.getWithResponse(resourceGroupName, resourceName, agentPoolName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String agentPoolName = Utils.getValueFromIdByName(id, "agentPools"); + if (agentPoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'agentPools'.", id))); + } + Boolean localIgnorePodDisruptionBudget = null; + this.delete(resourceGroupName, resourceName, agentPoolName, localIgnorePodDisruptionBudget, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Boolean ignorePodDisruptionBudget, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String agentPoolName = Utils.getValueFromIdByName(id, "agentPools"); + if (agentPoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'agentPools'.", id))); + } + this.delete(resourceGroupName, resourceName, agentPoolName, ignorePodDisruptionBudget, context); + } + + private AgentPoolsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + public AgentPoolImpl define(String name) { + return new AgentPoolImpl(name, this.manager()); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServiceManagementClientBuilder.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServiceManagementClientBuilder.java new file mode 100644 index 0000000000000..227400366a141 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/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.containerservicemicrosoftcontainerserviceaks.generated.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 { + /* + * 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 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServiceManagementClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServiceManagementClientImpl.java new file mode 100644 index 0000000000000..86d7694fb71bd --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServiceManagementClientImpl.java @@ -0,0 +1,515 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.Response; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.management.polling.PollerFactory; +import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.AsyncPollResponse; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.AgentPoolsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ContainerServiceManagementClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ContainerServicesClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.MachinesClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.MaintenanceConfigurationsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ManagedClusterSnapshotsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ManagedClustersClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.OpenShiftManagedClustersClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.OperationStatusResultsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.OperationsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ResolvePrivateLinkServiceIdsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ScheduledEventsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.SnapshotsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.TrustedAccessRoleBindingsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.TrustedAccessRolesClient; +import java.io.IOException; +import java.lang.reflect.Type; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the ContainerServiceManagementClientImpl type. + */ +@ServiceClient(builder = ContainerServiceManagementClientBuilder.class) +public final class ContainerServiceManagementClientImpl implements ContainerServiceManagementClient { + /** + * 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; + } + + /** + * 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 OpenShiftManagedClustersClient object to access its operations. + */ + private final OpenShiftManagedClustersClient openShiftManagedClusters; + + /** + * Gets the OpenShiftManagedClustersClient object to access its operations. + * + * @return the OpenShiftManagedClustersClient object. + */ + public OpenShiftManagedClustersClient getOpenShiftManagedClusters() { + return this.openShiftManagedClusters; + } + + /** + * 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; + } + + /** + * 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 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 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 OperationStatusResultsClient object to access its operations. + */ + private final OperationStatusResultsClient operationStatusResults; + + /** + * Gets the OperationStatusResultsClient object to access its operations. + * + * @return the OperationStatusResultsClient object. + */ + public OperationStatusResultsClient getOperationStatusResults() { + return this.operationStatusResults; + } + + /** + * 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 ManagedClusterSnapshotsClient object to access its operations. + */ + private final ManagedClusterSnapshotsClient managedClusterSnapshots; + + /** + * Gets the ManagedClusterSnapshotsClient object to access its operations. + * + * @return the ManagedClusterSnapshotsClient object. + */ + public ManagedClusterSnapshotsClient getManagedClusterSnapshots() { + return this.managedClusterSnapshots; + } + + /** + * 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 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 ScheduledEventsClient object to access its operations. + */ + private final ScheduledEventsClient scheduledEvents; + + /** + * Gets the ScheduledEventsClient object to access its operations. + * + * @return the ScheduledEventsClient object. + */ + public ScheduledEventsClient getScheduledEvents() { + return this.scheduledEvents; + } + + /** + * 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 Subscription credentials which uniquely identify Microsoft Azure subscription. The + * subscription ID forms part of the URI for every service call. + * @param endpoint server parameter. + */ + ContainerServiceManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.defaultPollInterval = defaultPollInterval; + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.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.agentPools = new AgentPoolsClientImpl(this); + this.machines = new MachinesClientImpl(this); + this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); + this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); + this.resolvePrivateLinkServiceIds = new ResolvePrivateLinkServiceIdsClientImpl(this); + this.operationStatusResults = new OperationStatusResultsClientImpl(this); + this.snapshots = new SnapshotsClientImpl(this); + this.managedClusterSnapshots = new ManagedClusterSnapshotsClientImpl(this); + this.trustedAccessRoles = new TrustedAccessRolesClientImpl(this); + this.trustedAccessRoleBindings = new TrustedAccessRoleBindingsClientImpl(this); + this.scheduledEvents = new ScheduledEventsClientImpl(this); + } + + /** + * Gets default client context. + * + * @return the default client context. + */ + public Context getContext() { + return Context.NONE; + } + + /** + * Merges default client context with provided context. + * + * @param context the context to be merged with default client context. + * @return the merged context. + */ + public Context mergeContext(Context context) { + return CoreUtils.mergeContexts(this.getContext(), context); + } + + /** + * Gets long running operation result. + * + * @param activationResponse the response of activation operation. + * @param httpPipeline the http pipeline. + * @param pollResultType type of poll result. + * @param finalResultType type of final result. + * @param context the context shared by all requests. + * @param type of poll result. + * @param type of final result. + * @return poller flux for poll result and final result. + */ + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); + } + + /** + * Gets the final result, or an error, based on last async poll response. + * + * @param response the last async poll response. + * @param type of poll result. + * @param type of final result. + * @return the final result, or an error. + */ + public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { + if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { + String errorMessage; + ManagementError managementError = null; + HttpResponse errorResponse = null; + PollResult.Error lroError = response.getValue().getError(); + if (lroError != null) { + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); + + errorMessage = response.getValue().getError().getMessage(); + String errorBody = response.getValue().getError().getResponseBody(); + if (errorBody != null) { + // try to deserialize error body to ManagementError + try { + managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class, + SerializerEncoding.JSON); + if (managementError.getCode() == null || managementError.getMessage() == null) { + managementError = null; + } + } catch (IOException | RuntimeException ioe) { + LOGGER.logThrowableAsWarning(ioe); + } + } + } else { + // fallback to default error message + errorMessage = "Long running operation failed."; + } + if (managementError == null) { + // fallback to default ManagementError + managementError = new ManagementError(response.getStatus().toString(), errorMessage); + } + return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); + } else { + return response.getFinalResult(); + } + } + + private static final class HttpResponseImpl extends HttpResponse { + private final int statusCode; + + private final byte[] responseBody; + + private final HttpHeaders httpHeaders; + + HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { + super(null); + this.statusCode = statusCode; + this.httpHeaders = httpHeaders; + this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); + } + + public int getStatusCode() { + return statusCode; + } + + public String getHeaderValue(String s) { + return httpHeaders.getValue(s); + } + + public HttpHeaders getHeaders() { + return httpHeaders; + } + + public Flux getBody() { + return Flux.just(ByteBuffer.wrap(responseBody)); + } + + public Mono getBodyAsByteArray() { + return Mono.just(responseBody); + } + + public Mono getBodyAsString() { + return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); + } + + public Mono getBodyAsString(Charset charset) { + return Mono.just(new String(responseBody, charset)); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerServiceManagementClientImpl.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServicesClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServicesClientImpl.java new file mode 100644 index 0000000000000..b3a5f7c05cd9b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServicesClientImpl.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.containerservicemicrosoftcontainerserviceaks.generated.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.ContainerServicesClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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 = "ContainerServiceMana") + 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) + private 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) + private 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServicesImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServicesImpl.java new file mode 100644 index 0000000000000..a2a2ac834d0d4 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ContainerServicesImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ContainerServicesClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OrchestratorVersionProfileListResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServices; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OrchestratorVersionProfileListResult; + +public final class ContainerServicesImpl implements ContainerServices { + private static final ClientLogger LOGGER = new ClientLogger(ContainerServicesImpl.class); + + private final ContainerServicesClient innerClient; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public ContainerServicesImpl(ContainerServicesClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response listOrchestratorsWithResponse(String location, + String resourceType, Context context) { + Response inner + = this.serviceClient().listOrchestratorsWithResponse(location, resourceType, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new OrchestratorVersionProfileListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public OrchestratorVersionProfileListResult listOrchestrators(String location) { + OrchestratorVersionProfileListResultInner inner = this.serviceClient().listOrchestrators(location); + if (inner != null) { + return new OrchestratorVersionProfileListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + private ContainerServicesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/CredentialResultsImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/CredentialResultsImpl.java new file mode 100644 index 0000000000000..737b08f83277a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/CredentialResultsImpl.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.CredentialResultsInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CredentialResult; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CredentialResults; +import java.util.Collections; +import java.util.List; + +public final class CredentialResultsImpl implements CredentialResults { + private CredentialResultsInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + CredentialResultsImpl(CredentialResultsInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List kubeconfigs() { + List inner = this.innerModel().kubeconfigs(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public CredentialResultsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/GuardrailsAvailableVersionImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/GuardrailsAvailableVersionImpl.java new file mode 100644 index 0000000000000..0262b38105586 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/GuardrailsAvailableVersionImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.GuardrailsAvailableVersionInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.GuardrailsAvailableVersion; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.GuardrailsAvailableVersionsProperties; + +public final class GuardrailsAvailableVersionImpl implements GuardrailsAvailableVersion { + private GuardrailsAvailableVersionInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + GuardrailsAvailableVersionImpl(GuardrailsAvailableVersionInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public GuardrailsAvailableVersionsProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public GuardrailsAvailableVersionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/KubernetesVersionListResultImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/KubernetesVersionListResultImpl.java new file mode 100644 index 0000000000000..7ed6df25fe7d5 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/KubernetesVersionListResultImpl.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.KubernetesVersionListResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesVersion; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesVersionListResult; +import java.util.Collections; +import java.util.List; + +public final class KubernetesVersionListResultImpl implements KubernetesVersionListResult { + private KubernetesVersionListResultInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + KubernetesVersionListResultImpl(KubernetesVersionListResultInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List values() { + List inner = this.innerModel().values(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public KubernetesVersionListResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MachineImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MachineImpl.java new file mode 100644 index 0000000000000..0043622a5a725 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MachineImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MachineInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Machine; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MachineProperties; + +public final class MachineImpl implements Machine { + private MachineInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + MachineImpl(MachineInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public MachineProperties properties() { + return this.innerModel().properties(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public MachineInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MachinesClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MachinesClientImpl.java new file mode 100644 index 0000000000000..a0ff890888cbd --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MachinesClientImpl.java @@ -0,0 +1,449 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.MachinesClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MachineInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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 = "ContainerServiceMana") + 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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 + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Machines 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 + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Machines 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MachinesImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MachinesImpl.java new file mode 100644 index 0000000000000..9a3adff96123c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MachinesImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.MachinesClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MachineInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Machine; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Machines; + +public final class MachinesImpl implements Machines { + private static final ClientLogger LOGGER = new ClientLogger(MachinesImpl.class); + + private final MachinesClient innerClient; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public MachinesImpl(MachinesClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String resourceName, String agentPoolName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, resourceName, agentPoolName); + return Utils.mapPage(inner, inner1 -> new MachineImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String resourceName, String agentPoolName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceName, agentPoolName, context); + return Utils.mapPage(inner, inner1 -> new MachineImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, resourceName, + agentPoolName, machineName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MachineImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Machine get(String resourceGroupName, String resourceName, String agentPoolName, String machineName) { + MachineInner inner = this.serviceClient().get(resourceGroupName, resourceName, agentPoolName, machineName); + if (inner != null) { + return new MachineImpl(inner, this.manager()); + } else { + return null; + } + } + + private MachinesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationImpl.java new file mode 100644 index 0000000000000..6aead99529257 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationImpl.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MaintenanceConfigurationInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MaintenanceConfiguration; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MaintenanceWindow; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TimeInWeek; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TimeSpan; +import java.util.Collections; +import java.util.List; + +public final class MaintenanceConfigurationImpl + implements MaintenanceConfiguration, MaintenanceConfiguration.Definition, MaintenanceConfiguration.Update { + private MaintenanceConfigurationInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public List timeInWeek() { + List inner = this.innerModel().timeInWeek(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List notAllowedTime() { + List inner = this.innerModel().notAllowedTime(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public MaintenanceWindow maintenanceWindow() { + return this.innerModel().maintenanceWindow(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public MaintenanceConfigurationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String resourceName; + + private String configName; + + public MaintenanceConfigurationImpl withExistingManagedCluster(String resourceGroupName, String resourceName) { + this.resourceGroupName = resourceGroupName; + this.resourceName = resourceName; + return this; + } + + public MaintenanceConfiguration create() { + this.innerObject = serviceManager.serviceClient().getMaintenanceConfigurations() + .createOrUpdateWithResponse(resourceGroupName, resourceName, configName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public MaintenanceConfiguration create(Context context) { + this.innerObject = serviceManager.serviceClient().getMaintenanceConfigurations() + .createOrUpdateWithResponse(resourceGroupName, resourceName, configName, this.innerModel(), context) + .getValue(); + return this; + } + + MaintenanceConfigurationImpl(String name, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = new MaintenanceConfigurationInner(); + this.serviceManager = serviceManager; + this.configName = name; + } + + public MaintenanceConfigurationImpl update() { + return this; + } + + public MaintenanceConfiguration apply() { + this.innerObject = serviceManager.serviceClient().getMaintenanceConfigurations() + .createOrUpdateWithResponse(resourceGroupName, resourceName, configName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public MaintenanceConfiguration apply(Context context) { + this.innerObject = serviceManager.serviceClient().getMaintenanceConfigurations() + .createOrUpdateWithResponse(resourceGroupName, resourceName, configName, this.innerModel(), context) + .getValue(); + return this; + } + + MaintenanceConfigurationImpl(MaintenanceConfigurationInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "managedClusters"); + this.configName = Utils.getValueFromIdByName(innerObject.id(), "maintenanceConfigurations"); + } + + public MaintenanceConfiguration refresh() { + this.innerObject = serviceManager.serviceClient().getMaintenanceConfigurations() + .getWithResponse(resourceGroupName, resourceName, configName, Context.NONE).getValue(); + return this; + } + + public MaintenanceConfiguration refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getMaintenanceConfigurations() + .getWithResponse(resourceGroupName, resourceName, configName, context).getValue(); + return this; + } + + public MaintenanceConfigurationImpl withTimeInWeek(List timeInWeek) { + this.innerModel().withTimeInWeek(timeInWeek); + return this; + } + + public MaintenanceConfigurationImpl withNotAllowedTime(List notAllowedTime) { + this.innerModel().withNotAllowedTime(notAllowedTime); + return this; + } + + public MaintenanceConfigurationImpl withMaintenanceWindow(MaintenanceWindow maintenanceWindow) { + this.innerModel().withMaintenanceWindow(maintenanceWindow); + return this; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationsClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationsClientImpl.java new file mode 100644 index 0000000000000..ff5349cb59efd --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationsClientImpl.java @@ -0,0 +1,742 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.MaintenanceConfigurationsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MaintenanceConfigurationInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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 = "ContainerServiceMana") + 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 = "2023-11-02-preview"; + 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 = "2023-11-02-preview"; + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + private 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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. + * @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) + private 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 = "2023-11-02-preview"; + 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. + * @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 = "2023-11-02-preview"; + 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. + * @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) + private 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. + * @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. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 = "2023-11-02-preview"; + 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 = "2023-11-02-preview"; + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List maintenance configurations operation 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 + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List maintenance configurations operation 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationsImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationsImpl.java new file mode 100644 index 0000000000000..4cd3022b4a1ba --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MaintenanceConfigurationsImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.MaintenanceConfigurationsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MaintenanceConfigurationInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MaintenanceConfiguration; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MaintenanceConfigurations; + +public final class MaintenanceConfigurationsImpl implements MaintenanceConfigurations { + private static final ClientLogger LOGGER = new ClientLogger(MaintenanceConfigurationsImpl.class); + + private final MaintenanceConfigurationsClient innerClient; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public MaintenanceConfigurationsImpl(MaintenanceConfigurationsClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName) { + PagedIterable inner + = this.serviceClient().listByManagedCluster(resourceGroupName, resourceName); + return Utils.mapPage(inner, inner1 -> new MaintenanceConfigurationImpl(inner1, this.manager())); + } + + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context) { + PagedIterable inner + = this.serviceClient().listByManagedCluster(resourceGroupName, resourceName, context); + return Utils.mapPage(inner, inner1 -> new MaintenanceConfigurationImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String resourceName, + String configName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, resourceName, configName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MaintenanceConfigurationImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MaintenanceConfiguration get(String resourceGroupName, String resourceName, String configName) { + MaintenanceConfigurationInner inner = this.serviceClient().get(resourceGroupName, resourceName, configName); + if (inner != null) { + return new MaintenanceConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse(String resourceGroupName, String resourceName, String configName, + Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, configName, context); + } + + public void delete(String resourceGroupName, String resourceName, String configName) { + this.serviceClient().delete(resourceGroupName, resourceName, configName); + } + + public MaintenanceConfiguration getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String configName = Utils.getValueFromIdByName(id, "maintenanceConfigurations"); + if (configName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'maintenanceConfigurations'.", id))); + } + return this.getWithResponse(resourceGroupName, resourceName, configName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String configName = Utils.getValueFromIdByName(id, "maintenanceConfigurations"); + if (configName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'maintenanceConfigurations'.", id))); + } + return this.getWithResponse(resourceGroupName, resourceName, configName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String configName = Utils.getValueFromIdByName(id, "maintenanceConfigurations"); + if (configName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'maintenanceConfigurations'.", id))); + } + this.deleteWithResponse(resourceGroupName, resourceName, configName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String configName = Utils.getValueFromIdByName(id, "maintenanceConfigurations"); + if (configName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'maintenanceConfigurations'.", id))); + } + return this.deleteWithResponse(resourceGroupName, resourceName, configName, context); + } + + private MaintenanceConfigurationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + public MaintenanceConfigurationImpl define(String name) { + return new MaintenanceConfigurationImpl(name, this.manager()); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterAccessProfileImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterAccessProfileImpl.java new file mode 100644 index 0000000000000..ef2ad1e3597ad --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterAccessProfileImpl.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterAccessProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAccessProfile; +import java.util.Collections; +import java.util.Map; + +public final class ManagedClusterAccessProfileImpl implements ManagedClusterAccessProfile { + private ManagedClusterAccessProfileInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + ManagedClusterAccessProfileImpl(ManagedClusterAccessProfileInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public byte[] kubeConfig() { + return this.innerModel().kubeConfig(); + } + + public ManagedClusterAccessProfileInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterImpl.java new file mode 100644 index 0000000000000..a340d05fe144d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterImpl.java @@ -0,0 +1,725 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ClusterUpgradeSettings; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceLinuxProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceNetworkProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CredentialResults; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ExtendedLocation; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Format; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesSupportPlan; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedCluster; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAIToolchainOperatorProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAddonProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterApiServerAccessProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAutoUpgradeProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAzureMonitorProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterHttpProxyConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterIdentity; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterIngressProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterMetricsProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterNodeProvisioningProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterNodeResourceGroupProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterOidcIssuerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentityProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPropertiesAutoScalerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterStorageProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWindowsProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWorkloadAutoScalerProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PowerState; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkResource; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PublicNetworkAccess; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RunCommandRequest; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RunCommandResult; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SafeguardsProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ServiceMeshProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TagsObject; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.UserAssignedIdentity; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +public final class ManagedClusterImpl implements ManagedCluster, ManagedCluster.Definition, ManagedCluster.Update { + private ManagedClusterInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ManagedClusterSku sku() { + return this.innerModel().sku(); + } + + public ExtendedLocation extendedLocation() { + return this.innerModel().extendedLocation(); + } + + public ManagedClusterIdentity identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String provisioningState() { + return this.innerModel().provisioningState(); + } + + public PowerState powerState() { + return this.innerModel().powerState(); + } + + public CreationData creationData() { + return this.innerModel().creationData(); + } + + public Integer maxAgentPools() { + return this.innerModel().maxAgentPools(); + } + + public String kubernetesVersion() { + return this.innerModel().kubernetesVersion(); + } + + public String currentKubernetesVersion() { + return this.innerModel().currentKubernetesVersion(); + } + + public String dnsPrefix() { + return this.innerModel().dnsPrefix(); + } + + public String fqdnSubdomain() { + return this.innerModel().fqdnSubdomain(); + } + + public String fqdn() { + return this.innerModel().fqdn(); + } + + public String privateFqdn() { + return this.innerModel().privateFqdn(); + } + + public String azurePortalFqdn() { + return this.innerModel().azurePortalFqdn(); + } + + public List agentPoolProfiles() { + List inner = this.innerModel().agentPoolProfiles(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ContainerServiceLinuxProfile linuxProfile() { + return this.innerModel().linuxProfile(); + } + + public ManagedClusterWindowsProfile windowsProfile() { + return this.innerModel().windowsProfile(); + } + + public ManagedClusterServicePrincipalProfile servicePrincipalProfile() { + return this.innerModel().servicePrincipalProfile(); + } + + public Map addonProfiles() { + Map inner = this.innerModel().addonProfiles(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ManagedClusterPodIdentityProfile podIdentityProfile() { + return this.innerModel().podIdentityProfile(); + } + + public ManagedClusterOidcIssuerProfile oidcIssuerProfile() { + return this.innerModel().oidcIssuerProfile(); + } + + public String nodeResourceGroup() { + return this.innerModel().nodeResourceGroup(); + } + + public ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile() { + return this.innerModel().nodeResourceGroupProfile(); + } + + public Boolean enableRbac() { + return this.innerModel().enableRbac(); + } + + public KubernetesSupportPlan supportPlan() { + return this.innerModel().supportPlan(); + } + + public Boolean enablePodSecurityPolicy() { + return this.innerModel().enablePodSecurityPolicy(); + } + + public Boolean enableNamespaceResources() { + return this.innerModel().enableNamespaceResources(); + } + + public ContainerServiceNetworkProfile networkProfile() { + return this.innerModel().networkProfile(); + } + + public ManagedClusterAadProfile aadProfile() { + return this.innerModel().aadProfile(); + } + + public ManagedClusterAutoUpgradeProfile autoUpgradeProfile() { + return this.innerModel().autoUpgradeProfile(); + } + + public ClusterUpgradeSettings upgradeSettings() { + return this.innerModel().upgradeSettings(); + } + + public ManagedClusterPropertiesAutoScalerProfile autoScalerProfile() { + return this.innerModel().autoScalerProfile(); + } + + public ManagedClusterApiServerAccessProfile apiServerAccessProfile() { + return this.innerModel().apiServerAccessProfile(); + } + + public String diskEncryptionSetId() { + return this.innerModel().diskEncryptionSetId(); + } + + public Map identityProfile() { + Map inner = this.innerModel().identityProfile(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public List privateLinkResources() { + List inner = this.innerModel().privateLinkResources(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())).collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public Boolean disableLocalAccounts() { + return this.innerModel().disableLocalAccounts(); + } + + public ManagedClusterHttpProxyConfig httpProxyConfig() { + return this.innerModel().httpProxyConfig(); + } + + public ManagedClusterSecurityProfile securityProfile() { + return this.innerModel().securityProfile(); + } + + public ManagedClusterStorageProfile storageProfile() { + return this.innerModel().storageProfile(); + } + + public ManagedClusterIngressProfile ingressProfile() { + return this.innerModel().ingressProfile(); + } + + public PublicNetworkAccess publicNetworkAccess() { + return this.innerModel().publicNetworkAccess(); + } + + public ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile() { + return this.innerModel().workloadAutoScalerProfile(); + } + + public ManagedClusterAzureMonitorProfile azureMonitorProfile() { + return this.innerModel().azureMonitorProfile(); + } + + public SafeguardsProfile safeguardsProfile() { + return this.innerModel().safeguardsProfile(); + } + + public ServiceMeshProfile serviceMeshProfile() { + return this.innerModel().serviceMeshProfile(); + } + + public String resourceUid() { + return this.innerModel().resourceUid(); + } + + public ManagedClusterMetricsProfile metricsProfile() { + return this.innerModel().metricsProfile(); + } + + public ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile() { + return this.innerModel().aiToolchainOperatorProfile(); + } + + public ManagedClusterNodeProvisioningProfile nodeProvisioningProfile() { + return this.innerModel().nodeProvisioningProfile(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ManagedClusterInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String resourceName; + + private TagsObject updateParameters; + + public ManagedClusterImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public ManagedCluster create() { + this.innerObject = serviceManager.serviceClient().getManagedClusters().createOrUpdate(resourceGroupName, + resourceName, this.innerModel(), Context.NONE); + return this; + } + + public ManagedCluster create(Context context) { + this.innerObject = serviceManager.serviceClient().getManagedClusters().createOrUpdate(resourceGroupName, + resourceName, this.innerModel(), context); + return this; + } + + ManagedClusterImpl(String name, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = new ManagedClusterInner(); + this.serviceManager = serviceManager; + this.resourceName = name; + } + + public ManagedClusterImpl update() { + this.updateParameters = new TagsObject(); + return this; + } + + public ManagedCluster apply() { + this.innerObject = serviceManager.serviceClient().getManagedClusters().updateTags(resourceGroupName, + resourceName, updateParameters, Context.NONE); + return this; + } + + public ManagedCluster apply(Context context) { + this.innerObject = serviceManager.serviceClient().getManagedClusters().updateTags(resourceGroupName, + resourceName, updateParameters, context); + return this; + } + + ManagedClusterImpl(ManagedClusterInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "managedClusters"); + } + + public ManagedCluster refresh() { + this.innerObject = serviceManager.serviceClient().getManagedClusters() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + return this; + } + + public ManagedCluster refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getManagedClusters() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, context).getValue(); + return this; + } + + public Response listClusterAdminCredentialsWithResponse(String serverFqdn, Context context) { + return serviceManager.managedClusters().listClusterAdminCredentialsWithResponse(resourceGroupName, resourceName, + serverFqdn, context); + } + + public CredentialResults listClusterAdminCredentials() { + return serviceManager.managedClusters().listClusterAdminCredentials(resourceGroupName, resourceName); + } + + public Response listClusterUserCredentialsWithResponse(String serverFqdn, Format format, + Context context) { + return serviceManager.managedClusters().listClusterUserCredentialsWithResponse(resourceGroupName, resourceName, + serverFqdn, format, context); + } + + public CredentialResults listClusterUserCredentials() { + return serviceManager.managedClusters().listClusterUserCredentials(resourceGroupName, resourceName); + } + + public Response listClusterMonitoringUserCredentialsWithResponse(String serverFqdn, + Context context) { + return serviceManager.managedClusters().listClusterMonitoringUserCredentialsWithResponse(resourceGroupName, + resourceName, serverFqdn, context); + } + + public CredentialResults listClusterMonitoringUserCredentials() { + return serviceManager.managedClusters().listClusterMonitoringUserCredentials(resourceGroupName, resourceName); + } + + public void resetServicePrincipalProfile(ManagedClusterServicePrincipalProfile parameters) { + serviceManager.managedClusters().resetServicePrincipalProfile(resourceGroupName, resourceName, parameters); + } + + public void resetServicePrincipalProfile(ManagedClusterServicePrincipalProfile parameters, Context context) { + serviceManager.managedClusters().resetServicePrincipalProfile(resourceGroupName, resourceName, parameters, + context); + } + + public void resetAadProfile(ManagedClusterAadProfile parameters) { + serviceManager.managedClusters().resetAadProfile(resourceGroupName, resourceName, parameters); + } + + public void resetAadProfile(ManagedClusterAadProfile parameters, Context context) { + serviceManager.managedClusters().resetAadProfile(resourceGroupName, resourceName, parameters, context); + } + + public void rotateClusterCertificates() { + serviceManager.managedClusters().rotateClusterCertificates(resourceGroupName, resourceName); + } + + public void rotateClusterCertificates(Context context) { + serviceManager.managedClusters().rotateClusterCertificates(resourceGroupName, resourceName, context); + } + + public void rotateServiceAccountSigningKeys() { + serviceManager.managedClusters().rotateServiceAccountSigningKeys(resourceGroupName, resourceName); + } + + public void rotateServiceAccountSigningKeys(Context context) { + serviceManager.managedClusters().rotateServiceAccountSigningKeys(resourceGroupName, resourceName, context); + } + + public void stop() { + serviceManager.managedClusters().stop(resourceGroupName, resourceName); + } + + public void stop(Context context) { + serviceManager.managedClusters().stop(resourceGroupName, resourceName, context); + } + + public void start() { + serviceManager.managedClusters().start(resourceGroupName, resourceName); + } + + public void start(Context context) { + serviceManager.managedClusters().start(resourceGroupName, resourceName, context); + } + + public RunCommandResult runCommand(RunCommandRequest requestPayload) { + return serviceManager.managedClusters().runCommand(resourceGroupName, resourceName, requestPayload); + } + + public RunCommandResult runCommand(RunCommandRequest requestPayload, Context context) { + return serviceManager.managedClusters().runCommand(resourceGroupName, resourceName, requestPayload, context); + } + + public ManagedClusterImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ManagedClusterImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ManagedClusterImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateParameters.withTags(tags); + return this; + } + } + + public ManagedClusterImpl withSku(ManagedClusterSku sku) { + this.innerModel().withSku(sku); + return this; + } + + public ManagedClusterImpl withExtendedLocation(ExtendedLocation extendedLocation) { + this.innerModel().withExtendedLocation(extendedLocation); + return this; + } + + public ManagedClusterImpl withIdentity(ManagedClusterIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + + public ManagedClusterImpl withCreationData(CreationData creationData) { + this.innerModel().withCreationData(creationData); + return this; + } + + public ManagedClusterImpl withKubernetesVersion(String kubernetesVersion) { + this.innerModel().withKubernetesVersion(kubernetesVersion); + return this; + } + + public ManagedClusterImpl withDnsPrefix(String dnsPrefix) { + this.innerModel().withDnsPrefix(dnsPrefix); + return this; + } + + public ManagedClusterImpl withFqdnSubdomain(String fqdnSubdomain) { + this.innerModel().withFqdnSubdomain(fqdnSubdomain); + return this; + } + + public ManagedClusterImpl withAgentPoolProfiles(List agentPoolProfiles) { + this.innerModel().withAgentPoolProfiles(agentPoolProfiles); + return this; + } + + public ManagedClusterImpl withLinuxProfile(ContainerServiceLinuxProfile linuxProfile) { + this.innerModel().withLinuxProfile(linuxProfile); + return this; + } + + public ManagedClusterImpl withWindowsProfile(ManagedClusterWindowsProfile windowsProfile) { + this.innerModel().withWindowsProfile(windowsProfile); + return this; + } + + public ManagedClusterImpl + withServicePrincipalProfile(ManagedClusterServicePrincipalProfile servicePrincipalProfile) { + this.innerModel().withServicePrincipalProfile(servicePrincipalProfile); + return this; + } + + public ManagedClusterImpl withAddonProfiles(Map addonProfiles) { + this.innerModel().withAddonProfiles(addonProfiles); + return this; + } + + public ManagedClusterImpl withPodIdentityProfile(ManagedClusterPodIdentityProfile podIdentityProfile) { + this.innerModel().withPodIdentityProfile(podIdentityProfile); + return this; + } + + public ManagedClusterImpl withOidcIssuerProfile(ManagedClusterOidcIssuerProfile oidcIssuerProfile) { + this.innerModel().withOidcIssuerProfile(oidcIssuerProfile); + return this; + } + + public ManagedClusterImpl withNodeResourceGroup(String nodeResourceGroup) { + this.innerModel().withNodeResourceGroup(nodeResourceGroup); + return this; + } + + public ManagedClusterImpl + withNodeResourceGroupProfile(ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile) { + this.innerModel().withNodeResourceGroupProfile(nodeResourceGroupProfile); + return this; + } + + public ManagedClusterImpl withEnableRbac(Boolean enableRbac) { + this.innerModel().withEnableRbac(enableRbac); + return this; + } + + public ManagedClusterImpl withSupportPlan(KubernetesSupportPlan supportPlan) { + this.innerModel().withSupportPlan(supportPlan); + return this; + } + + public ManagedClusterImpl withEnablePodSecurityPolicy(Boolean enablePodSecurityPolicy) { + this.innerModel().withEnablePodSecurityPolicy(enablePodSecurityPolicy); + return this; + } + + public ManagedClusterImpl withEnableNamespaceResources(Boolean enableNamespaceResources) { + this.innerModel().withEnableNamespaceResources(enableNamespaceResources); + return this; + } + + public ManagedClusterImpl withNetworkProfile(ContainerServiceNetworkProfile networkProfile) { + this.innerModel().withNetworkProfile(networkProfile); + return this; + } + + public ManagedClusterImpl withAadProfile(ManagedClusterAadProfile aadProfile) { + this.innerModel().withAadProfile(aadProfile); + return this; + } + + public ManagedClusterImpl withAutoUpgradeProfile(ManagedClusterAutoUpgradeProfile autoUpgradeProfile) { + this.innerModel().withAutoUpgradeProfile(autoUpgradeProfile); + return this; + } + + public ManagedClusterImpl withUpgradeSettings(ClusterUpgradeSettings upgradeSettings) { + this.innerModel().withUpgradeSettings(upgradeSettings); + return this; + } + + public ManagedClusterImpl withAutoScalerProfile(ManagedClusterPropertiesAutoScalerProfile autoScalerProfile) { + this.innerModel().withAutoScalerProfile(autoScalerProfile); + return this; + } + + public ManagedClusterImpl withApiServerAccessProfile(ManagedClusterApiServerAccessProfile apiServerAccessProfile) { + this.innerModel().withApiServerAccessProfile(apiServerAccessProfile); + return this; + } + + public ManagedClusterImpl withDiskEncryptionSetId(String diskEncryptionSetId) { + this.innerModel().withDiskEncryptionSetId(diskEncryptionSetId); + return this; + } + + public ManagedClusterImpl withIdentityProfile(Map identityProfile) { + this.innerModel().withIdentityProfile(identityProfile); + return this; + } + + public ManagedClusterImpl withPrivateLinkResources(List privateLinkResources) { + this.innerModel().withPrivateLinkResources(privateLinkResources); + return this; + } + + public ManagedClusterImpl withDisableLocalAccounts(Boolean disableLocalAccounts) { + this.innerModel().withDisableLocalAccounts(disableLocalAccounts); + return this; + } + + public ManagedClusterImpl withHttpProxyConfig(ManagedClusterHttpProxyConfig httpProxyConfig) { + this.innerModel().withHttpProxyConfig(httpProxyConfig); + return this; + } + + public ManagedClusterImpl withSecurityProfile(ManagedClusterSecurityProfile securityProfile) { + this.innerModel().withSecurityProfile(securityProfile); + return this; + } + + public ManagedClusterImpl withStorageProfile(ManagedClusterStorageProfile storageProfile) { + this.innerModel().withStorageProfile(storageProfile); + return this; + } + + public ManagedClusterImpl withIngressProfile(ManagedClusterIngressProfile ingressProfile) { + this.innerModel().withIngressProfile(ingressProfile); + return this; + } + + public ManagedClusterImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.innerModel().withPublicNetworkAccess(publicNetworkAccess); + return this; + } + + public ManagedClusterImpl + withWorkloadAutoScalerProfile(ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile) { + this.innerModel().withWorkloadAutoScalerProfile(workloadAutoScalerProfile); + return this; + } + + public ManagedClusterImpl withAzureMonitorProfile(ManagedClusterAzureMonitorProfile azureMonitorProfile) { + this.innerModel().withAzureMonitorProfile(azureMonitorProfile); + return this; + } + + public ManagedClusterImpl withSafeguardsProfile(SafeguardsProfile safeguardsProfile) { + this.innerModel().withSafeguardsProfile(safeguardsProfile); + return this; + } + + public ManagedClusterImpl withServiceMeshProfile(ServiceMeshProfile serviceMeshProfile) { + this.innerModel().withServiceMeshProfile(serviceMeshProfile); + return this; + } + + public ManagedClusterImpl withMetricsProfile(ManagedClusterMetricsProfile metricsProfile) { + this.innerModel().withMetricsProfile(metricsProfile); + return this; + } + + public ManagedClusterImpl + withAiToolchainOperatorProfile(ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile) { + this.innerModel().withAiToolchainOperatorProfile(aiToolchainOperatorProfile); + return this; + } + + public ManagedClusterImpl + withNodeProvisioningProfile(ManagedClusterNodeProvisioningProfile nodeProvisioningProfile) { + this.innerModel().withNodeProvisioningProfile(nodeProvisioningProfile); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterSnapshotImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterSnapshotImpl.java new file mode 100644 index 0000000000000..a9f4e532a528d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterSnapshotImpl.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterSnapshotInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPropertiesForSnapshot; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSnapshot; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SnapshotType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TagsObject; +import java.util.Collections; +import java.util.Map; + +public final class ManagedClusterSnapshotImpl + implements ManagedClusterSnapshot, ManagedClusterSnapshot.Definition, ManagedClusterSnapshot.Update { + private ManagedClusterSnapshotInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public CreationData creationData() { + return this.innerModel().creationData(); + } + + public SnapshotType snapshotType() { + return this.innerModel().snapshotType(); + } + + public ManagedClusterPropertiesForSnapshot managedClusterPropertiesReadOnly() { + return this.innerModel().managedClusterPropertiesReadOnly(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ManagedClusterSnapshotInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String resourceName; + + private TagsObject updateParameters; + + public ManagedClusterSnapshotImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public ManagedClusterSnapshot create() { + this.innerObject = serviceManager.serviceClient().getManagedClusterSnapshots() + .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), Context.NONE).getValue(); + return this; + } + + public ManagedClusterSnapshot create(Context context) { + this.innerObject = serviceManager.serviceClient().getManagedClusterSnapshots() + .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), context).getValue(); + return this; + } + + ManagedClusterSnapshotImpl(String name, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = new ManagedClusterSnapshotInner(); + this.serviceManager = serviceManager; + this.resourceName = name; + } + + public ManagedClusterSnapshotImpl update() { + this.updateParameters = new TagsObject(); + return this; + } + + public ManagedClusterSnapshot apply() { + this.innerObject = serviceManager.serviceClient().getManagedClusterSnapshots() + .updateTagsWithResponse(resourceGroupName, resourceName, updateParameters, Context.NONE).getValue(); + return this; + } + + public ManagedClusterSnapshot apply(Context context) { + this.innerObject = serviceManager.serviceClient().getManagedClusterSnapshots() + .updateTagsWithResponse(resourceGroupName, resourceName, updateParameters, context).getValue(); + return this; + } + + ManagedClusterSnapshotImpl(ManagedClusterSnapshotInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "managedclustersnapshots"); + } + + public ManagedClusterSnapshot refresh() { + this.innerObject = serviceManager.serviceClient().getManagedClusterSnapshots() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + return this; + } + + public ManagedClusterSnapshot refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getManagedClusterSnapshots() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, context).getValue(); + return this; + } + + public ManagedClusterSnapshotImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ManagedClusterSnapshotImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ManagedClusterSnapshotImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateParameters.withTags(tags); + return this; + } + } + + public ManagedClusterSnapshotImpl withCreationData(CreationData creationData) { + this.innerModel().withCreationData(creationData); + return this; + } + + public ManagedClusterSnapshotImpl withSnapshotType(SnapshotType snapshotType) { + this.innerModel().withSnapshotType(snapshotType); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterSnapshotsClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterSnapshotsClientImpl.java new file mode 100644 index 0000000000000..20c2d960f984e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterSnapshotsClientImpl.java @@ -0,0 +1,1016 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.ManagedClusterSnapshotsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterSnapshotInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSnapshotListResult; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TagsObject; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ManagedClusterSnapshotsClient. + */ +public final class ManagedClusterSnapshotsClientImpl implements ManagedClusterSnapshotsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ManagedClusterSnapshotsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of ManagedClusterSnapshotsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ManagedClusterSnapshotsClientImpl(ContainerServiceManagementClientImpl client) { + this.service = RestProxy.create(ManagedClusterSnapshotsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientManagedClusterSnapshots to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceMana") + public interface ManagedClusterSnapshotsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedclustersnapshots") + @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/managedclustersnapshots") + @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/managedclustersnapshots/{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/managedclustersnapshots/{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") ManagedClusterSnapshotInner parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{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/managedclustersnapshots/{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 managed cluster 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 managed cluster 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 = "2023-11-02-preview"; + 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 cluster 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 managed cluster 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 = "2023-11-02-preview"; + 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 cluster 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 managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of managed cluster 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 managed cluster 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 managed cluster 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 managed cluster 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 managed cluster 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 managed cluster 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 managed cluster 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 Managed Cluster 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 = "2023-11-02-preview"; + 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 cluster 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 Managed Cluster 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 = "2023-11-02-preview"; + 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 cluster 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 Managed Cluster Snapshots operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists managed cluster 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 Managed Cluster 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 managed cluster 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 Managed Cluster Snapshots operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Lists managed cluster 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 Managed Cluster 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 managed cluster 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 managed cluster snapshot along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private 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 = "2023-11-02-preview"; + 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 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 managed cluster 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 = "2023-11-02-preview"; + 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 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 managed cluster snapshot on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a managed cluster 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 managed cluster 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 managed cluster 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 managed cluster snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterSnapshotInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + /** + * Creates or updates a managed cluster 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 managed cluster 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 managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterSnapshotInner 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 = "2023-11-02-preview"; + 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 managed cluster 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 managed cluster 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 managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterSnapshotInner 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 = "2023-11-02-preview"; + 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 managed cluster 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 managed cluster 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 managed cluster snapshot resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + ManagedClusterSnapshotInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates or updates a managed cluster 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 managed cluster 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 managed cluster snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, + String resourceName, ManagedClusterSnapshotInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Creates or updates a managed cluster 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 managed cluster 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 managed cluster snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterSnapshotInner createOrUpdate(String resourceGroupName, String resourceName, + ManagedClusterSnapshotInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); + } + + /** + * Updates tags on a managed cluster 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 managed cluster 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 managed cluster 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) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 = "2023-11-02-preview"; + 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 managed cluster 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 managed cluster 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 managed cluster 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 = "2023-11-02-preview"; + 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 managed cluster 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 managed cluster 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 managed cluster snapshot resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync(String resourceGroupName, String resourceName, + TagsObject parameters) { + return updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates tags on a managed cluster 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 managed cluster 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 managed cluster 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 managed cluster 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 managed cluster 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 managed cluster snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterSnapshotInner updateTags(String resourceGroupName, String resourceName, + TagsObject parameters) { + return updateTagsWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); + } + + /** + * Deletes a managed cluster 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) + private 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 = "2023-11-02-preview"; + 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 managed cluster 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 = "2023-11-02-preview"; + 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 managed cluster 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) + private Mono deleteAsync(String resourceGroupName, String resourceName) { + return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap(ignored -> Mono.empty()); + } + + /** + * Deletes a managed cluster 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 managed cluster 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 + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Cluster Snapshots 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 + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Cluster Snapshots 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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Cluster 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())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Cluster 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterSnapshotsImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterSnapshotsImpl.java new file mode 100644 index 0000000000000..e8536b1e7fbfb --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterSnapshotsImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ManagedClusterSnapshotsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterSnapshotInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSnapshot; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSnapshots; + +public final class ManagedClusterSnapshotsImpl implements ManagedClusterSnapshots { + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterSnapshotsImpl.class); + + private final ManagedClusterSnapshotsClient innerClient; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public ManagedClusterSnapshotsImpl(ManagedClusterSnapshotsClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new ManagedClusterSnapshotImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new ManagedClusterSnapshotImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new ManagedClusterSnapshotImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new ManagedClusterSnapshotImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, + String resourceName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, resourceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ManagedClusterSnapshotImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ManagedClusterSnapshot getByResourceGroup(String resourceGroupName, String resourceName) { + ManagedClusterSnapshotInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); + if (inner != null) { + return new ManagedClusterSnapshotImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, context); + } + + public void deleteByResourceGroup(String resourceGroupName, String resourceName) { + this.serviceClient().delete(resourceGroupName, resourceName); + } + + public ManagedClusterSnapshot getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedclustersnapshots"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'managedclustersnapshots'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedclustersnapshots"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'managedclustersnapshots'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedclustersnapshots"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'managedclustersnapshots'.", id))); + } + this.deleteByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedclustersnapshots"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'managedclustersnapshots'.", id))); + } + return this.deleteByResourceGroupWithResponse(resourceGroupName, resourceName, context); + } + + private ManagedClusterSnapshotsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + public ManagedClusterSnapshotImpl define(String name) { + return new ManagedClusterSnapshotImpl(name, this.manager()); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterUpgradeProfileImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterUpgradeProfileImpl.java new file mode 100644 index 0000000000000..34ddab98d5ada --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClusterUpgradeProfileImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPoolUpgradeProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterUpgradeProfile; +import java.util.Collections; +import java.util.List; + +public final class ManagedClusterUpgradeProfileImpl implements ManagedClusterUpgradeProfile { + private ManagedClusterUpgradeProfileInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + ManagedClusterUpgradeProfileImpl(ManagedClusterUpgradeProfileInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ManagedClusterPoolUpgradeProfile controlPlaneProfile() { + return this.innerModel().controlPlaneProfile(); + } + + public List agentPoolProfiles() { + List inner = this.innerModel().agentPoolProfiles(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ManagedClusterUpgradeProfileInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClustersClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClustersClientImpl.java new file mode 100644 index 0000000000000..9713ce406a782 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClustersClientImpl.java @@ -0,0 +1,6228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.ManagedClustersClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.CredentialResultsInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.GuardrailsAvailableVersionInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.KubernetesVersionListResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterAccessProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshRevisionProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OSOptionProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OutboundEnvironmentEndpointInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.RunCommandResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SafeguardsAvailableVersionInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Format; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.GuardrailsAvailableVersionsList; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterListResult; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClustersGetCommandResultResponse; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshRevisionProfileList; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshUpgradeProfileList; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OutboundEnvironmentEndpointCollection; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RunCommandRequest; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SafeguardsAvailableVersionsList; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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 ManagedClustersClient. + */ +public final class ManagedClustersClientImpl implements 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 = "ContainerServiceMana") + public interface ManagedClustersService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getOSOptions(@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); + + @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, + @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, + @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, + @QueryParam("ignore-pod-disruption-budget") Boolean ignorePodDisruptionBudget, + @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}/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}/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}/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}/guardrailsVersions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getGuardrailsVersions(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("version") String version, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listGuardrailsVersions(@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}/safeguardsVersions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getSafeguardsVersions(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("version") String version, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSafeguardsVersions(@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}/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> listGuardrailsVersionsNext( + @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> listSafeguardsVersionsNext( + @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 supported OS options in the specified subscription. + * + * @param location The name of the Azure region. + * @param resourceType The resource type for which the OS options 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 supported OS options in the specified subscription along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getOSOptionsWithResponseAsync(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 = "2023-11-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getOSOptions(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), location, resourceType, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets supported OS options in the specified subscription. + * + * @param location The name of the Azure region. + * @param resourceType The resource type for which the OS options 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 supported OS options in the specified subscription along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getOSOptionsWithResponseAsync(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 = "2023-11-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getOSOptions(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), location, + resourceType, accept, context); + } + + /** + * Gets supported OS options in the specified subscription. + * + * @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 supported OS options in the specified subscription on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getOSOptionsAsync(String location) { + final String resourceType = null; + return getOSOptionsWithResponseAsync(location, resourceType).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets supported OS options in the specified subscription. + * + * @param location The name of the Azure region. + * @param resourceType The resource type for which the OS options 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 supported OS options in the specified subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getOSOptionsWithResponse(String location, String resourceType, + Context context) { + return getOSOptionsWithResponseAsync(location, resourceType, context).block(); + } + + /** + * Gets supported OS options in the specified subscription. + * + * @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 supported OS options in the specified subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OSOptionProfileInner getOSOptions(String location) { + final String resourceType = null; + return getOSOptionsWithResponse(location, resourceType, Context.NONE).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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 = "2023-11-02-preview"; + 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 managed 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, 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 = "2023-11-02-preview"; + 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 managed 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) + private PollerFlux, ManagedClusterInner> + beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, ManagedClusterInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters); + 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, 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) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters).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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters).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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, 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) { + return createOrUpdateAsync(resourceGroupName, resourceName, parameters).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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, parameters, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 = "2023-11-02-preview"; + 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 managed 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, 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 = "2023-11-02-preview"; + 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 managed 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) + private PollerFlux, ManagedClusterInner> + beginUpdateTagsAsync(String resourceGroupName, String resourceName, TagsObject parameters) { + Mono>> mono + = updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters); + 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, 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) { + return this.beginUpdateTagsAsync(resourceGroupName, resourceName, parameters).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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, Context context) { + return this.beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) { + return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters).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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, Context context) { + return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, 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) { + return updateTagsAsync(resourceGroupName, resourceName, parameters).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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, + Context context) { + return updateTagsAsync(resourceGroupName, resourceName, parameters, 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 ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, + Boolean ignorePodDisruptionBudget) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 = "2023-11-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, ignorePodDisruptionBudget, 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 ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, + Boolean ignorePodDisruptionBudget, 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 = "2023-11-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + resourceName, ignorePodDisruptionBudget, 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 ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, + Boolean ignorePodDisruptionBudget) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, ignorePodDisruptionBudget); + 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) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName) { + final Boolean ignorePodDisruptionBudget = null; + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, ignorePodDisruptionBudget); + 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 ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, + Boolean ignorePodDisruptionBudget, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, ignorePodDisruptionBudget, 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 Boolean ignorePodDisruptionBudget = null; + return this.beginDeleteAsync(resourceGroupName, resourceName, ignorePodDisruptionBudget).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 ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, + Boolean ignorePodDisruptionBudget, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, ignorePodDisruptionBudget, 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 ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, Boolean ignorePodDisruptionBudget) { + return beginDeleteAsync(resourceGroupName, resourceName, ignorePodDisruptionBudget).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) + private Mono deleteAsync(String resourceGroupName, String resourceName) { + final Boolean ignorePodDisruptionBudget = null; + return beginDeleteAsync(resourceGroupName, resourceName, ignorePodDisruptionBudget).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 ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, Boolean ignorePodDisruptionBudget, + Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, ignorePodDisruptionBudget, 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 Boolean ignorePodDisruptionBudget = null; + deleteAsync(resourceGroupName, resourceName, ignorePodDisruptionBudget).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 ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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, Boolean ignorePodDisruptionBudget, + Context context) { + deleteAsync(resourceGroupName, resourceName, ignorePodDisruptionBudget, 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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(); + } + + /** + * 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, an error 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) + private 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 = "2023-11-02-preview"; + 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, an error 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 = "2023-11-02-preview"; + 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, an error 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) + private 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, an error 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, an error 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, an error 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, an error 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) + private 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, an error 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, an error 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, an error 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 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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)); + } + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Guardrails Version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getGuardrailsVersionsWithResponseAsync(String location, + String version) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and 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 (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String apiVersion = "2023-11-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getGuardrailsVersions(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), location, version, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Guardrails Version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getGuardrailsVersionsWithResponseAsync(String location, + String version, 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 (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String apiVersion = "2023-11-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getGuardrailsVersions(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + location, version, accept, context); + } + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Guardrails Version on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getGuardrailsVersionsAsync(String location, String version) { + return getGuardrailsVersionsWithResponseAsync(location, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Guardrails Version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getGuardrailsVersionsWithResponse(String location, String version, + Context context) { + return getGuardrailsVersionsWithResponseAsync(location, version, context).block(); + } + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Guardrails Version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GuardrailsAvailableVersionInner getGuardrailsVersions(String location, String version) { + return getGuardrailsVersionsWithResponse(location, version, Context.NONE).getValue(); + } + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default 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 GuardrailsVersions along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listGuardrailsVersionsSinglePageAsync(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 = "2023-11-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listGuardrailsVersions(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())); + } + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default 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 GuardrailsVersions along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listGuardrailsVersionsSinglePageAsync(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 = "2023-11-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listGuardrailsVersions(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)); + } + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default 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 GuardrailsVersions as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listGuardrailsVersionsAsync(String location) { + return new PagedFlux<>(() -> listGuardrailsVersionsSinglePageAsync(location), + nextLink -> listGuardrailsVersionsNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default 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 GuardrailsVersions as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listGuardrailsVersionsAsync(String location, Context context) { + return new PagedFlux<>(() -> listGuardrailsVersionsSinglePageAsync(location, context), + nextLink -> listGuardrailsVersionsNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default 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 GuardrailsVersions as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listGuardrailsVersions(String location) { + return new PagedIterable<>(listGuardrailsVersionsAsync(location)); + } + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default 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 GuardrailsVersions as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listGuardrailsVersions(String location, Context context) { + return new PagedIterable<>(listGuardrailsVersionsAsync(location, context)); + } + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Safeguards Version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSafeguardsVersionsWithResponseAsync(String location, + String version) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and 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 (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String apiVersion = "2023-11-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getSafeguardsVersions(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), location, version, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Safeguards Version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSafeguardsVersionsWithResponseAsync(String location, + String version, 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 (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String apiVersion = "2023-11-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getSafeguardsVersions(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + location, version, accept, context); + } + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Safeguards Version on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSafeguardsVersionsAsync(String location, String version) { + return getSafeguardsVersionsWithResponseAsync(location, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Safeguards Version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSafeguardsVersionsWithResponse(String location, String version, + Context context) { + return getSafeguardsVersionsWithResponseAsync(location, version, context).block(); + } + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Safeguards Version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SafeguardsAvailableVersionInner getSafeguardsVersions(String location, String version) { + return getSafeguardsVersionsWithResponse(location, version, Context.NONE).getValue(); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default 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 SafeguardsVersions along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listSafeguardsVersionsSinglePageAsync(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 = "2023-11-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listSafeguardsVersions(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())); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default 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 SafeguardsVersions along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSafeguardsVersionsSinglePageAsync(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 = "2023-11-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listSafeguardsVersions(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)); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default 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 SafeguardsVersions as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSafeguardsVersionsAsync(String location) { + return new PagedFlux<>(() -> listSafeguardsVersionsSinglePageAsync(location), + nextLink -> listSafeguardsVersionsNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default 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 SafeguardsVersions as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSafeguardsVersionsAsync(String location, Context context) { + return new PagedFlux<>(() -> listSafeguardsVersionsSinglePageAsync(location, context), + nextLink -> listSafeguardsVersionsNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default 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 SafeguardsVersions as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSafeguardsVersions(String location) { + return new PagedIterable<>(listSafeguardsVersionsAsync(location)); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default 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 SafeguardsVersions as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSafeguardsVersions(String location, Context context) { + return new PagedIterable<>(listSafeguardsVersionsAsync(location, 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Clusters 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 + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Clusters 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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response 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())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response 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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of OutboundEnvironmentEndpoint 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())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of OutboundEnvironmentEndpoint 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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of GuardrailsVersions along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listGuardrailsVersionsNextSinglePageAsync(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.listGuardrailsVersionsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of GuardrailsVersions along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listGuardrailsVersionsNextSinglePageAsync(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.listGuardrailsVersionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of SafeguardsVersions along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listSafeguardsVersionsNextSinglePageAsync(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.listSafeguardsVersionsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of SafeguardsVersions along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listSafeguardsVersionsNextSinglePageAsync(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.listSafeguardsVersionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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 + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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 + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClustersImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClustersImpl.java new file mode 100644 index 0000000000000..c5fe46c7714e8 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ManagedClustersImpl.java @@ -0,0 +1,572 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ManagedClustersClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.CredentialResultsInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.GuardrailsAvailableVersionInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.KubernetesVersionListResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterAccessProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshRevisionProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OSOptionProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OutboundEnvironmentEndpointInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.RunCommandResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SafeguardsAvailableVersionInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CredentialResults; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Format; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.GuardrailsAvailableVersion; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesVersionListResult; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedCluster; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAadProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAccessProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterUpgradeProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusters; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClustersGetCommandResultResponse; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshRevisionProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshUpgradeProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSOptionProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OutboundEnvironmentEndpoint; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RunCommandRequest; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RunCommandResult; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SafeguardsAvailableVersion; + +public final class ManagedClustersImpl implements ManagedClusters { + private static final ClientLogger LOGGER = new ClientLogger(ManagedClustersImpl.class); + + private final ManagedClustersClient innerClient; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public ManagedClustersImpl(ManagedClustersClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getOSOptionsWithResponse(String location, String resourceType, Context context) { + Response inner + = this.serviceClient().getOSOptionsWithResponse(location, resourceType, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new OSOptionProfileImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public OSOptionProfile getOSOptions(String location) { + OSOptionProfileInner inner = this.serviceClient().getOSOptions(location); + if (inner != null) { + return new OSOptionProfileImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listKubernetesVersionsWithResponse(String location, Context context) { + Response inner + = this.serviceClient().listKubernetesVersionsWithResponse(location, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new KubernetesVersionListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public KubernetesVersionListResult listKubernetesVersions(String location) { + KubernetesVersionListResultInner inner = this.serviceClient().listKubernetesVersions(location); + if (inner != null) { + return new KubernetesVersionListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new ManagedClusterImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new ManagedClusterImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new ManagedClusterImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new ManagedClusterImpl(inner1, this.manager())); + } + + public Response getUpgradeProfileWithResponse(String resourceGroupName, + String resourceName, Context context) { + Response inner + = this.serviceClient().getUpgradeProfileWithResponse(resourceGroupName, resourceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ManagedClusterUpgradeProfileImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ManagedClusterUpgradeProfile getUpgradeProfile(String resourceGroupName, String resourceName) { + ManagedClusterUpgradeProfileInner inner + = this.serviceClient().getUpgradeProfile(resourceGroupName, resourceName); + if (inner != null) { + return new ManagedClusterUpgradeProfileImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getAccessProfileWithResponse(String resourceGroupName, + String resourceName, String roleName, Context context) { + Response inner + = this.serviceClient().getAccessProfileWithResponse(resourceGroupName, resourceName, roleName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ManagedClusterAccessProfileImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ManagedClusterAccessProfile getAccessProfile(String resourceGroupName, String resourceName, + String roleName) { + ManagedClusterAccessProfileInner inner + = this.serviceClient().getAccessProfile(resourceGroupName, resourceName, roleName); + if (inner != null) { + return new ManagedClusterAccessProfileImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listClusterAdminCredentialsWithResponse(String resourceGroupName, + String resourceName, String serverFqdn, Context context) { + Response inner = this.serviceClient() + .listClusterAdminCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CredentialResultsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CredentialResults listClusterAdminCredentials(String resourceGroupName, String resourceName) { + CredentialResultsInner inner + = this.serviceClient().listClusterAdminCredentials(resourceGroupName, resourceName); + if (inner != null) { + return new CredentialResultsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listClusterUserCredentialsWithResponse(String resourceGroupName, + String resourceName, String serverFqdn, Format format, Context context) { + Response inner = this.serviceClient() + .listClusterUserCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, format, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CredentialResultsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CredentialResults listClusterUserCredentials(String resourceGroupName, String resourceName) { + CredentialResultsInner inner = this.serviceClient().listClusterUserCredentials(resourceGroupName, resourceName); + if (inner != null) { + return new CredentialResultsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listClusterMonitoringUserCredentialsWithResponse(String resourceGroupName, + String resourceName, String serverFqdn, Context context) { + Response inner = this.serviceClient() + .listClusterMonitoringUserCredentialsWithResponse(resourceGroupName, resourceName, serverFqdn, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CredentialResultsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CredentialResults listClusterMonitoringUserCredentials(String resourceGroupName, String resourceName) { + CredentialResultsInner inner + = this.serviceClient().listClusterMonitoringUserCredentials(resourceGroupName, resourceName); + if (inner != null) { + return new CredentialResultsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, resourceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ManagedClusterImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ManagedCluster getByResourceGroup(String resourceGroupName, String resourceName) { + ManagedClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); + if (inner != null) { + return new ManagedClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String resourceName) { + this.serviceClient().delete(resourceGroupName, resourceName); + } + + public void delete(String resourceGroupName, String resourceName, Boolean ignorePodDisruptionBudget, + Context context) { + this.serviceClient().delete(resourceGroupName, resourceName, ignorePodDisruptionBudget, context); + } + + public void resetServicePrincipalProfile(String resourceGroupName, String resourceName, + ManagedClusterServicePrincipalProfile parameters) { + this.serviceClient().resetServicePrincipalProfile(resourceGroupName, resourceName, parameters); + } + + public void resetServicePrincipalProfile(String resourceGroupName, String resourceName, + ManagedClusterServicePrincipalProfile parameters, Context context) { + this.serviceClient().resetServicePrincipalProfile(resourceGroupName, resourceName, parameters, context); + } + + public void resetAadProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters) { + this.serviceClient().resetAadProfile(resourceGroupName, resourceName, parameters); + } + + public void resetAadProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, + Context context) { + this.serviceClient().resetAadProfile(resourceGroupName, resourceName, parameters, context); + } + + public void abortLatestOperation(String resourceGroupName, String resourceName) { + this.serviceClient().abortLatestOperation(resourceGroupName, resourceName); + } + + public void abortLatestOperation(String resourceGroupName, String resourceName, Context context) { + this.serviceClient().abortLatestOperation(resourceGroupName, resourceName, context); + } + + public void rotateClusterCertificates(String resourceGroupName, String resourceName) { + this.serviceClient().rotateClusterCertificates(resourceGroupName, resourceName); + } + + public void rotateClusterCertificates(String resourceGroupName, String resourceName, Context context) { + this.serviceClient().rotateClusterCertificates(resourceGroupName, resourceName, context); + } + + public void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName) { + this.serviceClient().rotateServiceAccountSigningKeys(resourceGroupName, resourceName); + } + + public void rotateServiceAccountSigningKeys(String resourceGroupName, String resourceName, Context context) { + this.serviceClient().rotateServiceAccountSigningKeys(resourceGroupName, resourceName, context); + } + + public void stop(String resourceGroupName, String resourceName) { + this.serviceClient().stop(resourceGroupName, resourceName); + } + + public void stop(String resourceGroupName, String resourceName, Context context) { + this.serviceClient().stop(resourceGroupName, resourceName, context); + } + + public void start(String resourceGroupName, String resourceName) { + this.serviceClient().start(resourceGroupName, resourceName); + } + + public void start(String resourceGroupName, String resourceName, Context context) { + this.serviceClient().start(resourceGroupName, resourceName, context); + } + + public RunCommandResult runCommand(String resourceGroupName, String resourceName, + RunCommandRequest requestPayload) { + RunCommandResultInner inner = this.serviceClient().runCommand(resourceGroupName, resourceName, requestPayload); + if (inner != null) { + return new RunCommandResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public RunCommandResult runCommand(String resourceGroupName, String resourceName, RunCommandRequest requestPayload, + Context context) { + RunCommandResultInner inner + = this.serviceClient().runCommand(resourceGroupName, resourceName, requestPayload, context); + if (inner != null) { + return new RunCommandResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getCommandResultWithResponse(String resourceGroupName, String resourceName, + String commandId, Context context) { + ManagedClustersGetCommandResultResponse inner + = this.serviceClient().getCommandResultWithResponse(resourceGroupName, resourceName, commandId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RunCommandResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RunCommandResult getCommandResult(String resourceGroupName, String resourceName, String commandId) { + RunCommandResultInner inner = this.serviceClient().getCommandResult(resourceGroupName, resourceName, commandId); + if (inner != null) { + return new RunCommandResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, + String resourceName) { + PagedIterable inner + = this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, resourceName); + return Utils.mapPage(inner, inner1 -> new OutboundEnvironmentEndpointImpl(inner1, this.manager())); + } + + public PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, + String resourceName, Context context) { + PagedIterable inner + = this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, resourceName, context); + return Utils.mapPage(inner, inner1 -> new OutboundEnvironmentEndpointImpl(inner1, this.manager())); + } + + public Response getGuardrailsVersionsWithResponse(String location, String version, + Context context) { + Response inner + = this.serviceClient().getGuardrailsVersionsWithResponse(location, version, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new GuardrailsAvailableVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public GuardrailsAvailableVersion getGuardrailsVersions(String location, String version) { + GuardrailsAvailableVersionInner inner = this.serviceClient().getGuardrailsVersions(location, version); + if (inner != null) { + return new GuardrailsAvailableVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listGuardrailsVersions(String location) { + PagedIterable inner = this.serviceClient().listGuardrailsVersions(location); + return Utils.mapPage(inner, inner1 -> new GuardrailsAvailableVersionImpl(inner1, this.manager())); + } + + public PagedIterable listGuardrailsVersions(String location, Context context) { + PagedIterable inner + = this.serviceClient().listGuardrailsVersions(location, context); + return Utils.mapPage(inner, inner1 -> new GuardrailsAvailableVersionImpl(inner1, this.manager())); + } + + public Response getSafeguardsVersionsWithResponse(String location, String version, + Context context) { + Response inner + = this.serviceClient().getSafeguardsVersionsWithResponse(location, version, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SafeguardsAvailableVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SafeguardsAvailableVersion getSafeguardsVersions(String location, String version) { + SafeguardsAvailableVersionInner inner = this.serviceClient().getSafeguardsVersions(location, version); + if (inner != null) { + return new SafeguardsAvailableVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listSafeguardsVersions(String location) { + PagedIterable inner = this.serviceClient().listSafeguardsVersions(location); + return Utils.mapPage(inner, inner1 -> new SafeguardsAvailableVersionImpl(inner1, this.manager())); + } + + public PagedIterable listSafeguardsVersions(String location, Context context) { + PagedIterable inner + = this.serviceClient().listSafeguardsVersions(location, context); + return Utils.mapPage(inner, inner1 -> new SafeguardsAvailableVersionImpl(inner1, this.manager())); + } + + public PagedIterable listMeshRevisionProfiles(String location) { + PagedIterable inner = this.serviceClient().listMeshRevisionProfiles(location); + return Utils.mapPage(inner, inner1 -> new MeshRevisionProfileImpl(inner1, this.manager())); + } + + public PagedIterable listMeshRevisionProfiles(String location, Context context) { + PagedIterable inner + = this.serviceClient().listMeshRevisionProfiles(location, context); + return Utils.mapPage(inner, inner1 -> new MeshRevisionProfileImpl(inner1, this.manager())); + } + + public Response getMeshRevisionProfileWithResponse(String location, String mode, + Context context) { + Response inner + = this.serviceClient().getMeshRevisionProfileWithResponse(location, mode, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MeshRevisionProfileImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MeshRevisionProfile getMeshRevisionProfile(String location, String mode) { + MeshRevisionProfileInner inner = this.serviceClient().getMeshRevisionProfile(location, mode); + if (inner != null) { + return new MeshRevisionProfileImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listMeshUpgradeProfiles(String resourceGroupName, String resourceName) { + PagedIterable inner + = this.serviceClient().listMeshUpgradeProfiles(resourceGroupName, resourceName); + return Utils.mapPage(inner, inner1 -> new MeshUpgradeProfileImpl(inner1, this.manager())); + } + + public PagedIterable listMeshUpgradeProfiles(String resourceGroupName, String resourceName, + Context context) { + PagedIterable inner + = this.serviceClient().listMeshUpgradeProfiles(resourceGroupName, resourceName, context); + return Utils.mapPage(inner, inner1 -> new MeshUpgradeProfileImpl(inner1, this.manager())); + } + + public Response getMeshUpgradeProfileWithResponse(String resourceGroupName, String resourceName, + String mode, Context context) { + Response inner + = this.serviceClient().getMeshUpgradeProfileWithResponse(resourceGroupName, resourceName, mode, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MeshUpgradeProfileImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MeshUpgradeProfile getMeshUpgradeProfile(String resourceGroupName, String resourceName, String mode) { + MeshUpgradeProfileInner inner + = this.serviceClient().getMeshUpgradeProfile(resourceGroupName, resourceName, mode); + if (inner != null) { + return new MeshUpgradeProfileImpl(inner, this.manager()); + } else { + return null; + } + } + + public ManagedCluster getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + Boolean localIgnorePodDisruptionBudget = null; + this.delete(resourceGroupName, resourceName, localIgnorePodDisruptionBudget, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Boolean ignorePodDisruptionBudget, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + this.delete(resourceGroupName, resourceName, ignorePodDisruptionBudget, context); + } + + private ManagedClustersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + public ManagedClusterImpl define(String name) { + return new ManagedClusterImpl(name, this.manager()); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MeshRevisionProfileImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MeshRevisionProfileImpl.java new file mode 100644 index 0000000000000..b0213c0f0f87a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MeshRevisionProfileImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshRevisionProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshRevisionProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshRevisionProfileProperties; + +public final class MeshRevisionProfileImpl implements MeshRevisionProfile { + private MeshRevisionProfileInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + MeshRevisionProfileImpl(MeshRevisionProfileInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public MeshRevisionProfileProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public MeshRevisionProfileInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MeshUpgradeProfileImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MeshUpgradeProfileImpl.java new file mode 100644 index 0000000000000..3bb5f790b1fd4 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/MeshUpgradeProfileImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshUpgradeProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshUpgradeProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshUpgradeProfileProperties; + +public final class MeshUpgradeProfileImpl implements MeshUpgradeProfile { + private MeshUpgradeProfileInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + MeshUpgradeProfileImpl(MeshUpgradeProfileInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public MeshUpgradeProfileProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public MeshUpgradeProfileInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OSOptionProfileImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OSOptionProfileImpl.java new file mode 100644 index 0000000000000..fcd1a2625b8ed --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OSOptionProfileImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OSOptionProfileInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSOptionProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSOptionProperty; +import java.util.Collections; +import java.util.List; + +public final class OSOptionProfileImpl implements OSOptionProfile { + private OSOptionProfileInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + OSOptionProfileImpl(OSOptionProfileInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public List osOptionPropertyList() { + List inner = this.innerModel().osOptionPropertyList(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public OSOptionProfileInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClusterImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClusterImpl.java new file mode 100644 index 0000000000000..0fced849abb70 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClusterImpl.java @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OpenShiftManagedClusterInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedCluster; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAgentPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAuthProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterMasterPoolProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftRouterProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PurchasePlan; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TagsObject; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class OpenShiftManagedClusterImpl + implements OpenShiftManagedCluster, OpenShiftManagedCluster.Definition, OpenShiftManagedCluster.Update { + private OpenShiftManagedClusterInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public PurchasePlan plan() { + return this.innerModel().plan(); + } + + public String provisioningState() { + return this.innerModel().provisioningState(); + } + + public String openShiftVersion() { + return this.innerModel().openShiftVersion(); + } + + public String clusterVersion() { + return this.innerModel().clusterVersion(); + } + + public String publicHostname() { + return this.innerModel().publicHostname(); + } + + public String fqdn() { + return this.innerModel().fqdn(); + } + + public NetworkProfile networkProfile() { + return this.innerModel().networkProfile(); + } + + public List routerProfiles() { + List inner = this.innerModel().routerProfiles(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public OpenShiftManagedClusterMasterPoolProfile masterPoolProfile() { + return this.innerModel().masterPoolProfile(); + } + + public List agentPoolProfiles() { + List inner = this.innerModel().agentPoolProfiles(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public OpenShiftManagedClusterAuthProfile authProfile() { + return this.innerModel().authProfile(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public OpenShiftManagedClusterInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String resourceName; + + private TagsObject updateParameters; + + public OpenShiftManagedClusterImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public OpenShiftManagedCluster create() { + this.innerObject = serviceManager.serviceClient().getOpenShiftManagedClusters() + .createOrUpdate(resourceGroupName, resourceName, this.innerModel(), Context.NONE); + return this; + } + + public OpenShiftManagedCluster create(Context context) { + this.innerObject = serviceManager.serviceClient().getOpenShiftManagedClusters() + .createOrUpdate(resourceGroupName, resourceName, this.innerModel(), context); + return this; + } + + OpenShiftManagedClusterImpl(String name, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = new OpenShiftManagedClusterInner(); + this.serviceManager = serviceManager; + this.resourceName = name; + } + + public OpenShiftManagedClusterImpl update() { + this.updateParameters = new TagsObject(); + return this; + } + + public OpenShiftManagedCluster apply() { + this.innerObject = serviceManager.serviceClient().getOpenShiftManagedClusters().updateTags(resourceGroupName, + resourceName, updateParameters, Context.NONE); + return this; + } + + public OpenShiftManagedCluster apply(Context context) { + this.innerObject = serviceManager.serviceClient().getOpenShiftManagedClusters().updateTags(resourceGroupName, + resourceName, updateParameters, context); + return this; + } + + OpenShiftManagedClusterImpl(OpenShiftManagedClusterInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "openShiftManagedClusters"); + } + + public OpenShiftManagedCluster refresh() { + this.innerObject = serviceManager.serviceClient().getOpenShiftManagedClusters() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + return this; + } + + public OpenShiftManagedCluster refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getOpenShiftManagedClusters() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, context).getValue(); + return this; + } + + public OpenShiftManagedClusterImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public OpenShiftManagedClusterImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public OpenShiftManagedClusterImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateParameters.withTags(tags); + return this; + } + } + + public OpenShiftManagedClusterImpl withPlan(PurchasePlan plan) { + this.innerModel().withPlan(plan); + return this; + } + + public OpenShiftManagedClusterImpl withOpenShiftVersion(String openShiftVersion) { + this.innerModel().withOpenShiftVersion(openShiftVersion); + return this; + } + + public OpenShiftManagedClusterImpl withNetworkProfile(NetworkProfile networkProfile) { + this.innerModel().withNetworkProfile(networkProfile); + return this; + } + + public OpenShiftManagedClusterImpl withRouterProfiles(List routerProfiles) { + this.innerModel().withRouterProfiles(routerProfiles); + return this; + } + + public OpenShiftManagedClusterImpl + withMasterPoolProfile(OpenShiftManagedClusterMasterPoolProfile masterPoolProfile) { + this.innerModel().withMasterPoolProfile(masterPoolProfile); + return this; + } + + public OpenShiftManagedClusterImpl + withAgentPoolProfiles(List agentPoolProfiles) { + this.innerModel().withAgentPoolProfiles(agentPoolProfiles); + return this; + } + + public OpenShiftManagedClusterImpl withAuthProfile(OpenShiftManagedClusterAuthProfile authProfile) { + this.innerModel().withAuthProfile(authProfile); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClustersClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClustersClientImpl.java new file mode 100644 index 0000000000000..b82b5cfe90b92 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClustersClientImpl.java @@ -0,0 +1,1414 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.OpenShiftManagedClustersClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OpenShiftManagedClusterInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterListResult; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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 OpenShiftManagedClustersClient. + */ +public final class OpenShiftManagedClustersClientImpl implements OpenShiftManagedClustersClient { + /** + * The proxy service used to perform REST calls. + */ + private final OpenShiftManagedClustersService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of OpenShiftManagedClustersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OpenShiftManagedClustersClientImpl(ContainerServiceManagementClientImpl 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. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceMana") + public interface OpenShiftManagedClustersService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/openShiftManagedClusters") + @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/openShiftManagedClusters") + @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/openShiftManagedClusters/{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/openShiftManagedClusters/{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") OpenShiftManagedClusterInner parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{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/openShiftManagedClusters/{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("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 OpenShift managed clusters in the specified subscription. + * + * Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of each + * OpenShift managed cluster. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of OpenShift 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 = "2019-04-30"; + 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 OpenShift managed clusters in the specified subscription. + * + * Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of each + * OpenShift 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 list of OpenShift 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 = "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) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * + * Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of each + * OpenShift managed cluster. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of OpenShift managed clusters in the specified subscription as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * + * Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of each + * OpenShift 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 list of OpenShift 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 OpenShift managed clusters in the specified subscription. + * + * Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of each + * OpenShift managed cluster. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of OpenShift 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 OpenShift managed clusters in the specified subscription. + * + * Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of each + * OpenShift 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 list of OpenShift 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 OpenShift managed clusters in the specified subscription and resource group. + * + * Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns + * properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 OpenShift 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 = "2019-04-30"; + 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 OpenShift managed clusters in the specified subscription and resource group. + * + * Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns + * properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 OpenShift 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 = "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) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * + * Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns + * properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 OpenShift Managed Clusters operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * + * Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns + * properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 OpenShift 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 OpenShift managed clusters in the specified subscription and resource group. + * + * Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns + * properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 OpenShift Managed Clusters operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * + * Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns + * properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 OpenShift 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 a OpenShift managed cluster. + * + * Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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 details of the managed OpenShift cluster with a specified resource group and name along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private 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 = "2019-04-30"; + 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 OpenShift managed cluster. + * + * Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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 details of the managed OpenShift cluster with a specified resource group and name 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 = "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); + } + + /** + * Gets a OpenShift managed cluster. + * + * Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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 details of the managed OpenShift cluster with a specified resource group and name on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a OpenShift managed cluster. + * + * Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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 details of the managed OpenShift cluster with a specified resource group and name 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 OpenShift managed cluster. + * + * Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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 details of the managed OpenShift cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OpenShiftManagedClusterInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + /** + * Creates or updates an OpenShift managed cluster. + * + * Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return openShift Managed cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, OpenShiftManagedClusterInner 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 = "2019-04-30"; + 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 an OpenShift managed cluster. + * + * Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster 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 openShift Managed cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, OpenShiftManagedClusterInner 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 = "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); + } + + /** + * Creates or updates an OpenShift managed cluster. + * + * Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OpenShiftManagedClusterInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OpenShiftManagedClusterInner.class, OpenShiftManagedClusterInner.class, + this.client.getContext()); + } + + /** + * Creates or updates an OpenShift managed cluster. + * + * Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster 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 the {@link PollerFlux} for polling of openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OpenShiftManagedClusterInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OpenShiftManagedClusterInner.class, OpenShiftManagedClusterInner.class, + context); + } + + /** + * Creates or updates an OpenShift managed cluster. + * + * Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OpenShiftManagedClusterInner> + beginCreateOrUpdate(String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + } + + /** + * Creates or updates an OpenShift managed cluster. + * + * Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster 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 the {@link SyncPoller} for polling of openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OpenShiftManagedClusterInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); + } + + /** + * Creates or updates an OpenShift managed cluster. + * + * Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return openShift Managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + OpenShiftManagedClusterInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an OpenShift managed cluster. + * + * Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster 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 openShift Managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + OpenShiftManagedClusterInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an OpenShift managed cluster. + * + * Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OpenShiftManagedClusterInner createOrUpdate(String resourceGroupName, String resourceName, + OpenShiftManagedClusterInner parameters) { + return createOrUpdateAsync(resourceGroupName, resourceName, parameters).block(); + } + + /** + * Creates or updates an OpenShift managed cluster. + * + * Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster 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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OpenShiftManagedClusterInner createOrUpdate(String resourceGroupName, String resourceName, + OpenShiftManagedClusterInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Updates tags on an OpenShift managed cluster. + * + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift 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 openShift 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) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 = "2019-04-30"; + 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 an OpenShift managed cluster. + * + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster 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 openShift 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, 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 = "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); + } + + /** + * Updates tags on an OpenShift managed cluster. + * + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift 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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OpenShiftManagedClusterInner> + beginUpdateTagsAsync(String resourceGroupName, String resourceName, TagsObject parameters) { + Mono>> mono + = updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OpenShiftManagedClusterInner.class, OpenShiftManagedClusterInner.class, + this.client.getContext()); + } + + /** + * Updates tags on an OpenShift managed cluster. + * + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster 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 the {@link PollerFlux} for polling of openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OpenShiftManagedClusterInner> + beginUpdateTagsAsync(String resourceGroupName, String resourceName, TagsObject parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OpenShiftManagedClusterInner.class, OpenShiftManagedClusterInner.class, + context); + } + + /** + * Updates tags on an OpenShift managed cluster. + * + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift 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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OpenShiftManagedClusterInner> + beginUpdateTags(String resourceGroupName, String resourceName, TagsObject parameters) { + return this.beginUpdateTagsAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + } + + /** + * Updates tags on an OpenShift managed cluster. + * + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster 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 the {@link SyncPoller} for polling of openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OpenShiftManagedClusterInner> + beginUpdateTags(String resourceGroupName, String resourceName, TagsObject parameters, Context context) { + return this.beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); + } + + /** + * Updates tags on an OpenShift managed cluster. + * + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift 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 openShift Managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync(String resourceGroupName, String resourceName, + TagsObject parameters) { + return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates tags on an OpenShift managed cluster. + * + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster 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 openShift Managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync(String resourceGroupName, String resourceName, + TagsObject parameters, Context context) { + return beginUpdateTagsAsync(resourceGroupName, resourceName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates tags on an OpenShift managed cluster. + * + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift 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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OpenShiftManagedClusterInner updateTags(String resourceGroupName, String resourceName, + TagsObject parameters) { + return updateTagsAsync(resourceGroupName, resourceName, parameters).block(); + } + + /** + * Updates tags on an OpenShift managed cluster. + * + * Updates an OpenShift managed cluster with the specified tags. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster 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 openShift Managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OpenShiftManagedClusterInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters, + Context context) { + return updateTagsAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Deletes an OpenShift managed cluster. + * + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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) + private 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 = "2019-04-30"; + 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 an OpenShift managed cluster. + * + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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 = "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); + } + + /** + * Deletes an OpenShift managed cluster. + * + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes an OpenShift managed cluster. + * + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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> beginDeleteAsync(String resourceGroupName, String resourceName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes an OpenShift managed cluster. + * + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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) { + return this.beginDeleteAsync(resourceGroupName, resourceName).getSyncPoller(); + } + + /** + * Deletes an OpenShift managed cluster. + * + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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> beginDelete(String resourceGroupName, String resourceName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, context).getSyncPoller(); + } + + /** + * Deletes an OpenShift managed cluster. + * + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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) + private Mono deleteAsync(String resourceGroupName, String resourceName) { + return beginDeleteAsync(resourceGroupName, resourceName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an OpenShift managed cluster. + * + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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 deleteAsync(String resourceGroupName, String resourceName, Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an OpenShift managed cluster. + * + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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) { + deleteAsync(resourceGroupName, resourceName).block(); + } + + /** + * Deletes an OpenShift managed cluster. + * + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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 delete(String resourceGroupName, String resourceName, Context context) { + deleteAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List OpenShift Managed Clusters 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 + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List OpenShift Managed Clusters 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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List OpenShift 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())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List OpenShift 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)); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClustersImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClustersImpl.java new file mode 100644 index 0000000000000..95f7cc6a3afb9 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OpenShiftManagedClustersImpl.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.OpenShiftManagedClustersClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OpenShiftManagedClusterInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedCluster; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusters; + +public final class OpenShiftManagedClustersImpl implements OpenShiftManagedClusters { + private static final ClientLogger LOGGER = new ClientLogger(OpenShiftManagedClustersImpl.class); + + private final OpenShiftManagedClustersClient innerClient; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public OpenShiftManagedClustersImpl(OpenShiftManagedClustersClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new OpenShiftManagedClusterImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new OpenShiftManagedClusterImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new OpenShiftManagedClusterImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new OpenShiftManagedClusterImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, + String resourceName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, resourceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new OpenShiftManagedClusterImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public OpenShiftManagedCluster getByResourceGroup(String resourceGroupName, String resourceName) { + OpenShiftManagedClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); + if (inner != null) { + return new OpenShiftManagedClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String resourceName) { + this.serviceClient().delete(resourceGroupName, resourceName); + } + + public void delete(String resourceGroupName, String resourceName, Context context) { + this.serviceClient().delete(resourceGroupName, resourceName, context); + } + + public OpenShiftManagedCluster getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "openShiftManagedClusters"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'openShiftManagedClusters'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "openShiftManagedClusters"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'openShiftManagedClusters'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "openShiftManagedClusters"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'openShiftManagedClusters'.", id))); + } + this.delete(resourceGroupName, resourceName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "openShiftManagedClusters"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'openShiftManagedClusters'.", id))); + } + this.delete(resourceGroupName, resourceName, context); + } + + private OpenShiftManagedClustersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + public OpenShiftManagedClusterImpl define(String name) { + return new OpenShiftManagedClusterImpl(name, this.manager()); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationStatusResultImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationStatusResultImpl.java new file mode 100644 index 0000000000000..df9e23cc1b5fb --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationStatusResultImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class OperationStatusResultImpl implements OperationStatusResult { + private OperationStatusResultInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + OperationStatusResultImpl(OperationStatusResultInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Float percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())).collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public OperationStatusResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationStatusResultsClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationStatusResultsClientImpl.java new file mode 100644 index 0000000000000..19becd72f57d7 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationStatusResultsClientImpl.java @@ -0,0 +1,585 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.OperationStatusResultsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OperationStatusResultList; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in OperationStatusResultsClient. + */ +public final class OperationStatusResultsClientImpl implements OperationStatusResultsClient { + /** + * The proxy service used to perform REST calls. + */ + private final OperationStatusResultsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of OperationStatusResultsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationStatusResultsClientImpl(ContainerServiceManagementClientImpl client) { + this.service = RestProxy.create(OperationStatusResultsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientOperationStatusResults to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceMana") + public interface OperationStatusResultsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations") + @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}/operations/{operationId}") + @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("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/operations/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByAgentPool(@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("operationId") String operationId, + @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 in the specified managedCluster. + * + * @param resourceGroupName The name of the resource 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 operations in the specified managedCluster 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 = "2023-11-02-preview"; + 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 operations in the specified managedCluster. + * + * @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 operations in the specified managedCluster 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 = "2023-11-02-preview"; + 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 operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource 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 operations in the specified managedCluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of operations in the specified managedCluster. + * + * @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 operations in the specified managedCluster 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 operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource 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 operations in the specified managedCluster 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 operations in the specified managedCluster. + * + * @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 operations in the specified managedCluster 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 status of a specific operation 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 operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String resourceName, String operationId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String apiVersion = "2023-11-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, operationId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the status of a specific operation 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 operationId The ID of an ongoing async 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 the status of a specific operation in the specified managed cluster along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String resourceName, String operationId, 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 (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String apiVersion = "2023-11-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + resourceName, operationId, accept, context); + } + + /** + * Get the status of a specific operation 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 operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String resourceName, + String operationId) { + return getWithResponseAsync(resourceGroupName, resourceName, operationId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the status of a specific operation 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 operationId The ID of an ongoing async 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 the status of a specific operation in the specified managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, + String operationId, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, operationId, context).block(); + } + + /** + * Get the status of a specific operation 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 operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner get(String resourceGroupName, String resourceName, String operationId) { + return getWithResponse(resourceGroupName, resourceName, operationId, Context.NONE).getValue(); + } + + /** + * Get the status of a specific operation 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 operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByAgentPoolWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, String operationId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String apiVersion = "2023-11-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByAgentPool(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, operationId, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the status of a specific operation 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 operationId The ID of an ongoing async 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 the status of a specific operation in the specified agent pool along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByAgentPoolWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, String operationId, 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 (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String apiVersion = "2023-11-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByAgentPool(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, agentPoolName, operationId, accept, context); + } + + /** + * Get the status of a specific operation 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 operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByAgentPoolAsync(String resourceGroupName, String resourceName, + String agentPoolName, String operationId) { + return getByAgentPoolWithResponseAsync(resourceGroupName, resourceName, agentPoolName, operationId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the status of a specific operation 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 operationId The ID of an ongoing async 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 the status of a specific operation in the specified agent pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByAgentPoolWithResponse(String resourceGroupName, + String resourceName, String agentPoolName, String operationId, Context context) { + return getByAgentPoolWithResponseAsync(resourceGroupName, resourceName, agentPoolName, operationId, context) + .block(); + } + + /** + * Get the status of a specific operation 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 operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner getByAgentPool(String resourceGroupName, String resourceName, + String agentPoolName, String operationId) { + return getByAgentPoolWithResponse(resourceGroupName, resourceName, agentPoolName, operationId, Context.NONE) + .getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operations list along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operations list 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationStatusResultsImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationStatusResultsImpl.java new file mode 100644 index 0000000000000..15eca8c221d14 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationStatusResultsImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.OperationStatusResultsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OperationStatusResult; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OperationStatusResults; + +public final class OperationStatusResultsImpl implements OperationStatusResults { + private static final ClientLogger LOGGER = new ClientLogger(OperationStatusResultsImpl.class); + + private final OperationStatusResultsClient innerClient; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public OperationStatusResultsImpl(OperationStatusResultsClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String resourceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, resourceName); + return Utils.mapPage(inner, inner1 -> new OperationStatusResultImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String resourceName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceName, context); + return Utils.mapPage(inner, inner1 -> new OperationStatusResultImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String resourceName, + String operationId, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, resourceName, operationId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new OperationStatusResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public OperationStatusResult get(String resourceGroupName, String resourceName, String operationId) { + OperationStatusResultInner inner = this.serviceClient().get(resourceGroupName, resourceName, operationId); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getByAgentPoolWithResponse(String resourceGroupName, String resourceName, + String agentPoolName, String operationId, Context context) { + Response inner = this.serviceClient().getByAgentPoolWithResponse(resourceGroupName, + resourceName, agentPoolName, operationId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new OperationStatusResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public OperationStatusResult getByAgentPool(String resourceGroupName, String resourceName, String agentPoolName, + String operationId) { + OperationStatusResultInner inner + = this.serviceClient().getByAgentPool(resourceGroupName, resourceName, agentPoolName, operationId); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + + private OperationStatusResultsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationValueImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationValueImpl.java new file mode 100644 index 0000000000000..4f6f2eda99d1e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationValueImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationValueInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OperationValue; + +public final class OperationValueImpl implements OperationValue { + private OperationValueInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + OperationValueImpl(OperationValueInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String origin() { + return this.innerModel().origin(); + } + + public String name() { + return this.innerModel().name(); + } + + public String operation() { + return this.innerModel().operation(); + } + + public String resource() { + return this.innerModel().resource(); + } + + public String description() { + return this.innerModel().description(); + } + + public String provider() { + return this.innerModel().provider(); + } + + public OperationValueInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationsClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationsClientImpl.java new file mode 100644 index 0000000000000..18d5798d22a49 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationsClientImpl.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.OperationsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationValueInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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 = "ContainerServiceMana") + 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationsImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationsImpl.java new file mode 100644 index 0000000000000..97bb7134be5cd --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OperationsImpl.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.OperationsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationValueInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OperationValue; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Operations; + +public final class OperationsImpl implements Operations { + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); + + private final OperationsClient innerClient; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public OperationsImpl(OperationsClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new OperationValueImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new OperationValueImpl(inner1, this.manager())); + } + + private OperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OrchestratorVersionProfileListResultImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OrchestratorVersionProfileListResultImpl.java new file mode 100644 index 0000000000000..5cd4984d23990 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OrchestratorVersionProfileListResultImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OrchestratorVersionProfileListResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OrchestratorVersionProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OrchestratorVersionProfileListResult; +import java.util.Collections; +import java.util.List; + +public final class OrchestratorVersionProfileListResultImpl implements OrchestratorVersionProfileListResult { + private OrchestratorVersionProfileListResultInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + OrchestratorVersionProfileListResultImpl(OrchestratorVersionProfileListResultInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public List orchestrators() { + List inner = this.innerModel().orchestrators(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public OrchestratorVersionProfileListResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OutboundEnvironmentEndpointImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OutboundEnvironmentEndpointImpl.java new file mode 100644 index 0000000000000..7ad5ad0647761 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/OutboundEnvironmentEndpointImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OutboundEnvironmentEndpointInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.EndpointDependency; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OutboundEnvironmentEndpoint; +import java.util.Collections; +import java.util.List; + +public final class OutboundEnvironmentEndpointImpl implements OutboundEnvironmentEndpoint { + private OutboundEnvironmentEndpointInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + OutboundEnvironmentEndpointImpl(OutboundEnvironmentEndpointInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String category() { + return this.innerModel().category(); + } + + public List endpoints() { + List inner = this.innerModel().endpoints(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public OutboundEnvironmentEndpointInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionImpl.java new file mode 100644 index 0000000000000..9d12c03b8a80c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpoint; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpointConnection; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkServiceConnectionState; + +public final class PrivateEndpointConnectionImpl implements PrivateEndpointConnection { + private PrivateEndpointConnectionInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public PrivateEndpoint privateEndpoint() { + return this.innerModel().privateEndpoint(); + } + + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.innerModel().privateLinkServiceConnectionState(); + } + + public PrivateEndpointConnectionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionListResultImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionListResultImpl.java new file mode 100644 index 0000000000000..8cabf733eec15 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionListResultImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionListResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpointConnection; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpointConnectionListResult; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class PrivateEndpointConnectionListResultImpl implements PrivateEndpointConnectionListResult { + private PrivateEndpointConnectionListResultInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + PrivateEndpointConnectionListResultImpl(PrivateEndpointConnectionListResultInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())).collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public PrivateEndpointConnectionListResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionsClientImpl.java new file mode 100644 index 0000000000000..07df41eafa0d7 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionsClientImpl.java @@ -0,0 +1,769 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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 = "ContainerServiceMana") + 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionsImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionsImpl.java new file mode 100644 index 0000000000000..87312df5a4ae5 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateEndpointConnectionsImpl.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionListResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpointConnection; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpointConnectionListResult; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpointConnections; + +public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsImpl.class); + + private final PrivateEndpointConnectionsClient innerClient; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public PrivateEndpointConnectionsImpl(PrivateEndpointConnectionsClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response listWithResponse(String resourceGroupName, String resourceName, + Context context) { + Response inner + = this.serviceClient().listWithResponse(resourceGroupName, resourceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateEndpointConnectionListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateEndpointConnectionListResult list(String resourceGroupName, String resourceName) { + PrivateEndpointConnectionListResultInner inner = this.serviceClient().list(resourceGroupName, resourceName); + if (inner != null) { + return new PrivateEndpointConnectionListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, + resourceName, privateEndpointConnectionName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateEndpointConnection get(String resourceGroupName, String resourceName, + String privateEndpointConnectionName) { + PrivateEndpointConnectionInner inner + = this.serviceClient().get(resourceGroupName, resourceName, privateEndpointConnectionName); + if (inner != null) { + return new PrivateEndpointConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateWithResponse(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { + Response inner = this.serviceClient().updateWithResponse(resourceGroupName, + resourceName, privateEndpointConnectionName, parameters, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateEndpointConnection update(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { + PrivateEndpointConnectionInner inner + = this.serviceClient().update(resourceGroupName, resourceName, privateEndpointConnectionName, parameters); + if (inner != null) { + return new PrivateEndpointConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + this.serviceClient().delete(resourceGroupName, resourceName, privateEndpointConnectionName); + } + + public void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName, + Context context) { + this.serviceClient().delete(resourceGroupName, resourceName, privateEndpointConnectionName, context); + } + + private PrivateEndpointConnectionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourceImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourceImpl.java new file mode 100644 index 0000000000000..cb71518d64432 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourceImpl.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkResource; +import java.util.Collections; +import java.util.List; + +public final class PrivateLinkResourceImpl implements PrivateLinkResource { + private PrivateLinkResourceInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + PrivateLinkResourceImpl(PrivateLinkResourceInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String groupId() { + return this.innerModel().groupId(); + } + + public List requiredMembers() { + List inner = this.innerModel().requiredMembers(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String privateLinkServiceId() { + return this.innerModel().privateLinkServiceId(); + } + + public PrivateLinkResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesClientImpl.java new file mode 100644 index 0000000000000..9020cbf00c25a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesClientImpl.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.containerservicemicrosoftcontainerserviceaks.generated.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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 = "ContainerServiceMana") + 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesImpl.java new file mode 100644 index 0000000000000..c53e09c797afd --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourcesListResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkResources; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkResourcesListResult; + +public final class PrivateLinkResourcesImpl implements PrivateLinkResources { + private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkResourcesImpl.class); + + private final PrivateLinkResourcesClient innerClient; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public PrivateLinkResourcesImpl(PrivateLinkResourcesClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response listWithResponse(String resourceGroupName, String resourceName, + Context context) { + Response inner + = this.serviceClient().listWithResponse(resourceGroupName, resourceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateLinkResourcesListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateLinkResourcesListResult list(String resourceGroupName, String resourceName) { + PrivateLinkResourcesListResultInner inner = this.serviceClient().list(resourceGroupName, resourceName); + if (inner != null) { + return new PrivateLinkResourcesListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + private PrivateLinkResourcesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesListResultImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesListResultImpl.java new file mode 100644 index 0000000000000..0e28923fe3a99 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/PrivateLinkResourcesListResultImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourcesListResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkResource; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkResourcesListResult; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class PrivateLinkResourcesListResultImpl implements PrivateLinkResourcesListResult { + private PrivateLinkResourcesListResultInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + PrivateLinkResourcesListResultImpl(PrivateLinkResourcesListResultInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())).collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public PrivateLinkResourcesListResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ResolvePrivateLinkServiceIdsClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ResolvePrivateLinkServiceIdsClientImpl.java new file mode 100644 index 0000000000000..daced5f957435 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ResolvePrivateLinkServiceIdsClientImpl.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.ResolvePrivateLinkServiceIdsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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 = "ContainerServiceMana") + 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ResolvePrivateLinkServiceIdsImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ResolvePrivateLinkServiceIdsImpl.java new file mode 100644 index 0000000000000..8d5d897d8cfa3 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ResolvePrivateLinkServiceIdsImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ResolvePrivateLinkServiceIdsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkResource; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ResolvePrivateLinkServiceIds; + +public final class ResolvePrivateLinkServiceIdsImpl implements ResolvePrivateLinkServiceIds { + private static final ClientLogger LOGGER = new ClientLogger(ResolvePrivateLinkServiceIdsImpl.class); + + private final ResolvePrivateLinkServiceIdsClient innerClient; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public ResolvePrivateLinkServiceIdsImpl(ResolvePrivateLinkServiceIdsClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response postWithResponse(String resourceGroupName, String resourceName, + PrivateLinkResourceInner parameters, Context context) { + Response inner + = this.serviceClient().postWithResponse(resourceGroupName, resourceName, parameters, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateLinkResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateLinkResource post(String resourceGroupName, String resourceName, + PrivateLinkResourceInner parameters) { + PrivateLinkResourceInner inner = this.serviceClient().post(resourceGroupName, resourceName, parameters); + if (inner != null) { + return new PrivateLinkResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + private ResolvePrivateLinkServiceIdsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/RunCommandResultImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/RunCommandResultImpl.java new file mode 100644 index 0000000000000..8965b81888b3a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/RunCommandResultImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.RunCommandResultInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RunCommandResult; +import java.time.OffsetDateTime; + +public final class RunCommandResultImpl implements RunCommandResult { + private RunCommandResultInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + RunCommandResultImpl(RunCommandResultInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String provisioningState() { + return this.innerModel().provisioningState(); + } + + public Integer exitCode() { + return this.innerModel().exitCode(); + } + + public OffsetDateTime startedAt() { + return this.innerModel().startedAt(); + } + + public OffsetDateTime finishedAt() { + return this.innerModel().finishedAt(); + } + + public String logs() { + return this.innerModel().logs(); + } + + public String reason() { + return this.innerModel().reason(); + } + + public RunCommandResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SafeguardsAvailableVersionImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SafeguardsAvailableVersionImpl.java new file mode 100644 index 0000000000000..9668779a1b6e1 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SafeguardsAvailableVersionImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SafeguardsAvailableVersionInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SafeguardsAvailableVersion; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SafeguardsAvailableVersionsProperties; + +public final class SafeguardsAvailableVersionImpl implements SafeguardsAvailableVersion { + private SafeguardsAvailableVersionInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + SafeguardsAvailableVersionImpl(SafeguardsAvailableVersionInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SafeguardsAvailableVersionsProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public SafeguardsAvailableVersionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ScheduledEventImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ScheduledEventImpl.java new file mode 100644 index 0000000000000..c8d35072bab20 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ScheduledEventImpl.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ScheduledEventInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.EventStatus; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ResourceType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScheduledEvent; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; + +public final class ScheduledEventImpl implements ScheduledEvent { + private ScheduledEventInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + ScheduledEventImpl(ScheduledEventInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String description() { + return this.innerModel().description(); + } + + public String eventId() { + return this.innerModel().eventId(); + } + + public String eventSource() { + return this.innerModel().eventSource(); + } + + public EventStatus eventStatus() { + return this.innerModel().eventStatus(); + } + + public OffsetDateTime scheduledTime() { + return this.innerModel().scheduledTime(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime lastUpdateTime() { + return this.innerModel().lastUpdateTime(); + } + + public List resources() { + List inner = this.innerModel().resources(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ResourceType resourceType() { + return this.innerModel().resourceType(); + } + + public ScheduledEventInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ScheduledEventsClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ScheduledEventsClientImpl.java new file mode 100644 index 0000000000000..b243911fd009d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ScheduledEventsClientImpl.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.containerservicemicrosoftcontainerserviceaks.generated.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.ScheduledEventsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ScheduledEventInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ScheduledEventsClient. + */ +public final class ScheduledEventsClientImpl implements ScheduledEventsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ScheduledEventsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of ScheduledEventsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ScheduledEventsClientImpl(ContainerServiceManagementClientImpl client) { + this.service + = RestProxy.create(ScheduledEventsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientScheduledEvents to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceMana") + public interface ScheduledEventsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/scheduledEvents/{scheduledEventName}") + @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("scheduledEventName") String scheduledEventName, @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Access to this resource type is not currently available via GET. To consume please use System Topics or Azure + * Resource Graph. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param scheduledEventName The name of the scheduled event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> getWithResponseAsync(String resourceGroupName, String resourceName, + String scheduledEventName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 (scheduledEventName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scheduledEventName is required and cannot be null.")); + } + final String apiVersion = "2023-11-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, scheduledEventName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Access to this resource type is not currently available via GET. To consume please use System Topics or Azure + * Resource Graph. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param scheduledEventName The name of the scheduled event. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> getWithResponseAsync(String resourceGroupName, String resourceName, + String scheduledEventName, 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 (scheduledEventName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scheduledEventName is required and cannot be null.")); + } + final String apiVersion = "2023-11-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + resourceName, scheduledEventName, accept, context); + } + + /** + * Access to this resource type is not currently available via GET. To consume please use System Topics or Azure + * Resource Graph. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param scheduledEventName The name of the scheduled event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 getAsync(String resourceGroupName, String resourceName, + String scheduledEventName) { + return getWithResponseAsync(resourceGroupName, resourceName, scheduledEventName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Access to this resource type is not currently available via GET. To consume please use System Topics or Azure + * Resource Graph. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param scheduledEventName The name of the scheduled event. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, + String scheduledEventName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, scheduledEventName, context).block(); + } + + /** + * Access to this resource type is not currently available via GET. To consume please use System Topics or Azure + * Resource Graph. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param scheduledEventName The name of the scheduled event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 ScheduledEventInner get(String resourceGroupName, String resourceName, String scheduledEventName) { + return getWithResponse(resourceGroupName, resourceName, scheduledEventName, Context.NONE).getValue(); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ScheduledEventsImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ScheduledEventsImpl.java new file mode 100644 index 0000000000000..8898b64bd5408 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/ScheduledEventsImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.ScheduledEventsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ScheduledEventInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScheduledEvent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScheduledEvents; + +public final class ScheduledEventsImpl implements ScheduledEvents { + private static final ClientLogger LOGGER = new ClientLogger(ScheduledEventsImpl.class); + + private final ScheduledEventsClient innerClient; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public ScheduledEventsImpl(ScheduledEventsClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String resourceName, + String scheduledEventName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, resourceName, scheduledEventName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ScheduledEventImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ScheduledEvent get(String resourceGroupName, String resourceName, String scheduledEventName) { + ScheduledEventInner inner = this.serviceClient().get(resourceGroupName, resourceName, scheduledEventName); + if (inner != null) { + return new ScheduledEventImpl(inner, this.manager()); + } else { + return null; + } + } + + private ScheduledEventsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotImpl.java new file mode 100644 index 0000000000000..68a14dc13a780 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotImpl.java @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SnapshotInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Ossku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Snapshot; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SnapshotType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TagsObject; +import java.util.Collections; +import java.util.Map; + +public final class SnapshotImpl implements Snapshot, Snapshot.Definition, Snapshot.Update { + private SnapshotInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public CreationData creationData() { + return this.innerModel().creationData(); + } + + public SnapshotType snapshotType() { + return this.innerModel().snapshotType(); + } + + public String kubernetesVersion() { + return this.innerModel().kubernetesVersion(); + } + + public String nodeImageVersion() { + return this.innerModel().nodeImageVersion(); + } + + public OSType osType() { + return this.innerModel().osType(); + } + + public Ossku osSku() { + return this.innerModel().osSku(); + } + + public String vmSize() { + return this.innerModel().vmSize(); + } + + public Boolean enableFips() { + return this.innerModel().enableFips(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public SnapshotInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String resourceName; + + private TagsObject updateParameters; + + public SnapshotImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public Snapshot create() { + this.innerObject = serviceManager.serviceClient().getSnapshots() + .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), Context.NONE).getValue(); + return this; + } + + public Snapshot create(Context context) { + this.innerObject = serviceManager.serviceClient().getSnapshots() + .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), context).getValue(); + return this; + } + + SnapshotImpl(String name, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = new SnapshotInner(); + this.serviceManager = serviceManager; + this.resourceName = name; + } + + public SnapshotImpl update() { + this.updateParameters = new TagsObject(); + return this; + } + + public Snapshot apply() { + this.innerObject = serviceManager.serviceClient().getSnapshots() + .updateTagsWithResponse(resourceGroupName, resourceName, updateParameters, Context.NONE).getValue(); + return this; + } + + public Snapshot apply(Context context) { + this.innerObject = serviceManager.serviceClient().getSnapshots() + .updateTagsWithResponse(resourceGroupName, resourceName, updateParameters, context).getValue(); + return this; + } + + SnapshotImpl(SnapshotInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "snapshots"); + } + + public Snapshot refresh() { + this.innerObject = serviceManager.serviceClient().getSnapshots() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + return this; + } + + public Snapshot refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getSnapshots() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, context).getValue(); + return this; + } + + public SnapshotImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public SnapshotImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public SnapshotImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateParameters.withTags(tags); + return this; + } + } + + public SnapshotImpl withCreationData(CreationData creationData) { + this.innerModel().withCreationData(creationData); + return this; + } + + public SnapshotImpl withSnapshotType(SnapshotType snapshotType) { + this.innerModel().withSnapshotType(snapshotType); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotsClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotsClientImpl.java new file mode 100644 index 0000000000000..a6cb53a83b4b7 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotsClientImpl.java @@ -0,0 +1,1003 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.SnapshotsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SnapshotInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SnapshotListResult; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TagsObject; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SnapshotsClient. + */ +public final class SnapshotsClientImpl implements 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 = "ContainerServiceMana") + 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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 + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Snapshots 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 + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Snapshots 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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response 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())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotsImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotsImpl.java new file mode 100644 index 0000000000000..175d325993b50 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/SnapshotsImpl.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.SnapshotsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SnapshotInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Snapshot; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Snapshots; + +public final class SnapshotsImpl implements Snapshots { + private static final ClientLogger LOGGER = new ClientLogger(SnapshotsImpl.class); + + private final SnapshotsClient innerClient; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public SnapshotsImpl(SnapshotsClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, resourceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SnapshotImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Snapshot getByResourceGroup(String resourceGroupName, String resourceName) { + SnapshotInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); + if (inner != null) { + return new SnapshotImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, context); + } + + public void deleteByResourceGroup(String resourceGroupName, String resourceName) { + this.serviceClient().delete(resourceGroupName, resourceName); + } + + public Snapshot getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "snapshots"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "snapshots"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "snapshots"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); + } + this.deleteByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "snapshots"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); + } + return this.deleteByResourceGroupWithResponse(resourceGroupName, resourceName, context); + } + + private SnapshotsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + public SnapshotImpl define(String name) { + return new SnapshotImpl(name, this.manager()); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingImpl.java new file mode 100644 index 0000000000000..b7b603b9c65af --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleBindingInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleBinding; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleBindingProvisioningState; +import java.util.Collections; +import java.util.List; + +public final class TrustedAccessRoleBindingImpl + implements TrustedAccessRoleBinding, TrustedAccessRoleBinding.Definition, TrustedAccessRoleBinding.Update { + private TrustedAccessRoleBindingInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public TrustedAccessRoleBindingProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String sourceResourceId() { + return this.innerModel().sourceResourceId(); + } + + public List roles() { + List inner = this.innerModel().roles(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public TrustedAccessRoleBindingInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String resourceName; + + private String trustedAccessRoleBindingName; + + public TrustedAccessRoleBindingImpl withExistingManagedCluster(String resourceGroupName, String resourceName) { + this.resourceGroupName = resourceGroupName; + this.resourceName = resourceName; + return this; + } + + public TrustedAccessRoleBinding create() { + this.innerObject = serviceManager.serviceClient().getTrustedAccessRoleBindings().createOrUpdate( + resourceGroupName, resourceName, trustedAccessRoleBindingName, this.innerModel(), Context.NONE); + return this; + } + + public TrustedAccessRoleBinding create(Context context) { + this.innerObject = serviceManager.serviceClient().getTrustedAccessRoleBindings() + .createOrUpdate(resourceGroupName, resourceName, trustedAccessRoleBindingName, this.innerModel(), context); + return this; + } + + TrustedAccessRoleBindingImpl(String name, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = new TrustedAccessRoleBindingInner(); + this.serviceManager = serviceManager; + this.trustedAccessRoleBindingName = name; + } + + public TrustedAccessRoleBindingImpl update() { + return this; + } + + public TrustedAccessRoleBinding apply() { + this.innerObject = serviceManager.serviceClient().getTrustedAccessRoleBindings().createOrUpdate( + resourceGroupName, resourceName, trustedAccessRoleBindingName, this.innerModel(), Context.NONE); + return this; + } + + public TrustedAccessRoleBinding apply(Context context) { + this.innerObject = serviceManager.serviceClient().getTrustedAccessRoleBindings() + .createOrUpdate(resourceGroupName, resourceName, trustedAccessRoleBindingName, this.innerModel(), context); + return this; + } + + TrustedAccessRoleBindingImpl(TrustedAccessRoleBindingInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "managedClusters"); + this.trustedAccessRoleBindingName = Utils.getValueFromIdByName(innerObject.id(), "trustedAccessRoleBindings"); + } + + public TrustedAccessRoleBinding refresh() { + this.innerObject = serviceManager.serviceClient().getTrustedAccessRoleBindings() + .getWithResponse(resourceGroupName, resourceName, trustedAccessRoleBindingName, Context.NONE).getValue(); + return this; + } + + public TrustedAccessRoleBinding refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getTrustedAccessRoleBindings() + .getWithResponse(resourceGroupName, resourceName, trustedAccessRoleBindingName, context).getValue(); + return this; + } + + public TrustedAccessRoleBindingImpl withSourceResourceId(String sourceResourceId) { + this.innerModel().withSourceResourceId(sourceResourceId); + return this; + } + + public TrustedAccessRoleBindingImpl withRoles(List roles) { + this.innerModel().withRoles(roles); + return this; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingsClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingsClientImpl.java new file mode 100644 index 0000000000000..e85206f7d3094 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingsClientImpl.java @@ -0,0 +1,956 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.TrustedAccessRoleBindingsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleBindingInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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 = "ContainerServiceMana") + 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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) + private 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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) + private 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 + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingsImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingsImpl.java new file mode 100644 index 0000000000000..d517f6a7629fe --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleBindingsImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.TrustedAccessRoleBindingsClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleBindingInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleBinding; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleBindings; + +public final class TrustedAccessRoleBindingsImpl implements TrustedAccessRoleBindings { + private static final ClientLogger LOGGER = new ClientLogger(TrustedAccessRoleBindingsImpl.class); + + private final TrustedAccessRoleBindingsClient innerClient; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public TrustedAccessRoleBindingsImpl(TrustedAccessRoleBindingsClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String resourceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, resourceName); + return Utils.mapPage(inner, inner1 -> new TrustedAccessRoleBindingImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String resourceName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceName, context); + return Utils.mapPage(inner, inner1 -> new TrustedAccessRoleBindingImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, + resourceName, trustedAccessRoleBindingName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new TrustedAccessRoleBindingImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public TrustedAccessRoleBinding get(String resourceGroupName, String resourceName, + String trustedAccessRoleBindingName) { + TrustedAccessRoleBindingInner inner + = this.serviceClient().get(resourceGroupName, resourceName, trustedAccessRoleBindingName); + if (inner != null) { + return new TrustedAccessRoleBindingImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName) { + this.serviceClient().delete(resourceGroupName, resourceName, trustedAccessRoleBindingName); + } + + public void delete(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, + Context context) { + this.serviceClient().delete(resourceGroupName, resourceName, trustedAccessRoleBindingName, context); + } + + public TrustedAccessRoleBinding getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String trustedAccessRoleBindingName = Utils.getValueFromIdByName(id, "trustedAccessRoleBindings"); + if (trustedAccessRoleBindingName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'trustedAccessRoleBindings'.", id))); + } + return this.getWithResponse(resourceGroupName, resourceName, trustedAccessRoleBindingName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String trustedAccessRoleBindingName = Utils.getValueFromIdByName(id, "trustedAccessRoleBindings"); + if (trustedAccessRoleBindingName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'trustedAccessRoleBindings'.", id))); + } + return this.getWithResponse(resourceGroupName, resourceName, trustedAccessRoleBindingName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String trustedAccessRoleBindingName = Utils.getValueFromIdByName(id, "trustedAccessRoleBindings"); + if (trustedAccessRoleBindingName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'trustedAccessRoleBindings'.", id))); + } + this.delete(resourceGroupName, resourceName, trustedAccessRoleBindingName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "managedClusters"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); + } + String trustedAccessRoleBindingName = Utils.getValueFromIdByName(id, "trustedAccessRoleBindings"); + if (trustedAccessRoleBindingName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'trustedAccessRoleBindings'.", id))); + } + this.delete(resourceGroupName, resourceName, trustedAccessRoleBindingName, context); + } + + private TrustedAccessRoleBindingsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } + + public TrustedAccessRoleBindingImpl define(String name) { + return new TrustedAccessRoleBindingImpl(name, this.manager()); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleImpl.java new file mode 100644 index 0000000000000..f190947ea5b3c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRoleImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRole; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleRule; +import java.util.Collections; +import java.util.List; + +public final class TrustedAccessRoleImpl implements TrustedAccessRole { + private TrustedAccessRoleInner innerObject; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + TrustedAccessRoleImpl(TrustedAccessRoleInner innerObject, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String sourceResourceType() { + return this.innerModel().sourceResourceType(); + } + + public String name() { + return this.innerModel().name(); + } + + public List rules() { + List inner = this.innerModel().rules(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public TrustedAccessRoleInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRolesClientImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRolesClientImpl.java new file mode 100644 index 0000000000000..d36b6ad33ba3c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRolesClientImpl.java @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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.containerservicemicrosoftcontainerserviceaks.generated.fluent.TrustedAccessRolesClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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 = "ContainerServiceMana") + 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 = "2023-11-02-preview"; + 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 = "2023-11-02-preview"; + 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) + private 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 + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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 + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRolesImpl.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRolesImpl.java new file mode 100644 index 0000000000000..61c47082fb580 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/TrustedAccessRolesImpl.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.TrustedAccessRolesClient; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRole; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoles; + +public final class TrustedAccessRolesImpl implements TrustedAccessRoles { + private static final ClientLogger LOGGER = new ClientLogger(TrustedAccessRolesImpl.class); + + private final TrustedAccessRolesClient innerClient; + + private final com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager; + + public TrustedAccessRolesImpl(TrustedAccessRolesClient innerClient, + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String location) { + PagedIterable inner = this.serviceClient().list(location); + return Utils.mapPage(inner, inner1 -> new TrustedAccessRoleImpl(inner1, this.manager())); + } + + public PagedIterable list(String location, Context context) { + PagedIterable inner = this.serviceClient().list(location, context); + return Utils.mapPage(inner, inner1 -> new TrustedAccessRoleImpl(inner1, this.manager())); + } + + private TrustedAccessRolesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager + manager() { + return this.serviceManager; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/Utils.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/Utils.java new file mode 100644 index 0000000000000..6f3a0ec0f54a1 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/Utils.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.containerservicemicrosoftcontainerserviceaks.generated.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.util.CoreUtils; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import reactor.core.publisher.Flux; + +final class Utils { + private Utils() { + } + + static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterator itr = Arrays.stream(id.split("/")).iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && !part.trim().isEmpty()) { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + + } + + static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { + if (id == null || pathTemplate == null) { + return null; + } + String parameterNameParentheses = "{" + parameterName + "}"; + List idSegmentsReverted = Arrays.asList(id.split("/")); + List pathSegments = Arrays.asList(pathTemplate.split("/")); + Collections.reverse(idSegmentsReverted); + Iterator idItrReverted = idSegmentsReverted.iterator(); + int pathIndex = pathSegments.size(); + while (idItrReverted.hasNext() && pathIndex > 0) { + String idSegment = idItrReverted.next(); + String pathSegment = pathSegments.get(--pathIndex); + if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { + if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { + if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { + List segments = new ArrayList<>(); + segments.add(idSegment); + idItrReverted.forEachRemaining(segments::add); + Collections.reverse(segments); + if (!segments.isEmpty() && segments.get(0).isEmpty()) { + segments.remove(0); + } + return String.join("/", segments); + } else { + return idSegment; + } + } + } + } + return null; + + } + + static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { + return new PagedIterableImpl<>(pageIterable, mapper); + } + + private static final class PagedIterableImpl extends PagedIterable { + + private final PagedIterable pagedIterable; + private final Function mapper; + private final Function, PagedResponse> pageMapper; + + private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + this.pagedIterable = pagedIterable; + this.mapper = mapper; + this.pageMapper = getPageMapper(mapper); + } + + private static Function, PagedResponse> getPageMapper(Function mapper) { + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); + } + + @Override + public Stream stream() { + return pagedIterable.stream().map(mapper); + } + + @Override + public Stream> streamByPage() { + return pagedIterable.streamByPage().map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken) { + return pagedIterable.streamByPage(continuationToken).map(pageMapper); + } + + @Override + public Stream> streamByPage(int preferredPageSize) { + return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken, int preferredPageSize) { + return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); + } + + @Override + public Iterator iterator() { + return new IteratorImpl<>(pagedIterable.iterator(), mapper); + } + + @Override + public Iterable> iterableByPage() { + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken) { + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); + } + + @Override + public Iterable> iterableByPage(int preferredPageSize) { + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + } + } + + private static final class IteratorImpl implements Iterator { + + private final Iterator iterator; + private final Function mapper; + + private IteratorImpl(Iterator iterator, Function mapper) { + this.iterator = iterator; + this.mapper = mapper; + } + + @Override + public boolean hasNext() { + return iterator.hasNext(); + } + + @Override + public S next() { + return mapper.apply(iterator.next()); + } + + @Override + public void remove() { + iterator.remove(); + } + } + + private static final class IterableImpl implements Iterable { + + private final Iterable iterable; + private final Function mapper; + + private IterableImpl(Iterable iterable, Function mapper) { + this.iterable = iterable; + this.mapper = mapper; + } + + @Override + public Iterator iterator() { + return new IteratorImpl<>(iterable.iterator(), mapper); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/package-info.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/package-info.java new file mode 100644 index 0000000000000..fbfbe57360ef1 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/implementation/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the implementations for ContainerServiceManagementClient. + * Container Service Client. + */ +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation; diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AbsoluteMonthlySchedule.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AbsoluteMonthlySchedule.java new file mode 100644 index 0000000000000..ee932e6a91b5e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AbsoluteMonthlySchedule.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. + */ +@Fluent +public final class AbsoluteMonthlySchedule { + /* + * Specifies the number of months between each set of occurrences. + */ + @JsonProperty(value = "intervalMonths", required = true) + private int intervalMonths; + + /* + * The date of the month. + */ + @JsonProperty(value = "dayOfMonth", required = true) + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AddonAutoscaling.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AddonAutoscaling.java new file mode 100644 index 0000000000000..2e3b39f345deb --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AddonAutoscaling.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. + */ +public final class AddonAutoscaling extends ExpandableStringEnum { + /** + * Static value Enabled for AddonAutoscaling. + */ + public static final AddonAutoscaling ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for AddonAutoscaling. + */ + public static final AddonAutoscaling DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of AddonAutoscaling value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AddonAutoscaling() { + } + + /** + * Creates or finds a AddonAutoscaling from its string representation. + * + * @param name a name to look for. + * @return the corresponding AddonAutoscaling. + */ + @JsonCreator + public static AddonAutoscaling fromString(String name) { + return fromString(name, AddonAutoscaling.class); + } + + /** + * Gets known AddonAutoscaling values. + * + * @return known AddonAutoscaling values. + */ + public static Collection values() { + return values(AddonAutoscaling.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPool.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPool.java new file mode 100644 index 0000000000000..edc55ef9ad6ec --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPool.java @@ -0,0 +1,2367 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of AgentPool. + */ +public interface AgentPool { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: Resource type. + * + * @return the type value. + */ + String type(); + + /** + * Gets 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. + */ + Integer count(); + + /** + * Gets 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. + */ + String vmSize(); + + /** + * Gets 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. + */ + Integer osDiskSizeGB(); + + /** + * Gets 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. + */ + OSDiskType osDiskType(); + + /** + * Gets the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and + * Kubelet ephemeral storage. + * + * @return the kubeletDiskType value. + */ + KubeletDiskType kubeletDiskType(); + + /** + * Gets the workloadRuntime property: Determines the type of workload a node can run. + * + * @return the workloadRuntime value. + */ + WorkloadRuntime workloadRuntime(); + + /** + * Gets 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. + */ + String messageOfTheDay(); + + /** + * Gets 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. + */ + String vnetSubnetId(); + + /** + * Gets 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. + */ + String podSubnetId(); + + /** + * Gets the maxPods property: The maximum number of pods that can run on a node. + * + * @return the maxPods value. + */ + Integer maxPods(); + + /** + * Gets the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @return the osType value. + */ + OSType osType(); + + /** + * Gets the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if + * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after + * Windows2019 is deprecated. + * + * @return the osSku value. + */ + Ossku osSku(); + + /** + * Gets the maxCount property: The maximum number of nodes for auto-scaling. + * + * @return the maxCount value. + */ + Integer maxCount(); + + /** + * Gets the minCount property: The minimum number of nodes for auto-scaling. + * + * @return the minCount value. + */ + Integer minCount(); + + /** + * Gets the enableAutoScaling property: Whether to enable auto-scaler. + * + * @return the enableAutoScaling value. + */ + Boolean enableAutoScaling(); + + /** + * Gets the scaleDownMode property: This also effects the cluster autoscaler behavior. If not specified, it defaults + * to Delete. + * + * @return the scaleDownMode value. + */ + ScaleDownMode scaleDownMode(); + + /** + * Gets the typePropertiesType property: The type of Agent Pool. + * + * @return the typePropertiesType value. + */ + AgentPoolType typePropertiesType(); + + /** + * Gets 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. + */ + AgentPoolMode mode(); + + /** + * Gets the orchestratorVersion property: The version of Kubernetes specified by the user. + * + * Both patch version <major.minor.patch> and <major.minor> are supported. When <major.minor> is + * specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same + * <major.minor> once it has been created 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. + */ + String orchestratorVersion(); + + /** + * Gets the currentOrchestratorVersion property: The version of Kubernetes running on the Agent Pool. + * + * If orchestratorVersion was a fully specified version <major.minor.patch>, this field will be exactly equal + * to it. If orchestratorVersion was <major.minor>, this field will contain the full <major.minor.patch> + * version being used. + * + * @return the currentOrchestratorVersion value. + */ + String currentOrchestratorVersion(); + + /** + * Gets the nodeImageVersion property: The version of node image. + * + * @return the nodeImageVersion value. + */ + String nodeImageVersion(); + + /** + * Gets the upgradeSettings property: Settings for upgrading the agentpool. + * + * @return the upgradeSettings value. + */ + AgentPoolUpgradeSettings upgradeSettings(); + + /** + * Gets the provisioningState property: The current deployment or provisioning state. + * + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * Gets the powerState property: 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. + */ + PowerState powerState(); + + /** + * Gets 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. + */ + List availabilityZones(); + + /** + * Gets 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. + */ + Boolean enableNodePublicIp(); + + /** + * Gets the enableCustomCATrust property: Whether to enable Custom CA Trust feature. + * + * When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a daemonset + * along with host services to sync custom certificate authorities from user-provided list of base64 encoded + * certificates into node trust stores. Defaults to false. + * + * @return the enableCustomCATrust value. + */ + Boolean enableCustomCATrust(); + + /** + * Gets 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. + */ + String nodePublicIpPrefixId(); + + /** + * Gets the scaleSetPriority property: The Virtual Machine Scale Set priority. If not specified, the default is + * 'Regular'. + * + * @return the scaleSetPriority value. + */ + ScaleSetPriority scaleSetPriority(); + + /** + * Gets the scaleSetEvictionPolicy property: The Virtual Machine Scale Set eviction policy. + * + * This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + * + * @return the scaleSetEvictionPolicy value. + */ + ScaleSetEvictionPolicy scaleSetEvictionPolicy(); + + /** + * Gets 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. + */ + Float spotMaxPrice(); + + /** + * Gets the tags property: The tags to be persisted on the agent pool virtual machine scale set. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the nodeLabels property: The node labels to be persisted across all nodes in agent pool. + * + * @return the nodeLabels value. + */ + Map nodeLabels(); + + /** + * Gets the nodeTaints property: The taints added to new nodes during node pool create and scale. For example, + * key=value:NoSchedule. + * + * @return the nodeTaints value. + */ + List nodeTaints(); + + /** + * Gets the nodeInitializationTaints property: Taints added on the nodes during creation that will not be reconciled + * by AKS. + * + * These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be modified + * after node pool is created, but nodes will not be recreated with new taints until another operation that requires + * recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run before the + * node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with `kubectl + * taint nodes node1 key1=value1:NoSchedule-`. + * + * @return the nodeInitializationTaints value. + */ + List nodeInitializationTaints(); + + /** + * Gets the proximityPlacementGroupId property: The ID for Proximity Placement Group. + * + * @return the proximityPlacementGroupId value. + */ + String proximityPlacementGroupId(); + + /** + * Gets the kubeletConfig property: Kubelet configurations of agent nodes. + * + * The Kubelet configuration on the agent pool nodes. + * + * @return the kubeletConfig value. + */ + KubeletConfig kubeletConfig(); + + /** + * Gets the linuxOSConfig property: OS configurations of Linux agent nodes. + * + * The OS configuration of Linux agent nodes. + * + * @return the linuxOSConfig value. + */ + LinuxOSConfig linuxOSConfig(); + + /** + * Gets 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. + */ + Boolean enableEncryptionAtHost(); + + /** + * Gets the enableUltraSsd property: Whether to enable UltraSSD. + * + * @return the enableUltraSsd value. + */ + Boolean enableUltraSsd(); + + /** + * Gets 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. + */ + Boolean enableFips(); + + /** + * Gets the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for + * supported GPU VM SKU. + * + * @return the gpuInstanceProfile value. + */ + GpuInstanceProfile gpuInstanceProfile(); + + /** + * Gets 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. + */ + CreationData creationData(); + + /** + * Gets the capacityReservationGroupId property: The fully qualified resource ID of the Capacity Reservation Group + * to provide virtual machines from a reserved group of Virtual Machines. + * + * AKS will associate the specified agent pool with the Capacity Reservation Group. + * + * @return the capacityReservationGroupId value. + */ + String capacityReservationGroupId(); + + /** + * Gets 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. + */ + String hostGroupId(); + + /** + * Gets the windowsProfile property: The Windows agent pool's specific profile. + * + * @return the windowsProfile value. + */ + AgentPoolWindowsProfile windowsProfile(); + + /** + * Gets the networkProfile property: Network-related settings of an agent pool. + * + * @return the networkProfile value. + */ + AgentPoolNetworkProfile networkProfile(); + + /** + * Gets the securityProfile property: The security settings of an agent pool. + * + * @return the securityProfile value. + */ + AgentPoolSecurityProfile securityProfile(); + + /** + * Gets the gpuProfile property: The GPU settings of an agent pool. + * + * @return the gpuProfile value. + */ + AgentPoolGpuProfile gpuProfile(); + + /** + * Gets the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. + * + * @return the artifactStreamingProfile value. + */ + AgentPoolArtifactStreamingProfile artifactStreamingProfile(); + + /** + * Gets the virtualMachinesProfile property: Specifications on VirtualMachines agent pool. + * + * @return the virtualMachinesProfile value. + */ + VirtualMachinesProfile virtualMachinesProfile(); + + /** + * Gets the virtualMachineNodesStatus property: The status of nodes in a VirtualMachines agent pool. + * + * @return the virtualMachineNodesStatus value. + */ + List virtualMachineNodesStatus(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolInner + * object. + * + * @return the inner object. + */ + AgentPoolInner innerModel(); + + /** + * The entirety of the AgentPool definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The AgentPool definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the AgentPool definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the AgentPool definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, resourceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @return the next definition stage. + */ + WithCreate withExistingManagedCluster(String resourceGroupName, String resourceName); + } + + /** + * The stage of the AgentPool definition which contains all the minimum required properties for the resource to + * be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithCount, DefinitionStages.WithVmSize, + DefinitionStages.WithOsDiskSizeGB, DefinitionStages.WithOsDiskType, DefinitionStages.WithKubeletDiskType, + DefinitionStages.WithWorkloadRuntime, DefinitionStages.WithMessageOfTheDay, + DefinitionStages.WithVnetSubnetId, DefinitionStages.WithPodSubnetId, DefinitionStages.WithMaxPods, + DefinitionStages.WithOsType, DefinitionStages.WithOsSku, DefinitionStages.WithMaxCount, + DefinitionStages.WithMinCount, DefinitionStages.WithEnableAutoScaling, DefinitionStages.WithScaleDownMode, + DefinitionStages.WithTypePropertiesType, DefinitionStages.WithMode, + DefinitionStages.WithOrchestratorVersion, DefinitionStages.WithUpgradeSettings, + DefinitionStages.WithPowerState, DefinitionStages.WithAvailabilityZones, + DefinitionStages.WithEnableNodePublicIp, DefinitionStages.WithEnableCustomCATrust, + DefinitionStages.WithNodePublicIpPrefixId, DefinitionStages.WithScaleSetPriority, + DefinitionStages.WithScaleSetEvictionPolicy, DefinitionStages.WithSpotMaxPrice, + DefinitionStages.WithNodeLabels, DefinitionStages.WithNodeTaints, + DefinitionStages.WithNodeInitializationTaints, DefinitionStages.WithProximityPlacementGroupId, + DefinitionStages.WithKubeletConfig, DefinitionStages.WithLinuxOSConfig, + DefinitionStages.WithEnableEncryptionAtHost, DefinitionStages.WithEnableUltraSsd, + DefinitionStages.WithEnableFips, DefinitionStages.WithGpuInstanceProfile, DefinitionStages.WithCreationData, + DefinitionStages.WithCapacityReservationGroupId, DefinitionStages.WithHostGroupId, + DefinitionStages.WithWindowsProfile, DefinitionStages.WithNetworkProfile, + DefinitionStages.WithSecurityProfile, DefinitionStages.WithGpuProfile, + DefinitionStages.WithArtifactStreamingProfile, DefinitionStages.WithVirtualMachinesProfile, + DefinitionStages.WithVirtualMachineNodesStatus { + /** + * Executes the create request. + * + * @return the created resource. + */ + AgentPool create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + AgentPool create(Context context); + } + + /** + * The stage of the AgentPool definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: The tags to be persisted on the agent pool virtual machine scale set.. + * + * @param tags The tags to be persisted on the agent pool virtual machine scale set. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the AgentPool definition allowing to specify count. + */ + interface WithCount { + /** + * Specifies 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 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 next definition stage. + */ + WithCreate withCount(Integer count); + } + + /** + * The stage of the AgentPool definition allowing to specify vmSize. + */ + interface WithVmSize { + /** + * Specifies 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 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 next definition stage. + */ + WithCreate withVmSize(String vmSize); + } + + /** + * The stage of the AgentPool definition allowing to specify osDiskSizeGB. + */ + interface WithOsDiskSizeGB { + /** + * Specifies 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 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 next definition stage. + */ + WithCreate withOsDiskSizeGB(Integer osDiskSizeGB); + } + + /** + * The stage of the AgentPool definition allowing to specify osDiskType. + */ + interface WithOsDiskType { + /** + * Specifies 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 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 next definition stage. + */ + WithCreate withOsDiskType(OSDiskType osDiskType); + } + + /** + * The stage of the AgentPool definition allowing to specify kubeletDiskType. + */ + interface WithKubeletDiskType { + /** + * Specifies the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime + * data root, and Kubelet ephemeral storage.. + * + * @param kubeletDiskType Determines the placement of emptyDir volumes, container runtime data root, and + * Kubelet ephemeral storage. + * @return the next definition stage. + */ + WithCreate withKubeletDiskType(KubeletDiskType kubeletDiskType); + } + + /** + * The stage of the AgentPool definition allowing to specify workloadRuntime. + */ + interface WithWorkloadRuntime { + /** + * Specifies the workloadRuntime property: Determines the type of workload a node can run.. + * + * @param workloadRuntime Determines the type of workload a node can run. + * @return the next definition stage. + */ + WithCreate withWorkloadRuntime(WorkloadRuntime workloadRuntime); + } + + /** + * The stage of the AgentPool definition allowing to specify messageOfTheDay. + */ + interface WithMessageOfTheDay { + /** + * Specifies 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 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 next definition stage. + */ + WithCreate withMessageOfTheDay(String messageOfTheDay); + } + + /** + * The stage of the AgentPool definition allowing to specify vnetSubnetId. + */ + interface WithVnetSubnetId { + /** + * Specifies 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 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 next definition stage. + */ + WithCreate withVnetSubnetId(String vnetSubnetId); + } + + /** + * The stage of the AgentPool definition allowing to specify podSubnetId. + */ + interface WithPodSubnetId { + /** + * Specifies 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 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 next definition stage. + */ + WithCreate withPodSubnetId(String podSubnetId); + } + + /** + * The stage of the AgentPool definition allowing to specify maxPods. + */ + interface WithMaxPods { + /** + * Specifies the maxPods property: The maximum number of pods that can run on a node.. + * + * @param maxPods The maximum number of pods that can run on a node. + * @return the next definition stage. + */ + WithCreate withMaxPods(Integer maxPods); + } + + /** + * The stage of the AgentPool definition allowing to specify osType. + */ + interface WithOsType { + /** + * Specifies the osType property: OsType to be used to specify os type. Choose from Linux and Windows. + * Default to Linux.. + * + * @param osType OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * @return the next definition stage. + */ + WithCreate withOsType(OSType osType); + } + + /** + * The stage of the AgentPool definition allowing to specify osSku. + */ + interface WithOsSku { + /** + * Specifies the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default + * is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed + * to Windows2022 after Windows2019 is deprecated.. + * + * @param osSku Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if + * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to + * Windows2022 after Windows2019 is deprecated. + * @return the next definition stage. + */ + WithCreate withOsSku(Ossku osSku); + } + + /** + * The stage of the AgentPool definition allowing to specify maxCount. + */ + interface WithMaxCount { + /** + * Specifies the maxCount property: The maximum number of nodes for auto-scaling. + * + * @param maxCount The maximum number of nodes for auto-scaling. + * @return the next definition stage. + */ + WithCreate withMaxCount(Integer maxCount); + } + + /** + * The stage of the AgentPool definition allowing to specify minCount. + */ + interface WithMinCount { + /** + * Specifies the minCount property: The minimum number of nodes for auto-scaling. + * + * @param minCount The minimum number of nodes for auto-scaling. + * @return the next definition stage. + */ + WithCreate withMinCount(Integer minCount); + } + + /** + * The stage of the AgentPool definition allowing to specify enableAutoScaling. + */ + interface WithEnableAutoScaling { + /** + * Specifies the enableAutoScaling property: Whether to enable auto-scaler. + * + * @param enableAutoScaling Whether to enable auto-scaler. + * @return the next definition stage. + */ + WithCreate withEnableAutoScaling(Boolean enableAutoScaling); + } + + /** + * The stage of the AgentPool definition allowing to specify scaleDownMode. + */ + interface WithScaleDownMode { + /** + * Specifies the scaleDownMode property: This also effects the cluster autoscaler behavior. If not + * specified, it defaults to Delete.. + * + * @param scaleDownMode This also effects the cluster autoscaler behavior. If not specified, it defaults to + * Delete. + * @return the next definition stage. + */ + WithCreate withScaleDownMode(ScaleDownMode scaleDownMode); + } + + /** + * The stage of the AgentPool definition allowing to specify typePropertiesType. + */ + interface WithTypePropertiesType { + /** + * Specifies the typePropertiesType property: The type of Agent Pool.. + * + * @param typePropertiesType The type of Agent Pool. + * @return the next definition stage. + */ + WithCreate withTypePropertiesType(AgentPoolType typePropertiesType); + } + + /** + * The stage of the AgentPool definition allowing to specify mode. + */ + interface WithMode { + /** + * Specifies 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 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 next definition stage. + */ + WithCreate withMode(AgentPoolMode mode); + } + + /** + * The stage of the AgentPool definition allowing to specify orchestratorVersion. + */ + interface WithOrchestratorVersion { + /** + * Specifies the orchestratorVersion property: The version of Kubernetes specified by the user. + * + * Both patch version <major.minor.patch> and <major.minor> are supported. When + * <major.minor> is specified, the latest supported patch version is chosen automatically. Updating + * the agent pool with the same <major.minor> once it has been created 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 version of Kubernetes specified by the user. + * + * Both patch version <major.minor.patch> and <major.minor> are supported. When + * <major.minor> is specified, the latest supported patch version is chosen automatically. Updating + * the agent pool with the same <major.minor> once it has been created 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 next definition stage. + */ + WithCreate withOrchestratorVersion(String orchestratorVersion); + } + + /** + * The stage of the AgentPool definition allowing to specify upgradeSettings. + */ + interface WithUpgradeSettings { + /** + * Specifies the upgradeSettings property: Settings for upgrading the agentpool. + * + * @param upgradeSettings Settings for upgrading the agentpool. + * @return the next definition stage. + */ + WithCreate withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings); + } + + /** + * The stage of the AgentPool definition allowing to specify powerState. + */ + interface WithPowerState { + /** + * Specifies the powerState property: 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 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 next definition stage. + */ + WithCreate withPowerState(PowerState powerState); + } + + /** + * The stage of the AgentPool definition allowing to specify availabilityZones. + */ + interface WithAvailabilityZones { + /** + * Specifies 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 list of Availability zones to use for nodes. This can only be specified if + * the AgentPoolType property is 'VirtualMachineScaleSets'. + * @return the next definition stage. + */ + WithCreate withAvailabilityZones(List availabilityZones); + } + + /** + * The stage of the AgentPool definition allowing to specify enableNodePublicIp. + */ + interface WithEnableNodePublicIp { + /** + * Specifies 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 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 next definition stage. + */ + WithCreate withEnableNodePublicIp(Boolean enableNodePublicIp); + } + + /** + * The stage of the AgentPool definition allowing to specify enableCustomCATrust. + */ + interface WithEnableCustomCATrust { + /** + * Specifies the enableCustomCATrust property: Whether to enable Custom CA Trust feature. + * + * When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a + * daemonset along with host services to sync custom certificate authorities from user-provided list of + * base64 encoded certificates into node trust stores. Defaults to false.. + * + * @param enableCustomCATrust Whether to enable Custom CA Trust feature. + * + * When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a + * daemonset along with host services to sync custom certificate authorities from user-provided list of + * base64 encoded certificates into node trust stores. Defaults to false. + * @return the next definition stage. + */ + WithCreate withEnableCustomCATrust(Boolean enableCustomCATrust); + } + + /** + * The stage of the AgentPool definition allowing to specify nodePublicIpPrefixId. + */ + interface WithNodePublicIpPrefixId { + /** + * Specifies 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 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 next definition stage. + */ + WithCreate withNodePublicIpPrefixId(String nodePublicIpPrefixId); + } + + /** + * The stage of the AgentPool definition allowing to specify scaleSetPriority. + */ + interface WithScaleSetPriority { + /** + * Specifies the scaleSetPriority property: The Virtual Machine Scale Set priority. If not specified, the + * default is 'Regular'.. + * + * @param scaleSetPriority The Virtual Machine Scale Set priority. If not specified, the default is + * 'Regular'. + * @return the next definition stage. + */ + WithCreate withScaleSetPriority(ScaleSetPriority scaleSetPriority); + } + + /** + * The stage of the AgentPool definition allowing to specify scaleSetEvictionPolicy. + */ + interface WithScaleSetEvictionPolicy { + /** + * Specifies the scaleSetEvictionPolicy property: The Virtual Machine Scale Set eviction policy. + * + * This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is + * 'Delete'.. + * + * @param scaleSetEvictionPolicy The Virtual Machine Scale Set eviction policy. + * + * This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is + * 'Delete'. + * @return the next definition stage. + */ + WithCreate withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy); + } + + /** + * The stage of the AgentPool definition allowing to specify spotMaxPrice. + */ + interface WithSpotMaxPrice { + /** + * Specifies 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 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 next definition stage. + */ + WithCreate withSpotMaxPrice(Float spotMaxPrice); + } + + /** + * The stage of the AgentPool definition allowing to specify nodeLabels. + */ + interface WithNodeLabels { + /** + * Specifies the nodeLabels property: The node labels to be persisted across all nodes in agent pool.. + * + * @param nodeLabels The node labels to be persisted across all nodes in agent pool. + * @return the next definition stage. + */ + WithCreate withNodeLabels(Map nodeLabels); + } + + /** + * The stage of the AgentPool definition allowing to specify nodeTaints. + */ + interface WithNodeTaints { + /** + * Specifies the nodeTaints property: The taints added to new nodes during node pool create and scale. For + * example, key=value:NoSchedule.. + * + * @param nodeTaints The taints added to new nodes during node pool create and scale. For example, + * key=value:NoSchedule. + * @return the next definition stage. + */ + WithCreate withNodeTaints(List nodeTaints); + } + + /** + * The stage of the AgentPool definition allowing to specify nodeInitializationTaints. + */ + interface WithNodeInitializationTaints { + /** + * Specifies the nodeInitializationTaints property: Taints added on the nodes during creation that will not + * be reconciled by AKS. + * + * These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be + * modified after node pool is created, but nodes will not be recreated with new taints until another + * operation that requires recreation (e.g. node image upgrade) happens. These taints allow for required + * configuration to run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' + * that then can be removed with `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @param nodeInitializationTaints Taints added on the nodes during creation that will not be reconciled by + * AKS. + * + * These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be + * modified after node pool is created, but nodes will not be recreated with new taints until another + * operation that requires recreation (e.g. node image upgrade) happens. These taints allow for required + * configuration to run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' + * that then can be removed with `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * @return the next definition stage. + */ + WithCreate withNodeInitializationTaints(List nodeInitializationTaints); + } + + /** + * The stage of the AgentPool definition allowing to specify proximityPlacementGroupId. + */ + interface WithProximityPlacementGroupId { + /** + * Specifies the proximityPlacementGroupId property: The ID for Proximity Placement Group.. + * + * @param proximityPlacementGroupId The ID for Proximity Placement Group. + * @return the next definition stage. + */ + WithCreate withProximityPlacementGroupId(String proximityPlacementGroupId); + } + + /** + * The stage of the AgentPool definition allowing to specify kubeletConfig. + */ + interface WithKubeletConfig { + /** + * Specifies the kubeletConfig property: Kubelet configurations of agent nodes. + * + * The Kubelet configuration on the agent pool nodes.. + * + * @param kubeletConfig Kubelet configurations of agent nodes. + * + * The Kubelet configuration on the agent pool nodes. + * @return the next definition stage. + */ + WithCreate withKubeletConfig(KubeletConfig kubeletConfig); + } + + /** + * The stage of the AgentPool definition allowing to specify linuxOSConfig. + */ + interface WithLinuxOSConfig { + /** + * Specifies the linuxOSConfig property: OS configurations of Linux agent nodes. + * + * The OS configuration of Linux agent nodes.. + * + * @param linuxOSConfig OS configurations of Linux agent nodes. + * + * The OS configuration of Linux agent nodes. + * @return the next definition stage. + */ + WithCreate withLinuxOSConfig(LinuxOSConfig linuxOSConfig); + } + + /** + * The stage of the AgentPool definition allowing to specify enableEncryptionAtHost. + */ + interface WithEnableEncryptionAtHost { + /** + * Specifies 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 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 next definition stage. + */ + WithCreate withEnableEncryptionAtHost(Boolean enableEncryptionAtHost); + } + + /** + * The stage of the AgentPool definition allowing to specify enableUltraSsd. + */ + interface WithEnableUltraSsd { + /** + * Specifies the enableUltraSsd property: Whether to enable UltraSSD. + * + * @param enableUltraSsd Whether to enable UltraSSD. + * @return the next definition stage. + */ + WithCreate withEnableUltraSsd(Boolean enableUltraSsd); + } + + /** + * The stage of the AgentPool definition allowing to specify enableFips. + */ + interface WithEnableFips { + /** + * Specifies 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 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 next definition stage. + */ + WithCreate withEnableFips(Boolean enableFips); + } + + /** + * The stage of the AgentPool definition allowing to specify gpuInstanceProfile. + */ + interface WithGpuInstanceProfile { + /** + * Specifies the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance + * profile for supported GPU VM SKU.. + * + * @param gpuInstanceProfile GPUInstanceProfile to be used to specify GPU MIG instance profile for supported + * GPU VM SKU. + * @return the next definition stage. + */ + WithCreate withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile); + } + + /** + * The stage of the AgentPool definition allowing to specify creationData. + */ + interface WithCreationData { + /** + * Specifies 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 CreationData to be used to specify the source Snapshot ID if the node pool will be + * created/upgraded using a snapshot. + * @return the next definition stage. + */ + WithCreate withCreationData(CreationData creationData); + } + + /** + * The stage of the AgentPool definition allowing to specify capacityReservationGroupId. + */ + interface WithCapacityReservationGroupId { + /** + * Specifies the capacityReservationGroupId property: The fully qualified resource ID of the Capacity + * Reservation Group to provide virtual machines from a reserved group of Virtual Machines. + * + * AKS will associate the specified agent pool with the Capacity Reservation Group.. + * + * @param capacityReservationGroupId The fully qualified resource ID of the Capacity Reservation Group to + * provide virtual machines from a reserved group of Virtual Machines. + * + * AKS will associate the specified agent pool with the Capacity Reservation Group. + * @return the next definition stage. + */ + WithCreate withCapacityReservationGroupId(String capacityReservationGroupId); + } + + /** + * The stage of the AgentPool definition allowing to specify hostGroupId. + */ + interface WithHostGroupId { + /** + * Specifies 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 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 next definition stage. + */ + WithCreate withHostGroupId(String hostGroupId); + } + + /** + * The stage of the AgentPool definition allowing to specify windowsProfile. + */ + interface WithWindowsProfile { + /** + * Specifies the windowsProfile property: The Windows agent pool's specific profile.. + * + * @param windowsProfile The Windows agent pool's specific profile. + * @return the next definition stage. + */ + WithCreate withWindowsProfile(AgentPoolWindowsProfile windowsProfile); + } + + /** + * The stage of the AgentPool definition allowing to specify networkProfile. + */ + interface WithNetworkProfile { + /** + * Specifies the networkProfile property: Network-related settings of an agent pool.. + * + * @param networkProfile Network-related settings of an agent pool. + * @return the next definition stage. + */ + WithCreate withNetworkProfile(AgentPoolNetworkProfile networkProfile); + } + + /** + * The stage of the AgentPool definition allowing to specify securityProfile. + */ + interface WithSecurityProfile { + /** + * Specifies the securityProfile property: The security settings of an agent pool.. + * + * @param securityProfile The security settings of an agent pool. + * @return the next definition stage. + */ + WithCreate withSecurityProfile(AgentPoolSecurityProfile securityProfile); + } + + /** + * The stage of the AgentPool definition allowing to specify gpuProfile. + */ + interface WithGpuProfile { + /** + * Specifies the gpuProfile property: The GPU settings of an agent pool.. + * + * @param gpuProfile The GPU settings of an agent pool. + * @return the next definition stage. + */ + WithCreate withGpuProfile(AgentPoolGpuProfile gpuProfile); + } + + /** + * The stage of the AgentPool definition allowing to specify artifactStreamingProfile. + */ + interface WithArtifactStreamingProfile { + /** + * Specifies the artifactStreamingProfile property: Configuration for using artifact streaming on AKS.. + * + * @param artifactStreamingProfile Configuration for using artifact streaming on AKS. + * @return the next definition stage. + */ + WithCreate withArtifactStreamingProfile(AgentPoolArtifactStreamingProfile artifactStreamingProfile); + } + + /** + * The stage of the AgentPool definition allowing to specify virtualMachinesProfile. + */ + interface WithVirtualMachinesProfile { + /** + * Specifies the virtualMachinesProfile property: Specifications on VirtualMachines agent pool.. + * + * @param virtualMachinesProfile Specifications on VirtualMachines agent pool. + * @return the next definition stage. + */ + WithCreate withVirtualMachinesProfile(VirtualMachinesProfile virtualMachinesProfile); + } + + /** + * The stage of the AgentPool definition allowing to specify virtualMachineNodesStatus. + */ + interface WithVirtualMachineNodesStatus { + /** + * Specifies the virtualMachineNodesStatus property: The status of nodes in a VirtualMachines agent pool.. + * + * @param virtualMachineNodesStatus The status of nodes in a VirtualMachines agent pool. + * @return the next definition stage. + */ + WithCreate withVirtualMachineNodesStatus(List virtualMachineNodesStatus); + } + } + + /** + * Begins update for the AgentPool resource. + * + * @return the stage of resource update. + */ + AgentPool.Update update(); + + /** + * The template for AgentPool update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithCount, UpdateStages.WithVmSize, + UpdateStages.WithOsDiskSizeGB, UpdateStages.WithOsDiskType, UpdateStages.WithKubeletDiskType, + UpdateStages.WithWorkloadRuntime, UpdateStages.WithMessageOfTheDay, UpdateStages.WithVnetSubnetId, + UpdateStages.WithPodSubnetId, UpdateStages.WithMaxPods, UpdateStages.WithOsType, UpdateStages.WithOsSku, + UpdateStages.WithMaxCount, UpdateStages.WithMinCount, UpdateStages.WithEnableAutoScaling, + UpdateStages.WithScaleDownMode, UpdateStages.WithTypePropertiesType, UpdateStages.WithMode, + UpdateStages.WithOrchestratorVersion, UpdateStages.WithUpgradeSettings, UpdateStages.WithPowerState, + UpdateStages.WithAvailabilityZones, UpdateStages.WithEnableNodePublicIp, UpdateStages.WithEnableCustomCATrust, + UpdateStages.WithNodePublicIpPrefixId, UpdateStages.WithScaleSetPriority, + UpdateStages.WithScaleSetEvictionPolicy, UpdateStages.WithSpotMaxPrice, UpdateStages.WithNodeLabels, + UpdateStages.WithNodeTaints, UpdateStages.WithNodeInitializationTaints, + UpdateStages.WithProximityPlacementGroupId, UpdateStages.WithKubeletConfig, UpdateStages.WithLinuxOSConfig, + UpdateStages.WithEnableEncryptionAtHost, UpdateStages.WithEnableUltraSsd, UpdateStages.WithEnableFips, + UpdateStages.WithGpuInstanceProfile, UpdateStages.WithCreationData, UpdateStages.WithCapacityReservationGroupId, + UpdateStages.WithHostGroupId, UpdateStages.WithWindowsProfile, UpdateStages.WithNetworkProfile, + UpdateStages.WithSecurityProfile, UpdateStages.WithGpuProfile, UpdateStages.WithArtifactStreamingProfile, + UpdateStages.WithVirtualMachinesProfile, UpdateStages.WithVirtualMachineNodesStatus { + /** + * Executes the update request. + * + * @return the updated resource. + */ + AgentPool apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + AgentPool apply(Context context); + } + + /** + * The AgentPool update stages. + */ + interface UpdateStages { + /** + * The stage of the AgentPool update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: The tags to be persisted on the agent pool virtual machine scale set.. + * + * @param tags The tags to be persisted on the agent pool virtual machine scale set. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the AgentPool update allowing to specify count. + */ + interface WithCount { + /** + * Specifies 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 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 next definition stage. + */ + Update withCount(Integer count); + } + + /** + * The stage of the AgentPool update allowing to specify vmSize. + */ + interface WithVmSize { + /** + * Specifies 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 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 next definition stage. + */ + Update withVmSize(String vmSize); + } + + /** + * The stage of the AgentPool update allowing to specify osDiskSizeGB. + */ + interface WithOsDiskSizeGB { + /** + * Specifies 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 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 next definition stage. + */ + Update withOsDiskSizeGB(Integer osDiskSizeGB); + } + + /** + * The stage of the AgentPool update allowing to specify osDiskType. + */ + interface WithOsDiskType { + /** + * Specifies 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 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 next definition stage. + */ + Update withOsDiskType(OSDiskType osDiskType); + } + + /** + * The stage of the AgentPool update allowing to specify kubeletDiskType. + */ + interface WithKubeletDiskType { + /** + * Specifies the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime + * data root, and Kubelet ephemeral storage.. + * + * @param kubeletDiskType Determines the placement of emptyDir volumes, container runtime data root, and + * Kubelet ephemeral storage. + * @return the next definition stage. + */ + Update withKubeletDiskType(KubeletDiskType kubeletDiskType); + } + + /** + * The stage of the AgentPool update allowing to specify workloadRuntime. + */ + interface WithWorkloadRuntime { + /** + * Specifies the workloadRuntime property: Determines the type of workload a node can run.. + * + * @param workloadRuntime Determines the type of workload a node can run. + * @return the next definition stage. + */ + Update withWorkloadRuntime(WorkloadRuntime workloadRuntime); + } + + /** + * The stage of the AgentPool update allowing to specify messageOfTheDay. + */ + interface WithMessageOfTheDay { + /** + * Specifies 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 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 next definition stage. + */ + Update withMessageOfTheDay(String messageOfTheDay); + } + + /** + * The stage of the AgentPool update allowing to specify vnetSubnetId. + */ + interface WithVnetSubnetId { + /** + * Specifies 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 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 next definition stage. + */ + Update withVnetSubnetId(String vnetSubnetId); + } + + /** + * The stage of the AgentPool update allowing to specify podSubnetId. + */ + interface WithPodSubnetId { + /** + * Specifies 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 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 next definition stage. + */ + Update withPodSubnetId(String podSubnetId); + } + + /** + * The stage of the AgentPool update allowing to specify maxPods. + */ + interface WithMaxPods { + /** + * Specifies the maxPods property: The maximum number of pods that can run on a node.. + * + * @param maxPods The maximum number of pods that can run on a node. + * @return the next definition stage. + */ + Update withMaxPods(Integer maxPods); + } + + /** + * The stage of the AgentPool update allowing to specify osType. + */ + interface WithOsType { + /** + * Specifies the osType property: OsType to be used to specify os type. Choose from Linux and Windows. + * Default to Linux.. + * + * @param osType OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * @return the next definition stage. + */ + Update withOsType(OSType osType); + } + + /** + * The stage of the AgentPool update allowing to specify osSku. + */ + interface WithOsSku { + /** + * Specifies the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default + * is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed + * to Windows2022 after Windows2019 is deprecated.. + * + * @param osSku Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if + * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to + * Windows2022 after Windows2019 is deprecated. + * @return the next definition stage. + */ + Update withOsSku(Ossku osSku); + } + + /** + * The stage of the AgentPool update allowing to specify maxCount. + */ + interface WithMaxCount { + /** + * Specifies the maxCount property: The maximum number of nodes for auto-scaling. + * + * @param maxCount The maximum number of nodes for auto-scaling. + * @return the next definition stage. + */ + Update withMaxCount(Integer maxCount); + } + + /** + * The stage of the AgentPool update allowing to specify minCount. + */ + interface WithMinCount { + /** + * Specifies the minCount property: The minimum number of nodes for auto-scaling. + * + * @param minCount The minimum number of nodes for auto-scaling. + * @return the next definition stage. + */ + Update withMinCount(Integer minCount); + } + + /** + * The stage of the AgentPool update allowing to specify enableAutoScaling. + */ + interface WithEnableAutoScaling { + /** + * Specifies the enableAutoScaling property: Whether to enable auto-scaler. + * + * @param enableAutoScaling Whether to enable auto-scaler. + * @return the next definition stage. + */ + Update withEnableAutoScaling(Boolean enableAutoScaling); + } + + /** + * The stage of the AgentPool update allowing to specify scaleDownMode. + */ + interface WithScaleDownMode { + /** + * Specifies the scaleDownMode property: This also effects the cluster autoscaler behavior. If not + * specified, it defaults to Delete.. + * + * @param scaleDownMode This also effects the cluster autoscaler behavior. If not specified, it defaults to + * Delete. + * @return the next definition stage. + */ + Update withScaleDownMode(ScaleDownMode scaleDownMode); + } + + /** + * The stage of the AgentPool update allowing to specify typePropertiesType. + */ + interface WithTypePropertiesType { + /** + * Specifies the typePropertiesType property: The type of Agent Pool.. + * + * @param typePropertiesType The type of Agent Pool. + * @return the next definition stage. + */ + Update withTypePropertiesType(AgentPoolType typePropertiesType); + } + + /** + * The stage of the AgentPool update allowing to specify mode. + */ + interface WithMode { + /** + * Specifies 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 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 next definition stage. + */ + Update withMode(AgentPoolMode mode); + } + + /** + * The stage of the AgentPool update allowing to specify orchestratorVersion. + */ + interface WithOrchestratorVersion { + /** + * Specifies the orchestratorVersion property: The version of Kubernetes specified by the user. + * + * Both patch version <major.minor.patch> and <major.minor> are supported. When + * <major.minor> is specified, the latest supported patch version is chosen automatically. Updating + * the agent pool with the same <major.minor> once it has been created 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 version of Kubernetes specified by the user. + * + * Both patch version <major.minor.patch> and <major.minor> are supported. When + * <major.minor> is specified, the latest supported patch version is chosen automatically. Updating + * the agent pool with the same <major.minor> once it has been created 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 next definition stage. + */ + Update withOrchestratorVersion(String orchestratorVersion); + } + + /** + * The stage of the AgentPool update allowing to specify upgradeSettings. + */ + interface WithUpgradeSettings { + /** + * Specifies the upgradeSettings property: Settings for upgrading the agentpool. + * + * @param upgradeSettings Settings for upgrading the agentpool. + * @return the next definition stage. + */ + Update withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings); + } + + /** + * The stage of the AgentPool update allowing to specify powerState. + */ + interface WithPowerState { + /** + * Specifies the powerState property: 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 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 next definition stage. + */ + Update withPowerState(PowerState powerState); + } + + /** + * The stage of the AgentPool update allowing to specify availabilityZones. + */ + interface WithAvailabilityZones { + /** + * Specifies 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 list of Availability zones to use for nodes. This can only be specified if + * the AgentPoolType property is 'VirtualMachineScaleSets'. + * @return the next definition stage. + */ + Update withAvailabilityZones(List availabilityZones); + } + + /** + * The stage of the AgentPool update allowing to specify enableNodePublicIp. + */ + interface WithEnableNodePublicIp { + /** + * Specifies 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 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 next definition stage. + */ + Update withEnableNodePublicIp(Boolean enableNodePublicIp); + } + + /** + * The stage of the AgentPool update allowing to specify enableCustomCATrust. + */ + interface WithEnableCustomCATrust { + /** + * Specifies the enableCustomCATrust property: Whether to enable Custom CA Trust feature. + * + * When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a + * daemonset along with host services to sync custom certificate authorities from user-provided list of + * base64 encoded certificates into node trust stores. Defaults to false.. + * + * @param enableCustomCATrust Whether to enable Custom CA Trust feature. + * + * When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a + * daemonset along with host services to sync custom certificate authorities from user-provided list of + * base64 encoded certificates into node trust stores. Defaults to false. + * @return the next definition stage. + */ + Update withEnableCustomCATrust(Boolean enableCustomCATrust); + } + + /** + * The stage of the AgentPool update allowing to specify nodePublicIpPrefixId. + */ + interface WithNodePublicIpPrefixId { + /** + * Specifies 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 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 next definition stage. + */ + Update withNodePublicIpPrefixId(String nodePublicIpPrefixId); + } + + /** + * The stage of the AgentPool update allowing to specify scaleSetPriority. + */ + interface WithScaleSetPriority { + /** + * Specifies the scaleSetPriority property: The Virtual Machine Scale Set priority. If not specified, the + * default is 'Regular'.. + * + * @param scaleSetPriority The Virtual Machine Scale Set priority. If not specified, the default is + * 'Regular'. + * @return the next definition stage. + */ + Update withScaleSetPriority(ScaleSetPriority scaleSetPriority); + } + + /** + * The stage of the AgentPool update allowing to specify scaleSetEvictionPolicy. + */ + interface WithScaleSetEvictionPolicy { + /** + * Specifies the scaleSetEvictionPolicy property: The Virtual Machine Scale Set eviction policy. + * + * This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is + * 'Delete'.. + * + * @param scaleSetEvictionPolicy The Virtual Machine Scale Set eviction policy. + * + * This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is + * 'Delete'. + * @return the next definition stage. + */ + Update withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy); + } + + /** + * The stage of the AgentPool update allowing to specify spotMaxPrice. + */ + interface WithSpotMaxPrice { + /** + * Specifies 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 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 next definition stage. + */ + Update withSpotMaxPrice(Float spotMaxPrice); + } + + /** + * The stage of the AgentPool update allowing to specify nodeLabels. + */ + interface WithNodeLabels { + /** + * Specifies the nodeLabels property: The node labels to be persisted across all nodes in agent pool.. + * + * @param nodeLabels The node labels to be persisted across all nodes in agent pool. + * @return the next definition stage. + */ + Update withNodeLabels(Map nodeLabels); + } + + /** + * The stage of the AgentPool update allowing to specify nodeTaints. + */ + interface WithNodeTaints { + /** + * Specifies the nodeTaints property: The taints added to new nodes during node pool create and scale. For + * example, key=value:NoSchedule.. + * + * @param nodeTaints The taints added to new nodes during node pool create and scale. For example, + * key=value:NoSchedule. + * @return the next definition stage. + */ + Update withNodeTaints(List nodeTaints); + } + + /** + * The stage of the AgentPool update allowing to specify nodeInitializationTaints. + */ + interface WithNodeInitializationTaints { + /** + * Specifies the nodeInitializationTaints property: Taints added on the nodes during creation that will not + * be reconciled by AKS. + * + * These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be + * modified after node pool is created, but nodes will not be recreated with new taints until another + * operation that requires recreation (e.g. node image upgrade) happens. These taints allow for required + * configuration to run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' + * that then can be removed with `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @param nodeInitializationTaints Taints added on the nodes during creation that will not be reconciled by + * AKS. + * + * These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be + * modified after node pool is created, but nodes will not be recreated with new taints until another + * operation that requires recreation (e.g. node image upgrade) happens. These taints allow for required + * configuration to run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' + * that then can be removed with `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * @return the next definition stage. + */ + Update withNodeInitializationTaints(List nodeInitializationTaints); + } + + /** + * The stage of the AgentPool update allowing to specify proximityPlacementGroupId. + */ + interface WithProximityPlacementGroupId { + /** + * Specifies the proximityPlacementGroupId property: The ID for Proximity Placement Group.. + * + * @param proximityPlacementGroupId The ID for Proximity Placement Group. + * @return the next definition stage. + */ + Update withProximityPlacementGroupId(String proximityPlacementGroupId); + } + + /** + * The stage of the AgentPool update allowing to specify kubeletConfig. + */ + interface WithKubeletConfig { + /** + * Specifies the kubeletConfig property: Kubelet configurations of agent nodes. + * + * The Kubelet configuration on the agent pool nodes.. + * + * @param kubeletConfig Kubelet configurations of agent nodes. + * + * The Kubelet configuration on the agent pool nodes. + * @return the next definition stage. + */ + Update withKubeletConfig(KubeletConfig kubeletConfig); + } + + /** + * The stage of the AgentPool update allowing to specify linuxOSConfig. + */ + interface WithLinuxOSConfig { + /** + * Specifies the linuxOSConfig property: OS configurations of Linux agent nodes. + * + * The OS configuration of Linux agent nodes.. + * + * @param linuxOSConfig OS configurations of Linux agent nodes. + * + * The OS configuration of Linux agent nodes. + * @return the next definition stage. + */ + Update withLinuxOSConfig(LinuxOSConfig linuxOSConfig); + } + + /** + * The stage of the AgentPool update allowing to specify enableEncryptionAtHost. + */ + interface WithEnableEncryptionAtHost { + /** + * Specifies 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 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 next definition stage. + */ + Update withEnableEncryptionAtHost(Boolean enableEncryptionAtHost); + } + + /** + * The stage of the AgentPool update allowing to specify enableUltraSsd. + */ + interface WithEnableUltraSsd { + /** + * Specifies the enableUltraSsd property: Whether to enable UltraSSD. + * + * @param enableUltraSsd Whether to enable UltraSSD. + * @return the next definition stage. + */ + Update withEnableUltraSsd(Boolean enableUltraSsd); + } + + /** + * The stage of the AgentPool update allowing to specify enableFips. + */ + interface WithEnableFips { + /** + * Specifies 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 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 next definition stage. + */ + Update withEnableFips(Boolean enableFips); + } + + /** + * The stage of the AgentPool update allowing to specify gpuInstanceProfile. + */ + interface WithGpuInstanceProfile { + /** + * Specifies the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance + * profile for supported GPU VM SKU.. + * + * @param gpuInstanceProfile GPUInstanceProfile to be used to specify GPU MIG instance profile for supported + * GPU VM SKU. + * @return the next definition stage. + */ + Update withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile); + } + + /** + * The stage of the AgentPool update allowing to specify creationData. + */ + interface WithCreationData { + /** + * Specifies 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 CreationData to be used to specify the source Snapshot ID if the node pool will be + * created/upgraded using a snapshot. + * @return the next definition stage. + */ + Update withCreationData(CreationData creationData); + } + + /** + * The stage of the AgentPool update allowing to specify capacityReservationGroupId. + */ + interface WithCapacityReservationGroupId { + /** + * Specifies the capacityReservationGroupId property: The fully qualified resource ID of the Capacity + * Reservation Group to provide virtual machines from a reserved group of Virtual Machines. + * + * AKS will associate the specified agent pool with the Capacity Reservation Group.. + * + * @param capacityReservationGroupId The fully qualified resource ID of the Capacity Reservation Group to + * provide virtual machines from a reserved group of Virtual Machines. + * + * AKS will associate the specified agent pool with the Capacity Reservation Group. + * @return the next definition stage. + */ + Update withCapacityReservationGroupId(String capacityReservationGroupId); + } + + /** + * The stage of the AgentPool update allowing to specify hostGroupId. + */ + interface WithHostGroupId { + /** + * Specifies 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 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 next definition stage. + */ + Update withHostGroupId(String hostGroupId); + } + + /** + * The stage of the AgentPool update allowing to specify windowsProfile. + */ + interface WithWindowsProfile { + /** + * Specifies the windowsProfile property: The Windows agent pool's specific profile.. + * + * @param windowsProfile The Windows agent pool's specific profile. + * @return the next definition stage. + */ + Update withWindowsProfile(AgentPoolWindowsProfile windowsProfile); + } + + /** + * The stage of the AgentPool update allowing to specify networkProfile. + */ + interface WithNetworkProfile { + /** + * Specifies the networkProfile property: Network-related settings of an agent pool.. + * + * @param networkProfile Network-related settings of an agent pool. + * @return the next definition stage. + */ + Update withNetworkProfile(AgentPoolNetworkProfile networkProfile); + } + + /** + * The stage of the AgentPool update allowing to specify securityProfile. + */ + interface WithSecurityProfile { + /** + * Specifies the securityProfile property: The security settings of an agent pool.. + * + * @param securityProfile The security settings of an agent pool. + * @return the next definition stage. + */ + Update withSecurityProfile(AgentPoolSecurityProfile securityProfile); + } + + /** + * The stage of the AgentPool update allowing to specify gpuProfile. + */ + interface WithGpuProfile { + /** + * Specifies the gpuProfile property: The GPU settings of an agent pool.. + * + * @param gpuProfile The GPU settings of an agent pool. + * @return the next definition stage. + */ + Update withGpuProfile(AgentPoolGpuProfile gpuProfile); + } + + /** + * The stage of the AgentPool update allowing to specify artifactStreamingProfile. + */ + interface WithArtifactStreamingProfile { + /** + * Specifies the artifactStreamingProfile property: Configuration for using artifact streaming on AKS.. + * + * @param artifactStreamingProfile Configuration for using artifact streaming on AKS. + * @return the next definition stage. + */ + Update withArtifactStreamingProfile(AgentPoolArtifactStreamingProfile artifactStreamingProfile); + } + + /** + * The stage of the AgentPool update allowing to specify virtualMachinesProfile. + */ + interface WithVirtualMachinesProfile { + /** + * Specifies the virtualMachinesProfile property: Specifications on VirtualMachines agent pool.. + * + * @param virtualMachinesProfile Specifications on VirtualMachines agent pool. + * @return the next definition stage. + */ + Update withVirtualMachinesProfile(VirtualMachinesProfile virtualMachinesProfile); + } + + /** + * The stage of the AgentPool update allowing to specify virtualMachineNodesStatus. + */ + interface WithVirtualMachineNodesStatus { + /** + * Specifies the virtualMachineNodesStatus property: The status of nodes in a VirtualMachines agent pool.. + * + * @param virtualMachineNodesStatus The status of nodes in a VirtualMachines agent pool. + * @return the next definition stage. + */ + Update withVirtualMachineNodesStatus(List virtualMachineNodesStatus); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + AgentPool refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + AgentPool refresh(Context context); + + /** + * Deletes specific machines in an 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. + */ + void deleteMachines(AgentPoolDeleteMachinesParameter machines); + + /** + * Deletes specific machines in an 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. + */ + void deleteMachines(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. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + AgentPool upgradeNodeImageVersion(); + + /** + * 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + AgentPool upgradeNodeImageVersion(Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolArtifactStreamingProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolArtifactStreamingProfile.java new file mode 100644 index 0000000000000..7a194201d2130 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolArtifactStreamingProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The AgentPoolArtifactStreamingProfile model. + */ +@Fluent +public final class AgentPoolArtifactStreamingProfile { + /* + * Artifact streaming speeds up the cold-start of containers on a node through on-demand image loading. To use this + * feature, container images must also enable artifact streaming on ACR. If not specified, the default is false. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * Creates an instance of AgentPoolArtifactStreamingProfile class. + */ + public AgentPoolArtifactStreamingProfile() { + } + + /** + * Get the enabled property: Artifact streaming speeds up the cold-start of containers on a node through on-demand + * image loading. To use this feature, container images must also enable artifact streaming on ACR. If not + * specified, the default is false. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Artifact streaming speeds up the cold-start of containers on a node through on-demand + * image loading. To use this feature, container images must also enable artifact streaming on ACR. If not + * specified, the default is false. + * + * @param enabled the enabled value to set. + * @return the AgentPoolArtifactStreamingProfile object itself. + */ + public AgentPoolArtifactStreamingProfile withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolAvailableVersions.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolAvailableVersions.java new file mode 100644 index 0000000000000..7b1cba9906101 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolAvailableVersions.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolAvailableVersionsInner; +import java.util.List; + +/** + * An immutable client-side representation of AgentPoolAvailableVersions. + */ +public interface AgentPoolAvailableVersions { + /** + * Gets the id property: The ID of the agent pool version list. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the agent pool version list. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: Type of the agent pool version list. + * + * @return the type value. + */ + String type(); + + /** + * Gets the agentPoolVersions property: List of versions available for agent pool. + * + * @return the agentPoolVersions value. + */ + List agentPoolVersions(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolAvailableVersionsInner + * object. + * + * @return the inner object. + */ + AgentPoolAvailableVersionsInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java new file mode 100644 index 0000000000000..9ec15d899ea82 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem model. + */ +@Fluent +public final class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem { + /* + * Whether this version is the default agent pool version. + */ + @JsonProperty(value = "default") + private Boolean defaultProperty; + + /* + * The Kubernetes version (major.minor.patch). + */ + @JsonProperty(value = "kubernetesVersion") + private String kubernetesVersion; + + /* + * Whether Kubernetes version is currently in preview. + */ + @JsonProperty(value = "isPreview") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolDeleteMachinesParameter.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolDeleteMachinesParameter.java new file mode 100644 index 0000000000000..d1a2983162c02 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolDeleteMachinesParameter.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Specifies a list of machine names from the agent pool to be deleted. + */ +@Fluent +public final class AgentPoolDeleteMachinesParameter { + /* + * The agent pool machine names. + */ + @JsonProperty(value = "machineNames", required = true) + 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.logExceptionAsError(new IllegalArgumentException( + "Missing required property machineNames in model AgentPoolDeleteMachinesParameter")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AgentPoolDeleteMachinesParameter.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolGpuProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolGpuProfile.java new file mode 100644 index 0000000000000..d40a4fa9f2dae --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolGpuProfile.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The AgentPoolGpuProfile model. + */ +@Fluent +public final class AgentPoolGpuProfile { + /* + * Whether to auto install GPU drivers or not. + * + * The default value is true when the vmSize of the agent pool contains a GPU, false otherwise. GPU Driver + * Installation can only be set true when VM has an associated GPU resource. Setting this field to false prevents + * automatic GPU driver installation. In that case, in order for the GPU to be usable, the user must perform GPU + * driver installation themselves. + */ + @JsonProperty(value = "installGPUDriver") + private Boolean installGpuDriver; + + /** + * Creates an instance of AgentPoolGpuProfile class. + */ + public AgentPoolGpuProfile() { + } + + /** + * Get the installGpuDriver property: Whether to auto install GPU drivers or not. + * + * The default value is true when the vmSize of the agent pool contains a GPU, false otherwise. GPU Driver + * Installation can only be set true when VM has an associated GPU resource. Setting this field to false prevents + * automatic GPU driver installation. In that case, in order for the GPU to be usable, the user must perform GPU + * driver installation themselves. + * + * @return the installGpuDriver value. + */ + public Boolean installGpuDriver() { + return this.installGpuDriver; + } + + /** + * Set the installGpuDriver property: Whether to auto install GPU drivers or not. + * + * The default value is true when the vmSize of the agent pool contains a GPU, false otherwise. GPU Driver + * Installation can only be set true when VM has an associated GPU resource. Setting this field to false prevents + * automatic GPU driver installation. In that case, in order for the GPU to be usable, the user must perform GPU + * driver installation themselves. + * + * @param installGpuDriver the installGpuDriver value to set. + * @return the AgentPoolGpuProfile object itself. + */ + public AgentPoolGpuProfile withInstallGpuDriver(Boolean installGpuDriver) { + this.installGpuDriver = installGpuDriver; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolListResult.java new file mode 100644 index 0000000000000..5fe797c289f31 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolListResult.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response from the List Agent Pools operation. + */ +@Fluent +public final class AgentPoolListResult { + /* + * The list of agent pools. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next set of agent pool results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolMode.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolMode.java new file mode 100644 index 0000000000000..4b5cfff1e2cae --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolMode.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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"); + + /** + * 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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolNetworkProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolNetworkProfile.java new file mode 100644 index 0000000000000..72c5d7af6307c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolNetworkProfile.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Network settings of an agent pool. + */ +@Fluent +public final class AgentPoolNetworkProfile { + /* + * IPTags of instance-level public IPs. + */ + @JsonProperty(value = "nodePublicIPTags") + private List nodePublicIpTags; + + /* + * The port ranges that are allowed to access. The specified ranges are allowed to overlap. + */ + @JsonProperty(value = "allowedHostPorts") + private List allowedHostPorts; + + /* + * The IDs of the application security groups which agent pool will associate when created. + */ + @JsonProperty(value = "applicationSecurityGroups") + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolSecurityProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolSecurityProfile.java new file mode 100644 index 0000000000000..e38eae4455992 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolSecurityProfile.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The security settings of an agent pool. + */ +@Fluent +public final class AgentPoolSecurityProfile { + /* + * SSH access method of an agent pool. + */ + @JsonProperty(value = "sshAccess") + private AgentPoolSshAccess sshAccess; + + /* + * 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. + */ + @JsonProperty(value = "enableVTPM") + 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. + */ + @JsonProperty(value = "enableSecureBoot") + private Boolean enableSecureBoot; + + /** + * Creates an instance of AgentPoolSecurityProfile class. + */ + public AgentPoolSecurityProfile() { + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolSshAccess.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolSshAccess.java new file mode 100644 index 0000000000000..79206bdb8d8c6 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolSshAccess.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolType.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolType.java new file mode 100644 index 0000000000000..7e48b8ce0e7c7 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolType.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeProfile.java new file mode 100644 index 0000000000000..783bb0eaae146 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolUpgradeProfileInner; +import java.util.List; + +/** + * An immutable client-side representation of AgentPoolUpgradeProfile. + */ +public interface AgentPoolUpgradeProfile { + /** + * Gets the id property: The ID of the agent pool upgrade profile. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the agent pool upgrade profile. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the agent pool upgrade profile. + * + * @return the type value. + */ + String type(); + + /** + * Gets the kubernetesVersion property: The Kubernetes version (major.minor.patch). + * + * @return the kubernetesVersion value. + */ + String kubernetesVersion(); + + /** + * Gets the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @return the osType value. + */ + OSType osType(); + + /** + * Gets the upgrades property: List of orchestrator types and versions available for upgrade. + * + * @return the upgrades value. + */ + List upgrades(); + + /** + * Gets the latestNodeImageVersion property: The latest AKS supported node image version. + * + * @return the latestNodeImageVersion value. + */ + String latestNodeImageVersion(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolUpgradeProfileInner + * object. + * + * @return the inner object. + */ + AgentPoolUpgradeProfileInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java new file mode 100644 index 0000000000000..08a9595f3e562 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The AgentPoolUpgradeProfilePropertiesUpgradesItem model. + */ +@Fluent +public final class AgentPoolUpgradeProfilePropertiesUpgradesItem { + /* + * The Kubernetes version (major.minor.patch). + */ + @JsonProperty(value = "kubernetesVersion") + private String kubernetesVersion; + + /* + * Whether the Kubernetes version is currently in preview. + */ + @JsonProperty(value = "isPreview") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeSettings.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeSettings.java new file mode 100644 index 0000000000000..1034932521194 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolUpgradeSettings.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Settings for upgrading an agentpool. + */ +@Fluent +public final class AgentPoolUpgradeSettings { + /* + * 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 1. For more information, including best practices, see: + * https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade + */ + @JsonProperty(value = "maxSurge") + private String maxSurge; + + /* + * 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. + */ + @JsonProperty(value = "drainTimeoutInMinutes") + 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. + */ + @JsonProperty(value = "nodeSoakDurationInMinutes") + private Integer nodeSoakDurationInMinutes; + + /** + * 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 1. For more information, including best practices, see: + * https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade. + * + * @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 1. For more information, including best practices, see: + * https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade. + * + * @param maxSurge the maxSurge value to set. + * @return the AgentPoolUpgradeSettings object itself. + */ + public AgentPoolUpgradeSettings withMaxSurge(String maxSurge) { + this.maxSurge = maxSurge; + 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolWindowsProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolWindowsProfile.java new file mode 100644 index 0000000000000..6975dce5d9700 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPoolWindowsProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Windows agent pool's specific profile. + */ +@Fluent +public final class AgentPoolWindowsProfile { + /* + * 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. + */ + @JsonProperty(value = "disableOutboundNat") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPools.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPools.java new file mode 100644 index 0000000000000..0171d3b41579a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AgentPools.java @@ -0,0 +1,307 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of AgentPools. + */ +public interface AgentPools { + /** + * 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, an error 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. + */ + 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, an error 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. + */ + 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 PagedIterable}. + */ + 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}. + */ + 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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}. + */ + 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. + */ + AgentPool get(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. + */ + 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String resourceName, String agentPoolName, Boolean ignorePodDisruptionBudget, + 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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}. + */ + 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. + */ + AgentPoolUpgradeProfile 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. + */ + 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. + */ + 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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}. + */ + 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. + */ + AgentPoolAvailableVersions 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. + */ + AgentPool 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. + */ + AgentPool upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName, + Context context); + + /** + * Gets the specified managed cluster agent pool. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified managed cluster agent pool along with {@link Response}. + */ + AgentPool getById(String id); + + /** + * Gets the specified managed cluster agent pool. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified managed cluster agent pool along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes an agent pool in the specified managed cluster. + * + * @param id the resource ID. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Boolean ignorePodDisruptionBudget, Context context); + + /** + * Begins definition for a new AgentPool resource. + * + * @param name resource name. + * @return the first stage of the new AgentPool definition. + */ + AgentPool.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AzureKeyVaultKms.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AzureKeyVaultKms.java new file mode 100644 index 0000000000000..72630bdf67361 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/AzureKeyVaultKms.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure Key Vault key management service settings for the security profile. + */ +@Fluent +public final class AzureKeyVaultKms { + /* + * Whether to enable Azure Key Vault key management service. The default is false. + */ + @JsonProperty(value = "enabled") + 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. + */ + @JsonProperty(value = "keyId") + 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`. + */ + @JsonProperty(value = "keyVaultNetworkAccess") + 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. + */ + @JsonProperty(value = "keyVaultResourceId") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/BackendPoolType.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/BackendPoolType.java new file mode 100644 index 0000000000000..1eec259c2f4d1 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/BackendPoolType.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ClusterUpgradeSettings.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ClusterUpgradeSettings.java new file mode 100644 index 0000000000000..f7d522ce50598 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ClusterUpgradeSettings.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Settings for upgrading a cluster. + */ +@Fluent +public final class ClusterUpgradeSettings { + /* + * Settings for overrides. + */ + @JsonProperty(value = "overrideSettings") + 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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Code.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Code.java new file mode 100644 index 0000000000000..41d79bf41bac9 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Code.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CompatibleVersions.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CompatibleVersions.java new file mode 100644 index 0000000000000..32b1f0d13cc6c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CompatibleVersions.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Version information about a product/service that is compatible with a service mesh revision. + */ +@Fluent +public final class CompatibleVersions { + /* + * The product/service name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Product/service versions compatible with a service mesh add-on revision. + */ + @JsonProperty(value = "versions") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ConnectionStatus.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ConnectionStatus.java new file mode 100644 index 0000000000000..f6daeba0fdc63 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ConnectionStatus.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceLinuxProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceLinuxProfile.java new file mode 100644 index 0000000000000..b733ff1ec9956 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceLinuxProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Profile for Linux VMs in the container service cluster. + */ +@Fluent +public final class ContainerServiceLinuxProfile { + /* + * The administrator username to use for Linux VMs. + */ + @JsonProperty(value = "adminUsername", required = true) + private String adminUsername; + + /* + * The SSH configuration for Linux-based VMs running on Azure. + */ + @JsonProperty(value = "ssh", required = true) + 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.logExceptionAsError(new IllegalArgumentException( + "Missing required property adminUsername in model ContainerServiceLinuxProfile")); + } + if (ssh() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property ssh in model ContainerServiceLinuxProfile")); + } else { + ssh().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerServiceLinuxProfile.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceNetworkProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceNetworkProfile.java new file mode 100644 index 0000000000000..de686ef8bfb62 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceNetworkProfile.java @@ -0,0 +1,555 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Profile of network configuration. + */ +@Fluent +public final class ContainerServiceNetworkProfile { + /* + * Network plugin used for building the Kubernetes network. + */ + @JsonProperty(value = "networkPlugin") + private NetworkPlugin networkPlugin; + + /* + * Network plugin mode used for building the Kubernetes network. + */ + @JsonProperty(value = "networkPluginMode") + private NetworkPluginMode networkPluginMode; + + /* + * Network policy used for building the Kubernetes network. + */ + @JsonProperty(value = "networkPolicy") + private NetworkPolicy networkPolicy; + + /* + * The network mode Azure CNI is configured with. + * + * This cannot be specified if networkPlugin is anything other than 'azure'. + */ + @JsonProperty(value = "networkMode") + private NetworkMode networkMode; + + /* + * Network dataplane used in the Kubernetes cluster. + */ + @JsonProperty(value = "networkDataplane") + private NetworkDataplane networkDataplane; + + /* + * A CIDR notation IP range from which to assign pod IPs when kubenet is used. + */ + @JsonProperty(value = "podCidr") + private String podCidr; + + /* + * A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP + * ranges. + */ + @JsonProperty(value = "serviceCidr") + private String serviceCidr; + + /* + * An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range + * specified in serviceCidr. + */ + @JsonProperty(value = "dnsServiceIP") + 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). + */ + @JsonProperty(value = "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. + */ + @JsonProperty(value = "loadBalancerSku") + private LoadBalancerSku loadBalancerSku; + + /* + * Profile of the cluster load balancer. + */ + @JsonProperty(value = "loadBalancerProfile") + private ManagedClusterLoadBalancerProfile loadBalancerProfile; + + /* + * Profile of the cluster NAT gateway. + */ + @JsonProperty(value = "natGatewayProfile") + private ManagedClusterNatGatewayProfile natGatewayProfile; + + /* + * 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. + */ + @JsonProperty(value = "podCidrs") + 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. + */ + @JsonProperty(value = "serviceCidrs") + 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. + */ + @JsonProperty(value = "ipFamilies") + private List ipFamilies; + + /* + * Holds configuration customizations for kube-proxy. Any values not defined will use the kube-proxy defaulting + * behavior. See https://v.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ + * where is represented by a - string. Kubernetes version 1.23 would be + * '1-23'. + */ + @JsonProperty(value = "kubeProxyConfig") + private ContainerServiceNetworkProfileKubeProxyConfig kubeProxyConfig; + + /* + * This addon can be used to configure network monitoring and generate network monitoring data in Prometheus format + */ + @JsonProperty(value = "monitoring") + private NetworkMonitoring monitoring; + + /** + * 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: Network plugin mode used for building the Kubernetes network. + * + * @return the networkPluginMode value. + */ + public NetworkPluginMode networkPluginMode() { + return this.networkPluginMode; + } + + /** + * Set the networkPluginMode property: Network plugin mode used for building the Kubernetes network. + * + * @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 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 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; + } + + /** + * Get the kubeProxyConfig property: Holds configuration customizations for kube-proxy. Any values not defined will + * use the kube-proxy defaulting behavior. See + * https://v<version>.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where + * <version> is represented by a <major version>-<minor version> string. Kubernetes version 1.23 + * would be '1-23'. + * + * @return the kubeProxyConfig value. + */ + public ContainerServiceNetworkProfileKubeProxyConfig kubeProxyConfig() { + return this.kubeProxyConfig; + } + + /** + * Set the kubeProxyConfig property: Holds configuration customizations for kube-proxy. Any values not defined will + * use the kube-proxy defaulting behavior. See + * https://v<version>.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where + * <version> is represented by a <major version>-<minor version> string. Kubernetes version 1.23 + * would be '1-23'. + * + * @param kubeProxyConfig the kubeProxyConfig value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile + withKubeProxyConfig(ContainerServiceNetworkProfileKubeProxyConfig kubeProxyConfig) { + this.kubeProxyConfig = kubeProxyConfig; + return this; + } + + /** + * Get the monitoring property: This addon can be used to configure network monitoring and generate network + * monitoring data in Prometheus format. + * + * @return the monitoring value. + */ + public NetworkMonitoring monitoring() { + return this.monitoring; + } + + /** + * Set the monitoring property: This addon can be used to configure network monitoring and generate network + * monitoring data in Prometheus format. + * + * @param monitoring the monitoring value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withMonitoring(NetworkMonitoring monitoring) { + this.monitoring = monitoring; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (loadBalancerProfile() != null) { + loadBalancerProfile().validate(); + } + if (natGatewayProfile() != null) { + natGatewayProfile().validate(); + } + if (kubeProxyConfig() != null) { + kubeProxyConfig().validate(); + } + if (monitoring() != null) { + monitoring().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceNetworkProfileKubeProxyConfig.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceNetworkProfileKubeProxyConfig.java new file mode 100644 index 0000000000000..01f274a37574a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceNetworkProfileKubeProxyConfig.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Holds configuration customizations for kube-proxy. Any values not defined will use the kube-proxy defaulting + * behavior. See https://v<version>.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ + * where <version> is represented by a <major version>-<minor version> string. Kubernetes version + * 1.23 would be '1-23'. + */ +@Fluent +public final class ContainerServiceNetworkProfileKubeProxyConfig { + /* + * Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is enabled in AKS by + * default without these customizations). + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * Specify which proxy mode to use ('IPTABLES' or 'IPVS') + */ + @JsonProperty(value = "mode") + private Mode mode; + + /* + * Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. + */ + @JsonProperty(value = "ipvsConfig") + private ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig ipvsConfig; + + /** + * Creates an instance of ContainerServiceNetworkProfileKubeProxyConfig class. + */ + public ContainerServiceNetworkProfileKubeProxyConfig() { + } + + /** + * Get the enabled property: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, + * kube-proxy is enabled in AKS by default without these customizations). + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, + * kube-proxy is enabled in AKS by default without these customizations). + * + * @param enabled the enabled value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfig withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the mode property: Specify which proxy mode to use ('IPTABLES' or 'IPVS'). + * + * @return the mode value. + */ + public Mode mode() { + return this.mode; + } + + /** + * Set the mode property: Specify which proxy mode to use ('IPTABLES' or 'IPVS'). + * + * @param mode the mode value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfig withMode(Mode mode) { + this.mode = mode; + return this; + } + + /** + * Get the ipvsConfig property: Holds configuration customizations for IPVS. May only be specified if 'mode' is set + * to 'IPVS'. + * + * @return the ipvsConfig value. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig ipvsConfig() { + return this.ipvsConfig; + } + + /** + * Set the ipvsConfig property: Holds configuration customizations for IPVS. May only be specified if 'mode' is set + * to 'IPVS'. + * + * @param ipvsConfig the ipvsConfig value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfig + withIpvsConfig(ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig ipvsConfig) { + this.ipvsConfig = ipvsConfig; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ipvsConfig() != null) { + ipvsConfig().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.java new file mode 100644 index 0000000000000..c1506eb9cca40 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. + */ +@Fluent +public final class ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig { + /* + * IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. + */ + @JsonProperty(value = "scheduler") + private IpvsScheduler scheduler; + + /* + * The timeout value used for idle IPVS TCP sessions in seconds. Must be a positive integer value. + */ + @JsonProperty(value = "tcpTimeoutSeconds") + private Integer tcpTimeoutSeconds; + + /* + * The timeout value used for IPVS TCP sessions after receiving a FIN in seconds. Must be a positive integer value. + */ + @JsonProperty(value = "tcpFinTimeoutSeconds") + private Integer tcpFinTimeoutSeconds; + + /* + * The timeout value used for IPVS UDP packets in seconds. Must be a positive integer value. + */ + @JsonProperty(value = "udpTimeoutSeconds") + private Integer udpTimeoutSeconds; + + /** + * Creates an instance of ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig class. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig() { + } + + /** + * Get the scheduler property: IPVS scheduler, for more information please see + * http://www.linuxvirtualserver.org/docs/scheduling.html. + * + * @return the scheduler value. + */ + public IpvsScheduler scheduler() { + return this.scheduler; + } + + /** + * Set the scheduler property: IPVS scheduler, for more information please see + * http://www.linuxvirtualserver.org/docs/scheduling.html. + * + * @param scheduler the scheduler value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig withScheduler(IpvsScheduler scheduler) { + this.scheduler = scheduler; + return this; + } + + /** + * Get the tcpTimeoutSeconds property: The timeout value used for idle IPVS TCP sessions in seconds. Must be a + * positive integer value. + * + * @return the tcpTimeoutSeconds value. + */ + public Integer tcpTimeoutSeconds() { + return this.tcpTimeoutSeconds; + } + + /** + * Set the tcpTimeoutSeconds property: The timeout value used for idle IPVS TCP sessions in seconds. Must be a + * positive integer value. + * + * @param tcpTimeoutSeconds the tcpTimeoutSeconds value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig withTcpTimeoutSeconds(Integer tcpTimeoutSeconds) { + this.tcpTimeoutSeconds = tcpTimeoutSeconds; + return this; + } + + /** + * Get the tcpFinTimeoutSeconds property: The timeout value used for IPVS TCP sessions after receiving a FIN in + * seconds. Must be a positive integer value. + * + * @return the tcpFinTimeoutSeconds value. + */ + public Integer tcpFinTimeoutSeconds() { + return this.tcpFinTimeoutSeconds; + } + + /** + * Set the tcpFinTimeoutSeconds property: The timeout value used for IPVS TCP sessions after receiving a FIN in + * seconds. Must be a positive integer value. + * + * @param tcpFinTimeoutSeconds the tcpFinTimeoutSeconds value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig + withTcpFinTimeoutSeconds(Integer tcpFinTimeoutSeconds) { + this.tcpFinTimeoutSeconds = tcpFinTimeoutSeconds; + return this; + } + + /** + * Get the udpTimeoutSeconds property: The timeout value used for IPVS UDP packets in seconds. Must be a positive + * integer value. + * + * @return the udpTimeoutSeconds value. + */ + public Integer udpTimeoutSeconds() { + return this.udpTimeoutSeconds; + } + + /** + * Set the udpTimeoutSeconds property: The timeout value used for IPVS UDP packets in seconds. Must be a positive + * integer value. + * + * @param udpTimeoutSeconds the udpTimeoutSeconds value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig withUdpTimeoutSeconds(Integer udpTimeoutSeconds) { + this.udpTimeoutSeconds = udpTimeoutSeconds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceSshConfiguration.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceSshConfiguration.java new file mode 100644 index 0000000000000..483159a301991 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceSshConfiguration.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * SSH configuration for Linux-based VMs running on Azure. + */ +@Fluent +public final class ContainerServiceSshConfiguration { + /* + * The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. + */ + @JsonProperty(value = "publicKeys", required = true) + 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.logExceptionAsError(new IllegalArgumentException( + "Missing required property publicKeys in model ContainerServiceSshConfiguration")); + } else { + publicKeys().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerServiceSshConfiguration.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceSshPublicKey.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceSshPublicKey.java new file mode 100644 index 0000000000000..e7805395f6e54 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServiceSshPublicKey.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains information about SSH certificate public key data. + */ +@Fluent +public final class ContainerServiceSshPublicKey { + /* + * Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or + * without headers. + */ + @JsonProperty(value = "keyData", required = true) + 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.logExceptionAsError(new IllegalArgumentException( + "Missing required property keyData in model ContainerServiceSshPublicKey")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerServiceSshPublicKey.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServices.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServices.java new file mode 100644 index 0000000000000..9dbb81ad3caf8 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ContainerServices.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ContainerServices. + */ +public interface ContainerServices { + /** + * 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}. + */ + 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. + */ + OrchestratorVersionProfileListResult listOrchestrators(String location); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CreationData.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CreationData.java new file mode 100644 index 0000000000000..22358d6d5e789 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CreationData.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data used when creating a target resource from a source resource. + */ +@Fluent +public final class CreationData { + /* + * This is the ARM ID of the source object to be used to create the target object. + */ + @JsonProperty(value = "sourceResourceId") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CredentialResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CredentialResult.java new file mode 100644 index 0000000000000..6e325be7b82a5 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CredentialResult.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The credential result response. + */ +@Immutable +public final class CredentialResult { + /* + * The name of the credential. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Base64-encoded Kubernetes configuration file. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CredentialResults.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CredentialResults.java new file mode 100644 index 0000000000000..9bc12d10abfbd --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/CredentialResults.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.CredentialResultsInner; +import java.util.List; + +/** + * An immutable client-side representation of CredentialResults. + */ +public interface CredentialResults { + /** + * Gets the kubeconfigs property: Base64-encoded Kubernetes configuration file. + * + * @return the kubeconfigs value. + */ + List kubeconfigs(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.CredentialResultsInner + * object. + * + * @return the inner object. + */ + CredentialResultsInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DailySchedule.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DailySchedule.java new file mode 100644 index 0000000000000..8941ebf80a640 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DailySchedule.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * For schedules like: 'recur every day' or 'recur every 3 days'. + */ +@Fluent +public final class DailySchedule { + /* + * Specifies the number of days between each set of occurrences. + */ + @JsonProperty(value = "intervalDays", required = true) + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DateSpan.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DateSpan.java new file mode 100644 index 0000000000000..25063a645bb7c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DateSpan.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.LocalDate; + +/** + * A date range. + * + * For example, between '2022-12-23' and '2023-01-05'. + */ +@Fluent +public final class DateSpan { + /* + * The start date of the date span. + */ + @JsonProperty(value = "start", required = true) + private LocalDate start; + + /* + * The end date of the date span. + */ + @JsonProperty(value = "end", required = true) + 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 + .logExceptionAsError(new IllegalArgumentException("Missing required property start in model DateSpan")); + } + if (end() == null) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("Missing required property end in model DateSpan")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DateSpan.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DelegatedResource.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DelegatedResource.java new file mode 100644 index 0000000000000..248f267b70336 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/DelegatedResource.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.UUID; + +/** + * Delegated resource properties - internal use only. + */ +@Fluent +public final class DelegatedResource { + /* + * The ARM resource id of the delegated resource - internal use only. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /* + * The tenant id of the delegated resource - internal use only. + */ + @JsonProperty(value = "tenantId") + private UUID tenantId; + + /* + * The delegation id of the referral delegation (optional) - internal use only. + */ + @JsonProperty(value = "referralResource") + private String referralResource; + + /* + * The source resource location - internal use only. + */ + @JsonProperty(value = "location") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/EndpointDependency.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/EndpointDependency.java new file mode 100644 index 0000000000000..da74496264027 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/EndpointDependency.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A domain name that AKS agent nodes are reaching at. + */ +@Fluent +public final class EndpointDependency { + /* + * The domain name of the dependency. + */ + @JsonProperty(value = "domainName") + private String domainName; + + /* + * The Ports and Protocols used when connecting to domainName. + */ + @JsonProperty(value = "endpointDetails") + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/EndpointDetail.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/EndpointDetail.java new file mode 100644 index 0000000000000..dd9dbae3af93b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/EndpointDetail.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * connect information from the AKS agent nodes to a single endpoint. + */ +@Fluent +public final class EndpointDetail { + /* + * An IP Address that Domain Name currently resolves to. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /* + * The port an endpoint is connected to. + */ + @JsonProperty(value = "port") + private Integer port; + + /* + * The protocol used for connection + */ + @JsonProperty(value = "protocol") + private String protocol; + + /* + * Description of the detail + */ + @JsonProperty(value = "description") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/EventStatus.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/EventStatus.java new file mode 100644 index 0000000000000..66777c5052972 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/EventStatus.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The status of a scheduled event. + */ +public final class EventStatus extends ExpandableStringEnum { + /** + * Static value Scheduled for EventStatus. + */ + public static final EventStatus SCHEDULED = fromString("Scheduled"); + + /** + * Static value Started for EventStatus. + */ + public static final EventStatus STARTED = fromString("Started"); + + /** + * Static value Completed for EventStatus. + */ + public static final EventStatus COMPLETED = fromString("Completed"); + + /** + * Static value Cancelled for EventStatus. + */ + public static final EventStatus CANCELLED = fromString("Cancelled"); + + /** + * Static value Failed for EventStatus. + */ + public static final EventStatus FAILED = fromString("Failed"); + + /** + * Creates a new instance of EventStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EventStatus() { + } + + /** + * Creates or finds a EventStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding EventStatus. + */ + @JsonCreator + public static EventStatus fromString(String name) { + return fromString(name, EventStatus.class); + } + + /** + * Gets known EventStatus values. + * + * @return known EventStatus values. + */ + public static Collection values() { + return values(EventStatus.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Expander.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Expander.java new file mode 100644 index 0000000000000..c30ce30fe8ec2 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Expander.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ExtendedLocation.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ExtendedLocation.java new file mode 100644 index 0000000000000..ffb0d5f962da0 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ExtendedLocation.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The complex type of the extended location. + */ +@Fluent +public final class ExtendedLocation { + /* + * The name of the extended location. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The type of the extended location. + */ + @JsonProperty(value = "type") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ExtendedLocationTypes.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ExtendedLocationTypes.java new file mode 100644 index 0000000000000..9f8bfeb1bd0be --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ExtendedLocationTypes.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Format.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Format.java new file mode 100644 index 0000000000000..876ba37370c9e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Format.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GpuInstanceProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GpuInstanceProfile.java new file mode 100644 index 0000000000000..690d72356823a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GpuInstanceProfile.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GuardrailsAvailableVersion.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GuardrailsAvailableVersion.java new file mode 100644 index 0000000000000..e346d372f0c83 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GuardrailsAvailableVersion.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.GuardrailsAvailableVersionInner; + +/** + * An immutable client-side representation of GuardrailsAvailableVersion. + */ +public interface GuardrailsAvailableVersion { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: Whether the version is default or not and support info. + * + * @return the properties value. + */ + GuardrailsAvailableVersionsProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.GuardrailsAvailableVersionInner + * object. + * + * @return the inner object. + */ + GuardrailsAvailableVersionInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GuardrailsAvailableVersionsList.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GuardrailsAvailableVersionsList.java new file mode 100644 index 0000000000000..9f76c0948186e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GuardrailsAvailableVersionsList.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.GuardrailsAvailableVersionInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Hold values properties, which is array of GuardrailsVersions. + */ +@Fluent +public final class GuardrailsAvailableVersionsList { + /* + * Array of AKS supported Guardrails versions. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next Guardrails available version. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of GuardrailsAvailableVersionsList class. + */ + public GuardrailsAvailableVersionsList() { + } + + /** + * Get the value property: Array of AKS supported Guardrails versions. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Array of AKS supported Guardrails versions. + * + * @param value the value value to set. + * @return the GuardrailsAvailableVersionsList object itself. + */ + public GuardrailsAvailableVersionsList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next Guardrails available version. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GuardrailsAvailableVersionsProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GuardrailsAvailableVersionsProperties.java new file mode 100644 index 0000000000000..4f3b6d1e018e0 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GuardrailsAvailableVersionsProperties.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Whether the version is default or not and support info. + */ +@Immutable +public final class GuardrailsAvailableVersionsProperties { + /* + * The isDefaultVersion property. + */ + @JsonProperty(value = "isDefaultVersion", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDefaultVersion; + + /* + * Whether the version is preview or stable. + */ + @JsonProperty(value = "support", access = JsonProperty.Access.WRITE_ONLY) + private GuardrailsSupport support; + + /** + * Creates an instance of GuardrailsAvailableVersionsProperties class. + */ + public GuardrailsAvailableVersionsProperties() { + } + + /** + * Get the isDefaultVersion property: The isDefaultVersion property. + * + * @return the isDefaultVersion value. + */ + public Boolean isDefaultVersion() { + return this.isDefaultVersion; + } + + /** + * Get the support property: Whether the version is preview or stable. + * + * @return the support value. + */ + public GuardrailsSupport support() { + return this.support; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GuardrailsSupport.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GuardrailsSupport.java new file mode 100644 index 0000000000000..4befd0318f3e3 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/GuardrailsSupport.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Whether the version is preview or stable. + */ +public final class GuardrailsSupport extends ExpandableStringEnum { + /** + * Static value Preview for GuardrailsSupport. + */ + public static final GuardrailsSupport PREVIEW = fromString("Preview"); + + /** + * Static value Stable for GuardrailsSupport. + */ + public static final GuardrailsSupport STABLE = fromString("Stable"); + + /** + * Creates a new instance of GuardrailsSupport value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public GuardrailsSupport() { + } + + /** + * Creates or finds a GuardrailsSupport from its string representation. + * + * @param name a name to look for. + * @return the corresponding GuardrailsSupport. + */ + @JsonCreator + public static GuardrailsSupport fromString(String name) { + return fromString(name, GuardrailsSupport.class); + } + + /** + * Gets known GuardrailsSupport values. + * + * @return known GuardrailsSupport values. + */ + public static Collection values() { + return values(GuardrailsSupport.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IpFamily.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IpFamily.java new file mode 100644 index 0000000000000..4be16fc1fa92b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IpFamily.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IpTag.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IpTag.java new file mode 100644 index 0000000000000..678df9ef008a0 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IpTag.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains the IPTag associated with the object. + */ +@Fluent +public final class IpTag { + /* + * The IP tag type. Example: RoutingPreference. + */ + @JsonProperty(value = "ipTagType") + private String ipTagType; + + /* + * The value of the IP tag associated with the public IP. Example: Internet. + */ + @JsonProperty(value = "tag") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IpvsScheduler.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IpvsScheduler.java new file mode 100644 index 0000000000000..ac70418446156 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IpvsScheduler.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. + */ +public final class IpvsScheduler extends ExpandableStringEnum { + /** + * Static value RoundRobin for IpvsScheduler. + */ + public static final IpvsScheduler ROUND_ROBIN = fromString("RoundRobin"); + + /** + * Static value LeastConnection for IpvsScheduler. + */ + public static final IpvsScheduler LEAST_CONNECTION = fromString("LeastConnection"); + + /** + * Creates a new instance of IpvsScheduler value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IpvsScheduler() { + } + + /** + * Creates or finds a IpvsScheduler from its string representation. + * + * @param name a name to look for. + * @return the corresponding IpvsScheduler. + */ + @JsonCreator + public static IpvsScheduler fromString(String name) { + return fromString(name, IpvsScheduler.class); + } + + /** + * Gets known IpvsScheduler values. + * + * @return known IpvsScheduler values. + */ + public static Collection values() { + return values(IpvsScheduler.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioCertificateAuthority.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioCertificateAuthority.java new file mode 100644 index 0000000000000..56264a5eee416 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioCertificateAuthority.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * 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 { + /* + * Plugin certificates information for Service Mesh. + */ + @JsonProperty(value = "plugin") + 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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioComponents.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioComponents.java new file mode 100644 index 0000000000000..3e37caf6abe3d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioComponents.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Istio components configuration. + */ +@Fluent +public final class IstioComponents { + /* + * Istio ingress gateways. + */ + @JsonProperty(value = "ingressGateways") + private List ingressGateways; + + /* + * Istio egress gateways. + */ + @JsonProperty(value = "egressGateways") + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioEgressGateway.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioEgressGateway.java new file mode 100644 index 0000000000000..bfb1faf85076a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioEgressGateway.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * Istio egress gateway configuration. + */ +@Fluent +public final class IstioEgressGateway { + /* + * Whether to enable the egress gateway. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /* + * NodeSelector for scheduling the egress gateway. + */ + @JsonProperty(value = "nodeSelector") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map nodeSelector; + + /** + * 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 nodeSelector property: NodeSelector for scheduling the egress gateway. + * + * @return the nodeSelector value. + */ + public Map nodeSelector() { + return this.nodeSelector; + } + + /** + * Set the nodeSelector property: NodeSelector for scheduling the egress gateway. + * + * @param nodeSelector the nodeSelector value to set. + * @return the IstioEgressGateway object itself. + */ + public IstioEgressGateway withNodeSelector(Map nodeSelector) { + this.nodeSelector = nodeSelector; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioIngressGateway.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioIngressGateway.java new file mode 100644 index 0000000000000..152f60a1914ee --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioIngressGateway.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * 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 { + /* + * Mode of an ingress gateway. + */ + @JsonProperty(value = "mode", required = true) + private IstioIngressGatewayMode mode; + + /* + * Whether to enable the ingress gateway. + */ + @JsonProperty(value = "enabled", required = true) + 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.logExceptionAsError( + new IllegalArgumentException("Missing required property mode in model IstioIngressGateway")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IstioIngressGateway.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioIngressGatewayMode.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioIngressGatewayMode.java new file mode 100644 index 0000000000000..0ee60825136c0 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioIngressGatewayMode.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioPluginCertificateAuthority.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioPluginCertificateAuthority.java new file mode 100644 index 0000000000000..68c5dad3de85e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioPluginCertificateAuthority.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Plugin certificates information for Service Mesh. + */ +@Fluent +public final class IstioPluginCertificateAuthority { + /* + * The resource ID of the Key Vault. + */ + @JsonProperty(value = "keyVaultId") + private String keyVaultId; + + /* + * Intermediate certificate object name in Azure Key Vault. + */ + @JsonProperty(value = "certObjectName") + private String certObjectName; + + /* + * Intermediate certificate private key object name in Azure Key Vault. + */ + @JsonProperty(value = "keyObjectName") + private String keyObjectName; + + /* + * Root certificate object name in Azure Key Vault. + */ + @JsonProperty(value = "rootCertObjectName") + private String rootCertObjectName; + + /* + * Certificate chain object name in Azure Key Vault. + */ + @JsonProperty(value = "certChainObjectName") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioServiceMesh.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioServiceMesh.java new file mode 100644 index 0000000000000..63797a47e8c61 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/IstioServiceMesh.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Istio service mesh configuration. + */ +@Fluent +public final class IstioServiceMesh { + /* + * Istio components configuration. + */ + @JsonProperty(value = "components") + 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 + */ + @JsonProperty(value = "certificateAuthority") + 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 + */ + @JsonProperty(value = "revisions") + 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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KeyVaultNetworkAccessTypes.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KeyVaultNetworkAccessTypes.java new file mode 100644 index 0000000000000..6b959cfe0d222 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KeyVaultNetworkAccessTypes.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubeletConfig.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubeletConfig.java new file mode 100644 index 0000000000000..bb2f0f4a1c246 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubeletConfig.java @@ -0,0 +1,377 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +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 { + /* + * 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'. + */ + @JsonProperty(value = "cpuManagerPolicy") + private String cpuManagerPolicy; + + /* + * If CPU CFS quota enforcement is enabled for containers that specify CPU limits. + * + * The default is true. + */ + @JsonProperty(value = "cpuCfsQuota") + 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'. + */ + @JsonProperty(value = "cpuCfsQuotaPeriod") + 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% + */ + @JsonProperty(value = "imageGcHighThreshold") + 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% + */ + @JsonProperty(value = "imageGcLowThreshold") + 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'. + */ + @JsonProperty(value = "topologyManagerPolicy") + private String topologyManagerPolicy; + + /* + * Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). + */ + @JsonProperty(value = "allowedUnsafeSysctls") + private List allowedUnsafeSysctls; + + /* + * If set to true it will make the Kubelet fail to start if swap is enabled on the node. + */ + @JsonProperty(value = "failSwapOn") + private Boolean failSwapOn; + + /* + * The maximum size (e.g. 10Mi) of container log file before it is rotated. + */ + @JsonProperty(value = "containerLogMaxSizeMB") + private Integer containerLogMaxSizeMB; + + /* + * The maximum number of container log files that can be present for a container. The number must be ≥ 2. + */ + @JsonProperty(value = "containerLogMaxFiles") + private Integer containerLogMaxFiles; + + /* + * The maximum number of processes per pod. + */ + @JsonProperty(value = "podMaxPids") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubeletDiskType.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubeletDiskType.java new file mode 100644 index 0000000000000..493fd5eaf840f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubeletDiskType.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesPatchVersion.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesPatchVersion.java new file mode 100644 index 0000000000000..953ac1b6dc1b0 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesPatchVersion.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Kubernetes patch version profile. + */ +@Fluent +public final class KubernetesPatchVersion { + /* + * Possible upgrade path for given patch version + */ + @JsonProperty(value = "upgrades") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesSupportPlan.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesSupportPlan.java new file mode 100644 index 0000000000000..560b794863f64 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesSupportPlan.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersion.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersion.java new file mode 100644 index 0000000000000..7a2886ac19d77 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersion.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * Kubernetes version profile for given major.minor release. + */ +@Fluent +public final class KubernetesVersion { + /* + * major.minor version of Kubernetes release + */ + @JsonProperty(value = "version") + private String version; + + /* + * Capabilities on this Kubernetes version. + */ + @JsonProperty(value = "capabilities") + private KubernetesVersionCapabilities capabilities; + + /* + * Whether this version is in preview mode. + */ + @JsonProperty(value = "isPreview") + private Boolean isPreview; + + /* + * Patch versions of Kubernetes release + */ + @JsonProperty(value = "patchVersions") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + 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 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(); + } + }); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersionCapabilities.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersionCapabilities.java new file mode 100644 index 0000000000000..330a4eb6b7863 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersionCapabilities.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Capabilities on this Kubernetes version. + */ +@Fluent +public final class KubernetesVersionCapabilities { + /* + * The supportPlan property. + */ + @JsonProperty(value = "supportPlan") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersionListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersionListResult.java new file mode 100644 index 0000000000000..385f50a508600 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/KubernetesVersionListResult.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.KubernetesVersionListResultInner; +import java.util.List; + +/** + * An immutable client-side representation of KubernetesVersionListResult. + */ +public interface KubernetesVersionListResult { + /** + * Gets the values property: Array of AKS supported Kubernetes versions. + * + * @return the values value. + */ + List values(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.KubernetesVersionListResultInner + * object. + * + * @return the inner object. + */ + KubernetesVersionListResultInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Level.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Level.java new file mode 100644 index 0000000000000..c80594f965e43 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Level.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The Safeguards level to be used. By default, Safeguards is enabled for all namespaces except those that AKS excludes + * via systemExcludedNamespaces. + */ +public final class Level extends ExpandableStringEnum { + /** + * Static value Off for Level. + */ + public static final Level OFF = fromString("Off"); + + /** + * Static value Warning for Level. + */ + public static final Level WARNING = fromString("Warning"); + + /** + * Static value Enforcement for Level. + */ + public static final Level ENFORCEMENT = fromString("Enforcement"); + + /** + * Creates a new instance of Level value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Level() { + } + + /** + * Creates or finds a Level from its string representation. + * + * @param name a name to look for. + * @return the corresponding Level. + */ + @JsonCreator + public static Level fromString(String name) { + return fromString(name, Level.class); + } + + /** + * Gets known Level values. + * + * @return known Level values. + */ + public static Collection values() { + return values(Level.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LicenseType.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LicenseType.java new file mode 100644 index 0000000000000..77dd9ebd4b762 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LicenseType.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LinuxOSConfig.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LinuxOSConfig.java new file mode 100644 index 0000000000000..fc12c74eb0555 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LinuxOSConfig.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * 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 { + /* + * Sysctl settings for Linux agent nodes. + */ + @JsonProperty(value = "sysctls") + 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). + */ + @JsonProperty(value = "transparentHugePageEnabled") + 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). + */ + @JsonProperty(value = "transparentHugePageDefrag") + private String transparentHugePageDefrag; + + /* + * The size in MB of a swap file that will be created on each node. + */ + @JsonProperty(value = "swapFileSizeMB") + 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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LoadBalancerSku.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LoadBalancerSku.java new file mode 100644 index 0000000000000..adbf447052e8d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/LoadBalancerSku.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Machine.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Machine.java new file mode 100644 index 0000000000000..1460ce3c56d56 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Machine.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MachineInner; + +/** + * An immutable client-side representation of Machine. + */ +public interface Machine { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the properties property: The properties of the machine. + * + * @return the properties value. + */ + MachineProperties properties(); + + /** + * Gets 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. + */ + String name(); + + /** + * Gets the type property: Resource type. + * + * @return the type value. + */ + String type(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MachineInner + * object. + * + * @return the inner object. + */ + MachineInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MachineIpAddress.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MachineIpAddress.java new file mode 100644 index 0000000000000..c97f141b4450d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MachineIpAddress.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The machine IP address details. + */ +@Immutable +public final class MachineIpAddress { + /* + * IPv4 or IPv6 address of the machine + */ + @JsonProperty(value = "ip", access = JsonProperty.Access.WRITE_ONLY) + private String ip; + + /* + * To determine if address belongs IPv4 or IPv6 family. + */ + @JsonProperty(value = "family", access = JsonProperty.Access.WRITE_ONLY) + private IpFamily family; + + /** + * Creates an instance of MachineIpAddress class. + */ + public MachineIpAddress() { + } + + /** + * Get the ip property: IPv4 or IPv6 address of the machine. + * + * @return the ip value. + */ + public String ip() { + return this.ip; + } + + /** + * Get the family property: To determine if address belongs IPv4 or IPv6 family. + * + * @return the family value. + */ + public IpFamily family() { + return this.family; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MachineListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MachineListResult.java new file mode 100644 index 0000000000000..156cbc3f27067 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MachineListResult.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MachineInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response from the List Machines operation. + */ +@Fluent +public final class MachineListResult { + /* + * The list of Machines in cluster. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next set of machine results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of MachineListResult class. + */ + public MachineListResult() { + } + + /** + * 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; + } + + /** + * Get the nextLink property: The URL to get the next set of machine 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MachineNetworkProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MachineNetworkProperties.java new file mode 100644 index 0000000000000..e317aff003441 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MachineNetworkProperties.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * network properties of the machine. + */ +@Immutable +public final class MachineNetworkProperties { + /* + * IPv4, IPv6 addresses of the machine + */ + @JsonProperty(value = "ipAddresses", access = JsonProperty.Access.WRITE_ONLY) + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MachineProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MachineProperties.java new file mode 100644 index 0000000000000..30a34d63af40e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MachineProperties.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties of the machine. + */ +@Immutable +public final class MachineProperties { + /* + * network properties of the machine + */ + @JsonProperty(value = "network", access = JsonProperty.Access.WRITE_ONLY) + private MachineNetworkProperties network; + + /* + * Arm resource id of the machine. It can be used to GET underlying VM Instance + */ + @JsonProperty(value = "resourceId", access = JsonProperty.Access.WRITE_ONLY) + 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: Arm 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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Machines.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Machines.java new file mode 100644 index 0000000000000..ce09c4cd002ff --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Machines.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Machines. + */ +public interface Machines { + /** + * 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}. + */ + 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}. + */ + 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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}. + */ + 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. + */ + Machine get(String resourceGroupName, String resourceName, String agentPoolName, String machineName); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfiguration.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfiguration.java new file mode 100644 index 0000000000000..d7bf8bec3e395 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfiguration.java @@ -0,0 +1,278 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MaintenanceConfigurationInner; +import java.util.List; + +/** + * An immutable client-side representation of MaintenanceConfiguration. + */ +public interface MaintenanceConfiguration { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the systemData property: The system metadata relating to this resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets 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. + */ + String name(); + + /** + * Gets the type property: Resource type. + * + * @return the type value. + */ + String type(); + + /** + * Gets 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. + */ + List timeInWeek(); + + /** + * Gets the notAllowedTime property: Time slots on which upgrade is not allowed. + * + * @return the notAllowedTime value. + */ + List notAllowedTime(); + + /** + * Gets the maintenanceWindow property: Maintenance window for the maintenance configuration. + * + * @return the maintenanceWindow value. + */ + MaintenanceWindow maintenanceWindow(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MaintenanceConfigurationInner + * object. + * + * @return the inner object. + */ + MaintenanceConfigurationInner innerModel(); + + /** + * The entirety of the MaintenanceConfiguration definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The MaintenanceConfiguration definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the MaintenanceConfiguration definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the MaintenanceConfiguration definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, resourceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @return the next definition stage. + */ + WithCreate withExistingManagedCluster(String resourceGroupName, String resourceName); + } + + /** + * The stage of the MaintenanceConfiguration definition which contains all the minimum required properties for + * the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTimeInWeek, DefinitionStages.WithNotAllowedTime, + DefinitionStages.WithMaintenanceWindow { + /** + * Executes the create request. + * + * @return the created resource. + */ + MaintenanceConfiguration create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + MaintenanceConfiguration create(Context context); + } + + /** + * The stage of the MaintenanceConfiguration definition allowing to specify timeInWeek. + */ + interface WithTimeInWeek { + /** + * Specifies 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 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 next definition stage. + */ + WithCreate withTimeInWeek(List timeInWeek); + } + + /** + * The stage of the MaintenanceConfiguration definition allowing to specify notAllowedTime. + */ + interface WithNotAllowedTime { + /** + * Specifies the notAllowedTime property: Time slots on which upgrade is not allowed.. + * + * @param notAllowedTime Time slots on which upgrade is not allowed. + * @return the next definition stage. + */ + WithCreate withNotAllowedTime(List notAllowedTime); + } + + /** + * The stage of the MaintenanceConfiguration definition allowing to specify maintenanceWindow. + */ + interface WithMaintenanceWindow { + /** + * Specifies the maintenanceWindow property: Maintenance window for the maintenance configuration.. + * + * @param maintenanceWindow Maintenance window for the maintenance configuration. + * @return the next definition stage. + */ + WithCreate withMaintenanceWindow(MaintenanceWindow maintenanceWindow); + } + } + + /** + * Begins update for the MaintenanceConfiguration resource. + * + * @return the stage of resource update. + */ + MaintenanceConfiguration.Update update(); + + /** + * The template for MaintenanceConfiguration update. + */ + interface Update + extends UpdateStages.WithTimeInWeek, UpdateStages.WithNotAllowedTime, UpdateStages.WithMaintenanceWindow { + /** + * Executes the update request. + * + * @return the updated resource. + */ + MaintenanceConfiguration apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + MaintenanceConfiguration apply(Context context); + } + + /** + * The MaintenanceConfiguration update stages. + */ + interface UpdateStages { + /** + * The stage of the MaintenanceConfiguration update allowing to specify timeInWeek. + */ + interface WithTimeInWeek { + /** + * Specifies 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 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 next definition stage. + */ + Update withTimeInWeek(List timeInWeek); + } + + /** + * The stage of the MaintenanceConfiguration update allowing to specify notAllowedTime. + */ + interface WithNotAllowedTime { + /** + * Specifies the notAllowedTime property: Time slots on which upgrade is not allowed.. + * + * @param notAllowedTime Time slots on which upgrade is not allowed. + * @return the next definition stage. + */ + Update withNotAllowedTime(List notAllowedTime); + } + + /** + * The stage of the MaintenanceConfiguration update allowing to specify maintenanceWindow. + */ + interface WithMaintenanceWindow { + /** + * Specifies the maintenanceWindow property: Maintenance window for the maintenance configuration.. + * + * @param maintenanceWindow Maintenance window for the maintenance configuration. + * @return the next definition stage. + */ + Update withMaintenanceWindow(MaintenanceWindow maintenanceWindow); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + MaintenanceConfiguration refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + MaintenanceConfiguration refresh(Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfigurationListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfigurationListResult.java new file mode 100644 index 0000000000000..3e2eb1ed4cb64 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfigurationListResult.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MaintenanceConfigurationInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response from the List maintenance configurations operation. + */ +@Fluent +public final class MaintenanceConfigurationListResult { + /* + * The list of maintenance configurations. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next set of maintenance configuration results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfigurations.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfigurations.java new file mode 100644 index 0000000000000..7d27b96e1598f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceConfigurations.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of MaintenanceConfigurations. + */ +public interface MaintenanceConfigurations { + /** + * 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}. + */ + 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}. + */ + 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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}. + */ + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + MaintenanceConfiguration get(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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse(String resourceGroupName, String 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String resourceName, String configName); + + /** + * Gets the specified maintenance configuration of a managed cluster. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified maintenance configuration of a managed cluster along with {@link Response}. + */ + MaintenanceConfiguration getById(String id); + + /** + * Gets the specified maintenance configuration of a managed cluster. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified maintenance configuration of a managed cluster along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a maintenance configuration. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes a maintenance configuration. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new MaintenanceConfiguration resource. + * + * @param name resource name. + * @return the first stage of the new MaintenanceConfiguration definition. + */ + MaintenanceConfiguration.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceWindow.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceWindow.java new file mode 100644 index 0000000000000..8be32f76cfa51 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MaintenanceWindow.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.LocalDate; +import java.util.List; + +/** + * Maintenance window used to configure scheduled auto-upgrade for a Managed Cluster. + */ +@Fluent +public final class MaintenanceWindow { + /* + * Recurrence schedule for the maintenance window. + */ + @JsonProperty(value = "schedule", required = true) + private Schedule schedule; + + /* + * Length of maintenance window range from 4 to 24 hours. + */ + @JsonProperty(value = "durationHours", required = true) + 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'. + */ + @JsonProperty(value = "utcOffset") + 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. + */ + @JsonProperty(value = "startDate") + 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'. + */ + @JsonProperty(value = "startTime", required = true) + 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. + */ + @JsonProperty(value = "notAllowedDates") + 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.logExceptionAsError( + new IllegalArgumentException("Missing required property schedule in model MaintenanceWindow")); + } else { + schedule().validate(); + } + if (startTime() == null) { + throw LOGGER.logExceptionAsError( + 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); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedCluster.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedCluster.java new file mode 100644 index 0000000000000..213ce8ebdbde1 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedCluster.java @@ -0,0 +1,1510 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of ManagedCluster. + */ +public interface ManagedCluster { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the sku property: The managed cluster SKU. + * + * @return the sku value. + */ + ManagedClusterSku sku(); + + /** + * Gets the extendedLocation property: The extended location of the Virtual Machine. + * + * @return the extendedLocation value. + */ + ExtendedLocation extendedLocation(); + + /** + * Gets the identity property: The identity of the managed cluster, if configured. + * + * @return the identity value. + */ + ManagedClusterIdentity identity(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The current provisioning state. + * + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * Gets the powerState property: The Power State of the cluster. + * + * @return the powerState value. + */ + PowerState powerState(); + + /** + * Gets the creationData property: CreationData to be used to specify the source Snapshot ID if the cluster will be + * created/upgraded using a snapshot. + * + * @return the creationData value. + */ + CreationData creationData(); + + /** + * Gets the maxAgentPools property: The max number of agent pools for the managed cluster. + * + * @return the maxAgentPools value. + */ + Integer maxAgentPools(); + + /** + * Gets the kubernetesVersion property: The version of Kubernetes the Managed Cluster is requested to run. + * + * 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. + */ + String kubernetesVersion(); + + /** + * Gets the currentKubernetesVersion property: The version of Kubernetes the Managed Cluster is running. + * + * @return the currentKubernetesVersion value. + */ + String currentKubernetesVersion(); + + /** + * Gets 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. + */ + String dnsPrefix(); + + /** + * Gets 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. + */ + String fqdnSubdomain(); + + /** + * Gets the fqdn property: The FQDN of the master pool. + * + * @return the fqdn value. + */ + String fqdn(); + + /** + * Gets the privateFqdn property: The FQDN of private cluster. + * + * @return the privateFqdn value. + */ + String privateFqdn(); + + /** + * Gets 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. + */ + String azurePortalFqdn(); + + /** + * Gets the agentPoolProfiles property: The agent pool properties. + * + * @return the agentPoolProfiles value. + */ + List agentPoolProfiles(); + + /** + * Gets the linuxProfile property: The profile for Linux VMs in the Managed Cluster. + * + * @return the linuxProfile value. + */ + ContainerServiceLinuxProfile linuxProfile(); + + /** + * Gets the windowsProfile property: The profile for Windows VMs in the Managed Cluster. + * + * @return the windowsProfile value. + */ + ManagedClusterWindowsProfile windowsProfile(); + + /** + * Gets the servicePrincipalProfile property: Information about a service principal identity for the cluster to use + * for manipulating Azure APIs. + * + * @return the servicePrincipalProfile value. + */ + ManagedClusterServicePrincipalProfile servicePrincipalProfile(); + + /** + * Gets the addonProfiles property: The profile of managed cluster add-on. + * + * @return the addonProfiles value. + */ + Map addonProfiles(); + + /** + * Gets 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. + */ + ManagedClusterPodIdentityProfile podIdentityProfile(); + + /** + * Gets the oidcIssuerProfile property: The OIDC issuer profile of the Managed Cluster. + * + * @return the oidcIssuerProfile value. + */ + ManagedClusterOidcIssuerProfile oidcIssuerProfile(); + + /** + * Gets the nodeResourceGroup property: The name of the resource group containing agent pool nodes. + * + * @return the nodeResourceGroup value. + */ + String nodeResourceGroup(); + + /** + * Gets the nodeResourceGroupProfile property: The node resource group configuration profile. + * + * @return the nodeResourceGroupProfile value. + */ + ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile(); + + /** + * Gets the enableRbac property: Whether to enable Kubernetes Role-Based Access Control. + * + * @return the enableRbac value. + */ + Boolean enableRbac(); + + /** + * Gets the supportPlan property: The support plan for the Managed Cluster. If unspecified, the default is + * 'KubernetesOfficial'. + * + * @return the supportPlan value. + */ + KubernetesSupportPlan supportPlan(); + + /** + * Gets the enablePodSecurityPolicy property: (DEPRECATED) Whether to enable Kubernetes pod security policy + * (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn more + * at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. + * + * @return the enablePodSecurityPolicy value. + */ + Boolean enablePodSecurityPolicy(); + + /** + * Gets the enableNamespaceResources property: Enable namespace as Azure resource. + * + * The default value is false. It can be enabled/disabled on creation and updating of the managed cluster. See + * [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a ARM + * Resource. + * + * @return the enableNamespaceResources value. + */ + Boolean enableNamespaceResources(); + + /** + * Gets the networkProfile property: The network configuration profile. + * + * @return the networkProfile value. + */ + ContainerServiceNetworkProfile networkProfile(); + + /** + * Gets the aadProfile property: AADProfile specifies attributes for Azure Active Directory integration. + * + * The Azure Active Directory configuration. + * + * @return the aadProfile value. + */ + ManagedClusterAadProfile aadProfile(); + + /** + * Gets the autoUpgradeProfile property: The auto upgrade configuration. + * + * @return the autoUpgradeProfile value. + */ + ManagedClusterAutoUpgradeProfile autoUpgradeProfile(); + + /** + * Gets the upgradeSettings property: Settings for upgrading a cluster. + * + * @return the upgradeSettings value. + */ + ClusterUpgradeSettings upgradeSettings(); + + /** + * Gets the autoScalerProfile property: Parameters to be applied to the cluster-autoscaler when enabled. + * + * @return the autoScalerProfile value. + */ + ManagedClusterPropertiesAutoScalerProfile autoScalerProfile(); + + /** + * Gets the apiServerAccessProfile property: The access profile for managed cluster API server. + * + * @return the apiServerAccessProfile value. + */ + ManagedClusterApiServerAccessProfile apiServerAccessProfile(); + + /** + * Gets 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. + */ + String diskEncryptionSetId(); + + /** + * Gets the identityProfile property: Identities associated with the cluster. + * + * @return the identityProfile value. + */ + Map identityProfile(); + + /** + * Gets the privateLinkResources property: Private link resources associated with the cluster. + * + * @return the privateLinkResources value. + */ + List privateLinkResources(); + + /** + * Gets 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. + */ + Boolean disableLocalAccounts(); + + /** + * Gets the httpProxyConfig property: Configurations for provisioning the cluster with HTTP proxy servers. + * + * @return the httpProxyConfig value. + */ + ManagedClusterHttpProxyConfig httpProxyConfig(); + + /** + * Gets the securityProfile property: Security profile for the managed cluster. + * + * @return the securityProfile value. + */ + ManagedClusterSecurityProfile securityProfile(); + + /** + * Gets the storageProfile property: Storage profile for the managed cluster. + * + * @return the storageProfile value. + */ + ManagedClusterStorageProfile storageProfile(); + + /** + * Gets the ingressProfile property: Ingress profile for the managed cluster. + * + * @return the ingressProfile value. + */ + ManagedClusterIngressProfile ingressProfile(); + + /** + * Gets the publicNetworkAccess property: PublicNetworkAccess of the managedCluster + * + * Allow or deny public network access for AKS. + * + * @return the publicNetworkAccess value. + */ + PublicNetworkAccess publicNetworkAccess(); + + /** + * Gets the workloadAutoScalerProfile property: Workload Auto-scaler profile for the managed cluster. + * + * @return the workloadAutoScalerProfile value. + */ + ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile(); + + /** + * Gets the azureMonitorProfile property: Prometheus addon profile for the container service cluster. + * + * @return the azureMonitorProfile value. + */ + ManagedClusterAzureMonitorProfile azureMonitorProfile(); + + /** + * Gets the safeguardsProfile property: The Safeguards profile holds all the safeguards information for a given + * cluster. + * + * @return the safeguardsProfile value. + */ + SafeguardsProfile safeguardsProfile(); + + /** + * Gets the serviceMeshProfile property: Service mesh profile for a managed cluster. + * + * @return the serviceMeshProfile value. + */ + ServiceMeshProfile serviceMeshProfile(); + + /** + * Gets the resourceUid property: The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds + * (i.e: create, delete, create sequence). + * + * @return the resourceUid value. + */ + String resourceUid(); + + /** + * Gets the metricsProfile property: Optional cluster metrics configuration. + * + * @return the metricsProfile value. + */ + ManagedClusterMetricsProfile metricsProfile(); + + /** + * Gets the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. + * + * @return the aiToolchainOperatorProfile value. + */ + ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile(); + + /** + * Gets the nodeProvisioningProfile property: Node provisioning settings that apply to the whole cluster. + * + * @return the nodeProvisioningProfile value. + */ + ManagedClusterNodeProvisioningProfile nodeProvisioningProfile(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterInner + * object. + * + * @return the inner object. + */ + ManagedClusterInner innerModel(); + + /** + * The entirety of the ManagedCluster definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The ManagedCluster definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ManagedCluster definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ManagedCluster definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the ManagedCluster definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the ManagedCluster definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithSku, DefinitionStages.WithExtendedLocation, + DefinitionStages.WithIdentity, DefinitionStages.WithCreationData, DefinitionStages.WithKubernetesVersion, + DefinitionStages.WithDnsPrefix, DefinitionStages.WithFqdnSubdomain, DefinitionStages.WithAgentPoolProfiles, + DefinitionStages.WithLinuxProfile, DefinitionStages.WithWindowsProfile, + DefinitionStages.WithServicePrincipalProfile, DefinitionStages.WithAddonProfiles, + DefinitionStages.WithPodIdentityProfile, DefinitionStages.WithOidcIssuerProfile, + DefinitionStages.WithNodeResourceGroup, DefinitionStages.WithNodeResourceGroupProfile, + DefinitionStages.WithEnableRbac, DefinitionStages.WithSupportPlan, + DefinitionStages.WithEnablePodSecurityPolicy, DefinitionStages.WithEnableNamespaceResources, + DefinitionStages.WithNetworkProfile, DefinitionStages.WithAadProfile, + DefinitionStages.WithAutoUpgradeProfile, DefinitionStages.WithUpgradeSettings, + DefinitionStages.WithAutoScalerProfile, DefinitionStages.WithApiServerAccessProfile, + DefinitionStages.WithDiskEncryptionSetId, DefinitionStages.WithIdentityProfile, + DefinitionStages.WithPrivateLinkResources, DefinitionStages.WithDisableLocalAccounts, + DefinitionStages.WithHttpProxyConfig, DefinitionStages.WithSecurityProfile, + DefinitionStages.WithStorageProfile, DefinitionStages.WithIngressProfile, + DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithWorkloadAutoScalerProfile, + DefinitionStages.WithAzureMonitorProfile, DefinitionStages.WithSafeguardsProfile, + DefinitionStages.WithServiceMeshProfile, DefinitionStages.WithMetricsProfile, + DefinitionStages.WithAiToolchainOperatorProfile, DefinitionStages.WithNodeProvisioningProfile { + /** + * Executes the create request. + * + * @return the created resource. + */ + ManagedCluster create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ManagedCluster create(Context context); + } + + /** + * The stage of the ManagedCluster definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the ManagedCluster definition allowing to specify sku. + */ + interface WithSku { + /** + * Specifies the sku property: The managed cluster SKU.. + * + * @param sku The managed cluster SKU. + * @return the next definition stage. + */ + WithCreate withSku(ManagedClusterSku sku); + } + + /** + * The stage of the ManagedCluster definition allowing to specify extendedLocation. + */ + interface WithExtendedLocation { + /** + * Specifies the extendedLocation property: The extended location of the Virtual Machine.. + * + * @param extendedLocation The extended location of the Virtual Machine. + * @return the next definition stage. + */ + WithCreate withExtendedLocation(ExtendedLocation extendedLocation); + } + + /** + * The stage of the ManagedCluster definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The identity of the managed cluster, if configured.. + * + * @param identity The identity of the managed cluster, if configured. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedClusterIdentity identity); + } + + /** + * The stage of the ManagedCluster definition allowing to specify creationData. + */ + interface WithCreationData { + /** + * Specifies the creationData property: CreationData to be used to specify the source Snapshot ID if the + * cluster will be created/upgraded using a snapshot.. + * + * @param creationData CreationData to be used to specify the source Snapshot ID if the cluster will be + * created/upgraded using a snapshot. + * @return the next definition stage. + */ + WithCreate withCreationData(CreationData creationData); + } + + /** + * The stage of the ManagedCluster definition allowing to specify kubernetesVersion. + */ + interface WithKubernetesVersion { + /** + * Specifies the kubernetesVersion property: The version of Kubernetes the Managed Cluster is requested to + * run. + * + * 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 version of Kubernetes the Managed Cluster is requested to run. + * + * 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 next definition stage. + */ + WithCreate withKubernetesVersion(String kubernetesVersion); + } + + /** + * The stage of the ManagedCluster definition allowing to specify dnsPrefix. + */ + interface WithDnsPrefix { + /** + * Specifies the dnsPrefix property: The DNS prefix of the Managed Cluster. + * + * This cannot be updated once the Managed Cluster has been created.. + * + * @param dnsPrefix The DNS prefix of the Managed Cluster. + * + * This cannot be updated once the Managed Cluster has been created. + * @return the next definition stage. + */ + WithCreate withDnsPrefix(String dnsPrefix); + } + + /** + * The stage of the ManagedCluster definition allowing to specify fqdnSubdomain. + */ + interface WithFqdnSubdomain { + /** + * Specifies 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 FQDN subdomain of the private cluster with custom private dns zone. + * + * This cannot be updated once the Managed Cluster has been created. + * @return the next definition stage. + */ + WithCreate withFqdnSubdomain(String fqdnSubdomain); + } + + /** + * The stage of the ManagedCluster definition allowing to specify agentPoolProfiles. + */ + interface WithAgentPoolProfiles { + /** + * Specifies the agentPoolProfiles property: The agent pool properties.. + * + * @param agentPoolProfiles The agent pool properties. + * @return the next definition stage. + */ + WithCreate withAgentPoolProfiles(List agentPoolProfiles); + } + + /** + * The stage of the ManagedCluster definition allowing to specify linuxProfile. + */ + interface WithLinuxProfile { + /** + * Specifies the linuxProfile property: The profile for Linux VMs in the Managed Cluster.. + * + * @param linuxProfile The profile for Linux VMs in the Managed Cluster. + * @return the next definition stage. + */ + WithCreate withLinuxProfile(ContainerServiceLinuxProfile linuxProfile); + } + + /** + * The stage of the ManagedCluster definition allowing to specify windowsProfile. + */ + interface WithWindowsProfile { + /** + * Specifies the windowsProfile property: The profile for Windows VMs in the Managed Cluster.. + * + * @param windowsProfile The profile for Windows VMs in the Managed Cluster. + * @return the next definition stage. + */ + WithCreate withWindowsProfile(ManagedClusterWindowsProfile windowsProfile); + } + + /** + * The stage of the ManagedCluster definition allowing to specify servicePrincipalProfile. + */ + interface WithServicePrincipalProfile { + /** + * Specifies the servicePrincipalProfile property: Information about a service principal identity for the + * cluster to use for manipulating Azure APIs.. + * + * @param servicePrincipalProfile Information about a service principal identity for the cluster to use for + * manipulating Azure APIs. + * @return the next definition stage. + */ + WithCreate withServicePrincipalProfile(ManagedClusterServicePrincipalProfile servicePrincipalProfile); + } + + /** + * The stage of the ManagedCluster definition allowing to specify addonProfiles. + */ + interface WithAddonProfiles { + /** + * Specifies the addonProfiles property: The profile of managed cluster add-on.. + * + * @param addonProfiles The profile of managed cluster add-on. + * @return the next definition stage. + */ + WithCreate withAddonProfiles(Map addonProfiles); + } + + /** + * The stage of the ManagedCluster definition allowing to specify podIdentityProfile. + */ + interface WithPodIdentityProfile { + /** + * Specifies 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 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 next definition stage. + */ + WithCreate withPodIdentityProfile(ManagedClusterPodIdentityProfile podIdentityProfile); + } + + /** + * The stage of the ManagedCluster definition allowing to specify oidcIssuerProfile. + */ + interface WithOidcIssuerProfile { + /** + * Specifies the oidcIssuerProfile property: The OIDC issuer profile of the Managed Cluster.. + * + * @param oidcIssuerProfile The OIDC issuer profile of the Managed Cluster. + * @return the next definition stage. + */ + WithCreate withOidcIssuerProfile(ManagedClusterOidcIssuerProfile oidcIssuerProfile); + } + + /** + * The stage of the ManagedCluster definition allowing to specify nodeResourceGroup. + */ + interface WithNodeResourceGroup { + /** + * Specifies the nodeResourceGroup property: The name of the resource group containing agent pool nodes.. + * + * @param nodeResourceGroup The name of the resource group containing agent pool nodes. + * @return the next definition stage. + */ + WithCreate withNodeResourceGroup(String nodeResourceGroup); + } + + /** + * The stage of the ManagedCluster definition allowing to specify nodeResourceGroupProfile. + */ + interface WithNodeResourceGroupProfile { + /** + * Specifies the nodeResourceGroupProfile property: The node resource group configuration profile.. + * + * @param nodeResourceGroupProfile The node resource group configuration profile. + * @return the next definition stage. + */ + WithCreate withNodeResourceGroupProfile(ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile); + } + + /** + * The stage of the ManagedCluster definition allowing to specify enableRbac. + */ + interface WithEnableRbac { + /** + * Specifies the enableRbac property: Whether to enable Kubernetes Role-Based Access Control.. + * + * @param enableRbac Whether to enable Kubernetes Role-Based Access Control. + * @return the next definition stage. + */ + WithCreate withEnableRbac(Boolean enableRbac); + } + + /** + * The stage of the ManagedCluster definition allowing to specify supportPlan. + */ + interface WithSupportPlan { + /** + * Specifies the supportPlan property: The support plan for the Managed Cluster. If unspecified, the default + * is 'KubernetesOfficial'.. + * + * @param supportPlan The support plan for the Managed Cluster. If unspecified, the default is + * 'KubernetesOfficial'. + * @return the next definition stage. + */ + WithCreate withSupportPlan(KubernetesSupportPlan supportPlan); + } + + /** + * The stage of the ManagedCluster definition allowing to specify enablePodSecurityPolicy. + */ + interface WithEnablePodSecurityPolicy { + /** + * Specifies the enablePodSecurityPolicy property: (DEPRECATED) Whether to enable Kubernetes pod security + * policy (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in + * v1.25. Learn more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp.. + * + * @param enablePodSecurityPolicy (DEPRECATED) Whether to enable Kubernetes pod security policy (preview). + * PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn more at + * https://aka.ms/k8s/psp and https://aka.ms/aks/psp. + * @return the next definition stage. + */ + WithCreate withEnablePodSecurityPolicy(Boolean enablePodSecurityPolicy); + } + + /** + * The stage of the ManagedCluster definition allowing to specify enableNamespaceResources. + */ + interface WithEnableNamespaceResources { + /** + * Specifies the enableNamespaceResources property: Enable namespace as Azure resource. + * + * The default value is false. It can be enabled/disabled on creation and updating of the managed cluster. + * See [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on + * Namespace as a ARM Resource.. + * + * @param enableNamespaceResources Enable namespace as Azure resource. + * + * The default value is false. It can be enabled/disabled on creation and updating of the managed cluster. + * See [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on + * Namespace as a ARM Resource. + * @return the next definition stage. + */ + WithCreate withEnableNamespaceResources(Boolean enableNamespaceResources); + } + + /** + * The stage of the ManagedCluster definition allowing to specify networkProfile. + */ + interface WithNetworkProfile { + /** + * Specifies the networkProfile property: The network configuration profile.. + * + * @param networkProfile The network configuration profile. + * @return the next definition stage. + */ + WithCreate withNetworkProfile(ContainerServiceNetworkProfile networkProfile); + } + + /** + * The stage of the ManagedCluster definition allowing to specify aadProfile. + */ + interface WithAadProfile { + /** + * Specifies the aadProfile property: AADProfile specifies attributes for Azure Active Directory + * integration. + * + * The Azure Active Directory configuration.. + * + * @param aadProfile AADProfile specifies attributes for Azure Active Directory integration. + * + * The Azure Active Directory configuration. + * @return the next definition stage. + */ + WithCreate withAadProfile(ManagedClusterAadProfile aadProfile); + } + + /** + * The stage of the ManagedCluster definition allowing to specify autoUpgradeProfile. + */ + interface WithAutoUpgradeProfile { + /** + * Specifies the autoUpgradeProfile property: The auto upgrade configuration.. + * + * @param autoUpgradeProfile The auto upgrade configuration. + * @return the next definition stage. + */ + WithCreate withAutoUpgradeProfile(ManagedClusterAutoUpgradeProfile autoUpgradeProfile); + } + + /** + * The stage of the ManagedCluster definition allowing to specify upgradeSettings. + */ + interface WithUpgradeSettings { + /** + * Specifies the upgradeSettings property: Settings for upgrading a cluster.. + * + * @param upgradeSettings Settings for upgrading a cluster. + * @return the next definition stage. + */ + WithCreate withUpgradeSettings(ClusterUpgradeSettings upgradeSettings); + } + + /** + * The stage of the ManagedCluster definition allowing to specify autoScalerProfile. + */ + interface WithAutoScalerProfile { + /** + * Specifies the autoScalerProfile property: Parameters to be applied to the cluster-autoscaler when + * enabled. + * + * @param autoScalerProfile Parameters to be applied to the cluster-autoscaler when enabled. + * @return the next definition stage. + */ + WithCreate withAutoScalerProfile(ManagedClusterPropertiesAutoScalerProfile autoScalerProfile); + } + + /** + * The stage of the ManagedCluster definition allowing to specify apiServerAccessProfile. + */ + interface WithApiServerAccessProfile { + /** + * Specifies the apiServerAccessProfile property: The access profile for managed cluster API server.. + * + * @param apiServerAccessProfile The access profile for managed cluster API server. + * @return the next definition stage. + */ + WithCreate withApiServerAccessProfile(ManagedClusterApiServerAccessProfile apiServerAccessProfile); + } + + /** + * The stage of the ManagedCluster definition allowing to specify diskEncryptionSetId. + */ + interface WithDiskEncryptionSetId { + /** + * Specifies 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 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 next definition stage. + */ + WithCreate withDiskEncryptionSetId(String diskEncryptionSetId); + } + + /** + * The stage of the ManagedCluster definition allowing to specify identityProfile. + */ + interface WithIdentityProfile { + /** + * Specifies the identityProfile property: Identities associated with the cluster.. + * + * @param identityProfile Identities associated with the cluster. + * @return the next definition stage. + */ + WithCreate withIdentityProfile(Map identityProfile); + } + + /** + * The stage of the ManagedCluster definition allowing to specify privateLinkResources. + */ + interface WithPrivateLinkResources { + /** + * Specifies the privateLinkResources property: Private link resources associated with the cluster.. + * + * @param privateLinkResources Private link resources associated with the cluster. + * @return the next definition stage. + */ + WithCreate withPrivateLinkResources(List privateLinkResources); + } + + /** + * The stage of the ManagedCluster definition allowing to specify disableLocalAccounts. + */ + interface WithDisableLocalAccounts { + /** + * Specifies 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 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 next definition stage. + */ + WithCreate withDisableLocalAccounts(Boolean disableLocalAccounts); + } + + /** + * The stage of the ManagedCluster definition allowing to specify httpProxyConfig. + */ + interface WithHttpProxyConfig { + /** + * Specifies the httpProxyConfig property: Configurations for provisioning the cluster with HTTP proxy + * servers.. + * + * @param httpProxyConfig Configurations for provisioning the cluster with HTTP proxy servers. + * @return the next definition stage. + */ + WithCreate withHttpProxyConfig(ManagedClusterHttpProxyConfig httpProxyConfig); + } + + /** + * The stage of the ManagedCluster definition allowing to specify securityProfile. + */ + interface WithSecurityProfile { + /** + * Specifies the securityProfile property: Security profile for the managed cluster.. + * + * @param securityProfile Security profile for the managed cluster. + * @return the next definition stage. + */ + WithCreate withSecurityProfile(ManagedClusterSecurityProfile securityProfile); + } + + /** + * The stage of the ManagedCluster definition allowing to specify storageProfile. + */ + interface WithStorageProfile { + /** + * Specifies the storageProfile property: Storage profile for the managed cluster.. + * + * @param storageProfile Storage profile for the managed cluster. + * @return the next definition stage. + */ + WithCreate withStorageProfile(ManagedClusterStorageProfile storageProfile); + } + + /** + * The stage of the ManagedCluster definition allowing to specify ingressProfile. + */ + interface WithIngressProfile { + /** + * Specifies the ingressProfile property: Ingress profile for the managed cluster.. + * + * @param ingressProfile Ingress profile for the managed cluster. + * @return the next definition stage. + */ + WithCreate withIngressProfile(ManagedClusterIngressProfile ingressProfile); + } + + /** + * The stage of the ManagedCluster definition allowing to specify publicNetworkAccess. + */ + interface WithPublicNetworkAccess { + /** + * Specifies the publicNetworkAccess property: PublicNetworkAccess of the managedCluster + * + * Allow or deny public network access for AKS. + * + * @param publicNetworkAccess PublicNetworkAccess of the managedCluster + * + * Allow or deny public network access for AKS. + * @return the next definition stage. + */ + WithCreate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); + } + + /** + * The stage of the ManagedCluster definition allowing to specify workloadAutoScalerProfile. + */ + interface WithWorkloadAutoScalerProfile { + /** + * Specifies the workloadAutoScalerProfile property: Workload Auto-scaler profile for the managed cluster.. + * + * @param workloadAutoScalerProfile Workload Auto-scaler profile for the managed cluster. + * @return the next definition stage. + */ + WithCreate withWorkloadAutoScalerProfile(ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile); + } + + /** + * The stage of the ManagedCluster definition allowing to specify azureMonitorProfile. + */ + interface WithAzureMonitorProfile { + /** + * Specifies the azureMonitorProfile property: Prometheus addon profile for the container service cluster. + * + * @param azureMonitorProfile Prometheus addon profile for the container service cluster. + * @return the next definition stage. + */ + WithCreate withAzureMonitorProfile(ManagedClusterAzureMonitorProfile azureMonitorProfile); + } + + /** + * The stage of the ManagedCluster definition allowing to specify safeguardsProfile. + */ + interface WithSafeguardsProfile { + /** + * Specifies the safeguardsProfile property: The Safeguards profile holds all the safeguards information for + * a given cluster. + * + * @param safeguardsProfile The Safeguards profile holds all the safeguards information for a given cluster. + * @return the next definition stage. + */ + WithCreate withSafeguardsProfile(SafeguardsProfile safeguardsProfile); + } + + /** + * The stage of the ManagedCluster definition allowing to specify serviceMeshProfile. + */ + interface WithServiceMeshProfile { + /** + * Specifies the serviceMeshProfile property: Service mesh profile for a managed cluster.. + * + * @param serviceMeshProfile Service mesh profile for a managed cluster. + * @return the next definition stage. + */ + WithCreate withServiceMeshProfile(ServiceMeshProfile serviceMeshProfile); + } + + /** + * The stage of the ManagedCluster definition allowing to specify metricsProfile. + */ + interface WithMetricsProfile { + /** + * Specifies the metricsProfile property: Optional cluster metrics configuration.. + * + * @param metricsProfile Optional cluster metrics configuration. + * @return the next definition stage. + */ + WithCreate withMetricsProfile(ManagedClusterMetricsProfile metricsProfile); + } + + /** + * The stage of the ManagedCluster definition allowing to specify aiToolchainOperatorProfile. + */ + interface WithAiToolchainOperatorProfile { + /** + * Specifies the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole + * cluster.. + * + * @param aiToolchainOperatorProfile AI toolchain operator settings that apply to the whole cluster. + * @return the next definition stage. + */ + WithCreate + withAiToolchainOperatorProfile(ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile); + } + + /** + * The stage of the ManagedCluster definition allowing to specify nodeProvisioningProfile. + */ + interface WithNodeProvisioningProfile { + /** + * Specifies the nodeProvisioningProfile property: Node provisioning settings that apply to the whole + * cluster.. + * + * @param nodeProvisioningProfile Node provisioning settings that apply to the whole cluster. + * @return the next definition stage. + */ + WithCreate withNodeProvisioningProfile(ManagedClusterNodeProvisioningProfile nodeProvisioningProfile); + } + } + + /** + * Begins update for the ManagedCluster resource. + * + * @return the stage of resource update. + */ + ManagedCluster.Update update(); + + /** + * The template for ManagedCluster update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ManagedCluster apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ManagedCluster apply(Context context); + } + + /** + * The ManagedCluster update stages. + */ + interface UpdateStages { + /** + * The stage of the ManagedCluster update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ManagedCluster refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ManagedCluster refresh(Context context); + + /** + * Lists the admin credentials of a managed cluster. + * + * @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}. + */ + Response listClusterAdminCredentialsWithResponse(String serverFqdn, Context context); + + /** + * Lists the admin credentials of a managed cluster. + * + * @throws com.azure.core.management.exception.ManagementException 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. + */ + CredentialResults listClusterAdminCredentials(); + + /** + * Lists the user credentials of a managed cluster. + * + * @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}. + */ + Response listClusterUserCredentialsWithResponse(String serverFqdn, Format format, + Context context); + + /** + * Lists the user credentials of a managed cluster. + * + * @throws com.azure.core.management.exception.ManagementException 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. + */ + CredentialResults listClusterUserCredentials(); + + /** + * Lists the cluster monitoring user credentials of a managed cluster. + * + * @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}. + */ + Response listClusterMonitoringUserCredentialsWithResponse(String serverFqdn, Context context); + + /** + * Lists the cluster monitoring user credentials of a managed cluster. + * + * @throws com.azure.core.management.exception.ManagementException 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. + */ + CredentialResults listClusterMonitoringUserCredentials(); + + /** + * 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 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. + */ + void resetServicePrincipalProfile(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 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. + */ + void resetServicePrincipalProfile(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 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. + */ + void resetAadProfile(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 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. + */ + void resetAadProfile(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. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void rotateClusterCertificates(); + + /** + * 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void rotateClusterCertificates(Context context); + + /** + * Rotates the service account signing keys of a managed cluster. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void rotateServiceAccountSigningKeys(); + + /** + * Rotates the service account signing keys of a 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. + */ + void rotateServiceAccountSigningKeys(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. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void stop(); + + /** + * 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void stop(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. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void start(); + + /** + * 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void start(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 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. + */ + RunCommandResult runCommand(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 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. + */ + RunCommandResult runCommand(RunCommandRequest requestPayload, Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAIToolchainOperatorProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAIToolchainOperatorProfile.java new file mode 100644 index 0000000000000..90470ca57799d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAIToolchainOperatorProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * 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 { + /* + * Whether to enable AI toolchain operator to the cluster + * + * Indicates if AI toolchain operator enabled or not. + */ + @JsonProperty(value = "enabled") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAadProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAadProfile.java new file mode 100644 index 0000000000000..9ffb529cc893f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAadProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +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 { + /* + * Whether to enable managed AAD. + */ + @JsonProperty(value = "managed") + private Boolean managed; + + /* + * Whether to enable Azure RBAC for Kubernetes authorization. + */ + @JsonProperty(value = "enableAzureRBAC") + private Boolean enableAzureRbac; + + /* + * The list of AAD group object IDs that will have admin role of the cluster. + */ + @JsonProperty(value = "adminGroupObjectIDs") + private List adminGroupObjectIDs; + + /* + * (DEPRECATED) The client AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + */ + @JsonProperty(value = "clientAppID") + private String clientAppId; + + /* + * (DEPRECATED) The server AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + */ + @JsonProperty(value = "serverAppID") + private String serverAppId; + + /* + * (DEPRECATED) The server AAD application secret. Learn more at https://aka.ms/aks/aad-legacy. + */ + @JsonProperty(value = "serverAppSecret") + private String serverAppSecret; + + /* + * The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment + * subscription. + */ + @JsonProperty(value = "tenantID") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAccessProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAccessProfile.java new file mode 100644 index 0000000000000..8d2eafac31358 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAccessProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterAccessProfileInner; +import java.util.Map; + +/** + * An immutable client-side representation of ManagedClusterAccessProfile. + */ +public interface ManagedClusterAccessProfile { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the kubeConfig property: Base64-encoded Kubernetes configuration file. + * + * @return the kubeConfig value. + */ + byte[] kubeConfig(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterAccessProfileInner + * object. + * + * @return the inner object. + */ + ManagedClusterAccessProfileInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAddonProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAddonProfile.java new file mode 100644 index 0000000000000..0f4145c5343d3 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAddonProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * A Kubernetes add-on profile for a managed cluster. + */ +@Fluent +public final class ManagedClusterAddonProfile { + /* + * Whether the add-on is enabled or not. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /* + * Key-value pairs for configuring an add-on. + */ + @JsonProperty(value = "config") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map config; + + /* + * Information of user assigned identity used by this add-on. + */ + @JsonProperty(value = "identity", access = JsonProperty.Access.WRITE_ONLY) + 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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAddonProfileIdentity.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAddonProfileIdentity.java new file mode 100644 index 0000000000000..63e044ccaaf87 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAddonProfileIdentity.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; + +/** + * 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() { + super.validate(); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAgentPoolProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAgentPoolProfile.java new file mode 100644 index 0000000000000..1c06b5ce73d0b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAgentPoolProfile.java @@ -0,0 +1,517 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterAgentPoolProfileProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +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. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * 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; + } + + /** + * {@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 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 withEnableCustomCATrust(Boolean enableCustomCATrust) { + super.withEnableCustomCATrust(enableCustomCATrust); + 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 withNodeInitializationTaints(List nodeInitializationTaints) { + super.withNodeInitializationTaints(nodeInitializationTaints); + 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 withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { + super.withWindowsProfile(windowsProfile); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withNetworkProfile(AgentPoolNetworkProfile networkProfile) { + super.withNetworkProfile(networkProfile); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withSecurityProfile(AgentPoolSecurityProfile securityProfile) { + super.withSecurityProfile(securityProfile); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withGpuProfile(AgentPoolGpuProfile gpuProfile) { + super.withGpuProfile(gpuProfile); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile + withArtifactStreamingProfile(AgentPoolArtifactStreamingProfile artifactStreamingProfile) { + super.withArtifactStreamingProfile(artifactStreamingProfile); + 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (name() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property name in model ManagedClusterAgentPoolProfile")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterAgentPoolProfile.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterApiServerAccessProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterApiServerAccessProfile.java new file mode 100644 index 0000000000000..2e4deb6b660e5 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterApiServerAccessProfile.java @@ -0,0 +1,253 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Access profile for managed cluster API server. + */ +@Fluent +public final class ManagedClusterApiServerAccessProfile { + /* + * 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). + */ + @JsonProperty(value = "authorizedIPRanges") + 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). + */ + @JsonProperty(value = "enablePrivateCluster") + 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'. + */ + @JsonProperty(value = "privateDNSZone") + private String privateDnsZone; + + /* + * Whether to create additional public FQDN for private cluster or not. + */ + @JsonProperty(value = "enablePrivateClusterPublicFQDN") + private Boolean enablePrivateClusterPublicFqdn; + + /* + * Whether to disable run command for the cluster or not. + */ + @JsonProperty(value = "disableRunCommand") + private Boolean disableRunCommand; + + /* + * Whether to enable apiserver vnet integration for the cluster or not. + */ + @JsonProperty(value = "enableVnetIntegration") + private Boolean enableVnetIntegration; + + /* + * The subnet to be used when apiserver vnet integration is enabled. + * + * It is required when: 1. creating a new cluster with BYO Vnet; 2. updating an existing cluster to enable + * apiserver vnet integration. + */ + @JsonProperty(value = "subnetId") + 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. + * + * @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. + * + * @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: 1. creating a new cluster with BYO Vnet; 2. 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: 1. creating a new cluster with BYO Vnet; 2. 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAutoUpgradeProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAutoUpgradeProfile.java new file mode 100644 index 0000000000000..d243e93705d05 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAutoUpgradeProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Auto upgrade profile for a managed cluster. + */ +@Fluent +public final class ManagedClusterAutoUpgradeProfile { + /* + * 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). + */ + @JsonProperty(value = "upgradeChannel") + private UpgradeChannel upgradeChannel; + + /* + * Manner in which the OS on your nodes is updated + * + * The default is Unmanaged, but may change to either NodeImage or SecurityPatch at GA. + */ + @JsonProperty(value = "nodeOSUpgradeChannel") + 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: Manner in which the OS on your nodes is updated + * + * The default is Unmanaged, but may change to either NodeImage or SecurityPatch at GA. + * + * @return the nodeOSUpgradeChannel value. + */ + public NodeOSUpgradeChannel nodeOSUpgradeChannel() { + return this.nodeOSUpgradeChannel; + } + + /** + * Set the nodeOSUpgradeChannel property: Manner in which the OS on your nodes is updated + * + * The default is Unmanaged, but may change to either NodeImage or SecurityPatch at GA. + * + * @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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfile.java new file mode 100644 index 0000000000000..6915ca3327816 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfile.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Prometheus addon profile for the container service cluster. + */ +@Fluent +public final class ManagedClusterAzureMonitorProfile { + /* + * Metrics profile for the prometheus service addon + */ + @JsonProperty(value = "metrics") + private ManagedClusterAzureMonitorProfileMetrics metrics; + + /* + * Logs profile for the Azure Monitor Infrastructure and Application Logs. Collect out-of-the-box Kubernetes + * infrastructure & application logs to send to Azure Monitor. See aka.ms/AzureMonitorContainerInsights for an + * overview. + */ + @JsonProperty(value = "logs") + private ManagedClusterAzureMonitorProfileLogs logs; + + /** + * Creates an instance of ManagedClusterAzureMonitorProfile class. + */ + public ManagedClusterAzureMonitorProfile() { + } + + /** + * Get the metrics property: Metrics profile for the prometheus service addon. + * + * @return the metrics value. + */ + public ManagedClusterAzureMonitorProfileMetrics metrics() { + return this.metrics; + } + + /** + * Set the metrics property: Metrics profile for the prometheus service addon. + * + * @param metrics the metrics value to set. + * @return the ManagedClusterAzureMonitorProfile object itself. + */ + public ManagedClusterAzureMonitorProfile withMetrics(ManagedClusterAzureMonitorProfileMetrics metrics) { + this.metrics = metrics; + return this; + } + + /** + * Get the logs property: Logs profile for the Azure Monitor Infrastructure and Application Logs. Collect + * out-of-the-box Kubernetes infrastructure & application logs to send to Azure Monitor. See + * aka.ms/AzureMonitorContainerInsights for an overview. + * + * @return the logs value. + */ + public ManagedClusterAzureMonitorProfileLogs logs() { + return this.logs; + } + + /** + * Set the logs property: Logs profile for the Azure Monitor Infrastructure and Application Logs. Collect + * out-of-the-box Kubernetes infrastructure & application logs to send to Azure Monitor. See + * aka.ms/AzureMonitorContainerInsights for an overview. + * + * @param logs the logs value to set. + * @return the ManagedClusterAzureMonitorProfile object itself. + */ + public ManagedClusterAzureMonitorProfile withLogs(ManagedClusterAzureMonitorProfileLogs logs) { + this.logs = logs; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (metrics() != null) { + metrics().validate(); + } + if (logs() != null) { + logs().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileAppMonitoring.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileAppMonitoring.java new file mode 100644 index 0000000000000..1f1cf93f99e70 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileAppMonitoring.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Application Monitoring Profile for Kubernetes Application Container. Collects application logs, metrics and traces + * through auto-instrumentation of the application using Azure Monitor OpenTelemetry based SDKs. See + * aka.ms/AzureMonitorApplicationMonitoring for an overview. + */ +@Fluent +public final class ManagedClusterAzureMonitorProfileAppMonitoring { + /* + * Indicates if Application Monitoring enabled or not. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterAzureMonitorProfileAppMonitoring class. + */ + public ManagedClusterAzureMonitorProfileAppMonitoring() { + } + + /** + * Get the enabled property: Indicates if Application Monitoring enabled or not. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates if Application Monitoring enabled or not. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterAzureMonitorProfileAppMonitoring object itself. + */ + public ManagedClusterAzureMonitorProfileAppMonitoring withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.java new file mode 100644 index 0000000000000..139370d78f90d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Metrics. Collects + * OpenTelemetry metrics through auto-instrumentation of the application using Azure Monitor OpenTelemetry based SDKs. + * See aka.ms/AzureMonitorApplicationMonitoring for an overview. + */ +@Fluent +public final class ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics { + /* + * Indicates if Application Monitoring Open Telemetry Metrics is enabled or not. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics class. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics() { + } + + /** + * Get the enabled property: Indicates if Application Monitoring Open Telemetry Metrics is enabled or not. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates if Application Monitoring Open Telemetry Metrics is enabled or not. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics object itself. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileContainerInsights.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileContainerInsights.java new file mode 100644 index 0000000000000..405e7aaeba592 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileContainerInsights.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure Monitor Container Insights Profile for Kubernetes Events, Inventory and Container stdout & stderr logs + * etc. See aka.ms/AzureMonitorContainerInsights for an overview. + */ +@Fluent +public final class ManagedClusterAzureMonitorProfileContainerInsights { + /* + * Indicates if Azure Monitor Container Insights Logs Addon is enabled or not. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * Fully Qualified ARM Resource Id of Azure Log Analytics Workspace for storing Azure Monitor Container Insights + * Logs. + */ + @JsonProperty(value = "logAnalyticsWorkspaceResourceId") + private String logAnalyticsWorkspaceResourceId; + + /* + * Windows Host Logs Profile for Kubernetes Windows Nodes Log Collection. Collects ETW, Event Logs and Text logs + * etc. See aka.ms/AzureMonitorContainerInsights for an overview. + */ + @JsonProperty(value = "windowsHostLogs") + private ManagedClusterAzureMonitorProfileWindowsHostLogs windowsHostLogs; + + /** + * Creates an instance of ManagedClusterAzureMonitorProfileContainerInsights class. + */ + public ManagedClusterAzureMonitorProfileContainerInsights() { + } + + /** + * Get the enabled property: Indicates if Azure Monitor Container Insights Logs Addon is enabled or not. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates if Azure Monitor Container Insights Logs Addon is enabled or not. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterAzureMonitorProfileContainerInsights object itself. + */ + public ManagedClusterAzureMonitorProfileContainerInsights withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the logAnalyticsWorkspaceResourceId property: Fully Qualified ARM Resource Id of Azure Log Analytics + * Workspace for storing Azure Monitor Container Insights Logs. + * + * @return the logAnalyticsWorkspaceResourceId value. + */ + public String logAnalyticsWorkspaceResourceId() { + return this.logAnalyticsWorkspaceResourceId; + } + + /** + * Set the logAnalyticsWorkspaceResourceId property: Fully Qualified ARM Resource Id of Azure Log Analytics + * Workspace for storing Azure Monitor Container Insights Logs. + * + * @param logAnalyticsWorkspaceResourceId the logAnalyticsWorkspaceResourceId value to set. + * @return the ManagedClusterAzureMonitorProfileContainerInsights object itself. + */ + public ManagedClusterAzureMonitorProfileContainerInsights + withLogAnalyticsWorkspaceResourceId(String logAnalyticsWorkspaceResourceId) { + this.logAnalyticsWorkspaceResourceId = logAnalyticsWorkspaceResourceId; + return this; + } + + /** + * Get the windowsHostLogs property: Windows Host Logs Profile for Kubernetes Windows Nodes Log Collection. + * Collects ETW, Event Logs and Text logs etc. See aka.ms/AzureMonitorContainerInsights for an overview. + * + * @return the windowsHostLogs value. + */ + public ManagedClusterAzureMonitorProfileWindowsHostLogs windowsHostLogs() { + return this.windowsHostLogs; + } + + /** + * Set the windowsHostLogs property: Windows Host Logs Profile for Kubernetes Windows Nodes Log Collection. + * Collects ETW, Event Logs and Text logs etc. See aka.ms/AzureMonitorContainerInsights for an overview. + * + * @param windowsHostLogs the windowsHostLogs value to set. + * @return the ManagedClusterAzureMonitorProfileContainerInsights object itself. + */ + public ManagedClusterAzureMonitorProfileContainerInsights + withWindowsHostLogs(ManagedClusterAzureMonitorProfileWindowsHostLogs windowsHostLogs) { + this.windowsHostLogs = windowsHostLogs; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (windowsHostLogs() != null) { + windowsHostLogs().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java new file mode 100644 index 0000000000000..fbffc3fb10e90 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Kube State Metrics for prometheus addon profile for the container service cluster. + */ +@Fluent +public final class ManagedClusterAzureMonitorProfileKubeStateMetrics { + /* + * Comma-separated list of Kubernetes annotations keys that will be used in the resource's labels metric. + */ + @JsonProperty(value = "metricLabelsAllowlist") + private String metricLabelsAllowlist; + + /* + * Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric. + */ + @JsonProperty(value = "metricAnnotationsAllowList") + private String metricAnnotationsAllowList; + + /** + * Creates an instance of ManagedClusterAzureMonitorProfileKubeStateMetrics class. + */ + public ManagedClusterAzureMonitorProfileKubeStateMetrics() { + } + + /** + * Get the metricLabelsAllowlist property: Comma-separated list of Kubernetes annotations keys that will be used in + * the resource's labels metric. + * + * @return the metricLabelsAllowlist value. + */ + public String metricLabelsAllowlist() { + return this.metricLabelsAllowlist; + } + + /** + * Set the metricLabelsAllowlist property: Comma-separated list of Kubernetes annotations keys that will be used in + * the resource's labels metric. + * + * @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 additional Kubernetes label keys that will + * be used in the resource's labels metric. + * + * @return the metricAnnotationsAllowList value. + */ + public String metricAnnotationsAllowList() { + return this.metricAnnotationsAllowList; + } + + /** + * Set the metricAnnotationsAllowList property: Comma-separated list of additional Kubernetes label keys that will + * be used in the resource's labels metric. + * + * @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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileLogs.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileLogs.java new file mode 100644 index 0000000000000..060b25f699159 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileLogs.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Logs profile for the Azure Monitor Infrastructure and Application Logs. Collect out-of-the-box Kubernetes + * infrastructure & application logs to send to Azure Monitor. See aka.ms/AzureMonitorContainerInsights for an + * overview. + */ +@Fluent +public final class ManagedClusterAzureMonitorProfileLogs { + /* + * Azure Monitor Container Insights Profile for Kubernetes Events, Inventory and Container stdout & stderr logs + * etc. See aka.ms/AzureMonitorContainerInsights for an overview. + */ + @JsonProperty(value = "containerInsights") + private ManagedClusterAzureMonitorProfileContainerInsights containerInsights; + + /* + * Application Monitoring Profile for Kubernetes Application Container. Collects application logs, metrics and + * traces through auto-instrumentation of the application using Azure Monitor OpenTelemetry based SDKs. See + * aka.ms/AzureMonitorApplicationMonitoring for an overview. + */ + @JsonProperty(value = "appMonitoring") + private ManagedClusterAzureMonitorProfileAppMonitoring appMonitoring; + + /** + * Creates an instance of ManagedClusterAzureMonitorProfileLogs class. + */ + public ManagedClusterAzureMonitorProfileLogs() { + } + + /** + * Get the containerInsights property: Azure Monitor Container Insights Profile for Kubernetes Events, Inventory + * and Container stdout & stderr logs etc. See aka.ms/AzureMonitorContainerInsights for an overview. + * + * @return the containerInsights value. + */ + public ManagedClusterAzureMonitorProfileContainerInsights containerInsights() { + return this.containerInsights; + } + + /** + * Set the containerInsights property: Azure Monitor Container Insights Profile for Kubernetes Events, Inventory + * and Container stdout & stderr logs etc. See aka.ms/AzureMonitorContainerInsights for an overview. + * + * @param containerInsights the containerInsights value to set. + * @return the ManagedClusterAzureMonitorProfileLogs object itself. + */ + public ManagedClusterAzureMonitorProfileLogs + withContainerInsights(ManagedClusterAzureMonitorProfileContainerInsights containerInsights) { + this.containerInsights = containerInsights; + return this; + } + + /** + * Get the appMonitoring property: Application Monitoring Profile for Kubernetes Application Container. Collects + * application logs, metrics and traces through auto-instrumentation of the application using Azure Monitor + * OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. + * + * @return the appMonitoring value. + */ + public ManagedClusterAzureMonitorProfileAppMonitoring appMonitoring() { + return this.appMonitoring; + } + + /** + * Set the appMonitoring property: Application Monitoring Profile for Kubernetes Application Container. Collects + * application logs, metrics and traces through auto-instrumentation of the application using Azure Monitor + * OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. + * + * @param appMonitoring the appMonitoring value to set. + * @return the ManagedClusterAzureMonitorProfileLogs object itself. + */ + public ManagedClusterAzureMonitorProfileLogs + withAppMonitoring(ManagedClusterAzureMonitorProfileAppMonitoring appMonitoring) { + this.appMonitoring = appMonitoring; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (containerInsights() != null) { + containerInsights().validate(); + } + if (appMonitoring() != null) { + appMonitoring().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileMetrics.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileMetrics.java new file mode 100644 index 0000000000000..7fb893ffb676f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileMetrics.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Metrics profile for the prometheus service addon. + */ +@Fluent +public final class ManagedClusterAzureMonitorProfileMetrics { + /* + * Whether to enable the Prometheus collector + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /* + * Kube State Metrics for prometheus addon profile for the container service cluster + */ + @JsonProperty(value = "kubeStateMetrics") + private ManagedClusterAzureMonitorProfileKubeStateMetrics kubeStateMetrics; + + /* + * Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Metrics. Collects + * OpenTelemetry metrics through auto-instrumentation of the application using Azure Monitor OpenTelemetry based + * SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. + */ + @JsonProperty(value = "appMonitoringOpenTelemetryMetrics") + private ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics appMonitoringOpenTelemetryMetrics; + + /** + * Creates an instance of ManagedClusterAzureMonitorProfileMetrics class. + */ + public ManagedClusterAzureMonitorProfileMetrics() { + } + + /** + * Get the enabled property: Whether to enable the Prometheus collector. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable the Prometheus collector. + * + * @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 for prometheus addon profile for the container service + * cluster. + * + * @return the kubeStateMetrics value. + */ + public ManagedClusterAzureMonitorProfileKubeStateMetrics kubeStateMetrics() { + return this.kubeStateMetrics; + } + + /** + * Set the kubeStateMetrics property: Kube State Metrics for prometheus addon profile for the container service + * cluster. + * + * @param kubeStateMetrics the kubeStateMetrics value to set. + * @return the ManagedClusterAzureMonitorProfileMetrics object itself. + */ + public ManagedClusterAzureMonitorProfileMetrics + withKubeStateMetrics(ManagedClusterAzureMonitorProfileKubeStateMetrics kubeStateMetrics) { + this.kubeStateMetrics = kubeStateMetrics; + return this; + } + + /** + * Get the appMonitoringOpenTelemetryMetrics property: Application Monitoring Open Telemetry Metrics Profile for + * Kubernetes Application Container Metrics. Collects OpenTelemetry metrics through auto-instrumentation of the + * application using Azure Monitor OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an + * overview. + * + * @return the appMonitoringOpenTelemetryMetrics value. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics appMonitoringOpenTelemetryMetrics() { + return this.appMonitoringOpenTelemetryMetrics; + } + + /** + * Set the appMonitoringOpenTelemetryMetrics property: Application Monitoring Open Telemetry Metrics Profile for + * Kubernetes Application Container Metrics. Collects OpenTelemetry metrics through auto-instrumentation of the + * application using Azure Monitor OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an + * overview. + * + * @param appMonitoringOpenTelemetryMetrics the appMonitoringOpenTelemetryMetrics value to set. + * @return the ManagedClusterAzureMonitorProfileMetrics object itself. + */ + public ManagedClusterAzureMonitorProfileMetrics withAppMonitoringOpenTelemetryMetrics( + ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics appMonitoringOpenTelemetryMetrics) { + this.appMonitoringOpenTelemetryMetrics = appMonitoringOpenTelemetryMetrics; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (kubeStateMetrics() != null) { + kubeStateMetrics().validate(); + } + if (appMonitoringOpenTelemetryMetrics() != null) { + appMonitoringOpenTelemetryMetrics().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileWindowsHostLogs.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileWindowsHostLogs.java new file mode 100644 index 0000000000000..11c4b0ce3345d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterAzureMonitorProfileWindowsHostLogs.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Windows Host Logs Profile for Kubernetes Windows Nodes Log Collection. Collects ETW, Event Logs and Text logs etc. + * See aka.ms/AzureMonitorContainerInsights for an overview. + */ +@Fluent +public final class ManagedClusterAzureMonitorProfileWindowsHostLogs { + /* + * Indicates if Windows Host Log Collection is enabled or not for Azure Monitor Container Insights Logs Addon. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterAzureMonitorProfileWindowsHostLogs class. + */ + public ManagedClusterAzureMonitorProfileWindowsHostLogs() { + } + + /** + * Get the enabled property: Indicates if Windows Host Log Collection is enabled or not for Azure Monitor Container + * Insights Logs Addon. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates if Windows Host Log Collection is enabled or not for Azure Monitor Container + * Insights Logs Addon. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterAzureMonitorProfileWindowsHostLogs object itself. + */ + public ManagedClusterAzureMonitorProfileWindowsHostLogs withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterCostAnalysis.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterCostAnalysis.java new file mode 100644 index 0000000000000..6efbb980f3ef7 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterCostAnalysis.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The cost analysis configuration for the cluster. + */ +@Fluent +public final class ManagedClusterCostAnalysis { + /* + * Whether to enable cost analysis + * + * The Managed Cluster sku.tier must be set to 'Standard' 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. + */ + @JsonProperty(value = "enabled") + 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' 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' 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterHttpProxyConfig.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterHttpProxyConfig.java new file mode 100644 index 0000000000000..287ffa2f501e8 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterHttpProxyConfig.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Cluster HTTP proxy configuration. + */ +@Fluent +public final class ManagedClusterHttpProxyConfig { + /* + * The HTTP proxy server endpoint to use. + */ + @JsonProperty(value = "httpProxy") + private String httpProxy; + + /* + * The HTTPS proxy server endpoint to use. + */ + @JsonProperty(value = "httpsProxy") + private String httpsProxy; + + /* + * The endpoints that should not go through proxy. + */ + @JsonProperty(value = "noProxy") + private List noProxy; + + /* + * A read-only list of all endpoints for which traffic should not be sent to the proxy. This list is a superset of + * noProxy and values injected by AKS. + */ + @JsonProperty(value = "effectiveNoProxy", access = JsonProperty.Access.WRITE_ONLY) + private List effectiveNoProxy; + + /* + * Alternative CA cert to use for connecting to proxy servers. + */ + @JsonProperty(value = "trustedCa") + 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 effectiveNoProxy property: A read-only list of all endpoints for which traffic should not be sent to the + * proxy. This list is a superset of noProxy and values injected by AKS. + * + * @return the effectiveNoProxy value. + */ + public List effectiveNoProxy() { + return this.effectiveNoProxy; + } + + /** + * 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterIdentity.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterIdentity.java new file mode 100644 index 0000000000000..2fc642cd25b8b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterIdentity.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * Identity for the managed cluster. + */ +@Fluent +public final class ManagedClusterIdentity { + /* + * The principal id of the system assigned identity which is used by master components. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /* + * The tenant id of the system assigned identity which is used by master components. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + 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). + */ + @JsonProperty(value = "type") + 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. + */ + @JsonProperty(value = "delegatedResources") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map delegatedResources; + + /* + * The keys must be ARM resource IDs in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/ + * userAssignedIdentities/{identityName}'. + */ + @JsonProperty(value = "userAssignedIdentities") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + 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 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 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(); + } + }); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterIngressProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterIngressProfile.java new file mode 100644 index 0000000000000..fb8581ecbb4e1 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterIngressProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Ingress profile for the container service cluster. + */ +@Fluent +public final class ManagedClusterIngressProfile { + /* + * Web App Routing settings for the ingress profile. + */ + @JsonProperty(value = "webAppRouting") + private ManagedClusterIngressProfileWebAppRouting webAppRouting; + + /** + * Creates an instance of ManagedClusterIngressProfile class. + */ + public ManagedClusterIngressProfile() { + } + + /** + * Get the webAppRouting property: Web App Routing settings for the ingress profile. + * + * @return the webAppRouting value. + */ + public ManagedClusterIngressProfileWebAppRouting webAppRouting() { + return this.webAppRouting; + } + + /** + * Set the webAppRouting property: Web App Routing settings for the ingress profile. + * + * @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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterIngressProfileWebAppRouting.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterIngressProfileWebAppRouting.java new file mode 100644 index 0000000000000..8887be0292fa2 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterIngressProfileWebAppRouting.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Web App Routing settings for the ingress profile. + */ +@Fluent +public final class ManagedClusterIngressProfileWebAppRouting { + /* + * Whether to enable Web App Routing. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * Resource IDs of the DNS zones to be associated with the Web App Routing add-on. Used only when Web App Routing + * 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. + */ + @JsonProperty(value = "dnsZoneResourceIds") + private List dnsZoneResourceIds; + + /* + * Managed identity of the Web 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. + */ + @JsonProperty(value = "identity", access = JsonProperty.Access.WRITE_ONLY) + private UserAssignedIdentity identity; + + /** + * Creates an instance of ManagedClusterIngressProfileWebAppRouting class. + */ + public ManagedClusterIngressProfileWebAppRouting() { + } + + /** + * Get the enabled property: Whether to enable Web App Routing. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Web App Routing. + * + * @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 Web App Routing + * add-on. Used only when Web App Routing 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 Web App Routing + * add-on. Used only when Web App Routing 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 identity property: Managed identity of the Web 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 (identity() != null) { + identity().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterListResult.java new file mode 100644 index 0000000000000..a2f4e22be6eff --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterListResult.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response from the List Managed Clusters operation. + */ +@Fluent +public final class ManagedClusterListResult { + /* + * The list of managed clusters. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next set of managed cluster results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfile.java new file mode 100644 index 0000000000000..5750412e74447 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfile.java @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Profile of the managed cluster load balancer. + */ +@Fluent +public final class ManagedClusterLoadBalancerProfile { + /* + * Desired managed outbound IPs for the cluster load balancer. + */ + @JsonProperty(value = "managedOutboundIPs") + private ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIPs; + + /* + * Desired outbound IP Prefix resources for the cluster load balancer. + */ + @JsonProperty(value = "outboundIPPrefixes") + private ManagedClusterLoadBalancerProfileOutboundIpPrefixes outboundIpPrefixes; + + /* + * Desired outbound IP resources for the cluster load balancer. + */ + @JsonProperty(value = "outboundIPs") + private ManagedClusterLoadBalancerProfileOutboundIPs outboundIPs; + + /* + * The effective outbound IP resources of the cluster load balancer. + */ + @JsonProperty(value = "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 default value is 0 which results in Azure dynamically allocating ports. + */ + @JsonProperty(value = "allocatedOutboundPorts") + 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. + */ + @JsonProperty(value = "idleTimeoutInMinutes") + private Integer idleTimeoutInMinutes; + + /* + * Enable multiple standard load balancers per AKS cluster or not. + */ + @JsonProperty(value = "enableMultipleStandardLoadBalancers") + private Boolean enableMultipleStandardLoadBalancers; + + /* + * The type of the managed inbound Load Balancer BackendPool. + */ + @JsonProperty(value = "backendPoolType") + 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; + } + + /** + * Set the effectiveOutboundIPs property: The effective outbound IP resources of the cluster load balancer. + * + * @param effectiveOutboundIPs the effectiveOutboundIPs value to set. + * @return the ManagedClusterLoadBalancerProfile object itself. + */ + public ManagedClusterLoadBalancerProfile withEffectiveOutboundIPs(List effectiveOutboundIPs) { + this.effectiveOutboundIPs = effectiveOutboundIPs; + return this; + } + + /** + * 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java new file mode 100644 index 0000000000000..c8e2791954045 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Desired managed outbound IPs for the cluster load balancer. + */ +@Fluent +public final class ManagedClusterLoadBalancerProfileManagedOutboundIPs { + /* + * 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. + */ + @JsonProperty(value = "count") + 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. + */ + @JsonProperty(value = "countIPv6") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileOutboundIPs.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileOutboundIPs.java new file mode 100644 index 0000000000000..c27527c07af77 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileOutboundIPs.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Desired outbound IP resources for the cluster load balancer. + */ +@Fluent +public final class ManagedClusterLoadBalancerProfileOutboundIPs { + /* + * A list of public IP resources. + */ + @JsonProperty(value = "publicIPs") + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java new file mode 100644 index 0000000000000..ac60b88c10a2d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Desired outbound IP Prefix resources for the cluster load balancer. + */ +@Fluent +public final class ManagedClusterLoadBalancerProfileOutboundIpPrefixes { + /* + * A list of public IP prefix resources. + */ + @JsonProperty(value = "publicIPPrefixes") + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterManagedOutboundIpProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterManagedOutboundIpProfile.java new file mode 100644 index 0000000000000..2a8e7d67fbb88 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterManagedOutboundIpProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Profile of the managed outbound IP resources of the managed cluster. + */ +@Fluent +public final class ManagedClusterManagedOutboundIpProfile { + /* + * 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. + */ + @JsonProperty(value = "count") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterMetricsProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterMetricsProfile.java new file mode 100644 index 0000000000000..27249b9a37c3e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterMetricsProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The metrics profile for the ManagedCluster. + */ +@Fluent +public final class ManagedClusterMetricsProfile { + /* + * The cost analysis configuration for the cluster + */ + @JsonProperty(value = "costAnalysis") + private ManagedClusterCostAnalysis costAnalysis; + + /** + * Creates an instance of ManagedClusterMetricsProfile class. + */ + public ManagedClusterMetricsProfile() { + } + + /** + * Get the costAnalysis property: The cost analysis configuration for the cluster. + * + * @return the costAnalysis value. + */ + public ManagedClusterCostAnalysis costAnalysis() { + return this.costAnalysis; + } + + /** + * Set the costAnalysis property: The cost analysis configuration for the cluster. + * + * @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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterNatGatewayProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterNatGatewayProfile.java new file mode 100644 index 0000000000000..822d5fe1a4386 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterNatGatewayProfile.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Profile of the managed cluster NAT gateway. + */ +@Fluent +public final class ManagedClusterNatGatewayProfile { + /* + * Profile of the managed outbound IP resources of the cluster NAT gateway. + */ + @JsonProperty(value = "managedOutboundIPProfile") + private ManagedClusterManagedOutboundIpProfile managedOutboundIpProfile; + + /* + * The effective outbound IP resources of the cluster NAT gateway. + */ + @JsonProperty(value = "effectiveOutboundIPs") + 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. + */ + @JsonProperty(value = "idleTimeoutInMinutes") + 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; + } + + /** + * Set the effectiveOutboundIPs property: The effective outbound IP resources of the cluster NAT gateway. + * + * @param effectiveOutboundIPs the effectiveOutboundIPs value to set. + * @return the ManagedClusterNatGatewayProfile object itself. + */ + public ManagedClusterNatGatewayProfile withEffectiveOutboundIPs(List effectiveOutboundIPs) { + this.effectiveOutboundIPs = effectiveOutboundIPs; + 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 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterNodeProvisioningProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterNodeProvisioningProfile.java new file mode 100644 index 0000000000000..50309d1b551b9 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterNodeProvisioningProfile.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ManagedClusterNodeProvisioningProfile model. + */ +@Fluent +public final class ManagedClusterNodeProvisioningProfile { + /* + * The node provisioning mode. If not specified, the default is Manual. + * + * Once the mode it set to Auto, it cannot be changed back to Manual. + */ + @JsonProperty(value = "mode") + private NodeProvisioningMode mode; + + /** + * Creates an instance of ManagedClusterNodeProvisioningProfile class. + */ + public ManagedClusterNodeProvisioningProfile() { + } + + /** + * Get the mode property: The node provisioning mode. If not specified, the default is Manual. + * + * Once the mode it set to Auto, it cannot be changed back to 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. + * + * Once the mode it set to Auto, it cannot be changed back to Manual. + * + * @param mode the mode value to set. + * @return the ManagedClusterNodeProvisioningProfile object itself. + */ + public ManagedClusterNodeProvisioningProfile withMode(NodeProvisioningMode mode) { + this.mode = mode; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterNodeResourceGroupProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterNodeResourceGroupProfile.java new file mode 100644 index 0000000000000..5b8251e37549d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterNodeResourceGroupProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Node resource group lockdown profile for a managed cluster. + */ +@Fluent +public final class ManagedClusterNodeResourceGroupProfile { + /* + * The restriction level applied to the cluster's node resource group + */ + @JsonProperty(value = "restrictionLevel") + 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. + * + * @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. + * + * @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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterOidcIssuerProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterOidcIssuerProfile.java new file mode 100644 index 0000000000000..1f123f816dea0 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterOidcIssuerProfile.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The OIDC issuer profile of the Managed Cluster. + */ +@Fluent +public final class ManagedClusterOidcIssuerProfile { + /* + * The OIDC issuer url of the Managed Cluster. + */ + @JsonProperty(value = "issuerURL", access = JsonProperty.Access.WRITE_ONLY) + private String issuerUrl; + + /* + * Whether the OIDC issuer is enabled. + */ + @JsonProperty(value = "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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentity.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentity.java new file mode 100644 index 0000000000000..03221b2166a3e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentity.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details about the pod identity assigned to the Managed Cluster. + */ +@Fluent +public final class ManagedClusterPodIdentity { + /* + * The name of the pod identity. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The namespace of the pod identity. + */ + @JsonProperty(value = "namespace", required = true) + private String namespace; + + /* + * The binding selector to use for the AzureIdentityBinding resource. + */ + @JsonProperty(value = "bindingSelector") + private String bindingSelector; + + /* + * The user assigned identity details. + */ + @JsonProperty(value = "identity", required = true) + private UserAssignedIdentity identity; + + /* + * The current provisioning state of the pod identity. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ManagedClusterPodIdentityProvisioningState provisioningState; + + /* + * The provisioningInfo property. + */ + @JsonProperty(value = "provisioningInfo", access = JsonProperty.Access.WRITE_ONLY) + 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.logExceptionAsError( + new IllegalArgumentException("Missing required property name in model ManagedClusterPodIdentity")); + } + if (namespace() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property namespace in model ManagedClusterPodIdentity")); + } + if (identity() == null) { + throw LOGGER.logExceptionAsError( + 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); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityException.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityException.java new file mode 100644 index 0000000000000..b080b8925c11d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityException.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +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 { + /* + * The name of the pod identity exception. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The namespace of the pod identity exception. + */ + @JsonProperty(value = "namespace", required = true) + private String namespace; + + /* + * The pod labels to match. + */ + @JsonProperty(value = "podLabels", required = true) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + 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.logExceptionAsError(new IllegalArgumentException( + "Missing required property name in model ManagedClusterPodIdentityException")); + } + if (namespace() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property namespace in model ManagedClusterPodIdentityException")); + } + if (podLabels() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property podLabels in model ManagedClusterPodIdentityException")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterPodIdentityException.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProfile.java new file mode 100644 index 0000000000000..da65fe59ade89 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProfile.java @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +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 { + /* + * Whether the pod identity addon is enabled. + */ + @JsonProperty(value = "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. + */ + @JsonProperty(value = "allowNetworkPluginKubenet") + private Boolean allowNetworkPluginKubenet; + + /* + * The pod identities to use in the cluster. + */ + @JsonProperty(value = "userAssignedIdentities") + private List userAssignedIdentities; + + /* + * The pod identity exceptions to allow. + */ + @JsonProperty(value = "userAssignedIdentityExceptions") + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningError.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningError.java new file mode 100644 index 0000000000000..7dda34ba93def --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningError.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An error response from the pod identity provisioning. + */ +@Fluent +public final class ManagedClusterPodIdentityProvisioningError { + /* + * Details about the error. + */ + @JsonProperty(value = "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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningErrorBody.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningErrorBody.java new file mode 100644 index 0000000000000..de87aef1cc69a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningErrorBody.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * An error response from the pod identity provisioning. + */ +@Fluent +public final class ManagedClusterPodIdentityProvisioningErrorBody { + /* + * An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + */ + @JsonProperty(value = "code") + private String code; + + /* + * A message describing the error, intended to be suitable for display in a user interface. + */ + @JsonProperty(value = "message") + private String message; + + /* + * The target of the particular error. For example, the name of the property in error. + */ + @JsonProperty(value = "target") + private String target; + + /* + * A list of additional details about the error. + */ + @JsonProperty(value = "details") + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningInfo.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningInfo.java new file mode 100644 index 0000000000000..dd8521eabb32b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningInfo.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ManagedClusterPodIdentityProvisioningInfo model. + */ +@Fluent +public final class ManagedClusterPodIdentityProvisioningInfo { + /* + * Pod identity assignment error (if any). + */ + @JsonProperty(value = "error") + 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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningState.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningState.java new file mode 100644 index 0000000000000..34952ad3d911b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPodIdentityProvisioningState.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPoolUpgradeProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPoolUpgradeProfile.java new file mode 100644 index 0000000000000..0cea0dd64ae31 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPoolUpgradeProfile.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The list of available upgrade versions. + */ +@Fluent +public final class ManagedClusterPoolUpgradeProfile { + /* + * The Kubernetes version (major.minor.patch). + */ + @JsonProperty(value = "kubernetesVersion", required = true) + private String kubernetesVersion; + + /* + * The Agent Pool name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + */ + @JsonProperty(value = "osType", required = true) + private OSType osType; + + /* + * List of orchestrator types and versions available for upgrade. + */ + @JsonProperty(value = "upgrades") + 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.logExceptionAsError(new IllegalArgumentException( + "Missing required property kubernetesVersion in model ManagedClusterPoolUpgradeProfile")); + } + if (osType() == null) { + throw LOGGER.logExceptionAsError(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); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java new file mode 100644 index 0000000000000..ba2ec896f5a2a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPoolUpgradeProfileUpgradesItem.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ManagedClusterPoolUpgradeProfileUpgradesItem model. + */ +@Fluent +public final class ManagedClusterPoolUpgradeProfileUpgradesItem { + /* + * The Kubernetes version (major.minor.patch). + */ + @JsonProperty(value = "kubernetesVersion") + private String kubernetesVersion; + + /* + * Whether the Kubernetes version is currently in preview. + */ + @JsonProperty(value = "isPreview") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPropertiesAutoScalerProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPropertiesAutoScalerProfile.java new file mode 100644 index 0000000000000..c3eb971a39b49 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPropertiesAutoScalerProfile.java @@ -0,0 +1,734 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters to be applied to the cluster-autoscaler when enabled. + */ +@Fluent +public final class ManagedClusterPropertiesAutoScalerProfile { + /* + * Detects similar node pools and balances the number of nodes between them. + * + * Valid values are 'true' and 'false' + */ + @JsonProperty(value = "balance-similar-node-groups") + 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. + */ + @JsonProperty(value = "daemonset-eviction-for-empty-nodes") + 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. + */ + @JsonProperty(value = "daemonset-eviction-for-occupied-nodes") + 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. + */ + @JsonProperty(value = "ignore-daemonsets-utilization") + private Boolean ignoreDaemonsetsUtilization; + + /* + * The expander to use when scaling up + * + * Available values are: 'least-waste', 'most-pods', 'priority', 'random'. + */ + @JsonProperty(value = "expander") + 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. + */ + @JsonProperty(value = "max-empty-bulk-delete") + 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. + */ + @JsonProperty(value = "max-graceful-termination-sec") + 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. + */ + @JsonProperty(value = "max-node-provision-time") + 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. + */ + @JsonProperty(value = "max-total-unready-percentage") + 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). + */ + @JsonProperty(value = "new-pod-scale-up-delay") + private String newPodScaleUpDelay; + + /* + * The number of allowed unready nodes, irrespective of max-total-unready-percentage. + * + * This must be an integer. The default is 3. + */ + @JsonProperty(value = "ok-total-unready-count") + 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. + */ + @JsonProperty(value = "scan-interval") + 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. + */ + @JsonProperty(value = "scale-down-delay-after-add") + 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. + */ + @JsonProperty(value = "scale-down-delay-after-delete") + 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. + */ + @JsonProperty(value = "scale-down-delay-after-failure") + 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. + */ + @JsonProperty(value = "scale-down-unneeded-time") + 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. + */ + @JsonProperty(value = "scale-down-unready-time") + 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'. + */ + @JsonProperty(value = "scale-down-utilization-threshold") + private String scaleDownUtilizationThreshold; + + /* + * If cluster autoscaler will skip deleting nodes with pods with local storage, for example, EmptyDir or HostPath. + * + * The default is true. + */ + @JsonProperty(value = "skip-nodes-with-local-storage") + 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. + */ + @JsonProperty(value = "skip-nodes-with-system-pods") + 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 + * + * Available values are: 'least-waste', 'most-pods', 'priority', 'random'. + * + * @return the expander value. + */ + public Expander expander() { + return this.expander; + } + + /** + * Set the expander property: The expander to use when scaling up + * + * Available values are: 'least-waste', 'most-pods', 'priority', 'random'. + * + * @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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPropertiesForSnapshot.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPropertiesForSnapshot.java new file mode 100644 index 0000000000000..96321fb32b00d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterPropertiesForSnapshot.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * managed cluster properties for snapshot, these properties are read only. + */ +@Fluent +public final class ManagedClusterPropertiesForSnapshot { + /* + * The current kubernetes version. + */ + @JsonProperty(value = "kubernetesVersion") + private String kubernetesVersion; + + /* + * The current managed cluster sku. + */ + @JsonProperty(value = "sku") + private ManagedClusterSku sku; + + /* + * Whether the cluster has enabled Kubernetes Role-Based Access Control or not. + */ + @JsonProperty(value = "enableRbac") + private Boolean enableRbac; + + /* + * The current network profile. + */ + @JsonProperty(value = "networkProfile", access = JsonProperty.Access.WRITE_ONLY) + private NetworkProfileForSnapshot networkProfile; + + /** + * Creates an instance of ManagedClusterPropertiesForSnapshot class. + */ + public ManagedClusterPropertiesForSnapshot() { + } + + /** + * Get the kubernetesVersion property: The current kubernetes version. + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set the kubernetesVersion property: The current kubernetes version. + * + * @param kubernetesVersion the kubernetesVersion value to set. + * @return the ManagedClusterPropertiesForSnapshot object itself. + */ + public ManagedClusterPropertiesForSnapshot withKubernetesVersion(String kubernetesVersion) { + this.kubernetesVersion = kubernetesVersion; + return this; + } + + /** + * Get the sku property: The current managed cluster sku. + * + * @return the sku value. + */ + public ManagedClusterSku sku() { + return this.sku; + } + + /** + * Set the sku property: The current managed cluster sku. + * + * @param sku the sku value to set. + * @return the ManagedClusterPropertiesForSnapshot object itself. + */ + public ManagedClusterPropertiesForSnapshot withSku(ManagedClusterSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the enableRbac property: Whether the cluster has enabled Kubernetes Role-Based Access Control or not. + * + * @return the enableRbac value. + */ + public Boolean enableRbac() { + return this.enableRbac; + } + + /** + * Set the enableRbac property: Whether the cluster has enabled Kubernetes Role-Based Access Control or not. + * + * @param enableRbac the enableRbac value to set. + * @return the ManagedClusterPropertiesForSnapshot object itself. + */ + public ManagedClusterPropertiesForSnapshot withEnableRbac(Boolean enableRbac) { + this.enableRbac = enableRbac; + return this; + } + + /** + * Get the networkProfile property: The current network profile. + * + * @return the networkProfile value. + */ + public NetworkProfileForSnapshot networkProfile() { + return this.networkProfile; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sku() != null) { + sku().validate(); + } + if (networkProfile() != null) { + networkProfile().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfile.java new file mode 100644 index 0000000000000..85cfff4dc588f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfile.java @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Security profile for the container service cluster. + */ +@Fluent +public final class ManagedClusterSecurityProfile { + /* + * Microsoft Defender settings for the security profile. + */ + @JsonProperty(value = "defender") + private ManagedClusterSecurityProfileDefender defender; + + /* + * Azure Key Vault [key management service](https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/) + * settings for the security profile. + */ + @JsonProperty(value = "azureKeyVaultKms") + 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. + */ + @JsonProperty(value = "workloadIdentity") + private ManagedClusterSecurityProfileWorkloadIdentity workloadIdentity; + + /* + * Image Cleaner settings for the security profile. + */ + @JsonProperty(value = "imageCleaner") + private ManagedClusterSecurityProfileImageCleaner imageCleaner; + + /* + * Image integrity is a feature that works with Azure Policy to verify image integrity by signature. This will not + * have any effect unless Azure Policy is applied to enforce image signatures. See + * https://aka.ms/aks/image-integrity for how to use this feature via policy. + */ + @JsonProperty(value = "imageIntegrity") + private ManagedClusterSecurityProfileImageIntegrity imageIntegrity; + + /* + * [Node + * Restriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) + * settings for the security profile. + */ + @JsonProperty(value = "nodeRestriction") + private ManagedClusterSecurityProfileNodeRestriction nodeRestriction; + + /* + * The list of base64 encoded certificate strings that will be added to the node trust store. At most 10 strings + * can be provided. + * + * A list of up to 10 base64 encoded CAs that will be added to the trust store on nodes with the Custom CA Trust + * feature enabled. For more information see [Custom CA Trust + * Certificates](https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority) + */ + @JsonProperty(value = "customCATrustCertificates") + 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 imageIntegrity property: Image integrity is a feature that works with Azure Policy to verify image + * integrity by signature. This will not have any effect unless Azure Policy is applied to enforce image + * signatures. See https://aka.ms/aks/image-integrity for how to use this feature via policy. + * + * @return the imageIntegrity value. + */ + public ManagedClusterSecurityProfileImageIntegrity imageIntegrity() { + return this.imageIntegrity; + } + + /** + * Set the imageIntegrity property: Image integrity is a feature that works with Azure Policy to verify image + * integrity by signature. This will not have any effect unless Azure Policy is applied to enforce image + * signatures. See https://aka.ms/aks/image-integrity for how to use this feature via policy. + * + * @param imageIntegrity the imageIntegrity value to set. + * @return the ManagedClusterSecurityProfile object itself. + */ + public ManagedClusterSecurityProfile + withImageIntegrity(ManagedClusterSecurityProfileImageIntegrity imageIntegrity) { + this.imageIntegrity = imageIntegrity; + return this; + } + + /** + * Get the nodeRestriction property: [Node + * Restriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) + * settings for the security profile. + * + * @return the nodeRestriction value. + */ + public ManagedClusterSecurityProfileNodeRestriction nodeRestriction() { + return this.nodeRestriction; + } + + /** + * Set the nodeRestriction property: [Node + * Restriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) + * settings for the security profile. + * + * @param nodeRestriction the nodeRestriction value to set. + * @return the ManagedClusterSecurityProfile object itself. + */ + public ManagedClusterSecurityProfile + withNodeRestriction(ManagedClusterSecurityProfileNodeRestriction nodeRestriction) { + this.nodeRestriction = nodeRestriction; + return this; + } + + /** + * Get the customCATrustCertificates property: The list of base64 encoded certificate strings that will be added to + * the node trust store. At most 10 strings can be provided. + * + * A list of up to 10 base64 encoded CAs that will be added to the trust store on nodes with the Custom CA Trust + * feature enabled. 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: The list of base64 encoded certificate strings that will be added to + * the node trust store. At most 10 strings can be provided. + * + * A list of up to 10 base64 encoded CAs that will be added to the trust store on nodes with the Custom CA Trust + * feature enabled. 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(); + } + if (imageIntegrity() != null) { + imageIntegrity().validate(); + } + if (nodeRestriction() != null) { + nodeRestriction().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileDefender.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileDefender.java new file mode 100644 index 0000000000000..17d98e0ef550e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileDefender.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Microsoft Defender settings for the security profile. + */ +@Fluent +public final class ManagedClusterSecurityProfileDefender { + /* + * 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. + */ + @JsonProperty(value = "logAnalyticsWorkspaceResourceId") + private String logAnalyticsWorkspaceResourceId; + + /* + * Microsoft Defender threat detection for Cloud settings for the security profile. + */ + @JsonProperty(value = "securityMonitoring") + 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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java new file mode 100644 index 0000000000000..c9207c5e41aaa --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Microsoft Defender settings for the security profile threat detection. + */ +@Fluent +public final class ManagedClusterSecurityProfileDefenderSecurityMonitoring { + /* + * Whether to enable Defender threat detection + */ + @JsonProperty(value = "enabled") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileImageCleaner.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileImageCleaner.java new file mode 100644 index 0000000000000..d34e30cf0932c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileImageCleaner.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * 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 { + /* + * Whether to enable Image Cleaner on AKS cluster. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * Image Cleaner scanning interval in hours. + */ + @JsonProperty(value = "intervalHours") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileImageIntegrity.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileImageIntegrity.java new file mode 100644 index 0000000000000..a036424645174 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileImageIntegrity.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Image integrity related settings for the security profile. + */ +@Fluent +public final class ManagedClusterSecurityProfileImageIntegrity { + /* + * Whether to enable image integrity. The default value is false. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterSecurityProfileImageIntegrity class. + */ + public ManagedClusterSecurityProfileImageIntegrity() { + } + + /** + * Get the enabled property: Whether to enable image integrity. The default value is false. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable image integrity. The default value is false. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterSecurityProfileImageIntegrity object itself. + */ + public ManagedClusterSecurityProfileImageIntegrity withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileNodeRestriction.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileNodeRestriction.java new file mode 100644 index 0000000000000..2d1f6c7a22390 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileNodeRestriction.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Node Restriction settings for the security profile. + */ +@Fluent +public final class ManagedClusterSecurityProfileNodeRestriction { + /* + * Whether to enable Node Restriction + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterSecurityProfileNodeRestriction class. + */ + public ManagedClusterSecurityProfileNodeRestriction() { + } + + /** + * Get the enabled property: Whether to enable Node Restriction. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Node Restriction. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterSecurityProfileNodeRestriction object itself. + */ + public ManagedClusterSecurityProfileNodeRestriction withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileWorkloadIdentity.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileWorkloadIdentity.java new file mode 100644 index 0000000000000..83059571c9f36 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSecurityProfileWorkloadIdentity.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Workload identity settings for the security profile. + */ +@Fluent +public final class ManagedClusterSecurityProfileWorkloadIdentity { + /* + * Whether to enable workload identity. + */ + @JsonProperty(value = "enabled") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterServicePrincipalProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterServicePrincipalProfile.java new file mode 100644 index 0000000000000..375674551ab8a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterServicePrincipalProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about a service principal identity for the cluster to use for manipulating Azure APIs. + */ +@Fluent +public final class ManagedClusterServicePrincipalProfile { + /* + * The ID for the service principal. + */ + @JsonProperty(value = "clientId", required = true) + private String clientId; + + /* + * The secret password associated with the service principal in plain text. + */ + @JsonProperty(value = "secret") + 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.logExceptionAsError(new IllegalArgumentException( + "Missing required property clientId in model ManagedClusterServicePrincipalProfile")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterServicePrincipalProfile.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSku.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSku.java new file mode 100644 index 0000000000000..a27f1e194dd00 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSku.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The SKU of a Managed Cluster. + */ +@Fluent +public final class ManagedClusterSku { + /* + * The name of a managed cluster SKU. + */ + @JsonProperty(value = "name") + 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. + */ + @JsonProperty(value = "tier") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSkuName.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSkuName.java new file mode 100644 index 0000000000000..552ddf8c7e95e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSkuName.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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"); + + /** + * 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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSkuTier.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSkuTier.java new file mode 100644 index 0000000000000..42f8051d0f2f5 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSkuTier.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSnapshot.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSnapshot.java new file mode 100644 index 0000000000000..e74401bba174e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSnapshot.java @@ -0,0 +1,285 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterSnapshotInner; +import java.util.Map; + +/** + * An immutable client-side representation of ManagedClusterSnapshot. + */ +public interface ManagedClusterSnapshot { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the creationData property: CreationData to be used to specify the source resource ID to create this + * snapshot. + * + * @return the creationData value. + */ + CreationData creationData(); + + /** + * Gets the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @return the snapshotType value. + */ + SnapshotType snapshotType(); + + /** + * Gets the managedClusterPropertiesReadOnly property: What the properties will be showed when getting managed + * cluster snapshot. Those properties are read-only. + * + * @return the managedClusterPropertiesReadOnly value. + */ + ManagedClusterPropertiesForSnapshot managedClusterPropertiesReadOnly(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterSnapshotInner + * object. + * + * @return the inner object. + */ + ManagedClusterSnapshotInner innerModel(); + + /** + * The entirety of the ManagedClusterSnapshot definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The ManagedClusterSnapshot definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ManagedClusterSnapshot definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ManagedClusterSnapshot definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the ManagedClusterSnapshot definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the ManagedClusterSnapshot definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithCreationData, DefinitionStages.WithSnapshotType { + /** + * Executes the create request. + * + * @return the created resource. + */ + ManagedClusterSnapshot create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ManagedClusterSnapshot create(Context context); + } + + /** + * The stage of the ManagedClusterSnapshot definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the ManagedClusterSnapshot definition allowing to specify creationData. + */ + interface WithCreationData { + /** + * Specifies the creationData property: CreationData to be used to specify the source resource ID to create + * this snapshot.. + * + * @param creationData CreationData to be used to specify the source resource ID to create this snapshot. + * @return the next definition stage. + */ + WithCreate withCreationData(CreationData creationData); + } + + /** + * The stage of the ManagedClusterSnapshot definition allowing to specify snapshotType. + */ + interface WithSnapshotType { + /** + * Specifies the snapshotType property: The type of a snapshot. The default is NodePool.. + * + * @param snapshotType The type of a snapshot. The default is NodePool. + * @return the next definition stage. + */ + WithCreate withSnapshotType(SnapshotType snapshotType); + } + } + + /** + * Begins update for the ManagedClusterSnapshot resource. + * + * @return the stage of resource update. + */ + ManagedClusterSnapshot.Update update(); + + /** + * The template for ManagedClusterSnapshot update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ManagedClusterSnapshot apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ManagedClusterSnapshot apply(Context context); + } + + /** + * The ManagedClusterSnapshot update stages. + */ + interface UpdateStages { + /** + * The stage of the ManagedClusterSnapshot update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ManagedClusterSnapshot refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ManagedClusterSnapshot refresh(Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSnapshotListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSnapshotListResult.java new file mode 100644 index 0000000000000..aee0f5113bf25 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSnapshotListResult.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterSnapshotInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response from the List Managed Cluster Snapshots operation. + */ +@Fluent +public final class ManagedClusterSnapshotListResult { + /* + * The list of managed cluster snapshots. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next set of managed cluster snapshot results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of ManagedClusterSnapshotListResult class. + */ + public ManagedClusterSnapshotListResult() { + } + + /** + * Get the value property: The list of managed cluster snapshots. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of managed cluster snapshots. + * + * @param value the value value to set. + * @return the ManagedClusterSnapshotListResult object itself. + */ + public ManagedClusterSnapshotListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of managed cluster 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSnapshots.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSnapshots.java new file mode 100644 index 0000000000000..ee78d48b738ca --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterSnapshots.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ManagedClusterSnapshots. + */ +public interface ManagedClusterSnapshots { + /** + * Gets a list of managed cluster 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 managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Gets a list of managed cluster 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 managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Lists managed cluster 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 Managed Cluster Snapshots operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists managed cluster 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 Managed Cluster Snapshots operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets a managed cluster 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 managed cluster snapshot along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context); + + /** + * Gets a managed cluster 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 managed cluster snapshot. + */ + ManagedClusterSnapshot getByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Deletes a managed cluster 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}. + */ + Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); + + /** + * Deletes a managed cluster 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. + */ + void deleteByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Gets a managed cluster snapshot. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot along with {@link Response}. + */ + ManagedClusterSnapshot getById(String id); + + /** + * Gets a managed cluster snapshot. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a managed cluster snapshot. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes a managed cluster snapshot. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ManagedClusterSnapshot resource. + * + * @param name resource name. + * @return the first stage of the new ManagedClusterSnapshot definition. + */ + ManagedClusterSnapshot.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfile.java new file mode 100644 index 0000000000000..26598cb63ced6 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfile.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Storage profile for the container service cluster. + */ +@Fluent +public final class ManagedClusterStorageProfile { + /* + * AzureDisk CSI Driver settings for the storage profile. + */ + @JsonProperty(value = "diskCSIDriver") + private ManagedClusterStorageProfileDiskCsiDriver diskCsiDriver; + + /* + * AzureFile CSI Driver settings for the storage profile. + */ + @JsonProperty(value = "fileCSIDriver") + private ManagedClusterStorageProfileFileCsiDriver fileCsiDriver; + + /* + * Snapshot Controller settings for the storage profile. + */ + @JsonProperty(value = "snapshotController") + private ManagedClusterStorageProfileSnapshotController snapshotController; + + /* + * AzureBlob CSI Driver settings for the storage profile. + */ + @JsonProperty(value = "blobCSIDriver") + 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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileBlobCsiDriver.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileBlobCsiDriver.java new file mode 100644 index 0000000000000..bedf5242971a6 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileBlobCsiDriver.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * AzureBlob CSI Driver settings for the storage profile. + */ +@Fluent +public final class ManagedClusterStorageProfileBlobCsiDriver { + /* + * Whether to enable AzureBlob CSI Driver. The default value is false. + */ + @JsonProperty(value = "enabled") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileDiskCsiDriver.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileDiskCsiDriver.java new file mode 100644 index 0000000000000..8890607adf011 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileDiskCsiDriver.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * AzureDisk CSI Driver settings for the storage profile. + */ +@Fluent +public final class ManagedClusterStorageProfileDiskCsiDriver { + /* + * Whether to enable AzureDisk CSI Driver. The default value is true. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * The version of AzureDisk CSI Driver. The default value is v1. + */ + @JsonProperty(value = "version") + private String version; + + /** + * 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; + } + + /** + * Get the version property: The version of AzureDisk CSI Driver. The default value is v1. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: The version of AzureDisk CSI Driver. The default value is v1. + * + * @param version the version value to set. + * @return the ManagedClusterStorageProfileDiskCsiDriver object itself. + */ + public ManagedClusterStorageProfileDiskCsiDriver withVersion(String version) { + this.version = version; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileFileCsiDriver.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileFileCsiDriver.java new file mode 100644 index 0000000000000..baff0c84f8fb4 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileFileCsiDriver.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * AzureFile CSI Driver settings for the storage profile. + */ +@Fluent +public final class ManagedClusterStorageProfileFileCsiDriver { + /* + * Whether to enable AzureFile CSI Driver. The default value is true. + */ + @JsonProperty(value = "enabled") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileSnapshotController.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileSnapshotController.java new file mode 100644 index 0000000000000..c42f93b976f21 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterStorageProfileSnapshotController.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Snapshot Controller settings for the storage profile. + */ +@Fluent +public final class ManagedClusterStorageProfileSnapshotController { + /* + * Whether to enable Snapshot Controller. The default value is true. + */ + @JsonProperty(value = "enabled") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterUpgradeProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterUpgradeProfile.java new file mode 100644 index 0000000000000..c517b0b641112 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterUpgradeProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterUpgradeProfileInner; +import java.util.List; + +/** + * An immutable client-side representation of ManagedClusterUpgradeProfile. + */ +public interface ManagedClusterUpgradeProfile { + /** + * Gets the id property: The ID of the upgrade profile. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the upgrade profile. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the upgrade profile. + * + * @return the type value. + */ + String type(); + + /** + * Gets the controlPlaneProfile property: The list of available upgrade versions for the control plane. + * + * @return the controlPlaneProfile value. + */ + ManagedClusterPoolUpgradeProfile controlPlaneProfile(); + + /** + * Gets the agentPoolProfiles property: The list of available upgrade versions for agent pools. + * + * @return the agentPoolProfiles value. + */ + List agentPoolProfiles(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterUpgradeProfileInner + * object. + * + * @return the inner object. + */ + ManagedClusterUpgradeProfileInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWindowsProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWindowsProfile.java new file mode 100644 index 0000000000000..dc3b816731660 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWindowsProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Profile for Windows VMs in the managed cluster. + */ +@Fluent +public final class ManagedClusterWindowsProfile { + /* + * 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 + */ + @JsonProperty(value = "adminUsername", required = true) + 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!" + */ + @JsonProperty(value = "adminPassword") + 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. + */ + @JsonProperty(value = "licenseType") + 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). + */ + @JsonProperty(value = "enableCSIProxy") + private Boolean enableCsiProxy; + + /* + * The Windows gMSA Profile in the Managed Cluster. + */ + @JsonProperty(value = "gmsaProfile") + 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.logExceptionAsError(new IllegalArgumentException( + "Missing required property adminUsername in model ManagedClusterWindowsProfile")); + } + if (gmsaProfile() != null) { + gmsaProfile().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterWindowsProfile.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfile.java new file mode 100644 index 0000000000000..c4999e08b6efb --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Workload Auto-scaler profile for the managed cluster. + */ +@Fluent +public final class ManagedClusterWorkloadAutoScalerProfile { + /* + * KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. + */ + @JsonProperty(value = "keda") + private ManagedClusterWorkloadAutoScalerProfileKeda keda; + + /* + * The verticalPodAutoscaler property. + */ + @JsonProperty(value = "verticalPodAutoscaler") + 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: The verticalPodAutoscaler property. + * + * @return the verticalPodAutoscaler value. + */ + public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler verticalPodAutoscaler() { + return this.verticalPodAutoscaler; + } + + /** + * Set the verticalPodAutoscaler property: The verticalPodAutoscaler property. + * + * @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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfileKeda.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfileKeda.java new file mode 100644 index 0000000000000..488d3903ce55f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfileKeda.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. + */ +@Fluent +public final class ManagedClusterWorkloadAutoScalerProfileKeda { + /* + * Whether to enable KEDA. + */ + @JsonProperty(value = "enabled", required = true) + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java new file mode 100644 index 0000000000000..3564c0e358fb4 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler model. + */ +@Fluent +public final class ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler { + /* + * Whether to enable VPA add-on in cluster. Default value is false. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /* + * Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. + */ + @JsonProperty(value = "addonAutoscaling") + private AddonAutoscaling addonAutoscaling; + + /** + * Creates an instance of ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler class. + */ + public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler() { + } + + /** + * Get the enabled property: Whether to enable VPA add-on in cluster. Default value is false. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable VPA add-on in cluster. 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; + } + + /** + * Get the addonAutoscaling property: Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. + * + * @return the addonAutoscaling value. + */ + public AddonAutoscaling addonAutoscaling() { + return this.addonAutoscaling; + } + + /** + * Set the addonAutoscaling property: Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. + * + * @param addonAutoscaling the addonAutoscaling value to set. + * @return the ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler object itself. + */ + public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler + withAddonAutoscaling(AddonAutoscaling addonAutoscaling) { + this.addonAutoscaling = addonAutoscaling; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusters.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusters.java new file mode 100644 index 0000000000000..4f0f147929096 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClusters.java @@ -0,0 +1,906 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ManagedClusters. + */ +public interface ManagedClusters { + /** + * Gets supported OS options in the specified subscription. + * + * @param location The name of the Azure region. + * @param resourceType The resource type for which the OS options 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 supported OS options in the specified subscription along with {@link Response}. + */ + Response getOSOptionsWithResponse(String location, String resourceType, Context context); + + /** + * Gets supported OS options in the specified subscription. + * + * @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 supported OS options in the specified subscription. + */ + OSOptionProfile getOSOptions(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}. + */ + 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. + */ + KubernetesVersionListResult 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 PagedIterable}. + */ + 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}. + */ + 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 PagedIterable}. + */ + 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}. + */ + 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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}. + */ + 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. + */ + ManagedClusterUpgradeProfile 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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}. + */ + 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. + */ + ManagedClusterAccessProfile 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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}. + */ + 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. + */ + CredentialResults 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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}. + */ + 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. + */ + CredentialResults 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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}. + */ + 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. + */ + CredentialResults 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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}. + */ + 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. + */ + ManagedCluster getByResourceGroup(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. + */ + 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 ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String resourceName, Boolean ignorePodDisruptionBudget, 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. + */ + 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. + */ + 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. + */ + 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. + */ + void resetAadProfile(String resourceGroupName, String resourceName, ManagedClusterAadProfile parameters, + 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, an error 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. + */ + 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, an error 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. + */ + void abortLatestOperation(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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + RunCommandResult 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. + */ + RunCommandResult 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + Response 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. + */ + RunCommandResult 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 PagedIterable}. + */ + 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}. + */ + PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, + String resourceName, Context context); + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 Guardrails Version along with {@link Response}. + */ + Response getGuardrailsVersionsWithResponse(String location, String version, + Context context); + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 Guardrails Version. + */ + GuardrailsAvailableVersion getGuardrailsVersions(String location, String version); + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default 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 GuardrailsVersions as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listGuardrailsVersions(String location); + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default 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 GuardrailsVersions as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listGuardrailsVersions(String location, Context context); + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 Safeguards Version along with {@link Response}. + */ + Response getSafeguardsVersionsWithResponse(String location, String version, + Context context); + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 Safeguards Version. + */ + SafeguardsAvailableVersion getSafeguardsVersions(String location, String version); + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default 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 SafeguardsVersions as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listSafeguardsVersions(String location); + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default 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 SafeguardsVersions as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listSafeguardsVersions(String location, 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 PagedIterable}. + */ + 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}. + */ + 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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}. + */ + 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. + */ + MeshRevisionProfile 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 PagedIterable}. + */ + 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}. + */ + 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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}. + */ + 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. + */ + MeshUpgradeProfile getMeshUpgradeProfile(String resourceGroupName, String resourceName, String mode); + + /** + * Gets a managed cluster. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster along with {@link Response}. + */ + ManagedCluster getById(String id); + + /** + * Gets a managed cluster. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a managed cluster. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes a managed cluster. + * + * @param id the resource ID. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Boolean ignorePodDisruptionBudget, Context context); + + /** + * Begins definition for a new ManagedCluster resource. + * + * @param name resource name. + * @return the first stage of the new ManagedCluster definition. + */ + ManagedCluster.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClustersGetCommandResultHeaders.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClustersGetCommandResultHeaders.java new file mode 100644 index 0000000000000..4b22207a67394 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClustersGetCommandResultHeaders.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ManagedClustersGetCommandResultHeaders model. + */ +@Fluent +public final class ManagedClustersGetCommandResultHeaders { + /* + * The Location property. + */ + @JsonProperty(value = "Location") + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClustersGetCommandResultResponse.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedClustersGetCommandResultResponse.java new file mode 100644 index 0000000000000..e3e6d79630348 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedServiceIdentityUserAssignedIdentitiesValue.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedServiceIdentityUserAssignedIdentitiesValue.java new file mode 100644 index 0000000000000..63968004131c4 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManagedServiceIdentityUserAssignedIdentitiesValue.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ManagedServiceIdentityUserAssignedIdentitiesValue model. + */ +@Immutable +public final class ManagedServiceIdentityUserAssignedIdentitiesValue { + /* + * The principal id of user assigned identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /* + * The client id of user assigned identity. + */ + @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManualScaleProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManualScaleProfile.java new file mode 100644 index 0000000000000..b8532236a791c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ManualScaleProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Specifications on number of machines. + */ +@Fluent +public final class ManualScaleProfile { + /* + * The list of allowed vm sizes. AKS will use the first available one when scaling. If a VM size is unavailable + * (e.g. due to quota or regional capacity reasons), AKS will use the next size. + */ + @JsonProperty(value = "sizes") + private List sizes; + + /* + * Number of nodes. + */ + @JsonProperty(value = "count") + private Integer count; + + /** + * Creates an instance of ManualScaleProfile class. + */ + public ManualScaleProfile() { + } + + /** + * Get the sizes property: The list of allowed vm sizes. AKS will use the first available one when scaling. If a VM + * size is unavailable (e.g. due to quota or regional capacity reasons), AKS will use the next size. + * + * @return the sizes value. + */ + public List sizes() { + return this.sizes; + } + + /** + * Set the sizes property: The list of allowed vm sizes. AKS will use the first available one when scaling. If a VM + * size is unavailable (e.g. due to quota or regional capacity reasons), AKS will use the next size. + * + * @param sizes the sizes value to set. + * @return the ManualScaleProfile object itself. + */ + public ManualScaleProfile withSizes(List sizes) { + this.sizes = sizes; + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevision.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevision.java new file mode 100644 index 0000000000000..7f4ec3d5b50a4 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevision.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Holds information on upgrades and compatibility for given major.minor mesh release. + */ +@Fluent +public class MeshRevision { + /* + * The revision of the mesh release. + */ + @JsonProperty(value = "revision") + private String revision; + + /* + * List of revisions available for upgrade of a specific mesh revision + */ + @JsonProperty(value = "upgrades") + private List upgrades; + + /* + * List of items this revision of service mesh is compatible with, and their associated versions. + */ + @JsonProperty(value = "compatibleWith") + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfile.java new file mode 100644 index 0000000000000..bc8f93867508e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshRevisionProfileInner; + +/** + * An immutable client-side representation of MeshRevisionProfile. + */ +public interface MeshRevisionProfile { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: Mesh revision profile properties for a mesh. + * + * @return the properties value. + */ + MeshRevisionProfileProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshRevisionProfileInner + * object. + * + * @return the inner object. + */ + MeshRevisionProfileInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfileList.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfileList.java new file mode 100644 index 0000000000000..4087ce270996f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfileList.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshRevisionProfileInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Holds an array of MeshRevisionsProfiles. + */ +@Fluent +public final class MeshRevisionProfileList { + /* + * Array of service mesh add-on revision profiles for all supported mesh modes. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next set of mesh revision profile. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfileProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfileProperties.java new file mode 100644 index 0000000000000..9774175fc8e2d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshRevisionProfileProperties.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Mesh revision profile properties for a mesh. + */ +@Fluent +public final class MeshRevisionProfileProperties { + /* + * The meshRevisions property. + */ + @JsonProperty(value = "meshRevisions") + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfile.java new file mode 100644 index 0000000000000..63d17bc8708ad --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshUpgradeProfileInner; + +/** + * An immutable client-side representation of MeshUpgradeProfile. + */ +public interface MeshUpgradeProfile { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: Mesh upgrade profile properties for a major.minor release. + * + * @return the properties value. + */ + MeshUpgradeProfileProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshUpgradeProfileInner + * object. + * + * @return the inner object. + */ + MeshUpgradeProfileInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfileList.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfileList.java new file mode 100644 index 0000000000000..99f6d0b5b9674 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfileList.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshUpgradeProfileInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Holds an array of MeshUpgradeProfiles. + */ +@Fluent +public final class MeshUpgradeProfileList { + /* + * Array of supported service mesh add-on upgrade profiles. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next set of mesh upgrade profile. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfileProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfileProperties.java new file mode 100644 index 0000000000000..9b142ab7b1ad1 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/MeshUpgradeProfileProperties.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +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() { + super.validate(); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Mode.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Mode.java new file mode 100644 index 0000000000000..a7c73acb5d1f4 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Mode.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Specify which proxy mode to use ('IPTABLES' or 'IPVS'). + */ +public final class Mode extends ExpandableStringEnum { + /** + * Static value IPTABLES for Mode. + */ + public static final Mode IPTABLES = fromString("IPTABLES"); + + /** + * Static value IPVS for Mode. + */ + public static final Mode IPVS = fromString("IPVS"); + + /** + * Creates a new instance of Mode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Mode() { + } + + /** + * Creates or finds a Mode from its string representation. + * + * @param name a name to look for. + * @return the corresponding Mode. + */ + @JsonCreator + public static Mode fromString(String name) { + return fromString(name, Mode.class); + } + + /** + * Gets known Mode values. + * + * @return known Mode values. + */ + public static Collection values() { + return values(Mode.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkDataplane.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkDataplane.java new file mode 100644 index 0000000000000..d0dc8c2ec1f1c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkDataplane.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkMode.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkMode.java new file mode 100644 index 0000000000000..0d8ac00c6eef8 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkMode.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkMonitoring.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkMonitoring.java new file mode 100644 index 0000000000000..fd3bb5eab2380 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkMonitoring.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * This addon can be used to configure network monitoring and generate network monitoring data in Prometheus format. + */ +@Fluent +public final class NetworkMonitoring { + /* + * Enable or disable the network monitoring plugin on the cluster + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * Creates an instance of NetworkMonitoring class. + */ + public NetworkMonitoring() { + } + + /** + * Get the enabled property: Enable or disable the network monitoring plugin on the cluster. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Enable or disable the network monitoring plugin on the cluster. + * + * @param enabled the enabled value to set. + * @return the NetworkMonitoring object itself. + */ + public NetworkMonitoring withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPlugin.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPlugin.java new file mode 100644 index 0000000000000..0481d71d500c9 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPlugin.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPluginMode.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPluginMode.java new file mode 100644 index 0000000000000..b30c6d5ea81a8 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPluginMode.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPolicy.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPolicy.java new file mode 100644 index 0000000000000..01f2c31ac2d9f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkPolicy.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkProfile.java new file mode 100644 index 0000000000000..9739d0f987c60 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkProfile.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Represents the OpenShift networking configuration. + */ +@Fluent +public final class NetworkProfile { + /* + * CIDR for the OpenShift Vnet. + */ + @JsonProperty(value = "vnetCidr") + private String vnetCidr; + + /* + * CIDR of the Vnet to peer. + */ + @JsonProperty(value = "peerVnetId") + private String peerVnetId; + + /* + * ID of the Vnet created for OSA cluster. + */ + @JsonProperty(value = "vnetId") + private String vnetId; + + /** + * Creates an instance of NetworkProfile class. + */ + public NetworkProfile() { + } + + /** + * Get the vnetCidr property: CIDR for the OpenShift Vnet. + * + * @return the vnetCidr value. + */ + public String vnetCidr() { + return this.vnetCidr; + } + + /** + * Set the vnetCidr property: CIDR for the OpenShift Vnet. + * + * @param vnetCidr the vnetCidr value to set. + * @return the NetworkProfile object itself. + */ + public NetworkProfile withVnetCidr(String vnetCidr) { + this.vnetCidr = vnetCidr; + return this; + } + + /** + * Get the peerVnetId property: CIDR of the Vnet to peer. + * + * @return the peerVnetId value. + */ + public String peerVnetId() { + return this.peerVnetId; + } + + /** + * Set the peerVnetId property: CIDR of the Vnet to peer. + * + * @param peerVnetId the peerVnetId value to set. + * @return the NetworkProfile object itself. + */ + public NetworkProfile withPeerVnetId(String peerVnetId) { + this.peerVnetId = peerVnetId; + return this; + } + + /** + * Get the vnetId property: ID of the Vnet created for OSA cluster. + * + * @return the vnetId value. + */ + public String vnetId() { + return this.vnetId; + } + + /** + * Set the vnetId property: ID of the Vnet created for OSA cluster. + * + * @param vnetId the vnetId value to set. + * @return the NetworkProfile object itself. + */ + public NetworkProfile withVnetId(String vnetId) { + this.vnetId = vnetId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkProfileForSnapshot.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkProfileForSnapshot.java new file mode 100644 index 0000000000000..bf34bb0c02def --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NetworkProfileForSnapshot.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * network profile for managed cluster snapshot, these properties are read only. + */ +@Fluent +public final class NetworkProfileForSnapshot { + /* + * networkPlugin for managed cluster snapshot. + */ + @JsonProperty(value = "networkPlugin") + private NetworkPlugin networkPlugin; + + /* + * NetworkPluginMode for managed cluster snapshot. + */ + @JsonProperty(value = "networkPluginMode") + private NetworkPluginMode networkPluginMode; + + /* + * networkPolicy for managed cluster snapshot. + */ + @JsonProperty(value = "networkPolicy") + private NetworkPolicy networkPolicy; + + /* + * The network mode Azure CNI is configured with. + * + * networkMode for managed cluster snapshot. + */ + @JsonProperty(value = "networkMode") + private NetworkMode networkMode; + + /* + * The load balancer sku for the managed cluster. + * + * loadBalancerSku for managed cluster snapshot. + */ + @JsonProperty(value = "loadBalancerSku") + private LoadBalancerSku loadBalancerSku; + + /** + * Creates an instance of NetworkProfileForSnapshot class. + */ + public NetworkProfileForSnapshot() { + } + + /** + * Get the networkPlugin property: networkPlugin for managed cluster snapshot. + * + * @return the networkPlugin value. + */ + public NetworkPlugin networkPlugin() { + return this.networkPlugin; + } + + /** + * Set the networkPlugin property: networkPlugin for managed cluster snapshot. + * + * @param networkPlugin the networkPlugin value to set. + * @return the NetworkProfileForSnapshot object itself. + */ + public NetworkProfileForSnapshot withNetworkPlugin(NetworkPlugin networkPlugin) { + this.networkPlugin = networkPlugin; + return this; + } + + /** + * Get the networkPluginMode property: NetworkPluginMode for managed cluster snapshot. + * + * @return the networkPluginMode value. + */ + public NetworkPluginMode networkPluginMode() { + return this.networkPluginMode; + } + + /** + * Set the networkPluginMode property: NetworkPluginMode for managed cluster snapshot. + * + * @param networkPluginMode the networkPluginMode value to set. + * @return the NetworkProfileForSnapshot object itself. + */ + public NetworkProfileForSnapshot withNetworkPluginMode(NetworkPluginMode networkPluginMode) { + this.networkPluginMode = networkPluginMode; + return this; + } + + /** + * Get the networkPolicy property: networkPolicy for managed cluster snapshot. + * + * @return the networkPolicy value. + */ + public NetworkPolicy networkPolicy() { + return this.networkPolicy; + } + + /** + * Set the networkPolicy property: networkPolicy for managed cluster snapshot. + * + * @param networkPolicy the networkPolicy value to set. + * @return the NetworkProfileForSnapshot object itself. + */ + public NetworkProfileForSnapshot withNetworkPolicy(NetworkPolicy networkPolicy) { + this.networkPolicy = networkPolicy; + return this; + } + + /** + * Get the networkMode property: The network mode Azure CNI is configured with. + * + * networkMode for managed cluster snapshot. + * + * @return the networkMode value. + */ + public NetworkMode networkMode() { + return this.networkMode; + } + + /** + * Set the networkMode property: The network mode Azure CNI is configured with. + * + * networkMode for managed cluster snapshot. + * + * @param networkMode the networkMode value to set. + * @return the NetworkProfileForSnapshot object itself. + */ + public NetworkProfileForSnapshot withNetworkMode(NetworkMode networkMode) { + this.networkMode = networkMode; + return this; + } + + /** + * Get the loadBalancerSku property: The load balancer sku for the managed cluster. + * + * loadBalancerSku for managed cluster snapshot. + * + * @return the loadBalancerSku value. + */ + public LoadBalancerSku loadBalancerSku() { + return this.loadBalancerSku; + } + + /** + * Set the loadBalancerSku property: The load balancer sku for the managed cluster. + * + * loadBalancerSku for managed cluster snapshot. + * + * @param loadBalancerSku the loadBalancerSku value to set. + * @return the NetworkProfileForSnapshot object itself. + */ + public NetworkProfileForSnapshot withLoadBalancerSku(LoadBalancerSku loadBalancerSku) { + this.loadBalancerSku = loadBalancerSku; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NodeOSUpgradeChannel.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NodeOSUpgradeChannel.java new file mode 100644 index 0000000000000..7a5023859330f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NodeOSUpgradeChannel.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Manner in which the OS on your nodes is updated + * + * The default is Unmanaged, but may change to either NodeImage or SecurityPatch at GA. + */ +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 SecurityPatch for NodeOSUpgradeChannel. + */ + public static final NodeOSUpgradeChannel SECURITY_PATCH = fromString("SecurityPatch"); + + /** + * Static value NodeImage for NodeOSUpgradeChannel. + */ + public static final NodeOSUpgradeChannel NODE_IMAGE = fromString("NodeImage"); + + /** + * 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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NodeProvisioningMode.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NodeProvisioningMode.java new file mode 100644 index 0000000000000..20fbab5fc7c1d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/NodeProvisioningMode.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The node provisioning mode. If not specified, the default is Manual. + * + * Once the mode it set to Auto, it cannot be changed back to 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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSDiskType.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSDiskType.java new file mode 100644 index 0000000000000..d69e5f5ca715f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSDiskType.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSOptionProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSOptionProfile.java new file mode 100644 index 0000000000000..5d4f7b326416b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSOptionProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OSOptionProfileInner; +import java.util.List; + +/** + * An immutable client-side representation of OSOptionProfile. + */ +public interface OSOptionProfile { + /** + * Gets the id property: The ID of the OS option resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the OS option resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the OS option resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the osOptionPropertyList property: The list of OS options. + * + * @return the osOptionPropertyList value. + */ + List osOptionPropertyList(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OSOptionProfileInner + * object. + * + * @return the inner object. + */ + OSOptionProfileInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSOptionProperty.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSOptionProperty.java new file mode 100644 index 0000000000000..3e05264feee1e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSOptionProperty.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * OS option property. + */ +@Fluent +public final class OSOptionProperty { + /* + * The OS type. + */ + @JsonProperty(value = "os-type", required = true) + private String osType; + + /* + * Whether the image is FIPS-enabled. + */ + @JsonProperty(value = "enable-fips-image", required = true) + private boolean enableFipsImage; + + /** + * Creates an instance of OSOptionProperty class. + */ + public OSOptionProperty() { + } + + /** + * Get the osType property: The OS type. + * + * @return the osType value. + */ + public String osType() { + return this.osType; + } + + /** + * Set the osType property: The OS type. + * + * @param osType the osType value to set. + * @return the OSOptionProperty object itself. + */ + public OSOptionProperty withOsType(String osType) { + this.osType = osType; + return this; + } + + /** + * Get the enableFipsImage property: Whether the image is FIPS-enabled. + * + * @return the enableFipsImage value. + */ + public boolean enableFipsImage() { + return this.enableFipsImage; + } + + /** + * Set the enableFipsImage property: Whether the image is FIPS-enabled. + * + * @param enableFipsImage the enableFipsImage value to set. + * @return the OSOptionProperty object itself. + */ + public OSOptionProperty withEnableFipsImage(boolean enableFipsImage) { + this.enableFipsImage = enableFipsImage; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (osType() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property osType in model OSOptionProperty")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OSOptionProperty.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSType.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSType.java new file mode 100644 index 0000000000000..4c9e499a88b2a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OSType.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + */ +public final class OSType extends ExpandableStringEnum { + /** + * Static value Linux for OSType. + */ + public static final OSType LINUX = fromString("Linux"); + + /** + * Static value Windows for OSType. + */ + public static final OSType WINDOWS = fromString("Windows"); + + /** + * Creates a new instance of OSType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OSType() { + } + + /** + * Creates or finds a OSType from its string representation. + * + * @param name a name to look for. + * @return the corresponding OSType. + */ + @JsonCreator + public static OSType fromString(String name) { + return fromString(name, OSType.class); + } + + /** + * Gets known OSType values. + * + * @return known OSType values. + */ + public static Collection values() { + return values(OSType.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftAgentPoolProfileRole.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftAgentPoolProfileRole.java new file mode 100644 index 0000000000000..6b20fec4f94eb --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftAgentPoolProfileRole.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * OpenShiftAgentPoolProfileRole represents the role of the AgentPoolProfile. + */ +public final class OpenShiftAgentPoolProfileRole extends ExpandableStringEnum { + /** + * Static value compute for OpenShiftAgentPoolProfileRole. + */ + public static final OpenShiftAgentPoolProfileRole COMPUTE = fromString("compute"); + + /** + * Static value infra for OpenShiftAgentPoolProfileRole. + */ + public static final OpenShiftAgentPoolProfileRole INFRA = fromString("infra"); + + /** + * Creates a new instance of OpenShiftAgentPoolProfileRole value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OpenShiftAgentPoolProfileRole() { + } + + /** + * Creates or finds a OpenShiftAgentPoolProfileRole from its string representation. + * + * @param name a name to look for. + * @return the corresponding OpenShiftAgentPoolProfileRole. + */ + @JsonCreator + public static OpenShiftAgentPoolProfileRole fromString(String name) { + return fromString(name, OpenShiftAgentPoolProfileRole.class); + } + + /** + * Gets known OpenShiftAgentPoolProfileRole values. + * + * @return known OpenShiftAgentPoolProfileRole values. + */ + public static Collection values() { + return values(OpenShiftAgentPoolProfileRole.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftContainerServiceVMSize.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftContainerServiceVMSize.java new file mode 100644 index 0000000000000..95472417fb670 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftContainerServiceVMSize.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Size of OpenShift VMs. + */ +public final class OpenShiftContainerServiceVMSize extends ExpandableStringEnum { + /** + * Static value Standard_D2s_v3 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_D2S_V3 = fromString("Standard_D2s_v3"); + + /** + * Static value Standard_D4s_v3 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_D4S_V3 = fromString("Standard_D4s_v3"); + + /** + * Static value Standard_D8s_v3 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_D8S_V3 = fromString("Standard_D8s_v3"); + + /** + * Static value Standard_D16s_v3 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_D16S_V3 = fromString("Standard_D16s_v3"); + + /** + * Static value Standard_D32s_v3 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_D32S_V3 = fromString("Standard_D32s_v3"); + + /** + * Static value Standard_D64s_v3 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_D64S_V3 = fromString("Standard_D64s_v3"); + + /** + * Static value Standard_DS4_v2 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_DS4_V2 = fromString("Standard_DS4_v2"); + + /** + * Static value Standard_DS5_v2 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_DS5_V2 = fromString("Standard_DS5_v2"); + + /** + * Static value Standard_F8s_v2 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_F8S_V2 = fromString("Standard_F8s_v2"); + + /** + * Static value Standard_F16s_v2 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_F16S_V2 = fromString("Standard_F16s_v2"); + + /** + * Static value Standard_F32s_v2 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_F32S_V2 = fromString("Standard_F32s_v2"); + + /** + * Static value Standard_F64s_v2 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_F64S_V2 = fromString("Standard_F64s_v2"); + + /** + * Static value Standard_F72s_v2 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_F72S_V2 = fromString("Standard_F72s_v2"); + + /** + * Static value Standard_F8s for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_F8S = fromString("Standard_F8s"); + + /** + * Static value Standard_F16s for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_F16S = fromString("Standard_F16s"); + + /** + * Static value Standard_E4s_v3 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_E4S_V3 = fromString("Standard_E4s_v3"); + + /** + * Static value Standard_E8s_v3 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_E8S_V3 = fromString("Standard_E8s_v3"); + + /** + * Static value Standard_E16s_v3 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_E16S_V3 = fromString("Standard_E16s_v3"); + + /** + * Static value Standard_E20s_v3 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_E20S_V3 = fromString("Standard_E20s_v3"); + + /** + * Static value Standard_E32s_v3 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_E32S_V3 = fromString("Standard_E32s_v3"); + + /** + * Static value Standard_E64s_v3 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_E64S_V3 = fromString("Standard_E64s_v3"); + + /** + * Static value Standard_GS2 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_GS2 = fromString("Standard_GS2"); + + /** + * Static value Standard_GS3 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_GS3 = fromString("Standard_GS3"); + + /** + * Static value Standard_GS4 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_GS4 = fromString("Standard_GS4"); + + /** + * Static value Standard_GS5 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_GS5 = fromString("Standard_GS5"); + + /** + * Static value Standard_DS12_v2 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_DS12_V2 = fromString("Standard_DS12_v2"); + + /** + * Static value Standard_DS13_v2 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_DS13_V2 = fromString("Standard_DS13_v2"); + + /** + * Static value Standard_DS14_v2 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_DS14_V2 = fromString("Standard_DS14_v2"); + + /** + * Static value Standard_DS15_v2 for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_DS15_V2 = fromString("Standard_DS15_v2"); + + /** + * Static value Standard_L4s for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_L4S = fromString("Standard_L4s"); + + /** + * Static value Standard_L8s for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_L8S = fromString("Standard_L8s"); + + /** + * Static value Standard_L16s for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_L16S = fromString("Standard_L16s"); + + /** + * Static value Standard_L32s for OpenShiftContainerServiceVMSize. + */ + public static final OpenShiftContainerServiceVMSize STANDARD_L32S = fromString("Standard_L32s"); + + /** + * Creates a new instance of OpenShiftContainerServiceVMSize value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OpenShiftContainerServiceVMSize() { + } + + /** + * Creates or finds a OpenShiftContainerServiceVMSize from its string representation. + * + * @param name a name to look for. + * @return the corresponding OpenShiftContainerServiceVMSize. + */ + @JsonCreator + public static OpenShiftContainerServiceVMSize fromString(String name) { + return fromString(name, OpenShiftContainerServiceVMSize.class); + } + + /** + * Gets known OpenShiftContainerServiceVMSize values. + * + * @return known OpenShiftContainerServiceVMSize values. + */ + public static Collection values() { + return values(OpenShiftContainerServiceVMSize.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedCluster.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedCluster.java new file mode 100644 index 0000000000000..a9c4ba610c682 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedCluster.java @@ -0,0 +1,399 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OpenShiftManagedClusterInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of OpenShiftManagedCluster. + */ +public interface OpenShiftManagedCluster { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the plan property: Define the resource plan as required by ARM for billing purposes. + * + * @return the plan value. + */ + PurchasePlan plan(); + + /** + * Gets the provisioningState property: The current deployment or provisioning state, which only appears in the + * response. + * + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * Gets the openShiftVersion property: Version of OpenShift specified when creating the cluster. + * + * @return the openShiftVersion value. + */ + String openShiftVersion(); + + /** + * Gets the clusterVersion property: Version of OpenShift specified when creating the cluster. + * + * @return the clusterVersion value. + */ + String clusterVersion(); + + /** + * Gets the publicHostname property: Service generated FQDN for OpenShift API server. + * + * @return the publicHostname value. + */ + String publicHostname(); + + /** + * Gets the fqdn property: Service generated FQDN for OpenShift API server loadbalancer internal hostname. + * + * @return the fqdn value. + */ + String fqdn(); + + /** + * Gets the networkProfile property: Configuration for OpenShift networking. + * + * @return the networkProfile value. + */ + NetworkProfile networkProfile(); + + /** + * Gets the routerProfiles property: Configuration for OpenShift router(s). + * + * @return the routerProfiles value. + */ + List routerProfiles(); + + /** + * Gets the masterPoolProfile property: Configuration for OpenShift master VMs. + * + * @return the masterPoolProfile value. + */ + OpenShiftManagedClusterMasterPoolProfile masterPoolProfile(); + + /** + * Gets the agentPoolProfiles property: Configuration of OpenShift cluster VMs. + * + * @return the agentPoolProfiles value. + */ + List agentPoolProfiles(); + + /** + * Gets the authProfile property: Configures OpenShift authentication. + * + * @return the authProfile value. + */ + OpenShiftManagedClusterAuthProfile authProfile(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OpenShiftManagedClusterInner + * object. + * + * @return the inner object. + */ + OpenShiftManagedClusterInner innerModel(); + + /** + * The entirety of the OpenShiftManagedCluster definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The OpenShiftManagedCluster definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the OpenShiftManagedCluster definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the OpenShiftManagedCluster definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the OpenShiftManagedCluster definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the OpenShiftManagedCluster definition which contains all the minimum required properties for + * the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithPlan, + DefinitionStages.WithOpenShiftVersion, DefinitionStages.WithNetworkProfile, + DefinitionStages.WithRouterProfiles, DefinitionStages.WithMasterPoolProfile, + DefinitionStages.WithAgentPoolProfiles, DefinitionStages.WithAuthProfile { + /** + * Executes the create request. + * + * @return the created resource. + */ + OpenShiftManagedCluster create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + OpenShiftManagedCluster create(Context context); + } + + /** + * The stage of the OpenShiftManagedCluster definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the OpenShiftManagedCluster definition allowing to specify plan. + */ + interface WithPlan { + /** + * Specifies the plan property: Define the resource plan as required by ARM for billing purposes. + * + * @param plan Define the resource plan as required by ARM for billing purposes. + * @return the next definition stage. + */ + WithCreate withPlan(PurchasePlan plan); + } + + /** + * The stage of the OpenShiftManagedCluster definition allowing to specify openShiftVersion. + */ + interface WithOpenShiftVersion { + /** + * Specifies the openShiftVersion property: Version of OpenShift specified when creating the cluster.. + * + * @param openShiftVersion Version of OpenShift specified when creating the cluster. + * @return the next definition stage. + */ + WithCreate withOpenShiftVersion(String openShiftVersion); + } + + /** + * The stage of the OpenShiftManagedCluster definition allowing to specify networkProfile. + */ + interface WithNetworkProfile { + /** + * Specifies the networkProfile property: Configuration for OpenShift networking.. + * + * @param networkProfile Configuration for OpenShift networking. + * @return the next definition stage. + */ + WithCreate withNetworkProfile(NetworkProfile networkProfile); + } + + /** + * The stage of the OpenShiftManagedCluster definition allowing to specify routerProfiles. + */ + interface WithRouterProfiles { + /** + * Specifies the routerProfiles property: Configuration for OpenShift router(s).. + * + * @param routerProfiles Configuration for OpenShift router(s). + * @return the next definition stage. + */ + WithCreate withRouterProfiles(List routerProfiles); + } + + /** + * The stage of the OpenShiftManagedCluster definition allowing to specify masterPoolProfile. + */ + interface WithMasterPoolProfile { + /** + * Specifies the masterPoolProfile property: Configuration for OpenShift master VMs.. + * + * @param masterPoolProfile Configuration for OpenShift master VMs. + * @return the next definition stage. + */ + WithCreate withMasterPoolProfile(OpenShiftManagedClusterMasterPoolProfile masterPoolProfile); + } + + /** + * The stage of the OpenShiftManagedCluster definition allowing to specify agentPoolProfiles. + */ + interface WithAgentPoolProfiles { + /** + * Specifies the agentPoolProfiles property: Configuration of OpenShift cluster VMs.. + * + * @param agentPoolProfiles Configuration of OpenShift cluster VMs. + * @return the next definition stage. + */ + WithCreate withAgentPoolProfiles(List agentPoolProfiles); + } + + /** + * The stage of the OpenShiftManagedCluster definition allowing to specify authProfile. + */ + interface WithAuthProfile { + /** + * Specifies the authProfile property: Configures OpenShift authentication.. + * + * @param authProfile Configures OpenShift authentication. + * @return the next definition stage. + */ + WithCreate withAuthProfile(OpenShiftManagedClusterAuthProfile authProfile); + } + } + + /** + * Begins update for the OpenShiftManagedCluster resource. + * + * @return the stage of resource update. + */ + OpenShiftManagedCluster.Update update(); + + /** + * The template for OpenShiftManagedCluster update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + OpenShiftManagedCluster apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + OpenShiftManagedCluster apply(Context context); + } + + /** + * The OpenShiftManagedCluster update stages. + */ + interface UpdateStages { + /** + * The stage of the OpenShiftManagedCluster update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + OpenShiftManagedCluster refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + OpenShiftManagedCluster refresh(Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAadIdentityProvider.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAadIdentityProvider.java new file mode 100644 index 0000000000000..27841a261c96a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAadIdentityProvider.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Defines the Identity provider for MS AAD. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("AADIdentityProvider") +@Fluent +public final class OpenShiftManagedClusterAadIdentityProvider extends OpenShiftManagedClusterBaseIdentityProvider { + /* + * The clientId password associated with the provider. + */ + @JsonProperty(value = "clientId") + private String clientId; + + /* + * The secret password associated with the provider. + */ + @JsonProperty(value = "secret") + private String secret; + + /* + * The tenantId associated with the provider. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /* + * The groupId to be granted cluster admin role. + */ + @JsonProperty(value = "customerAdminGroupId") + private String customerAdminGroupId; + + /** + * Creates an instance of OpenShiftManagedClusterAadIdentityProvider class. + */ + public OpenShiftManagedClusterAadIdentityProvider() { + } + + /** + * Get the clientId property: The clientId password associated with the provider. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The clientId password associated with the provider. + * + * @param clientId the clientId value to set. + * @return the OpenShiftManagedClusterAadIdentityProvider object itself. + */ + public OpenShiftManagedClusterAadIdentityProvider withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the secret property: The secret password associated with the provider. + * + * @return the secret value. + */ + public String secret() { + return this.secret; + } + + /** + * Set the secret property: The secret password associated with the provider. + * + * @param secret the secret value to set. + * @return the OpenShiftManagedClusterAadIdentityProvider object itself. + */ + public OpenShiftManagedClusterAadIdentityProvider withSecret(String secret) { + this.secret = secret; + return this; + } + + /** + * Get the tenantId property: The tenantId associated with the provider. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenantId associated with the provider. + * + * @param tenantId the tenantId value to set. + * @return the OpenShiftManagedClusterAadIdentityProvider object itself. + */ + public OpenShiftManagedClusterAadIdentityProvider withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the customerAdminGroupId property: The groupId to be granted cluster admin role. + * + * @return the customerAdminGroupId value. + */ + public String customerAdminGroupId() { + return this.customerAdminGroupId; + } + + /** + * Set the customerAdminGroupId property: The groupId to be granted cluster admin role. + * + * @param customerAdminGroupId the customerAdminGroupId value to set. + * @return the OpenShiftManagedClusterAadIdentityProvider object itself. + */ + public OpenShiftManagedClusterAadIdentityProvider withCustomerAdminGroupId(String customerAdminGroupId) { + this.customerAdminGroupId = customerAdminGroupId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAgentPoolProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAgentPoolProfile.java new file mode 100644 index 0000000000000..d2b13457731e6 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAgentPoolProfile.java @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines the configuration of the OpenShift cluster VMs. + */ +@Fluent +public final class OpenShiftManagedClusterAgentPoolProfile { + /* + * Unique name of the pool profile in the context of the subscription and resource group. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * Number of agents (VMs) to host docker containers. + */ + @JsonProperty(value = "count", required = true) + private int count; + + /* + * Size of agent VMs. + */ + @JsonProperty(value = "vmSize", required = true) + private OpenShiftContainerServiceVMSize vmSize; + + /* + * Subnet CIDR for the peering. + */ + @JsonProperty(value = "subnetCidr") + private String subnetCidr; + + /* + * OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + */ + @JsonProperty(value = "osType") + private OSType osType; + + /* + * Define the role of the AgentPoolProfile. + */ + @JsonProperty(value = "role") + private OpenShiftAgentPoolProfileRole role; + + /** + * Creates an instance of OpenShiftManagedClusterAgentPoolProfile class. + */ + public OpenShiftManagedClusterAgentPoolProfile() { + } + + /** + * Get the name property: Unique name of the pool profile in the context of the subscription and resource group. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Unique name of the pool profile in the context of the subscription and resource group. + * + * @param name the name value to set. + * @return the OpenShiftManagedClusterAgentPoolProfile object itself. + */ + public OpenShiftManagedClusterAgentPoolProfile withName(String name) { + this.name = name; + return this; + } + + /** + * Get the count property: Number of agents (VMs) to host docker containers. + * + * @return the count value. + */ + public int count() { + return this.count; + } + + /** + * Set the count property: Number of agents (VMs) to host docker containers. + * + * @param count the count value to set. + * @return the OpenShiftManagedClusterAgentPoolProfile object itself. + */ + public OpenShiftManagedClusterAgentPoolProfile withCount(int count) { + this.count = count; + return this; + } + + /** + * Get the vmSize property: Size of agent VMs. + * + * @return the vmSize value. + */ + public OpenShiftContainerServiceVMSize vmSize() { + return this.vmSize; + } + + /** + * Set the vmSize property: Size of agent VMs. + * + * @param vmSize the vmSize value to set. + * @return the OpenShiftManagedClusterAgentPoolProfile object itself. + */ + public OpenShiftManagedClusterAgentPoolProfile withVmSize(OpenShiftContainerServiceVMSize vmSize) { + this.vmSize = vmSize; + return this; + } + + /** + * Get the subnetCidr property: Subnet CIDR for the peering. + * + * @return the subnetCidr value. + */ + public String subnetCidr() { + return this.subnetCidr; + } + + /** + * Set the subnetCidr property: Subnet CIDR for the peering. + * + * @param subnetCidr the subnetCidr value to set. + * @return the OpenShiftManagedClusterAgentPoolProfile object itself. + */ + public OpenShiftManagedClusterAgentPoolProfile withSubnetCidr(String subnetCidr) { + this.subnetCidr = subnetCidr; + 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 OpenShiftManagedClusterAgentPoolProfile object itself. + */ + public OpenShiftManagedClusterAgentPoolProfile withOsType(OSType osType) { + this.osType = osType; + return this; + } + + /** + * Get the role property: Define the role of the AgentPoolProfile. + * + * @return the role value. + */ + public OpenShiftAgentPoolProfileRole role() { + return this.role; + } + + /** + * Set the role property: Define the role of the AgentPoolProfile. + * + * @param role the role value to set. + * @return the OpenShiftManagedClusterAgentPoolProfile object itself. + */ + public OpenShiftManagedClusterAgentPoolProfile withRole(OpenShiftAgentPoolProfileRole role) { + this.role = role; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property name in model OpenShiftManagedClusterAgentPoolProfile")); + } + if (vmSize() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property vmSize in model OpenShiftManagedClusterAgentPoolProfile")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OpenShiftManagedClusterAgentPoolProfile.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAuthProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAuthProfile.java new file mode 100644 index 0000000000000..4ff9c83f82aaf --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterAuthProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Defines all possible authentication profiles for the OpenShift cluster. + */ +@Fluent +public final class OpenShiftManagedClusterAuthProfile { + /* + * Type of authentication profile to use. + */ + @JsonProperty(value = "identityProviders") + private List identityProviders; + + /** + * Creates an instance of OpenShiftManagedClusterAuthProfile class. + */ + public OpenShiftManagedClusterAuthProfile() { + } + + /** + * Get the identityProviders property: Type of authentication profile to use. + * + * @return the identityProviders value. + */ + public List identityProviders() { + return this.identityProviders; + } + + /** + * Set the identityProviders property: Type of authentication profile to use. + * + * @param identityProviders the identityProviders value to set. + * @return the OpenShiftManagedClusterAuthProfile object itself. + */ + public OpenShiftManagedClusterAuthProfile + withIdentityProviders(List identityProviders) { + this.identityProviders = identityProviders; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identityProviders() != null) { + identityProviders().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterBaseIdentityProvider.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterBaseIdentityProvider.java new file mode 100644 index 0000000000000..d3e13f9b5fa5a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterBaseIdentityProvider.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Structure for any Identity provider. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "kind", + defaultImpl = OpenShiftManagedClusterBaseIdentityProvider.class) +@JsonTypeName("OpenShiftManagedClusterBaseIdentityProvider") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AADIdentityProvider", value = OpenShiftManagedClusterAadIdentityProvider.class) }) +@Immutable +public class OpenShiftManagedClusterBaseIdentityProvider { + /** + * Creates an instance of OpenShiftManagedClusterBaseIdentityProvider class. + */ + public OpenShiftManagedClusterBaseIdentityProvider() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterIdentityProvider.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterIdentityProvider.java new file mode 100644 index 0000000000000..666a72edcf5c4 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterIdentityProvider.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines the configuration of the identity providers to be used in the OpenShift cluster. + */ +@Fluent +public final class OpenShiftManagedClusterIdentityProvider { + /* + * Name of the provider. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Configuration of the provider. + */ + @JsonProperty(value = "provider") + private OpenShiftManagedClusterBaseIdentityProvider provider; + + /** + * Creates an instance of OpenShiftManagedClusterIdentityProvider class. + */ + public OpenShiftManagedClusterIdentityProvider() { + } + + /** + * Get the name property: Name of the provider. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the provider. + * + * @param name the name value to set. + * @return the OpenShiftManagedClusterIdentityProvider object itself. + */ + public OpenShiftManagedClusterIdentityProvider withName(String name) { + this.name = name; + return this; + } + + /** + * Get the provider property: Configuration of the provider. + * + * @return the provider value. + */ + public OpenShiftManagedClusterBaseIdentityProvider provider() { + return this.provider; + } + + /** + * Set the provider property: Configuration of the provider. + * + * @param provider the provider value to set. + * @return the OpenShiftManagedClusterIdentityProvider object itself. + */ + public OpenShiftManagedClusterIdentityProvider withProvider(OpenShiftManagedClusterBaseIdentityProvider provider) { + this.provider = provider; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (provider() != null) { + provider().validate(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterListResult.java new file mode 100644 index 0000000000000..1712a4c4129cd --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterListResult.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OpenShiftManagedClusterInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response from the List OpenShift Managed Clusters operation. + */ +@Fluent +public final class OpenShiftManagedClusterListResult { + /* + * The list of OpenShift managed clusters. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next set of OpenShift managed cluster results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of OpenShiftManagedClusterListResult class. + */ + public OpenShiftManagedClusterListResult() { + } + + /** + * Get the value property: The list of OpenShift managed clusters. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of OpenShift managed clusters. + * + * @param value the value value to set. + * @return the OpenShiftManagedClusterListResult object itself. + */ + public OpenShiftManagedClusterListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of OpenShift 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterMasterPoolProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterMasterPoolProfile.java new file mode 100644 index 0000000000000..040da3a553d56 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusterMasterPoolProfile.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * OpenShiftManagedClusterMaterPoolProfile contains configuration for OpenShift master VMs. + */ +@Fluent +public final class OpenShiftManagedClusterMasterPoolProfile { + /* + * Unique name of the master pool profile in the context of the subscription and resource group. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Number of masters (VMs) to host docker containers. The default value is 3. + */ + @JsonProperty(value = "count", required = true) + private int count; + + /* + * Size of agent VMs. + */ + @JsonProperty(value = "vmSize", required = true) + private OpenShiftContainerServiceVMSize vmSize; + + /* + * Subnet CIDR for the peering. + */ + @JsonProperty(value = "subnetCidr") + private String subnetCidr; + + /* + * OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + */ + @JsonProperty(value = "osType") + private OSType osType; + + /** + * Creates an instance of OpenShiftManagedClusterMasterPoolProfile class. + */ + public OpenShiftManagedClusterMasterPoolProfile() { + } + + /** + * Get the name property: Unique name of the master pool profile in the context of the subscription and resource + * group. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Unique name of the master pool profile in the context of the subscription and resource + * group. + * + * @param name the name value to set. + * @return the OpenShiftManagedClusterMasterPoolProfile object itself. + */ + public OpenShiftManagedClusterMasterPoolProfile withName(String name) { + this.name = name; + return this; + } + + /** + * Get the count property: Number of masters (VMs) to host docker containers. The default value is 3. + * + * @return the count value. + */ + public int count() { + return this.count; + } + + /** + * Set the count property: Number of masters (VMs) to host docker containers. The default value is 3. + * + * @param count the count value to set. + * @return the OpenShiftManagedClusterMasterPoolProfile object itself. + */ + public OpenShiftManagedClusterMasterPoolProfile withCount(int count) { + this.count = count; + return this; + } + + /** + * Get the vmSize property: Size of agent VMs. + * + * @return the vmSize value. + */ + public OpenShiftContainerServiceVMSize vmSize() { + return this.vmSize; + } + + /** + * Set the vmSize property: Size of agent VMs. + * + * @param vmSize the vmSize value to set. + * @return the OpenShiftManagedClusterMasterPoolProfile object itself. + */ + public OpenShiftManagedClusterMasterPoolProfile withVmSize(OpenShiftContainerServiceVMSize vmSize) { + this.vmSize = vmSize; + return this; + } + + /** + * Get the subnetCidr property: Subnet CIDR for the peering. + * + * @return the subnetCidr value. + */ + public String subnetCidr() { + return this.subnetCidr; + } + + /** + * Set the subnetCidr property: Subnet CIDR for the peering. + * + * @param subnetCidr the subnetCidr value to set. + * @return the OpenShiftManagedClusterMasterPoolProfile object itself. + */ + public OpenShiftManagedClusterMasterPoolProfile withSubnetCidr(String subnetCidr) { + this.subnetCidr = subnetCidr; + 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 OpenShiftManagedClusterMasterPoolProfile object itself. + */ + public OpenShiftManagedClusterMasterPoolProfile withOsType(OSType osType) { + this.osType = osType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (vmSize() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property vmSize in model OpenShiftManagedClusterMasterPoolProfile")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OpenShiftManagedClusterMasterPoolProfile.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusters.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusters.java new file mode 100644 index 0000000000000..dea489d04ca6a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftManagedClusters.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of OpenShiftManagedClusters. + */ +public interface OpenShiftManagedClusters { + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * + * Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of each + * OpenShift managed cluster. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of OpenShift managed clusters in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Gets a list of OpenShift managed clusters in the specified subscription. + * + * Gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of each + * OpenShift 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 a list of OpenShift managed clusters in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * + * Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns + * properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 OpenShift Managed Clusters operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists OpenShift managed clusters in the specified subscription and resource group. + * + * Lists OpenShift managed clusters in the specified subscription and resource group. The operation returns + * properties of each OpenShift managed cluster. + * + * @param resourceGroupName The name of the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 OpenShift Managed Clusters operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets a OpenShift managed cluster. + * + * Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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 details of the managed OpenShift cluster with a specified resource group and name along with + * {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context); + + /** + * Gets a OpenShift managed cluster. + * + * Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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 details of the managed OpenShift cluster with a specified resource group and name. + */ + OpenShiftManagedCluster getByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Deletes an OpenShift managed cluster. + * + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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. + */ + void deleteByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Deletes an OpenShift managed cluster. + * + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the OpenShift 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. + */ + void delete(String resourceGroupName, String resourceName, Context context); + + /** + * Gets a OpenShift managed cluster. + * + * Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the managed OpenShift cluster with a specified resource group and name along with + * {@link Response}. + */ + OpenShiftManagedCluster getById(String id); + + /** + * Gets a OpenShift managed cluster. + * + * Gets the details of the managed OpenShift cluster with a specified resource group and name. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the managed OpenShift cluster with a specified resource group and name along with + * {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes an OpenShift managed cluster. + * + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes an OpenShift managed cluster. + * + * Deletes the OpenShift managed cluster with a specified resource group and name. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new OpenShiftManagedCluster resource. + * + * @param name resource name. + * @return the first stage of the new OpenShiftManagedCluster definition. + */ + OpenShiftManagedCluster.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftRouterProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftRouterProfile.java new file mode 100644 index 0000000000000..d0617f86710d4 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OpenShiftRouterProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Represents an OpenShift router. + */ +@Fluent +public final class OpenShiftRouterProfile { + /* + * Name of the router profile. + */ + @JsonProperty(value = "name") + private String name; + + /* + * DNS subdomain for OpenShift router. + */ + @JsonProperty(value = "publicSubdomain", access = JsonProperty.Access.WRITE_ONLY) + private String publicSubdomain; + + /* + * Auto-allocated FQDN for the OpenShift router. + */ + @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) + private String fqdn; + + /** + * Creates an instance of OpenShiftRouterProfile class. + */ + public OpenShiftRouterProfile() { + } + + /** + * Get the name property: Name of the router profile. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the router profile. + * + * @param name the name value to set. + * @return the OpenShiftRouterProfile object itself. + */ + public OpenShiftRouterProfile withName(String name) { + this.name = name; + return this; + } + + /** + * Get the publicSubdomain property: DNS subdomain for OpenShift router. + * + * @return the publicSubdomain value. + */ + public String publicSubdomain() { + return this.publicSubdomain; + } + + /** + * Get the fqdn property: Auto-allocated FQDN for the OpenShift router. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationListResult.java new file mode 100644 index 0000000000000..f6a120de4ba8a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationListResult.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationValueInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The List Operation response. + */ +@Immutable +public final class OperationListResult { + /* + * The list of operations + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationStatusResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationStatusResult.java new file mode 100644 index 0000000000000..267b9f38ac139 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationStatusResult.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationStatusResultInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of OperationStatusResult. + */ +public interface OperationStatusResult { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Float percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationStatusResultInner + * object. + * + * @return the inner object. + */ + OperationStatusResultInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationStatusResultList.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationStatusResultList.java new file mode 100644 index 0000000000000..b1404ce569bb4 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationStatusResultList.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationStatusResultInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The operations list. It contains an URL link to get the next set of results. + */ +@Immutable +public final class OperationStatusResultList { + /* + * List of operations + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * URL to get the next set of operation list results (if there are any). + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of OperationStatusResultList class. + */ + public OperationStatusResultList() { + } + + /** + * Get the value property: List of operations. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: URL to get the next set of operation list results (if there are any). + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationStatusResults.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationStatusResults.java new file mode 100644 index 0000000000000..de11b7eac51fd --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationStatusResults.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of OperationStatusResults. + */ +public interface OperationStatusResults { + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource 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 operations in the specified managedCluster as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * Gets a list of operations in the specified managedCluster. + * + * @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 operations in the specified managedCluster as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String resourceName, Context context); + + /** + * Get the status of a specific operation 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 operationId The ID of an ongoing async 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 the status of a specific operation in the specified managed cluster along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String resourceName, String operationId, + Context context); + + /** + * Get the status of a specific operation 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 operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster. + */ + OperationStatusResult get(String resourceGroupName, String resourceName, String operationId); + + /** + * Get the status of a specific operation 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 operationId The ID of an ongoing async 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 the status of a specific operation in the specified agent pool along with {@link Response}. + */ + Response getByAgentPoolWithResponse(String resourceGroupName, String resourceName, + String agentPoolName, String operationId, Context context); + + /** + * Get the status of a specific operation 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 operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool. + */ + OperationStatusResult getByAgentPool(String resourceGroupName, String resourceName, String agentPoolName, + String operationId); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationValue.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationValue.java new file mode 100644 index 0000000000000..d0d76631454ac --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OperationValue.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationValueInner; + +/** + * An immutable client-side representation of OperationValue. + */ +public interface OperationValue { + /** + * Gets the origin property: The origin of the operation. + * + * @return the origin value. + */ + String origin(); + + /** + * Gets the name property: The name of the operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the operation property: The display name of the operation. + * + * @return the operation value. + */ + String operation(); + + /** + * Gets the resource property: The display name of the resource the operation applies to. + * + * @return the resource value. + */ + String resource(); + + /** + * Gets the description property: The description of the operation. + * + * @return the description value. + */ + String description(); + + /** + * Gets the provider property: The resource provider for the operation. + * + * @return the provider value. + */ + String provider(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationValueInner + * object. + * + * @return the inner object. + */ + OperationValueInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Operations.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Operations.java new file mode 100644 index 0000000000000..3708772501501 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Operations.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of Operations. + */ +public interface Operations { + /** + * 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}. + */ + 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}. + */ + PagedIterable list(Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorProfile.java new file mode 100644 index 0000000000000..245345c30b2cb --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorProfile.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains information about orchestrator. + */ +@Fluent +public final class OrchestratorProfile { + /* + * Orchestrator type. + */ + @JsonProperty(value = "orchestratorType") + private String orchestratorType; + + /* + * Orchestrator version (major, minor, patch). + */ + @JsonProperty(value = "orchestratorVersion", required = true) + private String orchestratorVersion; + + /* + * Whether Kubernetes version is currently in preview. + */ + @JsonProperty(value = "isPreview") + 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.logExceptionAsError(new IllegalArgumentException( + "Missing required property orchestratorVersion in model OrchestratorProfile")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OrchestratorProfile.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorVersionProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorVersionProfile.java new file mode 100644 index 0000000000000..639d42d73a972 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorVersionProfile.java @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The profile of an orchestrator and its available versions. + */ +@Fluent +public final class OrchestratorVersionProfile { + /* + * Orchestrator type. + */ + @JsonProperty(value = "orchestratorType", required = true) + private String orchestratorType; + + /* + * Orchestrator version (major, minor, patch). + */ + @JsonProperty(value = "orchestratorVersion", required = true) + private String orchestratorVersion; + + /* + * Installed by default if version is not specified. + */ + @JsonProperty(value = "default") + private Boolean defaultProperty; + + /* + * Whether Kubernetes version is currently in preview. + */ + @JsonProperty(value = "isPreview") + private Boolean isPreview; + + /* + * The list of available upgrade versions. + */ + @JsonProperty(value = "upgrades") + 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.logExceptionAsError(new IllegalArgumentException( + "Missing required property orchestratorType in model OrchestratorVersionProfile")); + } + if (orchestratorVersion() == null) { + throw LOGGER.logExceptionAsError(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); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorVersionProfileListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorVersionProfileListResult.java new file mode 100644 index 0000000000000..15887f6846ac4 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OrchestratorVersionProfileListResult.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OrchestratorVersionProfileListResultInner; +import java.util.List; + +/** + * An immutable client-side representation of OrchestratorVersionProfileListResult. + */ +public interface OrchestratorVersionProfileListResult { + /** + * Gets the id property: Id of the orchestrator version profile list result. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the orchestrator version profile list result. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: Type of the orchestrator version profile list result. + * + * @return the type value. + */ + String type(); + + /** + * Gets the orchestrators property: List of orchestrator version profiles. + * + * @return the orchestrators value. + */ + List orchestrators(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OrchestratorVersionProfileListResultInner + * object. + * + * @return the inner object. + */ + OrchestratorVersionProfileListResultInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Ossku.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Ossku.java new file mode 100644 index 0000000000000..b6e17f5767472 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Ossku.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 + * if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. + */ +public final class Ossku extends ExpandableStringEnum { + /** + * Static value Ubuntu for Ossku. + */ + public static final Ossku UBUNTU = fromString("Ubuntu"); + + /** + * Static value Mariner for Ossku. + */ + public static final Ossku MARINER = fromString("Mariner"); + + /** + * Static value AzureLinux for Ossku. + */ + public static final Ossku AZURE_LINUX = fromString("AzureLinux"); + + /** + * 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 WindowsAnnual for Ossku. + */ + public static final Ossku WINDOWS_ANNUAL = fromString("WindowsAnnual"); + + /** + * 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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundEnvironmentEndpoint.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundEnvironmentEndpoint.java new file mode 100644 index 0000000000000..61f43ef4b712f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundEnvironmentEndpoint.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OutboundEnvironmentEndpointInner; +import java.util.List; + +/** + * An immutable client-side representation of OutboundEnvironmentEndpoint. + */ +public interface OutboundEnvironmentEndpoint { + /** + * Gets the category property: The category of endpoints accessed by the AKS agent node, e.g. + * azure-resource-management, apiserver, etc. + * + * @return the category value. + */ + String category(); + + /** + * Gets the endpoints property: The endpoints that AKS agent nodes connect to. + * + * @return the endpoints value. + */ + List endpoints(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OutboundEnvironmentEndpointInner + * object. + * + * @return the inner object. + */ + OutboundEnvironmentEndpointInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundEnvironmentEndpointCollection.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundEnvironmentEndpointCollection.java new file mode 100644 index 0000000000000..306230f681f1c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundEnvironmentEndpointCollection.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OutboundEnvironmentEndpointInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Collection of OutboundEnvironmentEndpoint. + */ +@Fluent +public final class OutboundEnvironmentEndpointCollection { + /* + * Collection of resources. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * Link to next page of resources. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + 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.logExceptionAsError(new IllegalArgumentException( + "Missing required property value in model OutboundEnvironmentEndpointCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OutboundEnvironmentEndpointCollection.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundType.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundType.java new file mode 100644 index 0000000000000..3259a8dce8004 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/OutboundType.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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"); + + /** + * 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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PortRange.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PortRange.java new file mode 100644 index 0000000000000..a6ecd496033f3 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PortRange.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The port range. + */ +@Fluent +public final class PortRange { + /* + * 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. + */ + @JsonProperty(value = "portStart") + 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. + */ + @JsonProperty(value = "portEnd") + private Integer portEnd; + + /* + * The network protocol of the port. + */ + @JsonProperty(value = "protocol") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PowerState.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PowerState.java new file mode 100644 index 0000000000000..151cd749d37a7 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PowerState.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the Power State of the cluster. + */ +@Fluent +public final class PowerState { + /* + * Tells whether the cluster is Running or Stopped + */ + @JsonProperty(value = "code") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpoint.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpoint.java new file mode 100644 index 0000000000000..2cc54c99af5bb --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpoint.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Private endpoint which a connection belongs to. + */ +@Fluent +public final class PrivateEndpoint { + /* + * The resource ID of the private endpoint + */ + @JsonProperty(value = "id") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnection.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnection.java new file mode 100644 index 0000000000000..844a64540a760 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnection.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionInner; + +/** + * An immutable client-side representation of PrivateEndpointConnection. + */ +public interface PrivateEndpointConnection { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the provisioningState property: The current provisioning state. + * + * @return the provisioningState value. + */ + PrivateEndpointConnectionProvisioningState provisioningState(); + + /** + * Gets the privateEndpoint property: The resource of private endpoint. + * + * @return the privateEndpoint value. + */ + PrivateEndpoint privateEndpoint(); + + /** + * Gets the privateLinkServiceConnectionState property: A collection of information about the state of the + * connection between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionInner + * object. + * + * @return the inner object. + */ + PrivateEndpointConnectionInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnectionListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnectionListResult.java new file mode 100644 index 0000000000000..9faec19342bd7 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnectionListResult.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionListResultInner; +import java.util.List; + +/** + * An immutable client-side representation of PrivateEndpointConnectionListResult. + */ +public interface PrivateEndpointConnectionListResult { + /** + * Gets the value property: The collection value. + * + * @return the value value. + */ + List value(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionListResultInner + * object. + * + * @return the inner object. + */ + PrivateEndpointConnectionListResultInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnectionProvisioningState.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnectionProvisioningState.java new file mode 100644 index 0000000000000..b3afd86488741 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnectionProvisioningState.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnections.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnections.java new file mode 100644 index 0000000000000..0d968ec422622 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateEndpointConnections.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionInner; + +/** + * Resource collection API of PrivateEndpointConnections. + */ +public interface PrivateEndpointConnections { + /** + * 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}. + */ + 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. + */ + PrivateEndpointConnectionListResult 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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}. + */ + 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. + */ + PrivateEndpointConnection 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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}. + */ + 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. + */ + PrivateEndpointConnection 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. + */ + 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. + */ + void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResource.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResource.java new file mode 100644 index 0000000000000..6c8f8b205b43a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResource.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner; +import java.util.List; + +/** + * An immutable client-side representation of PrivateLinkResource. + */ +public interface PrivateLinkResource { + /** + * Gets the id property: The ID of the private link resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the private link resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The resource type. + * + * @return the type value. + */ + String type(); + + /** + * Gets the groupId property: The group ID of the resource. + * + * @return the groupId value. + */ + String groupId(); + + /** + * Gets the requiredMembers property: The RequiredMembers of the resource. + * + * @return the requiredMembers value. + */ + List requiredMembers(); + + /** + * Gets the privateLinkServiceId property: The private link service ID of the resource, this field is exposed only + * to NRP internally. + * + * @return the privateLinkServiceId value. + */ + String privateLinkServiceId(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner + * object. + * + * @return the inner object. + */ + PrivateLinkResourceInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResources.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResources.java new file mode 100644 index 0000000000000..230da3e6b4f89 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResources.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of PrivateLinkResources. + */ +public interface PrivateLinkResources { + /** + * 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}. + */ + 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. + */ + PrivateLinkResourcesListResult list(String resourceGroupName, String resourceName); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResourcesListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResourcesListResult.java new file mode 100644 index 0000000000000..0b321a9d9e5ba --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkResourcesListResult.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourcesListResultInner; +import java.util.List; + +/** + * An immutable client-side representation of PrivateLinkResourcesListResult. + */ +public interface PrivateLinkResourcesListResult { + /** + * Gets the value property: The collection value. + * + * @return the value value. + */ + List value(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourcesListResultInner + * object. + * + * @return the inner object. + */ + PrivateLinkResourcesListResultInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkServiceConnectionState.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkServiceConnectionState.java new file mode 100644 index 0000000000000..ac9211c3aca14 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PrivateLinkServiceConnectionState.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The state of a private link service connection. + */ +@Fluent +public final class PrivateLinkServiceConnectionState { + /* + * The private link service connection status. + */ + @JsonProperty(value = "status") + private ConnectionStatus status; + + /* + * The private link service connection description. + */ + @JsonProperty(value = "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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Protocol.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Protocol.java new file mode 100644 index 0000000000000..b1521ce7dd767 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Protocol.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PublicNetworkAccess.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PublicNetworkAccess.java new file mode 100644 index 0000000000000..300bfe6862bbd --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PublicNetworkAccess.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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"); + + /** + * Static value SecuredByPerimeter for PublicNetworkAccess. + */ + public static final PublicNetworkAccess SECURED_BY_PERIMETER = fromString("SecuredByPerimeter"); + + /** + * 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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PurchasePlan.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PurchasePlan.java new file mode 100644 index 0000000000000..ea0adb07fb97d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/PurchasePlan.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. + */ +@Fluent +public final class PurchasePlan { + /* + * The plan ID. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Specifies the product of the image from the marketplace. This is the same value as Offer under the + * imageReference element. + */ + @JsonProperty(value = "product") + private String product; + + /* + * The promotion code. + */ + @JsonProperty(value = "promotionCode") + private String promotionCode; + + /* + * The plan ID. + */ + @JsonProperty(value = "publisher") + private String publisher; + + /** + * Creates an instance of PurchasePlan class. + */ + public PurchasePlan() { + } + + /** + * Get the name property: The plan ID. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The plan ID. + * + * @param name the name value to set. + * @return the PurchasePlan object itself. + */ + public PurchasePlan withName(String name) { + this.name = name; + return this; + } + + /** + * Get the product property: Specifies the product of the image from the marketplace. This is the same value as + * Offer under the imageReference element. + * + * @return the product value. + */ + public String product() { + return this.product; + } + + /** + * Set the product property: Specifies the product of the image from the marketplace. This is the same value as + * Offer under the imageReference element. + * + * @param product the product value to set. + * @return the PurchasePlan object itself. + */ + public PurchasePlan withProduct(String product) { + this.product = product; + return this; + } + + /** + * Get the promotionCode property: The promotion code. + * + * @return the promotionCode value. + */ + public String promotionCode() { + return this.promotionCode; + } + + /** + * Set the promotionCode property: The promotion code. + * + * @param promotionCode the promotionCode value to set. + * @return the PurchasePlan object itself. + */ + public PurchasePlan withPromotionCode(String promotionCode) { + this.promotionCode = promotionCode; + return this; + } + + /** + * Get the publisher property: The plan ID. + * + * @return the publisher value. + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the publisher property: The plan ID. + * + * @param publisher the publisher value to set. + * @return the PurchasePlan object itself. + */ + public PurchasePlan withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RelativeMonthlySchedule.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RelativeMonthlySchedule.java new file mode 100644 index 0000000000000..58fffb0ea9b49 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RelativeMonthlySchedule.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. + */ +@Fluent +public final class RelativeMonthlySchedule { + /* + * Specifies the number of months between each set of occurrences. + */ + @JsonProperty(value = "intervalMonths", required = true) + private int intervalMonths; + + /* + * The week index. + * + * Specifies on which instance of the allowed days specified in daysOfWeek the maintenance occurs. + */ + @JsonProperty(value = "weekIndex", required = true) + private Type weekIndex; + + /* + * Specifies on which day of the week the maintenance occurs. + */ + @JsonProperty(value = "dayOfWeek", required = true) + 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 instance of the allowed days specified in daysOfWeek the maintenance occurs. + * + * @return the weekIndex value. + */ + public Type weekIndex() { + return this.weekIndex; + } + + /** + * Set the weekIndex property: The week index. + * + * Specifies on which instance of the allowed days specified in daysOfWeek the maintenance occurs. + * + * @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.logExceptionAsError( + new IllegalArgumentException("Missing required property weekIndex in model RelativeMonthlySchedule")); + } + if (dayOfWeek() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property dayOfWeek in model RelativeMonthlySchedule")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RelativeMonthlySchedule.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResolvePrivateLinkServiceIds.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResolvePrivateLinkServiceIds.java new file mode 100644 index 0000000000000..a0c832b49e5e8 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResolvePrivateLinkServiceIds.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner; + +/** + * Resource collection API of ResolvePrivateLinkServiceIds. + */ +public interface ResolvePrivateLinkServiceIds { + /** + * 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}. + */ + 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. + */ + PrivateLinkResource post(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResourceIdentityType.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResourceIdentityType.java new file mode 100644 index 0000000000000..c8f1f45f68aad --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResourceIdentityType.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * 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. + */ + @JsonCreator + 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} + */ + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResourceReference.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResourceReference.java new file mode 100644 index 0000000000000..192801f5174d0 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResourceReference.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A reference to an Azure resource. + */ +@Fluent +public final class ResourceReference { + /* + * The fully qualified Azure resource id. + */ + @JsonProperty(value = "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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResourceType.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResourceType.java new file mode 100644 index 0000000000000..9bb6c3ec88b8c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ResourceType.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The resource type of a scheduled event. + */ +public final class ResourceType extends ExpandableStringEnum { + /** + * Static value ManagedCluster for ResourceType. + */ + public static final ResourceType MANAGED_CLUSTER = fromString("ManagedCluster"); + + /** + * Static value AgentPool for ResourceType. + */ + public static final ResourceType AGENT_POOL = fromString("AgentPool"); + + /** + * Creates a new instance of ResourceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResourceType() { + } + + /** + * Creates or finds a ResourceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceType. + */ + @JsonCreator + public static ResourceType fromString(String name) { + return fromString(name, ResourceType.class); + } + + /** + * Gets known ResourceType values. + * + * @return known ResourceType values. + */ + public static Collection values() { + return values(ResourceType.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RestrictionLevel.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RestrictionLevel.java new file mode 100644 index 0000000000000..457f2fad8b1a3 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RestrictionLevel.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The restriction level applied to the cluster's node resource group. + */ +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RunCommandRequest.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RunCommandRequest.java new file mode 100644 index 0000000000000..8c12bc8d8c713 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RunCommandRequest.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A run command request. + */ +@Fluent +public final class RunCommandRequest { + /* + * The command to run. + */ + @JsonProperty(value = "command", required = true) + private String command; + + /* + * A base64 encoded zip file containing the files required by the command. + */ + @JsonProperty(value = "context") + private String context; + + /* + * AuthToken issued for AKS AAD Server App. + */ + @JsonProperty(value = "clusterToken") + 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.logExceptionAsError( + new IllegalArgumentException("Missing required property command in model RunCommandRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RunCommandRequest.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RunCommandResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RunCommandResult.java new file mode 100644 index 0000000000000..8782546fb1ece --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/RunCommandResult.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.RunCommandResultInner; +import java.time.OffsetDateTime; + +/** + * An immutable client-side representation of RunCommandResult. + */ +public interface RunCommandResult { + /** + * Gets the id property: The command id. + * + * @return the id value. + */ + String id(); + + /** + * Gets the provisioningState property: provisioning State. + * + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * Gets the exitCode property: The exit code of the command. + * + * @return the exitCode value. + */ + Integer exitCode(); + + /** + * Gets the startedAt property: The time when the command started. + * + * @return the startedAt value. + */ + OffsetDateTime startedAt(); + + /** + * Gets the finishedAt property: The time when the command finished. + * + * @return the finishedAt value. + */ + OffsetDateTime finishedAt(); + + /** + * Gets the logs property: The command output. + * + * @return the logs value. + */ + String logs(); + + /** + * Gets the reason property: An explanation of why provisioningState is set to failed (if so). + * + * @return the reason value. + */ + String reason(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.RunCommandResultInner + * object. + * + * @return the inner object. + */ + RunCommandResultInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SafeguardsAvailableVersion.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SafeguardsAvailableVersion.java new file mode 100644 index 0000000000000..73d7137652758 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SafeguardsAvailableVersion.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SafeguardsAvailableVersionInner; + +/** + * An immutable client-side representation of SafeguardsAvailableVersion. + */ +public interface SafeguardsAvailableVersion { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: Whether the version is default or not and support info. + * + * @return the properties value. + */ + SafeguardsAvailableVersionsProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SafeguardsAvailableVersionInner + * object. + * + * @return the inner object. + */ + SafeguardsAvailableVersionInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SafeguardsAvailableVersionsList.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SafeguardsAvailableVersionsList.java new file mode 100644 index 0000000000000..2481101d6a584 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SafeguardsAvailableVersionsList.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SafeguardsAvailableVersionInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Hold values properties, which is array of SafeguardsVersions. + */ +@Fluent +public final class SafeguardsAvailableVersionsList { + /* + * Array of AKS supported Safeguards versions. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next Safeguards available version. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of SafeguardsAvailableVersionsList class. + */ + public SafeguardsAvailableVersionsList() { + } + + /** + * Get the value property: Array of AKS supported Safeguards versions. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Array of AKS supported Safeguards versions. + * + * @param value the value value to set. + * @return the SafeguardsAvailableVersionsList object itself. + */ + public SafeguardsAvailableVersionsList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next Safeguards available version. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SafeguardsAvailableVersionsProperties.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SafeguardsAvailableVersionsProperties.java new file mode 100644 index 0000000000000..40542019a84d8 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SafeguardsAvailableVersionsProperties.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Whether the version is default or not and support info. + */ +@Immutable +public final class SafeguardsAvailableVersionsProperties { + /* + * The isDefaultVersion property. + */ + @JsonProperty(value = "isDefaultVersion", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDefaultVersion; + + /* + * Whether the version is preview or stable. + */ + @JsonProperty(value = "support", access = JsonProperty.Access.WRITE_ONLY) + private SafeguardsSupport support; + + /** + * Creates an instance of SafeguardsAvailableVersionsProperties class. + */ + public SafeguardsAvailableVersionsProperties() { + } + + /** + * Get the isDefaultVersion property: The isDefaultVersion property. + * + * @return the isDefaultVersion value. + */ + public Boolean isDefaultVersion() { + return this.isDefaultVersion; + } + + /** + * Get the support property: Whether the version is preview or stable. + * + * @return the support value. + */ + public SafeguardsSupport support() { + return this.support; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SafeguardsProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SafeguardsProfile.java new file mode 100644 index 0000000000000..98a4544b47d08 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SafeguardsProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The Safeguards profile. + */ +@Fluent +public final class SafeguardsProfile { + /* + * List of namespaces specified by AKS to be excluded from Safeguards + */ + @JsonProperty(value = "systemExcludedNamespaces", access = JsonProperty.Access.WRITE_ONLY) + private List systemExcludedNamespaces; + + /* + * The version of constraints to use + */ + @JsonProperty(value = "version") + private String version; + + /* + * The Safeguards level to be used. By default, Safeguards is enabled for all namespaces except those that AKS + * excludes via systemExcludedNamespaces + */ + @JsonProperty(value = "level", required = true) + private Level level; + + /* + * List of namespaces excluded from Safeguards checks + */ + @JsonProperty(value = "excludedNamespaces") + private List excludedNamespaces; + + /** + * Creates an instance of SafeguardsProfile class. + */ + public SafeguardsProfile() { + } + + /** + * Get the systemExcludedNamespaces property: List of namespaces specified by AKS to be excluded from Safeguards. + * + * @return the systemExcludedNamespaces value. + */ + public List systemExcludedNamespaces() { + return this.systemExcludedNamespaces; + } + + /** + * Get the version property: The version of constraints to use. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: The version of constraints to use. + * + * @param version the version value to set. + * @return the SafeguardsProfile object itself. + */ + public SafeguardsProfile withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the level property: The Safeguards level to be used. By default, Safeguards is enabled for all namespaces + * except those that AKS excludes via systemExcludedNamespaces. + * + * @return the level value. + */ + public Level level() { + return this.level; + } + + /** + * Set the level property: The Safeguards level to be used. By default, Safeguards is enabled for all namespaces + * except those that AKS excludes via systemExcludedNamespaces. + * + * @param level the level value to set. + * @return the SafeguardsProfile object itself. + */ + public SafeguardsProfile withLevel(Level level) { + this.level = level; + return this; + } + + /** + * Get the excludedNamespaces property: List of namespaces excluded from Safeguards checks. + * + * @return the excludedNamespaces value. + */ + public List excludedNamespaces() { + return this.excludedNamespaces; + } + + /** + * Set the excludedNamespaces property: List of namespaces excluded from Safeguards checks. + * + * @param excludedNamespaces the excludedNamespaces value to set. + * @return the SafeguardsProfile object itself. + */ + public SafeguardsProfile withExcludedNamespaces(List excludedNamespaces) { + this.excludedNamespaces = excludedNamespaces; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (level() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property level in model SafeguardsProfile")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SafeguardsProfile.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SafeguardsSupport.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SafeguardsSupport.java new file mode 100644 index 0000000000000..0963fac5d8e9f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SafeguardsSupport.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Whether the version is preview or stable. + */ +public final class SafeguardsSupport extends ExpandableStringEnum { + /** + * Static value Preview for SafeguardsSupport. + */ + public static final SafeguardsSupport PREVIEW = fromString("Preview"); + + /** + * Static value Stable for SafeguardsSupport. + */ + public static final SafeguardsSupport STABLE = fromString("Stable"); + + /** + * Creates a new instance of SafeguardsSupport value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SafeguardsSupport() { + } + + /** + * Creates or finds a SafeguardsSupport from its string representation. + * + * @param name a name to look for. + * @return the corresponding SafeguardsSupport. + */ + @JsonCreator + public static SafeguardsSupport fromString(String name) { + return fromString(name, SafeguardsSupport.class); + } + + /** + * Gets known SafeguardsSupport values. + * + * @return known SafeguardsSupport values. + */ + public static Collection values() { + return values(SafeguardsSupport.class); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleDownMode.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleDownMode.java new file mode 100644 index 0000000000000..543f3cc6a7765 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleDownMode.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleProfile.java new file mode 100644 index 0000000000000..a32d17da65a2a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Specifications on how to scale a VirtualMachines agent pool. + */ +@Fluent +public final class ScaleProfile { + /* + * Specifications on how to scale the VirtualMachines agent pool to a fixed size. + */ + @JsonProperty(value = "manual") + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleSetEvictionPolicy.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleSetEvictionPolicy.java new file mode 100644 index 0000000000000..90707fb2c7659 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleSetEvictionPolicy.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleSetPriority.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleSetPriority.java new file mode 100644 index 0000000000000..353d2f1caa787 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScaleSetPriority.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Schedule.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Schedule.java new file mode 100644 index 0000000000000..cd826bb1824f7 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Schedule.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * 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 { + /* + * For schedules like: 'recur every day' or 'recur every 3 days'. + */ + @JsonProperty(value = "daily") + private DailySchedule daily; + + /* + * For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. + */ + @JsonProperty(value = "weekly") + private WeeklySchedule weekly; + + /* + * For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. + */ + @JsonProperty(value = "absoluteMonthly") + private AbsoluteMonthlySchedule absoluteMonthly; + + /* + * For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. + */ + @JsonProperty(value = "relativeMonthly") + 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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScheduledEvent.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScheduledEvent.java new file mode 100644 index 0000000000000..364f09ca78e9d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScheduledEvent.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ScheduledEventInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of ScheduledEvent. + */ +public interface ScheduledEvent { + /** + * Gets the description property: The description of a scheduled event. + * + * @return the description value. + */ + String description(); + + /** + * Gets the eventId property: The event id of a scheduled event. + * + * @return the eventId value. + */ + String eventId(); + + /** + * Gets the eventSource property: The source of a scheduled event. + * + * @return the eventSource value. + */ + String eventSource(); + + /** + * Gets the eventStatus property: The status of a scheduled event. + * + * @return the eventStatus value. + */ + EventStatus eventStatus(); + + /** + * Gets the scheduledTime property: The time of a scheduled event. + * + * @return the scheduledTime value. + */ + OffsetDateTime scheduledTime(); + + /** + * Gets the startTime property: The time of a scheduled event starts. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the lastUpdateTime property: The time of a scheduled event last updates. + * + * @return the lastUpdateTime value. + */ + OffsetDateTime lastUpdateTime(); + + /** + * Gets the resources property: The list of resources of a scheduled event. + * + * @return the resources value. + */ + List resources(); + + /** + * Gets the resourceType property: The resource type of a scheduled event. + * + * @return the resourceType value. + */ + ResourceType resourceType(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ScheduledEventInner + * object. + * + * @return the inner object. + */ + ScheduledEventInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScheduledEvents.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScheduledEvents.java new file mode 100644 index 0000000000000..a652762d563e9 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ScheduledEvents.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ScheduledEvents. + */ +public interface ScheduledEvents { + /** + * Access to this resource type is not currently available via GET. To consume please use System Topics or Azure + * Resource Graph. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param scheduledEventName The name of the scheduled event. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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}. + */ + Response getWithResponse(String resourceGroupName, String resourceName, String scheduledEventName, + Context context); + + /** + * Access to this resource type is not currently available via GET. To consume please use System Topics or Azure + * Resource Graph. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param scheduledEventName The name of the scheduled event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ScheduledEvent get(String resourceGroupName, String resourceName, String scheduledEventName); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ServiceMeshMode.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ServiceMeshMode.java new file mode 100644 index 0000000000000..c056bd62070ed --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ServiceMeshMode.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ServiceMeshProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ServiceMeshProfile.java new file mode 100644 index 0000000000000..80b91d97e306b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/ServiceMeshProfile.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Service mesh profile for a managed cluster. + */ +@Fluent +public final class ServiceMeshProfile { + /* + * Mode of the service mesh. + */ + @JsonProperty(value = "mode", required = true) + private ServiceMeshMode mode; + + /* + * Istio service mesh configuration. + */ + @JsonProperty(value = "istio") + 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.logExceptionAsError( + new IllegalArgumentException("Missing required property mode in model ServiceMeshProfile")); + } + if (istio() != null) { + istio().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ServiceMeshProfile.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Snapshot.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Snapshot.java new file mode 100644 index 0000000000000..0c41ec71d9e98 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Snapshot.java @@ -0,0 +1,322 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SnapshotInner; +import java.util.Map; + +/** + * An immutable client-side representation of Snapshot. + */ +public interface Snapshot { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the creationData property: CreationData to be used to specify the source agent pool resource ID to create + * this snapshot. + * + * @return the creationData value. + */ + CreationData creationData(); + + /** + * Gets the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @return the snapshotType value. + */ + SnapshotType snapshotType(); + + /** + * Gets the kubernetesVersion property: The version of Kubernetes. + * + * @return the kubernetesVersion value. + */ + String kubernetesVersion(); + + /** + * Gets the nodeImageVersion property: The version of node image. + * + * @return the nodeImageVersion value. + */ + String nodeImageVersion(); + + /** + * Gets the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @return the osType value. + */ + OSType osType(); + + /** + * Gets the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if + * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after + * Windows2019 is deprecated. + * + * @return the osSku value. + */ + Ossku osSku(); + + /** + * Gets the vmSize property: The size of the VM. + * + * @return the vmSize value. + */ + String vmSize(); + + /** + * Gets the enableFips property: Whether to use a FIPS-enabled OS. + * + * @return the enableFips value. + */ + Boolean enableFips(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SnapshotInner + * object. + * + * @return the inner object. + */ + SnapshotInner innerModel(); + + /** + * The entirety of the Snapshot definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The Snapshot definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Snapshot definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the Snapshot definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the Snapshot definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the Snapshot definition which contains all the minimum required properties for the resource to + * be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithCreationData, DefinitionStages.WithSnapshotType { + /** + * Executes the create request. + * + * @return the created resource. + */ + Snapshot create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Snapshot create(Context context); + } + + /** + * The stage of the Snapshot definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the Snapshot definition allowing to specify creationData. + */ + interface WithCreationData { + /** + * Specifies the creationData property: CreationData to be used to specify the source agent pool resource ID + * to create this snapshot.. + * + * @param creationData CreationData to be used to specify the source agent pool resource ID to create this + * snapshot. + * @return the next definition stage. + */ + WithCreate withCreationData(CreationData creationData); + } + + /** + * The stage of the Snapshot definition allowing to specify snapshotType. + */ + interface WithSnapshotType { + /** + * Specifies the snapshotType property: The type of a snapshot. The default is NodePool.. + * + * @param snapshotType The type of a snapshot. The default is NodePool. + * @return the next definition stage. + */ + WithCreate withSnapshotType(SnapshotType snapshotType); + } + } + + /** + * Begins update for the Snapshot resource. + * + * @return the stage of resource update. + */ + Snapshot.Update update(); + + /** + * The template for Snapshot update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Snapshot apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Snapshot apply(Context context); + } + + /** + * The Snapshot update stages. + */ + interface UpdateStages { + /** + * The stage of the Snapshot update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Snapshot refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Snapshot refresh(Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SnapshotListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SnapshotListResult.java new file mode 100644 index 0000000000000..4ad95608ae66b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SnapshotListResult.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SnapshotInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response from the List Snapshots operation. + */ +@Fluent +public final class SnapshotListResult { + /* + * The list of snapshots. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next set of snapshot results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SnapshotType.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SnapshotType.java new file mode 100644 index 0000000000000..413137ebc8df3 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SnapshotType.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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"); + + /** + * Static value ManagedCluster for SnapshotType. + */ + public static final SnapshotType MANAGED_CLUSTER = fromString("ManagedCluster"); + + /** + * 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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Snapshots.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Snapshots.java new file mode 100644 index 0000000000000..0ee08c4351a55 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Snapshots.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Snapshots. + */ +public interface Snapshots { + /** + * 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}. + */ + 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}. + */ + 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 PagedIterable}. + */ + 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}. + */ + 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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}. + */ + 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. + */ + Snapshot getByResourceGroup(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}. + */ + Response deleteByResourceGroupWithResponse(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. + */ + void deleteByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Gets a snapshot. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot along with {@link Response}. + */ + Snapshot getById(String id); + + /** + * Gets a snapshot. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a snapshot. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes a snapshot. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Snapshot resource. + * + * @param name resource name. + * @return the first stage of the new Snapshot definition. + */ + Snapshot.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SysctlConfig.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SysctlConfig.java new file mode 100644 index 0000000000000..58d02853bb705 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/SysctlConfig.java @@ -0,0 +1,756 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Sysctl settings for Linux agent nodes. + */ +@Fluent +public final class SysctlConfig { + /* + * Sysctl setting net.core.somaxconn. + */ + @JsonProperty(value = "netCoreSomaxconn") + private Integer netCoreSomaxconn; + + /* + * Sysctl setting net.core.netdev_max_backlog. + */ + @JsonProperty(value = "netCoreNetdevMaxBacklog") + private Integer netCoreNetdevMaxBacklog; + + /* + * Sysctl setting net.core.rmem_default. + */ + @JsonProperty(value = "netCoreRmemDefault") + private Integer netCoreRmemDefault; + + /* + * Sysctl setting net.core.rmem_max. + */ + @JsonProperty(value = "netCoreRmemMax") + private Integer netCoreRmemMax; + + /* + * Sysctl setting net.core.wmem_default. + */ + @JsonProperty(value = "netCoreWmemDefault") + private Integer netCoreWmemDefault; + + /* + * Sysctl setting net.core.wmem_max. + */ + @JsonProperty(value = "netCoreWmemMax") + private Integer netCoreWmemMax; + + /* + * Sysctl setting net.core.optmem_max. + */ + @JsonProperty(value = "netCoreOptmemMax") + private Integer netCoreOptmemMax; + + /* + * Sysctl setting net.ipv4.tcp_max_syn_backlog. + */ + @JsonProperty(value = "netIpv4TcpMaxSynBacklog") + private Integer netIpv4TcpMaxSynBacklog; + + /* + * Sysctl setting net.ipv4.tcp_max_tw_buckets. + */ + @JsonProperty(value = "netIpv4TcpMaxTwBuckets") + private Integer netIpv4TcpMaxTwBuckets; + + /* + * Sysctl setting net.ipv4.tcp_fin_timeout. + */ + @JsonProperty(value = "netIpv4TcpFinTimeout") + private Integer netIpv4TcpFinTimeout; + + /* + * Sysctl setting net.ipv4.tcp_keepalive_time. + */ + @JsonProperty(value = "netIpv4TcpKeepaliveTime") + private Integer netIpv4TcpKeepaliveTime; + + /* + * Sysctl setting net.ipv4.tcp_keepalive_probes. + */ + @JsonProperty(value = "netIpv4TcpKeepaliveProbes") + private Integer netIpv4TcpKeepaliveProbes; + + /* + * Sysctl setting net.ipv4.tcp_keepalive_intvl. + */ + @JsonProperty(value = "netIpv4TcpkeepaliveIntvl") + private Integer netIpv4TcpkeepaliveIntvl; + + /* + * Sysctl setting net.ipv4.tcp_tw_reuse. + */ + @JsonProperty(value = "netIpv4TcpTwReuse") + private Boolean netIpv4TcpTwReuse; + + /* + * Sysctl setting net.ipv4.ip_local_port_range. + */ + @JsonProperty(value = "netIpv4IpLocalPortRange") + private String netIpv4IpLocalPortRange; + + /* + * Sysctl setting net.ipv4.neigh.default.gc_thresh1. + */ + @JsonProperty(value = "netIpv4NeighDefaultGcThresh1") + private Integer netIpv4NeighDefaultGcThresh1; + + /* + * Sysctl setting net.ipv4.neigh.default.gc_thresh2. + */ + @JsonProperty(value = "netIpv4NeighDefaultGcThresh2") + private Integer netIpv4NeighDefaultGcThresh2; + + /* + * Sysctl setting net.ipv4.neigh.default.gc_thresh3. + */ + @JsonProperty(value = "netIpv4NeighDefaultGcThresh3") + private Integer netIpv4NeighDefaultGcThresh3; + + /* + * Sysctl setting net.netfilter.nf_conntrack_max. + */ + @JsonProperty(value = "netNetfilterNfConntrackMax") + private Integer netNetfilterNfConntrackMax; + + /* + * Sysctl setting net.netfilter.nf_conntrack_buckets. + */ + @JsonProperty(value = "netNetfilterNfConntrackBuckets") + private Integer netNetfilterNfConntrackBuckets; + + /* + * Sysctl setting fs.inotify.max_user_watches. + */ + @JsonProperty(value = "fsInotifyMaxUserWatches") + private Integer fsInotifyMaxUserWatches; + + /* + * Sysctl setting fs.file-max. + */ + @JsonProperty(value = "fsFileMax") + private Integer fsFileMax; + + /* + * Sysctl setting fs.aio-max-nr. + */ + @JsonProperty(value = "fsAioMaxNr") + private Integer fsAioMaxNr; + + /* + * Sysctl setting fs.nr_open. + */ + @JsonProperty(value = "fsNrOpen") + private Integer fsNrOpen; + + /* + * Sysctl setting kernel.threads-max. + */ + @JsonProperty(value = "kernelThreadsMax") + private Integer kernelThreadsMax; + + /* + * Sysctl setting vm.max_map_count. + */ + @JsonProperty(value = "vmMaxMapCount") + private Integer vmMaxMapCount; + + /* + * Sysctl setting vm.swappiness. + */ + @JsonProperty(value = "vmSwappiness") + private Integer vmSwappiness; + + /* + * Sysctl setting vm.vfs_cache_pressure. + */ + @JsonProperty(value = "vmVfsCachePressure") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TagsObject.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TagsObject.java new file mode 100644 index 0000000000000..c27264593c38c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TagsObject.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * Tags object for patch operations. + */ +@Fluent +public final class TagsObject { + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** + * Creates an instance of TagsObject class. + */ + public TagsObject() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the TagsObject object itself. + */ + public TagsObject withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TimeInWeek.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TimeInWeek.java new file mode 100644 index 0000000000000..418ec12807711 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TimeInWeek.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Time in a week. + */ +@Fluent +public final class TimeInWeek { + /* + * The day of the week. + */ + @JsonProperty(value = "day") + 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. + */ + @JsonProperty(value = "hourSlots") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TimeSpan.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TimeSpan.java new file mode 100644 index 0000000000000..83216a07b5c55 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TimeSpan.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * A time range. + * + * For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. + */ +@Fluent +public final class TimeSpan { + /* + * The start of a time span + */ + @JsonProperty(value = "start") + private OffsetDateTime start; + + /* + * The end of a time span + */ + @JsonProperty(value = "end") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRole.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRole.java new file mode 100644 index 0000000000000..428fedfda00a1 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRole.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleInner; +import java.util.List; + +/** + * An immutable client-side representation of TrustedAccessRole. + */ +public interface TrustedAccessRole { + /** + * Gets the sourceResourceType property: Resource type of Azure resource. + * + * @return the sourceResourceType value. + */ + String sourceResourceType(); + + /** + * Gets the name property: Name of role, name is unique under a source resource type. + * + * @return the name value. + */ + String name(); + + /** + * Gets 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. + */ + List rules(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleInner + * object. + * + * @return the inner object. + */ + TrustedAccessRoleInner innerModel(); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBinding.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBinding.java new file mode 100644 index 0000000000000..235e93fea204c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBinding.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleBindingInner; +import java.util.List; + +/** + * An immutable client-side representation of TrustedAccessRoleBinding. + */ +public interface TrustedAccessRoleBinding { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The current provisioning state of trusted access role binding. + * + * @return the provisioningState value. + */ + TrustedAccessRoleBindingProvisioningState provisioningState(); + + /** + * Gets the sourceResourceId property: The ARM resource ID of source resource that trusted access is configured for. + * + * @return the sourceResourceId value. + */ + String sourceResourceId(); + + /** + * Gets 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. + */ + List roles(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner + * com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleBindingInner + * object. + * + * @return the inner object. + */ + TrustedAccessRoleBindingInner innerModel(); + + /** + * The entirety of the TrustedAccessRoleBinding definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithSourceResourceId, DefinitionStages.WithRoles, DefinitionStages.WithCreate { + } + + /** + * The TrustedAccessRoleBinding definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the TrustedAccessRoleBinding definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the TrustedAccessRoleBinding definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, resourceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @return the next definition stage. + */ + WithSourceResourceId withExistingManagedCluster(String resourceGroupName, String resourceName); + } + + /** + * The stage of the TrustedAccessRoleBinding definition allowing to specify sourceResourceId. + */ + interface WithSourceResourceId { + /** + * Specifies the sourceResourceId property: The ARM resource ID of source resource that trusted access is + * configured for.. + * + * @param sourceResourceId The ARM resource ID of source resource that trusted access is configured for. + * @return the next definition stage. + */ + WithRoles withSourceResourceId(String sourceResourceId); + } + + /** + * The stage of the TrustedAccessRoleBinding definition allowing to specify roles. + */ + interface WithRoles { + /** + * Specifies 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 A list of roles to bind, each item is a resource type qualified role name. For example: + * 'Microsoft.MachineLearningServices/workspaces/reader'. + * @return the next definition stage. + */ + WithCreate withRoles(List roles); + } + + /** + * The stage of the TrustedAccessRoleBinding definition which contains all the minimum required properties for + * the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate { + /** + * Executes the create request. + * + * @return the created resource. + */ + TrustedAccessRoleBinding create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + TrustedAccessRoleBinding create(Context context); + } + } + + /** + * Begins update for the TrustedAccessRoleBinding resource. + * + * @return the stage of resource update. + */ + TrustedAccessRoleBinding.Update update(); + + /** + * The template for TrustedAccessRoleBinding update. + */ + interface Update extends UpdateStages.WithSourceResourceId, UpdateStages.WithRoles { + /** + * Executes the update request. + * + * @return the updated resource. + */ + TrustedAccessRoleBinding apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + TrustedAccessRoleBinding apply(Context context); + } + + /** + * The TrustedAccessRoleBinding update stages. + */ + interface UpdateStages { + /** + * The stage of the TrustedAccessRoleBinding update allowing to specify sourceResourceId. + */ + interface WithSourceResourceId { + /** + * Specifies the sourceResourceId property: The ARM resource ID of source resource that trusted access is + * configured for.. + * + * @param sourceResourceId The ARM resource ID of source resource that trusted access is configured for. + * @return the next definition stage. + */ + Update withSourceResourceId(String sourceResourceId); + } + + /** + * The stage of the TrustedAccessRoleBinding update allowing to specify roles. + */ + interface WithRoles { + /** + * Specifies 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 A list of roles to bind, each item is a resource type qualified role name. For example: + * 'Microsoft.MachineLearningServices/workspaces/reader'. + * @return the next definition stage. + */ + Update withRoles(List roles); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + TrustedAccessRoleBinding refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + TrustedAccessRoleBinding refresh(Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindingListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindingListResult.java new file mode 100644 index 0000000000000..721bac12e31c8 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindingListResult.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleBindingInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of trusted access role bindings. + */ +@Fluent +public final class TrustedAccessRoleBindingListResult { + /* + * Role binding list + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to next page of resources. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindingProvisioningState.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindingProvisioningState.java new file mode 100644 index 0000000000000..ffafd0076fc07 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindingProvisioningState.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindings.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindings.java new file mode 100644 index 0000000000000..7b8730b1dc410 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleBindings.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of TrustedAccessRoleBindings. + */ +public interface TrustedAccessRoleBindings { + /** + * 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}. + */ + 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}. + */ + 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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}. + */ + 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. + */ + TrustedAccessRoleBinding get(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. + */ + 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. + */ + void delete(String resourceGroupName, String resourceName, String trustedAccessRoleBindingName, Context context); + + /** + * Get a trusted access role binding. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a trusted access role binding along with {@link Response}. + */ + TrustedAccessRoleBinding getById(String id); + + /** + * Get a trusted access role binding. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a trusted access role binding along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a trusted access role binding. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a trusted access role binding. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new TrustedAccessRoleBinding resource. + * + * @param name resource name. + * @return the first stage of the new TrustedAccessRoleBinding definition. + */ + TrustedAccessRoleBinding.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleListResult.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleListResult.java new file mode 100644 index 0000000000000..aed389965cf9b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleListResult.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of trusted access roles. + */ +@Immutable +public final class TrustedAccessRoleListResult { + /* + * Role list + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * Link to next page of resources. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + 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()); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleRule.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleRule.java new file mode 100644 index 0000000000000..f703330dd4e9a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoleRule.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Rule for trusted access role. + */ +@Immutable +public final class TrustedAccessRoleRule { + /* + * List of allowed verbs + */ + @JsonProperty(value = "verbs", access = JsonProperty.Access.WRITE_ONLY) + private List verbs; + + /* + * List of allowed apiGroups + */ + @JsonProperty(value = "apiGroups", access = JsonProperty.Access.WRITE_ONLY) + private List apiGroups; + + /* + * List of allowed resources + */ + @JsonProperty(value = "resources", access = JsonProperty.Access.WRITE_ONLY) + private List resources; + + /* + * List of allowed names + */ + @JsonProperty(value = "resourceNames", access = JsonProperty.Access.WRITE_ONLY) + private List resourceNames; + + /* + * List of allowed nonResourceURLs + */ + @JsonProperty(value = "nonResourceURLs", access = JsonProperty.Access.WRITE_ONLY) + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoles.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoles.java new file mode 100644 index 0000000000000..8365ed3a32f44 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/TrustedAccessRoles.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of TrustedAccessRoles. + */ +public interface TrustedAccessRoles { + /** + * 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}. + */ + 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}. + */ + PagedIterable list(String location, Context context); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Type.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Type.java new file mode 100644 index 0000000000000..7327b63cbabb3 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/Type.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The week index. + * + * Specifies on which instance of the allowed days specified in daysOfWeek the maintenance occurs. + */ +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UpgradeChannel.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UpgradeChannel.java new file mode 100644 index 0000000000000..71fe4c38b4e7e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UpgradeChannel.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UpgradeOverrideSettings.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UpgradeOverrideSettings.java new file mode 100644 index 0000000000000..c1f05ad14d856 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UpgradeOverrideSettings.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Settings for overrides when upgrading a cluster. + */ +@Fluent +public final class UpgradeOverrideSettings { + /* + * 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. + */ + @JsonProperty(value = "forceUpgrade") + 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. + */ + @JsonProperty(value = "until") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UserAssignedIdentity.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UserAssignedIdentity.java new file mode 100644 index 0000000000000..ebc9a882d0115 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/UserAssignedIdentity.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details about a user assigned identity. + */ +@Fluent +public class UserAssignedIdentity { + /* + * The resource ID of the user assigned identity. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /* + * The client ID of the user assigned identity. + */ + @JsonProperty(value = "clientId") + private String clientId; + + /* + * The object ID of the user assigned identity. + */ + @JsonProperty(value = "objectId") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/VirtualMachineNodes.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/VirtualMachineNodes.java new file mode 100644 index 0000000000000..8a09dd8908861 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/VirtualMachineNodes.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Current status on a group of nodes of the same vm size. + */ +@Fluent +public final class VirtualMachineNodes { + /* + * The VM size of the agents used to host this group of nodes. + */ + @JsonProperty(value = "size") + private String size; + + /* + * Number of nodes. + */ + @JsonProperty(value = "count") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/VirtualMachinesProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/VirtualMachinesProfile.java new file mode 100644 index 0000000000000..606b6e6e08abc --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/VirtualMachinesProfile.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifications on VirtualMachines agent pool. + */ +@Fluent +public final class VirtualMachinesProfile { + /* + * Specifications on how to scale a VirtualMachines agent pool. + */ + @JsonProperty(value = "scale") + 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(); + } + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WeekDay.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WeekDay.java new file mode 100644 index 0000000000000..5a9b13b77103f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WeekDay.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WeeklySchedule.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WeeklySchedule.java new file mode 100644 index 0000000000000..146b008d0c065 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WeeklySchedule.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. + */ +@Fluent +public final class WeeklySchedule { + /* + * Specifies the number of weeks between each set of occurrences. + */ + @JsonProperty(value = "intervalWeeks", required = true) + private int intervalWeeks; + + /* + * Specifies on which day of the week the maintenance occurs. + */ + @JsonProperty(value = "dayOfWeek", required = true) + 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.logExceptionAsError( + new IllegalArgumentException("Missing required property dayOfWeek in model WeeklySchedule")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WeeklySchedule.class); +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WindowsGmsaProfile.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WindowsGmsaProfile.java new file mode 100644 index 0000000000000..25265a4f7dd28 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WindowsGmsaProfile.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Windows gMSA Profile in the managed cluster. + */ +@Fluent +public final class WindowsGmsaProfile { + /* + * Whether to enable Windows gMSA. + * + * Specifies whether to enable Windows gMSA in the managed cluster. + */ + @JsonProperty(value = "enabled") + 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. + */ + @JsonProperty(value = "dnsServer") + 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. + */ + @JsonProperty(value = "rootDomainName") + 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() { + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WorkloadRuntime.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WorkloadRuntime.java new file mode 100644 index 0000000000000..dc9f160621d15 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/WorkloadRuntime.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.containerservicemicrosoftcontainerserviceaks.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +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 KataMshvVmIsolation for WorkloadRuntime. + */ + public static final WorkloadRuntime KATA_MSHV_VM_ISOLATION = fromString("KataMshvVmIsolation"); + + /** + * 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. + */ + @JsonCreator + 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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/package-info.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/package-info.java new file mode 100644 index 0000000000000..8cc029732e32d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the data models for ContainerServiceManagementClient. + * Container Service Client. + */ +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/package-info.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/package-info.java new file mode 100644 index 0000000000000..5bb2379f18bb7 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the classes for ContainerServiceManagementClient. + * Container Service Client. + */ +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated; diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/module-info.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/module-info.java new file mode 100644 index 0000000000000..3b763e21e4b4e --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/java/module-info.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +module com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated { + requires transitive com.azure.core.management; + + exports com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated; + exports com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent; + exports com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models; + exports com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models; + + opens com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models + to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models + to com.azure.core, com.fasterxml.jackson.databind; +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/proxy-config.json b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/proxy-config.json new file mode 100644 index 0000000000000..655ff11659ff1 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/proxy-config.json @@ -0,0 +1 @@ +[ [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.OpenShiftManagedClustersClientImpl$OpenShiftManagedClustersService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.ContainerServicesClientImpl$ContainerServicesService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.ManagedClustersClientImpl$ManagedClustersService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.MaintenanceConfigurationsClientImpl$MaintenanceConfigurationsService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.AgentPoolsClientImpl$AgentPoolsService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.MachinesClientImpl$MachinesService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.ResolvePrivateLinkServiceIdsClientImpl$ResolvePrivateLinkServiceIdsService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.OperationStatusResultsClientImpl$OperationStatusResultsService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.SnapshotsClientImpl$SnapshotsService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.ManagedClusterSnapshotsClientImpl$ManagedClusterSnapshotsService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.TrustedAccessRolesClientImpl$TrustedAccessRolesService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.TrustedAccessRoleBindingsClientImpl$TrustedAccessRoleBindingsService" ], [ "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.implementation.ScheduledEventsClientImpl$ScheduledEventsService" ] ] \ No newline at end of file diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/reflect-config.json b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/reflect-config.json new file mode 100644 index 0000000000000..641af07a20df9 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/reflect-config.json @@ -0,0 +1,1316 @@ +[ { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OpenShiftManagedClusterInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PurchasePlan", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OpenShiftManagedClusterProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftRouterProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterMasterPoolProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAgentPoolProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAuthProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterIdentityProvider", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterBaseIdentityProvider", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TagsObject", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OrchestratorVersionProfileListResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OrchestratorVersionProfileProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OrchestratorVersionProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OrchestratorProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OperationListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationValueInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationValueDisplay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OSOptionProfileInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OSOptionPropertyList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSOptionProperty", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.KubernetesVersionListResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesVersion", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesVersionCapabilities", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesPatchVersion", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSku", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ExtendedLocation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.DelegatedResource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedServiceIdentityUserAssignedIdentitiesValue", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PowerState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAgentPoolProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterAgentPoolProfileProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolUpgradeSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubeletConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.LinuxOSConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SysctlConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolWindowsProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolNetworkProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IpTag", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PortRange", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolSecurityProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolGpuProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolArtifactStreamingProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.VirtualMachinesProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManualScaleProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.VirtualMachineNodes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceLinuxProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceSshConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceSshPublicKey", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWindowsProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WindowsGmsaProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterServicePrincipalProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAddonProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAddonProfileIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.UserAssignedIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentityProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentityProvisioningInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentityProvisioningError", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentityProvisioningErrorBody", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentityException", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterOidcIssuerProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterNodeResourceGroupProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceNetworkProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterLoadBalancerProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterLoadBalancerProfileOutboundIpPrefixes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ResourceReference", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterLoadBalancerProfileOutboundIPs", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterNatGatewayProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterManagedOutboundIpProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceNetworkProfileKubeProxyConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkMonitoring", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAadProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAutoUpgradeProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ClusterUpgradeSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.UpgradeOverrideSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPropertiesAutoScalerProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterApiServerAccessProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterHttpProxyConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfileDefender", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AzureKeyVaultKms", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfileWorkloadIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfileImageCleaner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfileImageIntegrity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSecurityProfileNodeRestriction", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterStorageProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterStorageProfileDiskCsiDriver", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterStorageProfileFileCsiDriver", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterStorageProfileSnapshotController", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterStorageProfileBlobCsiDriver", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterIngressProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterIngressProfileWebAppRouting", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWorkloadAutoScalerProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWorkloadAutoScalerProfileKeda", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAzureMonitorProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAzureMonitorProfileMetrics", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAzureMonitorProfileKubeStateMetrics", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAzureMonitorProfileLogs", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAzureMonitorProfileContainerInsights", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAzureMonitorProfileWindowsHostLogs", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAzureMonitorProfileAppMonitoring", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SafeguardsProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ServiceMeshProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioServiceMesh", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioComponents", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioIngressGateway", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioEgressGateway", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioCertificateAuthority", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioPluginCertificateAuthority", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterMetricsProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterCostAnalysis", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterAIToolchainOperatorProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterNodeProvisioningProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterUpgradeProfileInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterUpgradeProfileProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPoolUpgradeProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPoolUpgradeProfileUpgradesItem", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterAccessProfileInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AccessProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.CredentialResultsInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CredentialResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MaintenanceConfigurationListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MaintenanceConfigurationInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MaintenanceConfigurationProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TimeInWeek", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TimeSpan", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MaintenanceWindow", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Schedule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.DailySchedule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WeeklySchedule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AbsoluteMonthlySchedule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RelativeMonthlySchedule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.DateSpan", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolUpgradeProfileInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolUpgradeProfileProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolUpgradeProfilePropertiesUpgradesItem", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolDeleteMachinesParameter", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MachineListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MachineInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MachineProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MachineNetworkProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MachineIpAddress", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolAvailableVersionsInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.AgentPoolAvailableVersionsProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionListResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpoint", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkServiceConnectionState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourcesListResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RunCommandRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.RunCommandResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.CommandResultProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OutboundEnvironmentEndpointCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OutboundEnvironmentEndpointInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.EndpointDependency", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.EndpointDetail", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OperationStatusResultList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.OperationStatusResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SnapshotListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SnapshotInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SnapshotProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSnapshotListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterSnapshotInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ManagedClusterSnapshotProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPropertiesForSnapshot", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkProfileForSnapshot", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleBindingListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleBindingInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.TrustedAccessRoleBindingProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.GuardrailsAvailableVersionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.GuardrailsAvailableVersionsProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.GuardrailsAvailableVersionsList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.SafeguardsAvailableVersionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SafeguardsAvailableVersionsProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SafeguardsAvailableVersionsList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshRevisionProfileList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshRevisionProfileInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshRevisionProfileProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshRevision", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CompatibleVersions", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshUpgradeProfileList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.MeshUpgradeProfileInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.MeshUpgradeProfileProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.ScheduledEventInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedClusterAadIdentityProvider", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClustersGetCommandResultHeaders", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftContainerServiceVMSize", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftAgentPoolProfileRole", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubernetesSupportPlan", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSkuName", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterSkuTier", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ExtendedLocationTypes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Code", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSDiskType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubeletDiskType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WorkloadRuntime", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Ossku", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleDownMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetPriority", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetEvictionPolicy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.GpuInstanceProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Protocol", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolSshAccess", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.LicenseType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedClusterPodIdentityProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.RestrictionLevel", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkPlugin", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkPluginMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkPolicy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NetworkDataplane", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OutboundType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.LoadBalancerSku", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.BackendPoolType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IpFamily", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Mode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IpvsScheduler", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.UpgradeChannel", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NodeOSUpgradeChannel", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Expander", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KeyVaultNetworkAccessTypes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PublicNetworkAccess", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AddonAutoscaling", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Level", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ServiceMeshMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.IstioIngressGatewayMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.NodeProvisioningMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Format", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WeekDay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Type", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateEndpointConnectionProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ConnectionStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SnapshotType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.TrustedAccessRoleBindingProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.GuardrailsSupport", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SafeguardsSupport", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.EventStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ResourceType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ResourceIdentityType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +} ] \ No newline at end of file diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsAbor.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsAbor.java new file mode 100644 index 0000000000000..131c039754b75 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsAbor.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.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** + * Samples for AgentPools AbortLatestOperation. + */ +public final class AgentPoolsAbor { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/AgentPoolsAbortOperation.json + */ + /** + * Sample code: Abort operation on agent pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void abortOperationOnAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().abortLatestOperation("rg1", "clustername1", "agentpool1", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsCrea.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsCrea.java new file mode 100644 index 0000000000000..f7f13fc87e776 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsCrea.java @@ -0,0 +1,470 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPool; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolMode; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolWindowsProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Code; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.GpuInstanceProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.KubeletConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.LinuxOSConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManualScaleProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSDiskType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OSType; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Ossku; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PowerState; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetEvictionPolicy; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ScaleSetPriority; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.SysctlConfig; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.VirtualMachinesProfile; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.WorkloadRuntime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for AgentPools CreateOrUpdate. + */ +public final class AgentPoolsCrea { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withCount(3) + .withVmSize("Standard_DS2_v2").withOsType(OSType.LINUX).withOrchestratorVersion("").withEnableFips(true) + .create(); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/AgentPoolsCreate_GPUMIG.json + */ + /** + * Sample code: Create Agent Pool with GPUMIG. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithGPUMIG( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").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).create(); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("wnp2").withExistingManagedCluster("rg1", "clustername1").withCount(3) + .withVmSize("Standard_D4s_v3").withOsType(OSType.WINDOWS).withOsSku(Ossku.WINDOWS2022) + .withOrchestratorVersion("1.23.3").create(); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withCount(3) + .withVmSize("Standard_DS2_v2").withOsType(OSType.LINUX).withOrchestratorVersion("") + .withHostGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1") + .create(); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/AgentPoolsCreate_Update.json + */ + /** + * Sample code: Create/Update Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1") + .withTags(mapOf("name1", "val1")).withCount(3).withVmSize("Standard_DS1_v2").withOsType(OSType.LINUX) + .withMode(AgentPoolMode.USER).withOrchestratorVersion("").withScaleSetPriority(ScaleSetPriority.SPOT) + .withScaleSetEvictionPolicy(ScaleSetEvictionPolicy.DELETE) + .withNodeLabels(mapOf("key1", "fakeTokenPlaceholder")) + .withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")).create(); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("wnp2").withExistingManagedCluster("rg1", "clustername1").withCount(3) + .withVmSize("Standard_D4s_v3").withOsType(OSType.WINDOWS).withOsSku(Ossku.WINDOWS2022) + .withOrchestratorVersion("1.23.8") + .withWindowsProfile(new AgentPoolWindowsProfile().withDisableOutboundNat(true)).create(); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/AgentPools_Start.json + */ + /** + * Sample code: Start Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void startAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1") + .withPowerState(new PowerState().withCode(Code.RUNNING)).create(); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/AgentPoolsCreate_EnableCustomCATrust.json + */ + /** + * Sample code: Create Agent Pool with CustomCATrust enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithCustomCATrustEnabled( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withCount(3) + .withVmSize("Standard_DS2_v2").withOsType(OSType.LINUX).withOrchestratorVersion("") + .withEnableCustomCATrust(true).create(); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/AgentPoolsCreate_Spot.json + */ + /** + * Sample code: Create Spot Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createSpotAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1") + .withTags(mapOf("name1", "val1")).withCount(3).withVmSize("Standard_DS1_v2").withOsType(OSType.LINUX) + .withOrchestratorVersion("").withScaleSetPriority(ScaleSetPriority.SPOT) + .withScaleSetEvictionPolicy(ScaleSetEvictionPolicy.DELETE) + .withNodeLabels(mapOf("key1", "fakeTokenPlaceholder")) + .withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")).create(); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withCount(3) + .withVmSize("Standard_DS2_v2").withOsDiskSizeGB(64).withOsDiskType(OSDiskType.EPHEMERAL) + .withOsType(OSType.LINUX).withOrchestratorVersion("").create(); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/AgentPoolsAssociate_CRG.json + */ + /** + * Sample code: Associate Agent Pool with Capacity Reservation Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void associateAgentPoolWithCapacityReservationGroup( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withCount(3) + .withVmSize("Standard_DS2_v2").withOsType(OSType.LINUX).withOrchestratorVersion("") + .withCapacityReservationGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1") + .create(); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withCount(3) + .withVmSize("Standard_DS2_v2").withOsType(OSType.LINUX).withOrchestratorVersion("") + .withEnableEncryptionAtHost(true).create(); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withCount(3) + .withVmSize("Standard_DS2_v2").withOsType(OSType.LINUX).withOrchestratorVersion("").withEnableUltraSsd(true) + .create(); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withCount(3) + .withVmSize("Standard_DS2_v2").withOsDiskSizeGB(64).withWorkloadRuntime(WorkloadRuntime.WASM_WASI) + .withOsType(OSType.LINUX).withMode(AgentPoolMode.USER).withOrchestratorVersion("").create(); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").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")) + .create(); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/AgentPoolsCreate_PPG.json + */ + /** + * Sample code: Create Agent Pool with PPG. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithPPG( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withCount(3) + .withVmSize("Standard_DS2_v2").withOsType(OSType.LINUX).withOrchestratorVersion("") + .withProximityPlacementGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1") + .create(); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").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)) + .create(); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/AgentPools_Stop.json + */ + /** + * Sample code: Stop Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void stopAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1") + .withPowerState(new PowerState().withCode(Code.STOPPED)).create(); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").withCount(3) + .withVmSize("Standard_DS2_v2").withOsDiskSizeGB(64).withMessageOfTheDay("Zm9vCg==").withOsType(OSType.LINUX) + .withMode(AgentPoolMode.USER).withOrchestratorVersion("").create(); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/AgentPoolsCreate_OSSKU.json + */ + /** + * Sample code: Create Agent Pool with OSSKU. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithOSSKU( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1").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)) + .create(); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().define("agentpool1").withExistingManagedCluster("rg1", "clustername1") + .withTags(mapOf("name1", "val1")).withOsType(OSType.LINUX) + .withTypePropertiesType(AgentPoolType.VIRTUAL_MACHINES).withOrchestratorVersion("1.9.6") + .withNodeLabels(mapOf("key1", "fakeTokenPlaceholder")) + .withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")) + .withVirtualMachinesProfile(new VirtualMachinesProfile() + .withScale(new ScaleProfile().withManual(Arrays.asList(new ManualScaleProfile() + .withSizes(Arrays.asList("Standard_D2_v2", "Standard_D2_v3")).withCount(5))))) + .create(); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/AgentPools_Update.json + */ + /** + * Sample code: Update Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updateAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + AgentPool resource = manager.agentPools() + .getWithResponse("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE).getValue(); + resource.update().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")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsDele.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsDele.java new file mode 100644 index 0000000000000..9f97512293f97 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsDele.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.containerservicemicrosoftcontainerserviceaks.generated.generated; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.AgentPoolDeleteMachinesParameter; +import java.util.Arrays; + +/** + * Samples for AgentPools DeleteMachines. + */ +public final class AgentPoolsDele { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().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/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetA.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetA.java new file mode 100644 index 0000000000000..567621f631e73 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetA.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.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** + * Samples for AgentPools GetAvailableAgentPoolVersions. + */ +public final class AgentPoolsGetA { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/AgentPoolsGetAgentPoolAvailableVersions.json + */ + /** + * Sample code: Get available versions for agent pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getAvailableVersionsForAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().getAvailableAgentPoolVersionsWithResponse("rg1", "clustername1", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetS.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetS.java new file mode 100644 index 0000000000000..a8d086981d501 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetS.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.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** + * Samples for AgentPools Get. + */ +public final class AgentPoolsGetS { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/AgentPoolsGet.json + */ + /** + * Sample code: Get Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().getWithResponse("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetU.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetU.java new file mode 100644 index 0000000000000..31226fedf06ea --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsGetU.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.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** + * Samples for AgentPools GetUpgradeProfile. + */ +public final class AgentPoolsGetU { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/AgentPoolsGetUpgradeProfile.json + */ + /** + * Sample code: Get Upgrade Profile for Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getUpgradeProfileForAgentPool( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().getUpgradeProfileWithResponse("rg1", "clustername1", "agentpool1", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsList.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsList.java new file mode 100644 index 0000000000000..5193fd1861df0 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsList.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.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** + * Samples for AgentPools List. + */ +public final class AgentPoolsList { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/AgentPoolsList.json + */ + /** + * Sample code: List Agent Pools by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listAgentPoolsByManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().list("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsUpgr.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsUpgr.java new file mode 100644 index 0000000000000..84758e4522e4a --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/AgentPoolsUpgr.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.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** + * Samples for AgentPools UpgradeNodeImageVersion. + */ +public final class AgentPoolsUpgr { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/AgentPoolsUpgradeNodeImageVersion.json + */ + /** + * Sample code: Upgrade Agent Pool Node Image Version. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void upgradeAgentPoolNodeImageVersion( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.agentPools().upgradeNodeImageVersion("rg1", "clustername1", "agentpool1", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ContainerServi.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ContainerServi.java new file mode 100644 index 0000000000000..533feb2cc54de --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ContainerServi.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.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** + * Samples for ContainerServices ListOrchestrators. + */ +public final class ContainerServi { + /* + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.containerServices().listOrchestratorsWithResponse("location1", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/MachinesGetSam.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/MachinesGetSam.java new file mode 100644 index 0000000000000..c4569845c5901 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/MachinesGetSam.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.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** + * Samples for Machines Get. + */ +public final class MachinesGetSam { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.machines().getWithResponse("rg1", "clustername1", "agentpool1", "aks-nodepool1-42263519-vmss00000t", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/MachinesListSa.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/MachinesListSa.java new file mode 100644 index 0000000000000..2ffb49f2a8d60 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/MachinesListSa.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.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** + * Samples for Machines List. + */ +public final class MachinesListSa { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.machines().list("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/MaintenanceCon.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/MaintenanceCon.java new file mode 100644 index 0000000000000..36b9a2b653ac8 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/MaintenanceCon.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** + * Samples for MaintenanceConfigurations ListByManagedCluster. + */ +public final class MaintenanceCon { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.maintenanceConfigurations().listByManagedCluster("rg1", "clustername1", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/MaintenanceConfigurationsList.json + */ + /** + * Sample code: List maintenance configurations by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listMaintenanceConfigurationsByManagedCluster( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.maintenanceConfigurations().listByManagedCluster("rg1", "clustername1", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ManagedCluster.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ManagedCluster.java new file mode 100644 index 0000000000000..8e30c06b54f8c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ManagedCluster.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ManagedCluster; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ManagedClusters UpdateTags. + */ +public final class ManagedCluster { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/ManagedClustersUpdateTags.json + */ + /** + * Sample code: Update Managed Cluster Tags. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updateManagedClusterTags( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + ManagedCluster resource = manager.managedClusters() + .getByResourceGroupWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf("archv3", "", "tier", "testing")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/OpenShiftManag.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/OpenShiftManag.java new file mode 100644 index 0000000000000..24c4022b36c9d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/OpenShiftManag.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.OpenShiftManagedCluster; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for OpenShiftManagedClusters UpdateTags. + */ +public final class OpenShiftManag { + /* + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + OpenShiftManagedCluster resource = manager.openShiftManagedClusters() + .getByResourceGroupWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf("archv3", "", "tier", "testing")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/OperationStatu.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/OperationStatu.java new file mode 100644 index 0000000000000..d016ccbceb4b8 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/OperationStatu.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.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** + * Samples for OperationStatusResult List. + */ +public final class OperationStatu { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/OperationStatusResultList.json + */ + /** + * Sample code: List of OperationStatusResult. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listOfOperationStatusResult( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.operationStatusResults().list("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/OperationsList.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/OperationsList.java new file mode 100644 index 0000000000000..944dcc02de15d --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/OperationsList.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.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** + * Samples for Operations List. + */ +public final class OperationsList { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/PrivateEndpoin.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/PrivateEndpoin.java new file mode 100644 index 0000000000000..550117be6f0fb --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/PrivateEndpoin.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.containerservicemicrosoftcontainerserviceaks.generated.generated; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.ConnectionStatus; +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.PrivateLinkServiceConnectionState; + +/** + * Samples for PrivateEndpointConnections Update. + */ +public final class PrivateEndpoin { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/PrivateEndpointConnectionsUpdate.json + */ + /** + * Sample code: Update Private Endpoint Connection. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updatePrivateEndpointConnection( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.privateEndpointConnections().updateWithResponse("rg1", "clustername1", "privateendpointconnection1", + new PrivateEndpointConnectionInner().withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.APPROVED)), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/PrivateLinkRes.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/PrivateLinkRes.java new file mode 100644 index 0000000000000..4721a690bd077 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/PrivateLinkRes.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.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** + * Samples for PrivateLinkResources List. + */ +public final class PrivateLinkRes { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.privateLinkResources().listWithResponse("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ResolvePrivate.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ResolvePrivate.java new file mode 100644 index 0000000000000..ee54eece0188c --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ResolvePrivate.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.containerservicemicrosoftcontainerserviceaks.generated.generated; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.fluent.models.PrivateLinkResourceInner; + +/** + * Samples for ResolvePrivateLinkServiceId Post. + */ +public final class ResolvePrivate { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * 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.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.resolvePrivateLinkServiceIds().postWithResponse("rg1", "clustername1", + new PrivateLinkResourceInner().withName("management"), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ScheduledEvent.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ScheduledEvent.java new file mode 100644 index 0000000000000..58964a7ef6890 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/ScheduledEvent.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.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** + * Samples for ScheduledEvents Get. + */ +public final class ScheduledEvent { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/ScheduledEventsGet.json + */ + /** + * Sample code: Get Scheduled Event. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getScheduledEvent( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.scheduledEvents().getWithResponse("rg1", "clustername1", "event1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsCreat.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsCreat.java new file mode 100644 index 0000000000000..fa3e3acad1011 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsCreat.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.containerservicemicrosoftcontainerserviceaks.generated.generated; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.CreationData; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Snapshots CreateOrUpdate. + */ +public final class SnapshotsCreat { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/SnapshotsCreate.json + */ + /** + * Sample code: Create/Update Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateSnapshot( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.snapshots().define("snapshot1").withRegion("westus").withExistingResourceGroup("rg1") + .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")) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsDelet.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsDelet.java new file mode 100644 index 0000000000000..e10ef8a7fb593 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsDelet.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.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** + * Samples for Snapshots Delete. + */ +public final class SnapshotsDelet { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/SnapshotsDelete.json + */ + /** + * Sample code: Delete Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteSnapshot( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.snapshots().deleteByResourceGroupWithResponse("rg1", "snapshot1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsGetBy.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsGetBy.java new file mode 100644 index 0000000000000..f678666e36c08 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsGetBy.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.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** + * Samples for Snapshots GetByResourceGroup. + */ +public final class SnapshotsGetBy { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/SnapshotsGet.json + */ + /** + * Sample code: Get Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getSnapshot( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.snapshots().getByResourceGroupWithResponse("rg1", "snapshot1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsListB.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsListB.java new file mode 100644 index 0000000000000..1f72afec59655 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsListB.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.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** + * Samples for Snapshots ListByResourceGroup. + */ +public final class SnapshotsListB { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/SnapshotsListByResourceGroup.json + */ + /** + * Sample code: List Snapshots by Resource Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listSnapshotsByResourceGroup( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.snapshots().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsListS.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsListS.java new file mode 100644 index 0000000000000..4e43b79e8588f --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsListS.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.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** + * Samples for Snapshots List. + */ +public final class SnapshotsListS { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/SnapshotsList.json + */ + /** + * Sample code: List Snapshots. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listSnapshots( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.snapshots().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsUpdat.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsUpdat.java new file mode 100644 index 0000000000000..b67e9019edfbb --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/SnapshotsUpdat.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.generated; + +import com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.models.Snapshot; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Snapshots UpdateTags. + */ +public final class SnapshotsUpdat { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/SnapshotsUpdateTags.json + */ + /** + * Sample code: Update Snapshot Tags. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updateSnapshotTags( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + Snapshot resource = manager.snapshots() + .getByResourceGroupWithResponse("rg1", "snapshot1", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf("key2", "fakeTokenPlaceholder", "key3", "fakeTokenPlaceholder")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/TrustedAccessR.java b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/TrustedAccessR.java new file mode 100644 index 0000000000000..2fc619a30c76b --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/src/samples/java/com/azure/resourcemanager/containerservicemicrosoftcontainerserviceaks/generated/generated/TrustedAccessR.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.containerservicemicrosoftcontainerserviceaks.generated.generated; + +/** + * Samples for TrustedAccessRoles List. + */ +public final class TrustedAccessR { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/ + * examples/TrustedAccessRoles_List.json + */ + /** + * Sample code: List trusted access roles. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listTrustedAccessRoles( + com.azure.resourcemanager.containerservicemicrosoftcontainerserviceaks.generated.ContainerServiceManager manager) { + manager.trustedAccessRoles().list("westus2", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/ci.yml b/sdk/containerservicemicrosoftcontainerserviceaks/ci.yml new file mode 100644 index 0000000000000..887378479a979 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/ci.yml @@ -0,0 +1,47 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/containerservicemicrosoftcontainerserviceaks/ci.yml + - sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/ + exclude: + - sdk/containerservicemicrosoftcontainerserviceaks/pom.xml + - sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/pom.xml + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/containerservicemicrosoftcontainerserviceaks/ci.yml + - sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/ + exclude: + - sdk/containerservicemicrosoftcontainerserviceaks/pom.xml + - sdk/containerservicemicrosoftcontainerserviceaks/azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated/pom.xml + +parameters: + - name: release_azureresourcemanagercontainerservicemicrosoftcontainerserviceaksgenerated + displayName: azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated + type: boolean + default: false + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: containerservicemicrosoftcontainerserviceaks + EnableBatchRelease: true + Artifacts: + - name: azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated + groupId: com.azure.resourcemanager + safeName: azureresourcemanagercontainerservicemicrosoftcontainerserviceaksgenerated + releaseInBatch: ${{ parameters.release_azureresourcemanagercontainerservicemicrosoftcontainerserviceaksgenerated }} diff --git a/sdk/containerservicemicrosoftcontainerserviceaks/pom.xml b/sdk/containerservicemicrosoftcontainerserviceaks/pom.xml new file mode 100644 index 0000000000000..624b59f297545 --- /dev/null +++ b/sdk/containerservicemicrosoftcontainerserviceaks/pom.xml @@ -0,0 +1,15 @@ + + + 4.0.0 + com.azure + azure-containerservicemicrosoftcontainerserviceaks-service + pom + 1.0.0 + + + azure-resourcemanager-containerservicemicrosoftcontainerserviceaks-generated + +