nodeTypes) {
- this.nodeTypes = nodeTypes;
- return this;
- }
-
- /**
- * Get the provisioningState property: The provisioning state of the cluster resource.
- *
- * @return the provisioningState value.
- */
- public ProvisioningState provisioningState() {
- return this.provisioningState;
- }
-
- /**
- * Get the reliabilityLevel property: The reliability level sets the replica set size of system services. Learn
- * about [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity).
- *
- * - None - Run the System services with a target replica set count of 1. This should only be used for test
- * clusters. - Bronze - Run the System services with a target replica set count of 3. This should only be used for
- * test clusters. - Silver - Run the System services with a target replica set count of 5. - Gold - Run the System
- * services with a target replica set count of 7. - Platinum - Run the System services with a target replica set
- * count of 9.
- *
- * @return the reliabilityLevel value.
- */
- public ReliabilityLevel reliabilityLevel() {
- return this.reliabilityLevel;
- }
-
- /**
- * Set the reliabilityLevel property: The reliability level sets the replica set size of system services. Learn
- * about [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity).
- *
- *
- None - Run the System services with a target replica set count of 1. This should only be used for test
- * clusters. - Bronze - Run the System services with a target replica set count of 3. This should only be used for
- * test clusters. - Silver - Run the System services with a target replica set count of 5. - Gold - Run the System
- * services with a target replica set count of 7. - Platinum - Run the System services with a target replica set
- * count of 9.
- *
- * @param reliabilityLevel the reliabilityLevel value to set.
- * @return the ClusterProperties object itself.
- */
- public ClusterProperties withReliabilityLevel(ReliabilityLevel reliabilityLevel) {
- this.reliabilityLevel = reliabilityLevel;
- return this;
- }
-
- /**
- * Get the reverseProxyCertificate property: The server certificate used by reverse proxy.
- *
- * @return the reverseProxyCertificate value.
- */
- public CertificateDescription reverseProxyCertificate() {
- return this.reverseProxyCertificate;
- }
-
- /**
- * Set the reverseProxyCertificate property: The server certificate used by reverse proxy.
- *
- * @param reverseProxyCertificate the reverseProxyCertificate value to set.
- * @return the ClusterProperties object itself.
- */
- public ClusterProperties withReverseProxyCertificate(CertificateDescription reverseProxyCertificate) {
- this.reverseProxyCertificate = reverseProxyCertificate;
- return this;
- }
-
- /**
- * Get the reverseProxyCertificateCommonNames property: Describes a list of server certificates referenced by common
- * name that are used to secure the cluster.
- *
- * @return the reverseProxyCertificateCommonNames value.
- */
- public ServerCertificateCommonNames reverseProxyCertificateCommonNames() {
- return this.reverseProxyCertificateCommonNames;
- }
-
- /**
- * Set the reverseProxyCertificateCommonNames property: Describes a list of server certificates referenced by common
- * name that are used to secure the cluster.
- *
- * @param reverseProxyCertificateCommonNames the reverseProxyCertificateCommonNames value to set.
- * @return the ClusterProperties object itself.
- */
- public ClusterProperties withReverseProxyCertificateCommonNames(
- ServerCertificateCommonNames reverseProxyCertificateCommonNames) {
- this.reverseProxyCertificateCommonNames = reverseProxyCertificateCommonNames;
- return this;
- }
-
- /**
- * Get the upgradeDescription property: The policy to use when upgrading the cluster.
- *
- * @return the upgradeDescription value.
- */
- public ClusterUpgradePolicy upgradeDescription() {
- return this.upgradeDescription;
- }
-
- /**
- * Set the upgradeDescription property: The policy to use when upgrading the cluster.
- *
- * @param upgradeDescription the upgradeDescription value to set.
- * @return the ClusterProperties object itself.
- */
- public ClusterProperties withUpgradeDescription(ClusterUpgradePolicy upgradeDescription) {
- this.upgradeDescription = upgradeDescription;
- return this;
- }
-
- /**
- * Get the upgradeMode property: The upgrade mode of the cluster when new Service Fabric runtime version is
- * available.
- *
- * @return the upgradeMode value.
- */
- public UpgradeMode upgradeMode() {
- return this.upgradeMode;
- }
-
- /**
- * Set the upgradeMode property: The upgrade mode of the cluster when new Service Fabric runtime version is
- * available.
- *
- * @param upgradeMode the upgradeMode value to set.
- * @return the ClusterProperties object itself.
- */
- public ClusterProperties withUpgradeMode(UpgradeMode upgradeMode) {
- this.upgradeMode = upgradeMode;
- return this;
- }
-
- /**
- * Get the applicationTypeVersionsCleanupPolicy property: The policy used to clean up unused versions.
- *
- * @return the applicationTypeVersionsCleanupPolicy value.
- */
- public ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy() {
- return this.applicationTypeVersionsCleanupPolicy;
- }
-
- /**
- * Set the applicationTypeVersionsCleanupPolicy property: The policy used to clean up unused versions.
- *
- * @param applicationTypeVersionsCleanupPolicy the applicationTypeVersionsCleanupPolicy value to set.
- * @return the ClusterProperties object itself.
- */
- public ClusterProperties withApplicationTypeVersionsCleanupPolicy(
- ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy) {
- this.applicationTypeVersionsCleanupPolicy = applicationTypeVersionsCleanupPolicy;
- return this;
- }
-
- /**
- * Get the vmImage property: The VM image VMSS has been configured with. Generic names such as Windows or Linux can
- * be used.
- *
- * @return the vmImage value.
- */
- public String vmImage() {
- return this.vmImage;
- }
-
- /**
- * Set the vmImage property: The VM image VMSS has been configured with. Generic names such as Windows or Linux can
- * be used.
- *
- * @param vmImage the vmImage value to set.
- * @return the ClusterProperties object itself.
- */
- public ClusterProperties withVmImage(String vmImage) {
- this.vmImage = vmImage;
- return this;
- }
-
- /**
- * Get the sfZonalUpgradeMode property: This property controls the logical grouping of VMs in upgrade domains (UDs).
- * This property can't be modified if a node type with multiple Availability Zones is already present in the
- * cluster.
- *
- * @return the sfZonalUpgradeMode value.
- */
- public SfZonalUpgradeMode sfZonalUpgradeMode() {
- return this.sfZonalUpgradeMode;
- }
-
- /**
- * Set the sfZonalUpgradeMode property: This property controls the logical grouping of VMs in upgrade domains (UDs).
- * This property can't be modified if a node type with multiple Availability Zones is already present in the
- * cluster.
- *
- * @param sfZonalUpgradeMode the sfZonalUpgradeMode value to set.
- * @return the ClusterProperties object itself.
- */
- public ClusterProperties withSfZonalUpgradeMode(SfZonalUpgradeMode sfZonalUpgradeMode) {
- this.sfZonalUpgradeMode = sfZonalUpgradeMode;
- return this;
- }
-
- /**
- * Get the vmssZonalUpgradeMode property: This property defines the upgrade mode for the virtual machine scale set,
- * it is mandatory if a node type with multiple Availability Zones is added.
- *
- * @return the vmssZonalUpgradeMode value.
- */
- public VmssZonalUpgradeMode vmssZonalUpgradeMode() {
- return this.vmssZonalUpgradeMode;
- }
-
- /**
- * Set the vmssZonalUpgradeMode property: This property defines the upgrade mode for the virtual machine scale set,
- * it is mandatory if a node type with multiple Availability Zones is added.
- *
- * @param vmssZonalUpgradeMode the vmssZonalUpgradeMode value to set.
- * @return the ClusterProperties object itself.
- */
- public ClusterProperties withVmssZonalUpgradeMode(VmssZonalUpgradeMode vmssZonalUpgradeMode) {
- this.vmssZonalUpgradeMode = vmssZonalUpgradeMode;
- return this;
- }
-
- /**
- * Get the infrastructureServiceManager property: Indicates if infrastructure service manager is enabled.
- *
- * @return the infrastructureServiceManager value.
- */
- public Boolean infrastructureServiceManager() {
- return this.infrastructureServiceManager;
- }
-
- /**
- * Set the infrastructureServiceManager property: Indicates if infrastructure service manager is enabled.
- *
- * @param infrastructureServiceManager the infrastructureServiceManager value to set.
- * @return the ClusterProperties object itself.
- */
- public ClusterProperties withInfrastructureServiceManager(Boolean infrastructureServiceManager) {
- this.infrastructureServiceManager = infrastructureServiceManager;
- return this;
- }
-
- /**
- * Get the upgradeWave property: Indicates when new cluster runtime version upgrades will be applied after they are
- * released. By default is Wave0. Only applies when **upgradeMode** is set to 'Automatic'.
- *
- * @return the upgradeWave value.
- */
- public ClusterUpgradeCadence upgradeWave() {
- return this.upgradeWave;
- }
-
- /**
- * Set the upgradeWave property: Indicates when new cluster runtime version upgrades will be applied after they are
- * released. By default is Wave0. Only applies when **upgradeMode** is set to 'Automatic'.
- *
- * @param upgradeWave the upgradeWave value to set.
- * @return the ClusterProperties object itself.
- */
- public ClusterProperties withUpgradeWave(ClusterUpgradeCadence upgradeWave) {
- this.upgradeWave = upgradeWave;
- return this;
- }
-
- /**
- * Get the upgradePauseStartTimestampUtc property: Indicates the start date and time to pause automatic runtime
- * version upgrades on the cluster for an specific period of time on the cluster (UTC).
- *
- * @return the upgradePauseStartTimestampUtc value.
- */
- public OffsetDateTime upgradePauseStartTimestampUtc() {
- return this.upgradePauseStartTimestampUtc;
- }
-
- /**
- * Set the upgradePauseStartTimestampUtc property: Indicates the start date and time to pause automatic runtime
- * version upgrades on the cluster for an specific period of time on the cluster (UTC).
- *
- * @param upgradePauseStartTimestampUtc the upgradePauseStartTimestampUtc value to set.
- * @return the ClusterProperties object itself.
- */
- public ClusterProperties withUpgradePauseStartTimestampUtc(OffsetDateTime upgradePauseStartTimestampUtc) {
- this.upgradePauseStartTimestampUtc = upgradePauseStartTimestampUtc;
- return this;
- }
-
- /**
- * Get the upgradePauseEndTimestampUtc property: Indicates the end date and time to pause automatic runtime version
- * upgrades on the cluster for an specific period of time on the cluster (UTC).
- *
- * @return the upgradePauseEndTimestampUtc value.
- */
- public OffsetDateTime upgradePauseEndTimestampUtc() {
- return this.upgradePauseEndTimestampUtc;
- }
-
- /**
- * Set the upgradePauseEndTimestampUtc property: Indicates the end date and time to pause automatic runtime version
- * upgrades on the cluster for an specific period of time on the cluster (UTC).
- *
- * @param upgradePauseEndTimestampUtc the upgradePauseEndTimestampUtc value to set.
- * @return the ClusterProperties object itself.
- */
- public ClusterProperties withUpgradePauseEndTimestampUtc(OffsetDateTime upgradePauseEndTimestampUtc) {
- this.upgradePauseEndTimestampUtc = upgradePauseEndTimestampUtc;
- return this;
- }
-
- /**
- * Get the waveUpgradePaused property: Boolean to pause automatic runtime version upgrades to the cluster.
- *
- * @return the waveUpgradePaused value.
- */
- public Boolean waveUpgradePaused() {
- return this.waveUpgradePaused;
- }
-
- /**
- * Set the waveUpgradePaused property: Boolean to pause automatic runtime version upgrades to the cluster.
- *
- * @param waveUpgradePaused the waveUpgradePaused value to set.
- * @return the ClusterProperties object itself.
- */
- public ClusterProperties withWaveUpgradePaused(Boolean waveUpgradePaused) {
- this.waveUpgradePaused = waveUpgradePaused;
- return this;
- }
-
- /**
- * Get the notifications property: Indicates a list of notification channels for cluster events.
- *
- * @return the notifications value.
- */
- public List notifications() {
- return this.notifications;
- }
-
- /**
- * Set the notifications property: Indicates a list of notification channels for cluster events.
- *
- * @param notifications the notifications value to set.
- * @return the ClusterProperties object itself.
- */
- public ClusterProperties withNotifications(List notifications) {
- this.notifications = notifications;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (availableClusterVersions() != null) {
- availableClusterVersions().forEach(e -> e.validate());
- }
- if (azureActiveDirectory() != null) {
- azureActiveDirectory().validate();
- }
- if (certificate() != null) {
- certificate().validate();
- }
- if (certificateCommonNames() != null) {
- certificateCommonNames().validate();
- }
- if (clientCertificateCommonNames() != null) {
- clientCertificateCommonNames().forEach(e -> e.validate());
- }
- if (clientCertificateThumbprints() != null) {
- clientCertificateThumbprints().forEach(e -> e.validate());
- }
- if (diagnosticsStorageAccountConfig() != null) {
- diagnosticsStorageAccountConfig().validate();
- }
- if (fabricSettings() != null) {
- fabricSettings().forEach(e -> e.validate());
- }
- if (managementEndpoint() == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- "Missing required property managementEndpoint in model ClusterProperties"));
- }
- if (nodeTypes() == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException("Missing required property nodeTypes in model ClusterProperties"));
- } else {
- nodeTypes().forEach(e -> e.validate());
- }
- if (reverseProxyCertificate() != null) {
- reverseProxyCertificate().validate();
- }
- if (reverseProxyCertificateCommonNames() != null) {
- reverseProxyCertificateCommonNames().validate();
- }
- if (upgradeDescription() != null) {
- upgradeDescription().validate();
- }
- if (applicationTypeVersionsCleanupPolicy() != null) {
- applicationTypeVersionsCleanupPolicy().validate();
- }
- if (notifications() != null) {
- notifications().forEach(e -> e.validate());
- }
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterPropertiesUpdateParameters.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterPropertiesUpdateParameters.java
deleted file mode 100644
index a76d143e7f90..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterPropertiesUpdateParameters.java
+++ /dev/null
@@ -1,728 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.servicefabric.models.AddOnFeatures;
-import com.azure.resourcemanager.servicefabric.models.ApplicationTypeVersionsCleanupPolicy;
-import com.azure.resourcemanager.servicefabric.models.CertificateDescription;
-import com.azure.resourcemanager.servicefabric.models.ClientCertificateCommonName;
-import com.azure.resourcemanager.servicefabric.models.ClientCertificateThumbprint;
-import com.azure.resourcemanager.servicefabric.models.ClusterUpgradeCadence;
-import com.azure.resourcemanager.servicefabric.models.ClusterUpgradePolicy;
-import com.azure.resourcemanager.servicefabric.models.NodeTypeDescription;
-import com.azure.resourcemanager.servicefabric.models.Notification;
-import com.azure.resourcemanager.servicefabric.models.ReliabilityLevel;
-import com.azure.resourcemanager.servicefabric.models.ServerCertificateCommonNames;
-import com.azure.resourcemanager.servicefabric.models.SettingsSectionDescription;
-import com.azure.resourcemanager.servicefabric.models.SfZonalUpgradeMode;
-import com.azure.resourcemanager.servicefabric.models.UpgradeMode;
-import com.azure.resourcemanager.servicefabric.models.VmssZonalUpgradeMode;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.time.OffsetDateTime;
-import java.util.List;
-
-/** Describes the cluster resource properties that can be updated during PATCH operation. */
-@Fluent
-public final class ClusterPropertiesUpdateParameters {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterPropertiesUpdateParameters.class);
-
- /*
- * The list of add-on features to enable in the cluster.
- */
- @JsonProperty(value = "addOnFeatures")
- private List addOnFeatures;
-
- /*
- * The certificate to use for securing the cluster. The certificate
- * provided will be used for node to node security within the cluster, SSL
- * certificate for cluster management endpoint and default admin client.
- */
- @JsonProperty(value = "certificate")
- private CertificateDescription certificate;
-
- /*
- * Describes a list of server certificates referenced by common name that
- * are used to secure the cluster.
- */
- @JsonProperty(value = "certificateCommonNames")
- private ServerCertificateCommonNames certificateCommonNames;
-
- /*
- * The list of client certificates referenced by common name that are
- * allowed to manage the cluster. This will overwrite the existing list.
- */
- @JsonProperty(value = "clientCertificateCommonNames")
- private List clientCertificateCommonNames;
-
- /*
- * The list of client certificates referenced by thumbprint that are
- * allowed to manage the cluster. This will overwrite the existing list.
- */
- @JsonProperty(value = "clientCertificateThumbprints")
- private List clientCertificateThumbprints;
-
- /*
- * The Service Fabric runtime version of the cluster. This property can
- * only by set the user when **upgradeMode** is set to 'Manual'. To get
- * list of available Service Fabric versions for new clusters use
- * [ClusterVersion API](./ClusterVersion.md). To get the list of available
- * version for existing clusters use **availableClusterVersions**.
- */
- @JsonProperty(value = "clusterCodeVersion")
- private String clusterCodeVersion;
-
- /*
- * Indicates if the event store service is enabled.
- */
- @JsonProperty(value = "eventStoreServiceEnabled")
- private Boolean eventStoreServiceEnabled;
-
- /*
- * The list of custom fabric settings to configure the cluster. This will
- * overwrite the existing list.
- */
- @JsonProperty(value = "fabricSettings")
- private List fabricSettings;
-
- /*
- * The list of node types in the cluster. This will overwrite the existing
- * list.
- */
- @JsonProperty(value = "nodeTypes")
- private List nodeTypes;
-
- /*
- * The reliability level sets the replica set size of system services.
- * Learn about
- * [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity).
- *
- * - None - Run the System services with a target replica set count of 1.
- * This should only be used for test clusters.
- * - Bronze - Run the System services with a target replica set count of 3.
- * This should only be used for test clusters.
- * - Silver - Run the System services with a target replica set count of 5.
- * - Gold - Run the System services with a target replica set count of 7.
- * - Platinum - Run the System services with a target replica set count of
- * 9.
- *
- */
- @JsonProperty(value = "reliabilityLevel")
- private ReliabilityLevel reliabilityLevel;
-
- /*
- * The server certificate used by reverse proxy.
- */
- @JsonProperty(value = "reverseProxyCertificate")
- private CertificateDescription reverseProxyCertificate;
-
- /*
- * The policy to use when upgrading the cluster.
- */
- @JsonProperty(value = "upgradeDescription")
- private ClusterUpgradePolicy upgradeDescription;
-
- /*
- * The policy used to clean up unused versions.
- */
- @JsonProperty(value = "applicationTypeVersionsCleanupPolicy")
- private ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy;
-
- /*
- * The upgrade mode of the cluster when new Service Fabric runtime version
- * is available.
- */
- @JsonProperty(value = "upgradeMode")
- private UpgradeMode upgradeMode;
-
- /*
- * This property controls the logical grouping of VMs in upgrade domains
- * (UDs). This property can't be modified if a node type with multiple
- * Availability Zones is already present in the cluster.
- */
- @JsonProperty(value = "sfZonalUpgradeMode")
- private SfZonalUpgradeMode sfZonalUpgradeMode;
-
- /*
- * This property defines the upgrade mode for the virtual machine scale
- * set, it is mandatory if a node type with multiple Availability Zones is
- * added.
- */
- @JsonProperty(value = "vmssZonalUpgradeMode")
- private VmssZonalUpgradeMode vmssZonalUpgradeMode;
-
- /*
- * Indicates if infrastructure service manager is enabled.
- */
- @JsonProperty(value = "infrastructureServiceManager")
- private Boolean infrastructureServiceManager;
-
- /*
- * Indicates when new cluster runtime version upgrades will be applied
- * after they are released. By default is Wave0. Only applies when
- * **upgradeMode** is set to 'Automatic'.
- */
- @JsonProperty(value = "upgradeWave")
- private ClusterUpgradeCadence upgradeWave;
-
- /*
- * The start timestamp to pause runtime version upgrades on the cluster
- * (UTC).
- */
- @JsonProperty(value = "upgradePauseStartTimestampUtc")
- private OffsetDateTime upgradePauseStartTimestampUtc;
-
- /*
- * The end timestamp of pause runtime version upgrades on the cluster
- * (UTC).
- */
- @JsonProperty(value = "upgradePauseEndTimestampUtc")
- private OffsetDateTime upgradePauseEndTimestampUtc;
-
- /*
- * Boolean to pause automatic runtime version upgrades to the cluster.
- */
- @JsonProperty(value = "waveUpgradePaused")
- private Boolean waveUpgradePaused;
-
- /*
- * Indicates a list of notification channels for cluster events.
- */
- @JsonProperty(value = "notifications")
- private List notifications;
-
- /**
- * Get the addOnFeatures property: The list of add-on features to enable in the cluster.
- *
- * @return the addOnFeatures value.
- */
- public List addOnFeatures() {
- return this.addOnFeatures;
- }
-
- /**
- * Set the addOnFeatures property: The list of add-on features to enable in the cluster.
- *
- * @param addOnFeatures the addOnFeatures value to set.
- * @return the ClusterPropertiesUpdateParameters object itself.
- */
- public ClusterPropertiesUpdateParameters withAddOnFeatures(List addOnFeatures) {
- this.addOnFeatures = addOnFeatures;
- return this;
- }
-
- /**
- * Get the certificate property: The certificate to use for securing the cluster. The certificate provided will be
- * used for node to node security within the cluster, SSL certificate for cluster management endpoint and default
- * admin client.
- *
- * @return the certificate value.
- */
- public CertificateDescription certificate() {
- return this.certificate;
- }
-
- /**
- * Set the certificate property: The certificate to use for securing the cluster. The certificate provided will be
- * used for node to node security within the cluster, SSL certificate for cluster management endpoint and default
- * admin client.
- *
- * @param certificate the certificate value to set.
- * @return the ClusterPropertiesUpdateParameters object itself.
- */
- public ClusterPropertiesUpdateParameters withCertificate(CertificateDescription certificate) {
- this.certificate = certificate;
- return this;
- }
-
- /**
- * Get the certificateCommonNames property: Describes a list of server certificates referenced by common name that
- * are used to secure the cluster.
- *
- * @return the certificateCommonNames value.
- */
- public ServerCertificateCommonNames certificateCommonNames() {
- return this.certificateCommonNames;
- }
-
- /**
- * Set the certificateCommonNames property: Describes a list of server certificates referenced by common name that
- * are used to secure the cluster.
- *
- * @param certificateCommonNames the certificateCommonNames value to set.
- * @return the ClusterPropertiesUpdateParameters object itself.
- */
- public ClusterPropertiesUpdateParameters withCertificateCommonNames(
- ServerCertificateCommonNames certificateCommonNames) {
- this.certificateCommonNames = certificateCommonNames;
- return this;
- }
-
- /**
- * Get the clientCertificateCommonNames property: The list of client certificates referenced by common name that are
- * allowed to manage the cluster. This will overwrite the existing list.
- *
- * @return the clientCertificateCommonNames value.
- */
- public List clientCertificateCommonNames() {
- return this.clientCertificateCommonNames;
- }
-
- /**
- * Set the clientCertificateCommonNames property: The list of client certificates referenced by common name that are
- * allowed to manage the cluster. This will overwrite the existing list.
- *
- * @param clientCertificateCommonNames the clientCertificateCommonNames value to set.
- * @return the ClusterPropertiesUpdateParameters object itself.
- */
- public ClusterPropertiesUpdateParameters withClientCertificateCommonNames(
- List clientCertificateCommonNames) {
- this.clientCertificateCommonNames = clientCertificateCommonNames;
- return this;
- }
-
- /**
- * Get the clientCertificateThumbprints property: The list of client certificates referenced by thumbprint that are
- * allowed to manage the cluster. This will overwrite the existing list.
- *
- * @return the clientCertificateThumbprints value.
- */
- public List clientCertificateThumbprints() {
- return this.clientCertificateThumbprints;
- }
-
- /**
- * Set the clientCertificateThumbprints property: The list of client certificates referenced by thumbprint that are
- * allowed to manage the cluster. This will overwrite the existing list.
- *
- * @param clientCertificateThumbprints the clientCertificateThumbprints value to set.
- * @return the ClusterPropertiesUpdateParameters object itself.
- */
- public ClusterPropertiesUpdateParameters withClientCertificateThumbprints(
- List clientCertificateThumbprints) {
- this.clientCertificateThumbprints = clientCertificateThumbprints;
- return this;
- }
-
- /**
- * Get the clusterCodeVersion property: The Service Fabric runtime version of the cluster. This property can only by
- * set the user when **upgradeMode** is set to 'Manual'. To get list of available Service Fabric versions for new
- * clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing
- * clusters use **availableClusterVersions**.
- *
- * @return the clusterCodeVersion value.
- */
- public String clusterCodeVersion() {
- return this.clusterCodeVersion;
- }
-
- /**
- * Set the clusterCodeVersion property: The Service Fabric runtime version of the cluster. This property can only by
- * set the user when **upgradeMode** is set to 'Manual'. To get list of available Service Fabric versions for new
- * clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing
- * clusters use **availableClusterVersions**.
- *
- * @param clusterCodeVersion the clusterCodeVersion value to set.
- * @return the ClusterPropertiesUpdateParameters object itself.
- */
- public ClusterPropertiesUpdateParameters withClusterCodeVersion(String clusterCodeVersion) {
- this.clusterCodeVersion = clusterCodeVersion;
- return this;
- }
-
- /**
- * Get the eventStoreServiceEnabled property: Indicates if the event store service is enabled.
- *
- * @return the eventStoreServiceEnabled value.
- */
- public Boolean eventStoreServiceEnabled() {
- return this.eventStoreServiceEnabled;
- }
-
- /**
- * Set the eventStoreServiceEnabled property: Indicates if the event store service is enabled.
- *
- * @param eventStoreServiceEnabled the eventStoreServiceEnabled value to set.
- * @return the ClusterPropertiesUpdateParameters object itself.
- */
- public ClusterPropertiesUpdateParameters withEventStoreServiceEnabled(Boolean eventStoreServiceEnabled) {
- this.eventStoreServiceEnabled = eventStoreServiceEnabled;
- return this;
- }
-
- /**
- * Get the fabricSettings property: The list of custom fabric settings to configure the cluster. This will overwrite
- * the existing list.
- *
- * @return the fabricSettings value.
- */
- public List fabricSettings() {
- return this.fabricSettings;
- }
-
- /**
- * Set the fabricSettings property: The list of custom fabric settings to configure the cluster. This will overwrite
- * the existing list.
- *
- * @param fabricSettings the fabricSettings value to set.
- * @return the ClusterPropertiesUpdateParameters object itself.
- */
- public ClusterPropertiesUpdateParameters withFabricSettings(List fabricSettings) {
- this.fabricSettings = fabricSettings;
- return this;
- }
-
- /**
- * Get the nodeTypes property: The list of node types in the cluster. This will overwrite the existing list.
- *
- * @return the nodeTypes value.
- */
- public List nodeTypes() {
- return this.nodeTypes;
- }
-
- /**
- * Set the nodeTypes property: The list of node types in the cluster. This will overwrite the existing list.
- *
- * @param nodeTypes the nodeTypes value to set.
- * @return the ClusterPropertiesUpdateParameters object itself.
- */
- public ClusterPropertiesUpdateParameters withNodeTypes(List nodeTypes) {
- this.nodeTypes = nodeTypes;
- return this;
- }
-
- /**
- * Get the reliabilityLevel property: The reliability level sets the replica set size of system services. Learn
- * about [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity).
- *
- * - None - Run the System services with a target replica set count of 1. This should only be used for test
- * clusters. - Bronze - Run the System services with a target replica set count of 3. This should only be used for
- * test clusters. - Silver - Run the System services with a target replica set count of 5. - Gold - Run the System
- * services with a target replica set count of 7. - Platinum - Run the System services with a target replica set
- * count of 9.
- *
- * @return the reliabilityLevel value.
- */
- public ReliabilityLevel reliabilityLevel() {
- return this.reliabilityLevel;
- }
-
- /**
- * Set the reliabilityLevel property: The reliability level sets the replica set size of system services. Learn
- * about [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity).
- *
- *
- None - Run the System services with a target replica set count of 1. This should only be used for test
- * clusters. - Bronze - Run the System services with a target replica set count of 3. This should only be used for
- * test clusters. - Silver - Run the System services with a target replica set count of 5. - Gold - Run the System
- * services with a target replica set count of 7. - Platinum - Run the System services with a target replica set
- * count of 9.
- *
- * @param reliabilityLevel the reliabilityLevel value to set.
- * @return the ClusterPropertiesUpdateParameters object itself.
- */
- public ClusterPropertiesUpdateParameters withReliabilityLevel(ReliabilityLevel reliabilityLevel) {
- this.reliabilityLevel = reliabilityLevel;
- return this;
- }
-
- /**
- * Get the reverseProxyCertificate property: The server certificate used by reverse proxy.
- *
- * @return the reverseProxyCertificate value.
- */
- public CertificateDescription reverseProxyCertificate() {
- return this.reverseProxyCertificate;
- }
-
- /**
- * Set the reverseProxyCertificate property: The server certificate used by reverse proxy.
- *
- * @param reverseProxyCertificate the reverseProxyCertificate value to set.
- * @return the ClusterPropertiesUpdateParameters object itself.
- */
- public ClusterPropertiesUpdateParameters withReverseProxyCertificate(
- CertificateDescription reverseProxyCertificate) {
- this.reverseProxyCertificate = reverseProxyCertificate;
- return this;
- }
-
- /**
- * Get the upgradeDescription property: The policy to use when upgrading the cluster.
- *
- * @return the upgradeDescription value.
- */
- public ClusterUpgradePolicy upgradeDescription() {
- return this.upgradeDescription;
- }
-
- /**
- * Set the upgradeDescription property: The policy to use when upgrading the cluster.
- *
- * @param upgradeDescription the upgradeDescription value to set.
- * @return the ClusterPropertiesUpdateParameters object itself.
- */
- public ClusterPropertiesUpdateParameters withUpgradeDescription(ClusterUpgradePolicy upgradeDescription) {
- this.upgradeDescription = upgradeDescription;
- return this;
- }
-
- /**
- * Get the applicationTypeVersionsCleanupPolicy property: The policy used to clean up unused versions.
- *
- * @return the applicationTypeVersionsCleanupPolicy value.
- */
- public ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy() {
- return this.applicationTypeVersionsCleanupPolicy;
- }
-
- /**
- * Set the applicationTypeVersionsCleanupPolicy property: The policy used to clean up unused versions.
- *
- * @param applicationTypeVersionsCleanupPolicy the applicationTypeVersionsCleanupPolicy value to set.
- * @return the ClusterPropertiesUpdateParameters object itself.
- */
- public ClusterPropertiesUpdateParameters withApplicationTypeVersionsCleanupPolicy(
- ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy) {
- this.applicationTypeVersionsCleanupPolicy = applicationTypeVersionsCleanupPolicy;
- return this;
- }
-
- /**
- * Get the upgradeMode property: The upgrade mode of the cluster when new Service Fabric runtime version is
- * available.
- *
- * @return the upgradeMode value.
- */
- public UpgradeMode upgradeMode() {
- return this.upgradeMode;
- }
-
- /**
- * Set the upgradeMode property: The upgrade mode of the cluster when new Service Fabric runtime version is
- * available.
- *
- * @param upgradeMode the upgradeMode value to set.
- * @return the ClusterPropertiesUpdateParameters object itself.
- */
- public ClusterPropertiesUpdateParameters withUpgradeMode(UpgradeMode upgradeMode) {
- this.upgradeMode = upgradeMode;
- return this;
- }
-
- /**
- * Get the sfZonalUpgradeMode property: This property controls the logical grouping of VMs in upgrade domains (UDs).
- * This property can't be modified if a node type with multiple Availability Zones is already present in the
- * cluster.
- *
- * @return the sfZonalUpgradeMode value.
- */
- public SfZonalUpgradeMode sfZonalUpgradeMode() {
- return this.sfZonalUpgradeMode;
- }
-
- /**
- * Set the sfZonalUpgradeMode property: This property controls the logical grouping of VMs in upgrade domains (UDs).
- * This property can't be modified if a node type with multiple Availability Zones is already present in the
- * cluster.
- *
- * @param sfZonalUpgradeMode the sfZonalUpgradeMode value to set.
- * @return the ClusterPropertiesUpdateParameters object itself.
- */
- public ClusterPropertiesUpdateParameters withSfZonalUpgradeMode(SfZonalUpgradeMode sfZonalUpgradeMode) {
- this.sfZonalUpgradeMode = sfZonalUpgradeMode;
- return this;
- }
-
- /**
- * Get the vmssZonalUpgradeMode property: This property defines the upgrade mode for the virtual machine scale set,
- * it is mandatory if a node type with multiple Availability Zones is added.
- *
- * @return the vmssZonalUpgradeMode value.
- */
- public VmssZonalUpgradeMode vmssZonalUpgradeMode() {
- return this.vmssZonalUpgradeMode;
- }
-
- /**
- * Set the vmssZonalUpgradeMode property: This property defines the upgrade mode for the virtual machine scale set,
- * it is mandatory if a node type with multiple Availability Zones is added.
- *
- * @param vmssZonalUpgradeMode the vmssZonalUpgradeMode value to set.
- * @return the ClusterPropertiesUpdateParameters object itself.
- */
- public ClusterPropertiesUpdateParameters withVmssZonalUpgradeMode(VmssZonalUpgradeMode vmssZonalUpgradeMode) {
- this.vmssZonalUpgradeMode = vmssZonalUpgradeMode;
- return this;
- }
-
- /**
- * Get the infrastructureServiceManager property: Indicates if infrastructure service manager is enabled.
- *
- * @return the infrastructureServiceManager value.
- */
- public Boolean infrastructureServiceManager() {
- return this.infrastructureServiceManager;
- }
-
- /**
- * Set the infrastructureServiceManager property: Indicates if infrastructure service manager is enabled.
- *
- * @param infrastructureServiceManager the infrastructureServiceManager value to set.
- * @return the ClusterPropertiesUpdateParameters object itself.
- */
- public ClusterPropertiesUpdateParameters withInfrastructureServiceManager(Boolean infrastructureServiceManager) {
- this.infrastructureServiceManager = infrastructureServiceManager;
- return this;
- }
-
- /**
- * Get the upgradeWave property: Indicates when new cluster runtime version upgrades will be applied after they are
- * released. By default is Wave0. Only applies when **upgradeMode** is set to 'Automatic'.
- *
- * @return the upgradeWave value.
- */
- public ClusterUpgradeCadence upgradeWave() {
- return this.upgradeWave;
- }
-
- /**
- * Set the upgradeWave property: Indicates when new cluster runtime version upgrades will be applied after they are
- * released. By default is Wave0. Only applies when **upgradeMode** is set to 'Automatic'.
- *
- * @param upgradeWave the upgradeWave value to set.
- * @return the ClusterPropertiesUpdateParameters object itself.
- */
- public ClusterPropertiesUpdateParameters withUpgradeWave(ClusterUpgradeCadence upgradeWave) {
- this.upgradeWave = upgradeWave;
- return this;
- }
-
- /**
- * Get the upgradePauseStartTimestampUtc property: The start timestamp to pause runtime version upgrades on the
- * cluster (UTC).
- *
- * @return the upgradePauseStartTimestampUtc value.
- */
- public OffsetDateTime upgradePauseStartTimestampUtc() {
- return this.upgradePauseStartTimestampUtc;
- }
-
- /**
- * Set the upgradePauseStartTimestampUtc property: The start timestamp to pause runtime version upgrades on the
- * cluster (UTC).
- *
- * @param upgradePauseStartTimestampUtc the upgradePauseStartTimestampUtc value to set.
- * @return the ClusterPropertiesUpdateParameters object itself.
- */
- public ClusterPropertiesUpdateParameters withUpgradePauseStartTimestampUtc(
- OffsetDateTime upgradePauseStartTimestampUtc) {
- this.upgradePauseStartTimestampUtc = upgradePauseStartTimestampUtc;
- return this;
- }
-
- /**
- * Get the upgradePauseEndTimestampUtc property: The end timestamp of pause runtime version upgrades on the cluster
- * (UTC).
- *
- * @return the upgradePauseEndTimestampUtc value.
- */
- public OffsetDateTime upgradePauseEndTimestampUtc() {
- return this.upgradePauseEndTimestampUtc;
- }
-
- /**
- * Set the upgradePauseEndTimestampUtc property: The end timestamp of pause runtime version upgrades on the cluster
- * (UTC).
- *
- * @param upgradePauseEndTimestampUtc the upgradePauseEndTimestampUtc value to set.
- * @return the ClusterPropertiesUpdateParameters object itself.
- */
- public ClusterPropertiesUpdateParameters withUpgradePauseEndTimestampUtc(
- OffsetDateTime upgradePauseEndTimestampUtc) {
- this.upgradePauseEndTimestampUtc = upgradePauseEndTimestampUtc;
- return this;
- }
-
- /**
- * Get the waveUpgradePaused property: Boolean to pause automatic runtime version upgrades to the cluster.
- *
- * @return the waveUpgradePaused value.
- */
- public Boolean waveUpgradePaused() {
- return this.waveUpgradePaused;
- }
-
- /**
- * Set the waveUpgradePaused property: Boolean to pause automatic runtime version upgrades to the cluster.
- *
- * @param waveUpgradePaused the waveUpgradePaused value to set.
- * @return the ClusterPropertiesUpdateParameters object itself.
- */
- public ClusterPropertiesUpdateParameters withWaveUpgradePaused(Boolean waveUpgradePaused) {
- this.waveUpgradePaused = waveUpgradePaused;
- return this;
- }
-
- /**
- * Get the notifications property: Indicates a list of notification channels for cluster events.
- *
- * @return the notifications value.
- */
- public List notifications() {
- return this.notifications;
- }
-
- /**
- * Set the notifications property: Indicates a list of notification channels for cluster events.
- *
- * @param notifications the notifications value to set.
- * @return the ClusterPropertiesUpdateParameters object itself.
- */
- public ClusterPropertiesUpdateParameters withNotifications(List notifications) {
- this.notifications = notifications;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (certificate() != null) {
- certificate().validate();
- }
- if (certificateCommonNames() != null) {
- certificateCommonNames().validate();
- }
- if (clientCertificateCommonNames() != null) {
- clientCertificateCommonNames().forEach(e -> e.validate());
- }
- if (clientCertificateThumbprints() != null) {
- clientCertificateThumbprints().forEach(e -> e.validate());
- }
- if (fabricSettings() != null) {
- fabricSettings().forEach(e -> e.validate());
- }
- if (nodeTypes() != null) {
- nodeTypes().forEach(e -> e.validate());
- }
- if (reverseProxyCertificate() != null) {
- reverseProxyCertificate().validate();
- }
- if (upgradeDescription() != null) {
- upgradeDescription().validate();
- }
- if (applicationTypeVersionsCleanupPolicy() != null) {
- applicationTypeVersionsCleanupPolicy().validate();
- }
- if (notifications() != null) {
- notifications().forEach(e -> e.validate());
- }
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceInner.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceInner.java
index 9b1a0478187d..759c6bb5b2e7 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceInner.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceInner.java
@@ -5,6 +5,7 @@
package com.azure.resourcemanager.servicefabric.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
@@ -21,15 +22,79 @@
import java.util.Map;
/** The service resource. */
+@JsonFlatten
@Fluent
-public final class ServiceResourceInner extends ProxyResource {
+public class ServiceResourceInner extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceResourceInner.class);
/*
- * The service resource properties.
+ * The placement constraints as a string. Placement constraints are boolean
+ * expressions on node properties and allow for restricting a service to
+ * particular nodes based on the service requirements. For example, to
+ * place a service on nodes where NodeType is blue specify the following:
+ * "NodeColor == blue)".
*/
- @JsonProperty(value = "properties")
- private ServiceResourceProperties innerProperties;
+ @JsonProperty(value = "properties.placementConstraints")
+ private String placementConstraints;
+
+ /*
+ * A list that describes the correlation of the service with other
+ * services.
+ */
+ @JsonProperty(value = "properties.correlationScheme")
+ private List correlationScheme;
+
+ /*
+ * The service load metrics is given as an array of
+ * ServiceLoadMetricDescription objects.
+ */
+ @JsonProperty(value = "properties.serviceLoadMetrics")
+ private List serviceLoadMetrics;
+
+ /*
+ * A list that describes the correlation of the service with other
+ * services.
+ */
+ @JsonProperty(value = "properties.servicePlacementPolicies")
+ private List servicePlacementPolicies;
+
+ /*
+ * Specifies the move cost for the service.
+ */
+ @JsonProperty(value = "properties.defaultMoveCost")
+ private MoveCost defaultMoveCost;
+
+ /*
+ * The current deployment or provisioning state, which only appears in the
+ * response
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private String provisioningState;
+
+ /*
+ * The name of the service type
+ */
+ @JsonProperty(value = "properties.serviceTypeName")
+ private String serviceTypeName;
+
+ /*
+ * Describes how the service is partitioned.
+ */
+ @JsonProperty(value = "properties.partitionDescription")
+ private PartitionSchemeDescription partitionDescription;
+
+ /*
+ * The activation Mode of the service package
+ */
+ @JsonProperty(value = "properties.servicePackageActivationMode")
+ private ArmServicePackageActivationMode servicePackageActivationMode;
+
+ /*
+ * Dns name used for the service. If this is specified, then the service
+ * can be accessed via its DNS name instead of service name.
+ */
+ @JsonProperty(value = "properties.serviceDnsName")
+ private String serviceDnsName;
/*
* It will be deprecated in New API, resource location depends on the
@@ -58,70 +123,114 @@ public final class ServiceResourceInner extends ProxyResource {
private SystemData systemData;
/**
- * Get the innerProperties property: The service resource properties.
+ * Get the placementConstraints property: The placement constraints as a string. Placement constraints are boolean
+ * expressions on node properties and allow for restricting a service to particular nodes based on the service
+ * requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor
+ * == blue)".
*
- * @return the innerProperties value.
+ * @return the placementConstraints value.
*/
- private ServiceResourceProperties innerProperties() {
- return this.innerProperties;
+ public String placementConstraints() {
+ return this.placementConstraints;
}
/**
- * Get the location property: It will be deprecated in New API, resource location depends on the parent resource.
+ * Set the placementConstraints property: The placement constraints as a string. Placement constraints are boolean
+ * expressions on node properties and allow for restricting a service to particular nodes based on the service
+ * requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor
+ * == blue)".
*
- * @return the location value.
+ * @param placementConstraints the placementConstraints value to set.
+ * @return the ServiceResourceInner object itself.
*/
- public String location() {
- return this.location;
+ public ServiceResourceInner withPlacementConstraints(String placementConstraints) {
+ this.placementConstraints = placementConstraints;
+ return this;
}
/**
- * Set the location property: It will be deprecated in New API, resource location depends on the parent resource.
+ * Get the correlationScheme property: A list that describes the correlation of the service with other services.
*
- * @param location the location value to set.
+ * @return the correlationScheme value.
+ */
+ public List correlationScheme() {
+ return this.correlationScheme;
+ }
+
+ /**
+ * Set the correlationScheme property: A list that describes the correlation of the service with other services.
+ *
+ * @param correlationScheme the correlationScheme value to set.
* @return the ServiceResourceInner object itself.
*/
- public ServiceResourceInner withLocation(String location) {
- this.location = location;
+ public ServiceResourceInner withCorrelationScheme(List correlationScheme) {
+ this.correlationScheme = correlationScheme;
return this;
}
/**
- * Get the tags property: Azure resource tags.
+ * Get the serviceLoadMetrics property: The service load metrics is given as an array of
+ * ServiceLoadMetricDescription objects.
*
- * @return the tags value.
+ * @return the serviceLoadMetrics value.
*/
- public Map tags() {
- return this.tags;
+ public List serviceLoadMetrics() {
+ return this.serviceLoadMetrics;
}
/**
- * Set the tags property: Azure resource tags.
+ * Set the serviceLoadMetrics property: The service load metrics is given as an array of
+ * ServiceLoadMetricDescription objects.
*
- * @param tags the tags value to set.
+ * @param serviceLoadMetrics the serviceLoadMetrics value to set.
* @return the ServiceResourceInner object itself.
*/
- public ServiceResourceInner withTags(Map tags) {
- this.tags = tags;
+ public ServiceResourceInner withServiceLoadMetrics(List serviceLoadMetrics) {
+ this.serviceLoadMetrics = serviceLoadMetrics;
return this;
}
/**
- * Get the etag property: Azure resource etag.
+ * Get the servicePlacementPolicies property: A list that describes the correlation of the service with other
+ * services.
*
- * @return the etag value.
+ * @return the servicePlacementPolicies value.
*/
- public String etag() {
- return this.etag;
+ public List servicePlacementPolicies() {
+ return this.servicePlacementPolicies;
}
/**
- * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ * Set the servicePlacementPolicies property: A list that describes the correlation of the service with other
+ * services.
*
- * @return the systemData value.
+ * @param servicePlacementPolicies the servicePlacementPolicies value to set.
+ * @return the ServiceResourceInner object itself.
*/
- public SystemData systemData() {
- return this.systemData;
+ public ServiceResourceInner withServicePlacementPolicies(
+ List servicePlacementPolicies) {
+ this.servicePlacementPolicies = servicePlacementPolicies;
+ return this;
+ }
+
+ /**
+ * Get the defaultMoveCost property: Specifies the move cost for the service.
+ *
+ * @return the defaultMoveCost value.
+ */
+ public MoveCost defaultMoveCost() {
+ return this.defaultMoveCost;
+ }
+
+ /**
+ * Set the defaultMoveCost property: Specifies the move cost for the service.
+ *
+ * @param defaultMoveCost the defaultMoveCost value to set.
+ * @return the ServiceResourceInner object itself.
+ */
+ public ServiceResourceInner withDefaultMoveCost(MoveCost defaultMoveCost) {
+ this.defaultMoveCost = defaultMoveCost;
+ return this;
}
/**
@@ -131,7 +240,7 @@ public SystemData systemData() {
* @return the provisioningState value.
*/
public String provisioningState() {
- return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ return this.provisioningState;
}
/**
@@ -140,7 +249,7 @@ public String provisioningState() {
* @return the serviceTypeName value.
*/
public String serviceTypeName() {
- return this.innerProperties() == null ? null : this.innerProperties().serviceTypeName();
+ return this.serviceTypeName;
}
/**
@@ -150,10 +259,7 @@ public String serviceTypeName() {
* @return the ServiceResourceInner object itself.
*/
public ServiceResourceInner withServiceTypeName(String serviceTypeName) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ServiceResourceProperties();
- }
- this.innerProperties().withServiceTypeName(serviceTypeName);
+ this.serviceTypeName = serviceTypeName;
return this;
}
@@ -163,7 +269,7 @@ public ServiceResourceInner withServiceTypeName(String serviceTypeName) {
* @return the partitionDescription value.
*/
public PartitionSchemeDescription partitionDescription() {
- return this.innerProperties() == null ? null : this.innerProperties().partitionDescription();
+ return this.partitionDescription;
}
/**
@@ -173,10 +279,7 @@ public PartitionSchemeDescription partitionDescription() {
* @return the ServiceResourceInner object itself.
*/
public ServiceResourceInner withPartitionDescription(PartitionSchemeDescription partitionDescription) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ServiceResourceProperties();
- }
- this.innerProperties().withPartitionDescription(partitionDescription);
+ this.partitionDescription = partitionDescription;
return this;
}
@@ -186,7 +289,7 @@ public ServiceResourceInner withPartitionDescription(PartitionSchemeDescription
* @return the servicePackageActivationMode value.
*/
public ArmServicePackageActivationMode servicePackageActivationMode() {
- return this.innerProperties() == null ? null : this.innerProperties().servicePackageActivationMode();
+ return this.servicePackageActivationMode;
}
/**
@@ -197,10 +300,7 @@ public ArmServicePackageActivationMode servicePackageActivationMode() {
*/
public ServiceResourceInner withServicePackageActivationMode(
ArmServicePackageActivationMode servicePackageActivationMode) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ServiceResourceProperties();
- }
- this.innerProperties().withServicePackageActivationMode(servicePackageActivationMode);
+ this.servicePackageActivationMode = servicePackageActivationMode;
return this;
}
@@ -211,7 +311,7 @@ public ServiceResourceInner withServicePackageActivationMode(
* @return the serviceDnsName value.
*/
public String serviceDnsName() {
- return this.innerProperties() == null ? null : this.innerProperties().serviceDnsName();
+ return this.serviceDnsName;
}
/**
@@ -222,137 +322,66 @@ public String serviceDnsName() {
* @return the ServiceResourceInner object itself.
*/
public ServiceResourceInner withServiceDnsName(String serviceDnsName) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ServiceResourceProperties();
- }
- this.innerProperties().withServiceDnsName(serviceDnsName);
+ this.serviceDnsName = serviceDnsName;
return this;
}
/**
- * Get the placementConstraints property: The placement constraints as a string. Placement constraints are boolean
- * expressions on node properties and allow for restricting a service to particular nodes based on the service
- * requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor
- * == blue)".
- *
- * @return the placementConstraints value.
- */
- public String placementConstraints() {
- return this.innerProperties() == null ? null : this.innerProperties().placementConstraints();
- }
-
- /**
- * Set the placementConstraints property: The placement constraints as a string. Placement constraints are boolean
- * expressions on node properties and allow for restricting a service to particular nodes based on the service
- * requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor
- * == blue)".
- *
- * @param placementConstraints the placementConstraints value to set.
- * @return the ServiceResourceInner object itself.
- */
- public ServiceResourceInner withPlacementConstraints(String placementConstraints) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ServiceResourceProperties();
- }
- this.innerProperties().withPlacementConstraints(placementConstraints);
- return this;
- }
-
- /**
- * Get the correlationScheme property: A list that describes the correlation of the service with other services.
- *
- * @return the correlationScheme value.
- */
- public List correlationScheme() {
- return this.innerProperties() == null ? null : this.innerProperties().correlationScheme();
- }
-
- /**
- * Set the correlationScheme property: A list that describes the correlation of the service with other services.
- *
- * @param correlationScheme the correlationScheme value to set.
- * @return the ServiceResourceInner object itself.
- */
- public ServiceResourceInner withCorrelationScheme(List correlationScheme) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ServiceResourceProperties();
- }
- this.innerProperties().withCorrelationScheme(correlationScheme);
- return this;
- }
-
- /**
- * Get the serviceLoadMetrics property: The service load metrics is given as an array of
- * ServiceLoadMetricDescription objects.
+ * Get the location property: It will be deprecated in New API, resource location depends on the parent resource.
*
- * @return the serviceLoadMetrics value.
+ * @return the location value.
*/
- public List serviceLoadMetrics() {
- return this.innerProperties() == null ? null : this.innerProperties().serviceLoadMetrics();
+ public String location() {
+ return this.location;
}
/**
- * Set the serviceLoadMetrics property: The service load metrics is given as an array of
- * ServiceLoadMetricDescription objects.
+ * Set the location property: It will be deprecated in New API, resource location depends on the parent resource.
*
- * @param serviceLoadMetrics the serviceLoadMetrics value to set.
+ * @param location the location value to set.
* @return the ServiceResourceInner object itself.
*/
- public ServiceResourceInner withServiceLoadMetrics(List serviceLoadMetrics) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ServiceResourceProperties();
- }
- this.innerProperties().withServiceLoadMetrics(serviceLoadMetrics);
+ public ServiceResourceInner withLocation(String location) {
+ this.location = location;
return this;
}
/**
- * Get the servicePlacementPolicies property: A list that describes the correlation of the service with other
- * services.
+ * Get the tags property: Azure resource tags.
*
- * @return the servicePlacementPolicies value.
+ * @return the tags value.
*/
- public List servicePlacementPolicies() {
- return this.innerProperties() == null ? null : this.innerProperties().servicePlacementPolicies();
+ public Map tags() {
+ return this.tags;
}
/**
- * Set the servicePlacementPolicies property: A list that describes the correlation of the service with other
- * services.
+ * Set the tags property: Azure resource tags.
*
- * @param servicePlacementPolicies the servicePlacementPolicies value to set.
+ * @param tags the tags value to set.
* @return the ServiceResourceInner object itself.
*/
- public ServiceResourceInner withServicePlacementPolicies(
- List servicePlacementPolicies) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ServiceResourceProperties();
- }
- this.innerProperties().withServicePlacementPolicies(servicePlacementPolicies);
+ public ServiceResourceInner withTags(Map tags) {
+ this.tags = tags;
return this;
}
/**
- * Get the defaultMoveCost property: Specifies the move cost for the service.
+ * Get the etag property: Azure resource etag.
*
- * @return the defaultMoveCost value.
+ * @return the etag value.
*/
- public MoveCost defaultMoveCost() {
- return this.innerProperties() == null ? null : this.innerProperties().defaultMoveCost();
+ public String etag() {
+ return this.etag;
}
/**
- * Set the defaultMoveCost property: Specifies the move cost for the service.
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
*
- * @param defaultMoveCost the defaultMoveCost value to set.
- * @return the ServiceResourceInner object itself.
+ * @return the systemData value.
*/
- public ServiceResourceInner withDefaultMoveCost(MoveCost defaultMoveCost) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ServiceResourceProperties();
- }
- this.innerProperties().withDefaultMoveCost(defaultMoveCost);
- return this;
+ public SystemData systemData() {
+ return this.systemData;
}
/**
@@ -361,8 +390,17 @@ public ServiceResourceInner withDefaultMoveCost(MoveCost defaultMoveCost) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
+ if (correlationScheme() != null) {
+ correlationScheme().forEach(e -> e.validate());
+ }
+ if (serviceLoadMetrics() != null) {
+ serviceLoadMetrics().forEach(e -> e.validate());
+ }
+ if (servicePlacementPolicies() != null) {
+ servicePlacementPolicies().forEach(e -> e.validate());
+ }
+ if (partitionDescription() != null) {
+ partitionDescription().validate();
}
}
}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationResourceImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationResourceImpl.java
index 56f200b45513..2383b1a35735 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationResourceImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationResourceImpl.java
@@ -40,35 +40,6 @@ public ManagedIdentity identity() {
return this.innerModel().identity();
}
- 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 String etag() {
- return this.innerModel().etag();
- }
-
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
- public String provisioningState() {
- return this.innerModel().provisioningState();
- }
-
- public String typeName() {
- return this.innerModel().typeName();
- }
-
public String typeVersion() {
return this.innerModel().typeVersion();
}
@@ -116,6 +87,35 @@ public List managedIdentities() {
}
}
+ public String provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public String typeName() {
+ return this.innerModel().typeName();
+ }
+
+ 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 String etag() {
+ return this.innerModel().etag();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public Region region() {
return Region.fromName(this.regionName());
}
@@ -243,11 +243,6 @@ public ApplicationResourceImpl withIdentity(ManagedIdentity identity) {
return this;
}
- public ApplicationResourceImpl withTypeName(String typeName) {
- this.innerModel().withTypeName(typeName);
- return this;
- }
-
public ApplicationResourceImpl withTypeVersion(String typeVersion) {
if (isInCreateMode()) {
this.innerModel().withTypeVersion(typeVersion);
@@ -328,6 +323,11 @@ public ApplicationResourceImpl withManagedIdentities(List defaultParameterList() {
+ Map inner = this.innerModel().defaultParameterList();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
public String location() {
return this.innerModel().location();
}
@@ -53,23 +70,6 @@ public SystemData systemData() {
return this.innerModel().systemData();
}
- public String provisioningState() {
- return this.innerModel().provisioningState();
- }
-
- public String appPackageUrl() {
- return this.innerModel().appPackageUrl();
- }
-
- public Map defaultParameterList() {
- Map inner = this.innerModel().defaultParameterList();
- if (inner != null) {
- return Collections.unmodifiableMap(inner);
- } else {
- return Collections.emptyMap();
- }
- }
-
public Region region() {
return Region.fromName(this.regionName());
}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterImpl.java
index b38b57ff0832..07d8f8ce6064 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterImpl.java
@@ -9,7 +9,6 @@
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.servicefabric.fluent.models.ClusterInner;
-import com.azure.resourcemanager.servicefabric.fluent.models.ClusterVersionDetails;
import com.azure.resourcemanager.servicefabric.models.AddOnFeatures;
import com.azure.resourcemanager.servicefabric.models.ApplicationTypeVersionsCleanupPolicy;
import com.azure.resourcemanager.servicefabric.models.AzureActiveDirectory;
@@ -21,6 +20,7 @@
import com.azure.resourcemanager.servicefabric.models.ClusterUpdateParameters;
import com.azure.resourcemanager.servicefabric.models.ClusterUpgradeCadence;
import com.azure.resourcemanager.servicefabric.models.ClusterUpgradePolicy;
+import com.azure.resourcemanager.servicefabric.models.ClusterVersionDetails;
import com.azure.resourcemanager.servicefabric.models.DiagnosticsStorageAccountConfig;
import com.azure.resourcemanager.servicefabric.models.NodeTypeDescription;
import com.azure.resourcemanager.servicefabric.models.Notification;
@@ -68,14 +68,6 @@ public Map tags() {
}
}
- public String etag() {
- return this.innerModel().etag();
- }
-
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
public List addOnFeatures() {
List inner = this.innerModel().addOnFeatures();
if (inner != null) {
@@ -239,6 +231,14 @@ public List notifications() {
}
}
+ public String etag() {
+ return this.innerModel().etag();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public Region region() {
return Region.fromName(this.regionName());
}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceResourceImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceResourceImpl.java
index 4112b6fcea61..61285d03b4c4 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceResourceImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceResourceImpl.java
@@ -37,25 +37,39 @@ public String type() {
return this.innerModel().type();
}
- public String location() {
- return this.innerModel().location();
+ public String placementConstraints() {
+ return this.innerModel().placementConstraints();
}
- public Map tags() {
- Map inner = this.innerModel().tags();
+ public List correlationScheme() {
+ List inner = this.innerModel().correlationScheme();
if (inner != null) {
- return Collections.unmodifiableMap(inner);
+ return Collections.unmodifiableList(inner);
} else {
- return Collections.emptyMap();
+ return Collections.emptyList();
}
}
- public String etag() {
- return this.innerModel().etag();
+ public List serviceLoadMetrics() {
+ List inner = this.innerModel().serviceLoadMetrics();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
}
- public SystemData systemData() {
- return this.innerModel().systemData();
+ public List servicePlacementPolicies() {
+ List inner = this.innerModel().servicePlacementPolicies();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public MoveCost defaultMoveCost() {
+ return this.innerModel().defaultMoveCost();
}
public String provisioningState() {
@@ -78,39 +92,25 @@ public String serviceDnsName() {
return this.innerModel().serviceDnsName();
}
- public String placementConstraints() {
- return this.innerModel().placementConstraints();
- }
-
- public List correlationScheme() {
- List inner = this.innerModel().correlationScheme();
- if (inner != null) {
- return Collections.unmodifiableList(inner);
- } else {
- return Collections.emptyList();
- }
+ public String location() {
+ return this.innerModel().location();
}
- public List serviceLoadMetrics() {
- List inner = this.innerModel().serviceLoadMetrics();
+ public Map tags() {
+ Map inner = this.innerModel().tags();
if (inner != null) {
- return Collections.unmodifiableList(inner);
+ return Collections.unmodifiableMap(inner);
} else {
- return Collections.emptyList();
+ return Collections.emptyMap();
}
}
- public List servicePlacementPolicies() {
- List inner = this.innerModel().servicePlacementPolicies();
- if (inner != null) {
- return Collections.unmodifiableList(inner);
- } else {
- return Collections.emptyList();
- }
+ public String etag() {
+ return this.innerModel().etag();
}
- public MoveCost defaultMoveCost() {
- return this.innerModel().defaultMoveCost();
+ public SystemData systemData() {
+ return this.innerModel().systemData();
}
public Region region() {
@@ -241,6 +241,57 @@ public ServiceResourceImpl withTags(Map tags) {
return this;
}
+ public ServiceResourceImpl withPlacementConstraints(String placementConstraints) {
+ if (isInCreateMode()) {
+ this.innerModel().withPlacementConstraints(placementConstraints);
+ return this;
+ } else {
+ this.updateParameters.withPlacementConstraints(placementConstraints);
+ return this;
+ }
+ }
+
+ public ServiceResourceImpl withCorrelationScheme(List correlationScheme) {
+ if (isInCreateMode()) {
+ this.innerModel().withCorrelationScheme(correlationScheme);
+ return this;
+ } else {
+ this.updateParameters.withCorrelationScheme(correlationScheme);
+ return this;
+ }
+ }
+
+ public ServiceResourceImpl withServiceLoadMetrics(List serviceLoadMetrics) {
+ if (isInCreateMode()) {
+ this.innerModel().withServiceLoadMetrics(serviceLoadMetrics);
+ return this;
+ } else {
+ this.updateParameters.withServiceLoadMetrics(serviceLoadMetrics);
+ return this;
+ }
+ }
+
+ public ServiceResourceImpl withServicePlacementPolicies(
+ List servicePlacementPolicies) {
+ if (isInCreateMode()) {
+ this.innerModel().withServicePlacementPolicies(servicePlacementPolicies);
+ return this;
+ } else {
+ this.updateParameters.withServicePlacementPolicies(servicePlacementPolicies);
+ return this;
+ }
+ }
+
+ public ServiceResourceImpl withDefaultMoveCost(MoveCost defaultMoveCost) {
+ if (isInCreateMode()) {
+ this.innerModel().withDefaultMoveCost(defaultMoveCost);
+ return this;
+ } else {
+ this.updateParameters.withDefaultMoveCost(defaultMoveCost);
+ return this;
+ }
+ }
+
public ServiceResourceImpl withServiceTypeName(String serviceTypeName) {
this.innerModel().withServiceTypeName(serviceTypeName);
return this;
@@ -262,29 +313,7 @@ public ServiceResourceImpl withServiceDnsName(String serviceDnsName) {
return this;
}
- public ServiceResourceImpl withPlacementConstraints(String placementConstraints) {
- this.innerModel().withPlacementConstraints(placementConstraints);
- return this;
- }
-
- public ServiceResourceImpl withCorrelationScheme(List correlationScheme) {
- this.innerModel().withCorrelationScheme(correlationScheme);
- return this;
- }
-
- public ServiceResourceImpl withServiceLoadMetrics(List serviceLoadMetrics) {
- this.innerModel().withServiceLoadMetrics(serviceLoadMetrics);
- return this;
- }
-
- public ServiceResourceImpl withServicePlacementPolicies(
- List servicePlacementPolicies) {
- this.innerModel().withServicePlacementPolicies(servicePlacementPolicies);
- return this;
- }
-
- public ServiceResourceImpl withDefaultMoveCost(MoveCost defaultMoveCost) {
- this.innerModel().withDefaultMoveCost(defaultMoveCost);
- return this;
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
}
}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResource.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResource.java
index 434458b67557..f6a21fd286ff 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResource.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResource.java
@@ -41,49 +41,6 @@ public interface ApplicationResource {
*/
ManagedIdentity identity();
- /**
- * Gets the location property: It will be deprecated in New API, resource location depends on the parent resource.
- *
- * @return the location value.
- */
- String location();
-
- /**
- * Gets the tags property: Azure resource tags.
- *
- * @return the tags value.
- */
- Map tags();
-
- /**
- * Gets the etag property: Azure resource etag.
- *
- * @return the etag value.
- */
- String etag();
-
- /**
- * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
- *
- * @return the systemData value.
- */
- SystemData systemData();
-
- /**
- * Gets the provisioningState property: The current deployment or provisioning state, which only appears in the
- * response.
- *
- * @return the provisioningState value.
- */
- String provisioningState();
-
- /**
- * Gets the typeName property: The application type name as defined in the application manifest.
- *
- * @return the typeName value.
- */
- String typeName();
-
/**
* Gets the typeVersion property: The version of the application type as defined in the application manifest.
*
@@ -147,6 +104,49 @@ public interface ApplicationResource {
*/
List managedIdentities();
+ /**
+ * Gets the provisioningState property: The current deployment or provisioning state, which only appears in the
+ * response.
+ *
+ * @return the provisioningState value.
+ */
+ String provisioningState();
+
+ /**
+ * Gets the typeName property: The application type name as defined in the application manifest.
+ *
+ * @return the typeName value.
+ */
+ String typeName();
+
+ /**
+ * Gets the location property: It will be deprecated in New API, resource location depends on the parent resource.
+ *
+ * @return the location value.
+ */
+ String location();
+
+ /**
+ * Gets the tags property: Azure resource tags.
+ *
+ * @return the tags value.
+ */
+ Map tags();
+
+ /**
+ * Gets the etag property: Azure resource etag.
+ *
+ * @return the etag value.
+ */
+ String etag();
+
+ /**
+ * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ SystemData systemData();
+
/**
* Gets the region of the resource.
*
@@ -196,7 +196,6 @@ interface WithCreate
extends DefinitionStages.WithLocation,
DefinitionStages.WithTags,
DefinitionStages.WithIdentity,
- DefinitionStages.WithTypeName,
DefinitionStages.WithTypeVersion,
DefinitionStages.WithParameters,
DefinitionStages.WithUpgradePolicy,
@@ -204,7 +203,8 @@ interface WithCreate
DefinitionStages.WithMaximumNodes,
DefinitionStages.WithRemoveApplicationCapacity,
DefinitionStages.WithMetrics,
- DefinitionStages.WithManagedIdentities {
+ DefinitionStages.WithManagedIdentities,
+ DefinitionStages.WithTypeName {
/**
* Executes the create request.
*
@@ -258,16 +258,6 @@ interface WithIdentity {
*/
WithCreate withIdentity(ManagedIdentity identity);
}
- /** The stage of the ApplicationResource definition allowing to specify typeName. */
- interface WithTypeName {
- /**
- * Specifies the typeName property: The application type name as defined in the application manifest..
- *
- * @param typeName The application type name as defined in the application manifest.
- * @return the next definition stage.
- */
- WithCreate withTypeName(String typeName);
- }
/** The stage of the ApplicationResource definition allowing to specify typeVersion. */
interface WithTypeVersion {
/**
@@ -365,6 +355,16 @@ interface WithManagedIdentities {
*/
WithCreate withManagedIdentities(List managedIdentities);
}
+ /** The stage of the ApplicationResource definition allowing to specify typeName. */
+ interface WithTypeName {
+ /**
+ * Specifies the typeName property: The application type name as defined in the application manifest..
+ *
+ * @param typeName The application type name as defined in the application manifest.
+ * @return the next definition stage.
+ */
+ WithCreate withTypeName(String typeName);
+ }
}
/**
* Begins update for the ApplicationResource resource.
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationResourceProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceProperties.java
similarity index 92%
rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationResourceProperties.java
rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceProperties.java
index af4faf65d772..55ead786f04b 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationResourceProperties.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceProperties.java
@@ -2,13 +2,10 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.resourcemanager.servicefabric.fluent.models;
+package com.azure.resourcemanager.servicefabric.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.servicefabric.models.ApplicationMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ApplicationUpgradePolicy;
-import com.azure.resourcemanager.servicefabric.models.ApplicationUserAssignedIdentity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceUpdate.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceUpdate.java
index 79e85f723ecb..c45e32500f38 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceUpdate.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceUpdate.java
@@ -5,10 +5,10 @@
package com.azure.resourcemanager.servicefabric.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationResourceUpdateProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -16,108 +16,96 @@
import java.util.Map;
/** The application resource for patch operations. */
+@JsonFlatten
@Fluent
-public final class ApplicationResourceUpdate extends ProxyResource {
+public class ApplicationResourceUpdate extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationResourceUpdate.class);
/*
- * The application resource properties for patch operations.
+ * The version of the application type as defined in the application
+ * manifest.
*/
- @JsonProperty(value = "properties")
- private ApplicationResourceUpdateProperties innerProperties;
+ @JsonProperty(value = "properties.typeVersion")
+ private String typeVersion;
/*
- * It will be deprecated in New API, resource location depends on the
- * parent resource.
+ * List of application parameters with overridden values from their default
+ * values specified in the application manifest.
*/
- @JsonProperty(value = "location")
- private String location;
+ @JsonProperty(value = "properties.parameters")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map parameters;
/*
- * Azure resource tags.
+ * Describes the policy for a monitored application upgrade.
*/
- @JsonProperty(value = "tags")
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
- private Map tags;
+ @JsonProperty(value = "properties.upgradePolicy")
+ private ApplicationUpgradePolicy upgradePolicy;
/*
- * Azure resource etag.
+ * The minimum number of nodes where Service Fabric will reserve capacity
+ * for this application. Note that this does not mean that the services of
+ * this application will be placed on all of those nodes. If this property
+ * is set to zero, no capacity will be reserved. The value of this property
+ * cannot be more than the value of the MaximumNodes property.
*/
- @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
- private String etag;
+ @JsonProperty(value = "properties.minimumNodes")
+ private Long minimumNodes;
/*
- * Metadata pertaining to creation and last modification of the resource.
+ * The maximum number of nodes where Service Fabric will reserve capacity
+ * for this application. Note that this does not mean that the services of
+ * this application will be placed on all of those nodes. By default, the
+ * value of this property is zero and it means that the services can be
+ * placed on any node.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
+ @JsonProperty(value = "properties.maximumNodes")
+ private Long maximumNodes;
- /**
- * Get the innerProperties property: The application resource properties for patch operations.
- *
- * @return the innerProperties value.
+ /*
+ * Remove the current application capacity settings.
*/
- private ApplicationResourceUpdateProperties innerProperties() {
- return this.innerProperties;
- }
+ @JsonProperty(value = "properties.removeApplicationCapacity")
+ private Boolean removeApplicationCapacity;
- /**
- * Get the location property: It will be deprecated in New API, resource location depends on the parent resource.
- *
- * @return the location value.
+ /*
+ * List of application capacity metric description.
*/
- public String location() {
- return this.location;
- }
+ @JsonProperty(value = "properties.metrics")
+ private List metrics;
- /**
- * Set the location property: It will be deprecated in New API, resource location depends on the parent resource.
- *
- * @param location the location value to set.
- * @return the ApplicationResourceUpdate object itself.
+ /*
+ * List of user assigned identities for the application, each mapped to a
+ * friendly name.
*/
- public ApplicationResourceUpdate withLocation(String location) {
- this.location = location;
- return this;
- }
+ @JsonProperty(value = "properties.managedIdentities")
+ private List managedIdentities;
- /**
- * Get the tags property: Azure resource tags.
- *
- * @return the tags value.
+ /*
+ * It will be deprecated in New API, resource location depends on the
+ * parent resource.
*/
- public Map tags() {
- return this.tags;
- }
+ @JsonProperty(value = "location")
+ private String location;
- /**
- * Set the tags property: Azure resource tags.
- *
- * @param tags the tags value to set.
- * @return the ApplicationResourceUpdate object itself.
+ /*
+ * Azure resource tags.
*/
- public ApplicationResourceUpdate withTags(Map tags) {
- this.tags = tags;
- return this;
- }
+ @JsonProperty(value = "tags")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map tags;
- /**
- * Get the etag property: Azure resource etag.
- *
- * @return the etag value.
+ /*
+ * Azure resource etag.
*/
- public String etag() {
- return this.etag;
- }
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
- /**
- * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
- *
- * @return the systemData value.
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
*/
- public SystemData systemData() {
- return this.systemData;
- }
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
/**
* Get the typeVersion property: The version of the application type as defined in the application manifest.
@@ -125,7 +113,7 @@ public SystemData systemData() {
* @return the typeVersion value.
*/
public String typeVersion() {
- return this.innerProperties() == null ? null : this.innerProperties().typeVersion();
+ return this.typeVersion;
}
/**
@@ -135,10 +123,7 @@ public String typeVersion() {
* @return the ApplicationResourceUpdate object itself.
*/
public ApplicationResourceUpdate withTypeVersion(String typeVersion) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ApplicationResourceUpdateProperties();
- }
- this.innerProperties().withTypeVersion(typeVersion);
+ this.typeVersion = typeVersion;
return this;
}
@@ -149,7 +134,7 @@ public ApplicationResourceUpdate withTypeVersion(String typeVersion) {
* @return the parameters value.
*/
public Map parameters() {
- return this.innerProperties() == null ? null : this.innerProperties().parameters();
+ return this.parameters;
}
/**
@@ -160,10 +145,7 @@ public Map parameters() {
* @return the ApplicationResourceUpdate object itself.
*/
public ApplicationResourceUpdate withParameters(Map parameters) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ApplicationResourceUpdateProperties();
- }
- this.innerProperties().withParameters(parameters);
+ this.parameters = parameters;
return this;
}
@@ -173,7 +155,7 @@ public ApplicationResourceUpdate withParameters(Map parameters)
* @return the upgradePolicy value.
*/
public ApplicationUpgradePolicy upgradePolicy() {
- return this.innerProperties() == null ? null : this.innerProperties().upgradePolicy();
+ return this.upgradePolicy;
}
/**
@@ -183,10 +165,7 @@ public ApplicationUpgradePolicy upgradePolicy() {
* @return the ApplicationResourceUpdate object itself.
*/
public ApplicationResourceUpdate withUpgradePolicy(ApplicationUpgradePolicy upgradePolicy) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ApplicationResourceUpdateProperties();
- }
- this.innerProperties().withUpgradePolicy(upgradePolicy);
+ this.upgradePolicy = upgradePolicy;
return this;
}
@@ -199,7 +178,7 @@ public ApplicationResourceUpdate withUpgradePolicy(ApplicationUpgradePolicy upgr
* @return the minimumNodes value.
*/
public Long minimumNodes() {
- return this.innerProperties() == null ? null : this.innerProperties().minimumNodes();
+ return this.minimumNodes;
}
/**
@@ -212,10 +191,7 @@ public Long minimumNodes() {
* @return the ApplicationResourceUpdate object itself.
*/
public ApplicationResourceUpdate withMinimumNodes(Long minimumNodes) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ApplicationResourceUpdateProperties();
- }
- this.innerProperties().withMinimumNodes(minimumNodes);
+ this.minimumNodes = minimumNodes;
return this;
}
@@ -227,7 +203,7 @@ public ApplicationResourceUpdate withMinimumNodes(Long minimumNodes) {
* @return the maximumNodes value.
*/
public Long maximumNodes() {
- return this.innerProperties() == null ? null : this.innerProperties().maximumNodes();
+ return this.maximumNodes;
}
/**
@@ -239,10 +215,7 @@ public Long maximumNodes() {
* @return the ApplicationResourceUpdate object itself.
*/
public ApplicationResourceUpdate withMaximumNodes(Long maximumNodes) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ApplicationResourceUpdateProperties();
- }
- this.innerProperties().withMaximumNodes(maximumNodes);
+ this.maximumNodes = maximumNodes;
return this;
}
@@ -252,7 +225,7 @@ public ApplicationResourceUpdate withMaximumNodes(Long maximumNodes) {
* @return the removeApplicationCapacity value.
*/
public Boolean removeApplicationCapacity() {
- return this.innerProperties() == null ? null : this.innerProperties().removeApplicationCapacity();
+ return this.removeApplicationCapacity;
}
/**
@@ -262,10 +235,7 @@ public Boolean removeApplicationCapacity() {
* @return the ApplicationResourceUpdate object itself.
*/
public ApplicationResourceUpdate withRemoveApplicationCapacity(Boolean removeApplicationCapacity) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ApplicationResourceUpdateProperties();
- }
- this.innerProperties().withRemoveApplicationCapacity(removeApplicationCapacity);
+ this.removeApplicationCapacity = removeApplicationCapacity;
return this;
}
@@ -275,7 +245,7 @@ public ApplicationResourceUpdate withRemoveApplicationCapacity(Boolean removeApp
* @return the metrics value.
*/
public List metrics() {
- return this.innerProperties() == null ? null : this.innerProperties().metrics();
+ return this.metrics;
}
/**
@@ -285,10 +255,7 @@ public List metrics() {
* @return the ApplicationResourceUpdate object itself.
*/
public ApplicationResourceUpdate withMetrics(List metrics) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ApplicationResourceUpdateProperties();
- }
- this.innerProperties().withMetrics(metrics);
+ this.metrics = metrics;
return this;
}
@@ -299,7 +266,7 @@ public ApplicationResourceUpdate withMetrics(List
* @return the managedIdentities value.
*/
public List managedIdentities() {
- return this.innerProperties() == null ? null : this.innerProperties().managedIdentities();
+ return this.managedIdentities;
}
/**
@@ -310,21 +277,82 @@ public List managedIdentities() {
* @return the ApplicationResourceUpdate object itself.
*/
public ApplicationResourceUpdate withManagedIdentities(List managedIdentities) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ApplicationResourceUpdateProperties();
- }
- this.innerProperties().withManagedIdentities(managedIdentities);
+ this.managedIdentities = managedIdentities;
return this;
}
+ /**
+ * Get the location property: It will be deprecated in New API, resource location depends on the parent resource.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location property: It will be deprecated in New API, resource location depends on the parent resource.
+ *
+ * @param location the location value to set.
+ * @return the ApplicationResourceUpdate object itself.
+ */
+ public ApplicationResourceUpdate withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the tags property: Azure resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the tags property: Azure resource tags.
+ *
+ * @param tags the tags value to set.
+ * @return the ApplicationResourceUpdate object itself.
+ */
+ public ApplicationResourceUpdate withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the etag property: Azure resource etag.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @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 (innerProperties() != null) {
- innerProperties().validate();
+ if (upgradePolicy() != null) {
+ upgradePolicy().validate();
+ }
+ if (metrics() != null) {
+ metrics().forEach(e -> e.validate());
+ }
+ if (managedIdentities() != null) {
+ managedIdentities().forEach(e -> e.validate());
}
}
}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationResourceUpdateProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceUpdateProperties.java
similarity index 96%
rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationResourceUpdateProperties.java
rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceUpdateProperties.java
index da9c28d7f94d..c7f9335eca2e 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationResourceUpdateProperties.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceUpdateProperties.java
@@ -2,13 +2,10 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.resourcemanager.servicefabric.fluent.models;
+package com.azure.resourcemanager.servicefabric.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.servicefabric.models.ApplicationMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ApplicationUpgradePolicy;
-import com.azure.resourcemanager.servicefabric.models.ApplicationUserAssignedIdentity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeResource.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeResource.java
index d9c5971f8cd0..c073a8d100e1 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeResource.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeResource.java
@@ -33,6 +33,14 @@ public interface ApplicationTypeResource {
*/
String type();
+ /**
+ * Gets the provisioningState property: The current deployment or provisioning state, which only appears in the
+ * response.
+ *
+ * @return the provisioningState value.
+ */
+ String provisioningState();
+
/**
* Gets the location property: It will be deprecated in New API, resource location depends on the parent resource.
*
@@ -61,14 +69,6 @@ public interface ApplicationTypeResource {
*/
SystemData systemData();
- /**
- * Gets the provisioningState property: The current deployment or provisioning state, which only appears in the
- * response.
- *
- * @return the provisioningState value.
- */
- String provisioningState();
-
/**
* Gets the region of the resource.
*
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersionResource.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersionResource.java
index 77af962f0088..d39d2b4f2cd5 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersionResource.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersionResource.java
@@ -34,55 +34,55 @@ public interface ApplicationTypeVersionResource {
String type();
/**
- * Gets the location property: It will be deprecated in New API, resource location depends on the parent resource.
+ * Gets the provisioningState property: The current deployment or provisioning state, which only appears in the
+ * response.
*
- * @return the location value.
+ * @return the provisioningState value.
*/
- String location();
+ String provisioningState();
/**
- * Gets the tags property: Azure resource tags.
+ * Gets the appPackageUrl property: The URL to the application package.
*
- * @return the tags value.
+ * @return the appPackageUrl value.
*/
- Map tags();
+ String appPackageUrl();
/**
- * Gets the etag property: Azure resource etag.
+ * Gets the defaultParameterList property: List of application type parameters that can be overridden when creating
+ * or updating the application.
*
- * @return the etag value.
+ * @return the defaultParameterList value.
*/
- String etag();
+ Map defaultParameterList();
/**
- * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
+ * Gets the location property: It will be deprecated in New API, resource location depends on the parent resource.
*
- * @return the systemData value.
+ * @return the location value.
*/
- SystemData systemData();
+ String location();
/**
- * Gets the provisioningState property: The current deployment or provisioning state, which only appears in the
- * response.
+ * Gets the tags property: Azure resource tags.
*
- * @return the provisioningState value.
+ * @return the tags value.
*/
- String provisioningState();
+ Map tags();
/**
- * Gets the appPackageUrl property: The URL to the application package.
+ * Gets the etag property: Azure resource etag.
*
- * @return the appPackageUrl value.
+ * @return the etag value.
*/
- String appPackageUrl();
+ String etag();
/**
- * Gets the defaultParameterList property: List of application type parameters that can be overridden when creating
- * or updating the application.
+ * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
*
- * @return the defaultParameterList value.
+ * @return the systemData value.
*/
- Map defaultParameterList();
+ SystemData systemData();
/**
* Gets the region of the resource.
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Cluster.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Cluster.java
index d7f8af757635..8bc651c6b312 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Cluster.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Cluster.java
@@ -9,7 +9,6 @@
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.servicefabric.fluent.models.ClusterInner;
-import com.azure.resourcemanager.servicefabric.fluent.models.ClusterVersionDetails;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Map;
@@ -51,20 +50,6 @@ public interface Cluster {
*/
Map tags();
- /**
- * Gets the etag property: Azure resource etag.
- *
- * @return the etag value.
- */
- String etag();
-
- /**
- * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
- *
- * @return the systemData value.
- */
- SystemData systemData();
-
/**
* Gets the addOnFeatures property: The list of add-on features to enable in the cluster.
*
@@ -329,6 +314,20 @@ public interface Cluster {
*/
List notifications();
+ /**
+ * Gets the etag property: Azure resource etag.
+ *
+ * @return the etag value.
+ */
+ String etag();
+
+ /**
+ * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ SystemData systemData();
+
/**
* Gets the region of the resource.
*
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterCodeVersionsResult.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterCodeVersionsResult.java
index 19efb2f4e228..decd732024d2 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterCodeVersionsResult.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterCodeVersionsResult.java
@@ -5,14 +5,15 @@
package com.azure.resourcemanager.servicefabric.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.servicefabric.fluent.models.ClusterVersionDetails;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The result of the Service Fabric runtime versions. */
+@JsonFlatten
@Fluent
-public final class ClusterCodeVersionsResult {
+public class ClusterCodeVersionsResult {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterCodeVersionsResult.class);
/*
@@ -34,10 +35,22 @@ public final class ClusterCodeVersionsResult {
private String type;
/*
- * The detail of the Service Fabric runtime version result
+ * The Service Fabric runtime version of the cluster.
*/
- @JsonProperty(value = "properties")
- private ClusterVersionDetails innerProperties;
+ @JsonProperty(value = "properties.codeVersion")
+ private String codeVersion;
+
+ /*
+ * The date of expiry of support of the version.
+ */
+ @JsonProperty(value = "properties.supportExpiryUtc")
+ private String supportExpiryUtc;
+
+ /*
+ * Indicates if this version is for Windows or Linux operating system.
+ */
+ @JsonProperty(value = "properties.environment")
+ private ClusterEnvironment environment;
/**
* Get the id property: The identification of the result.
@@ -99,22 +112,13 @@ public ClusterCodeVersionsResult withType(String type) {
return this;
}
- /**
- * Get the innerProperties property: The detail of the Service Fabric runtime version result.
- *
- * @return the innerProperties value.
- */
- private ClusterVersionDetails innerProperties() {
- return this.innerProperties;
- }
-
/**
* Get the codeVersion property: The Service Fabric runtime version of the cluster.
*
* @return the codeVersion value.
*/
public String codeVersion() {
- return this.innerProperties() == null ? null : this.innerProperties().codeVersion();
+ return this.codeVersion;
}
/**
@@ -124,10 +128,7 @@ public String codeVersion() {
* @return the ClusterCodeVersionsResult object itself.
*/
public ClusterCodeVersionsResult withCodeVersion(String codeVersion) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterVersionDetails();
- }
- this.innerProperties().withCodeVersion(codeVersion);
+ this.codeVersion = codeVersion;
return this;
}
@@ -137,7 +138,7 @@ public ClusterCodeVersionsResult withCodeVersion(String codeVersion) {
* @return the supportExpiryUtc value.
*/
public String supportExpiryUtc() {
- return this.innerProperties() == null ? null : this.innerProperties().supportExpiryUtc();
+ return this.supportExpiryUtc;
}
/**
@@ -147,10 +148,7 @@ public String supportExpiryUtc() {
* @return the ClusterCodeVersionsResult object itself.
*/
public ClusterCodeVersionsResult withSupportExpiryUtc(String supportExpiryUtc) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterVersionDetails();
- }
- this.innerProperties().withSupportExpiryUtc(supportExpiryUtc);
+ this.supportExpiryUtc = supportExpiryUtc;
return this;
}
@@ -160,7 +158,7 @@ public ClusterCodeVersionsResult withSupportExpiryUtc(String supportExpiryUtc) {
* @return the environment value.
*/
public ClusterEnvironment environment() {
- return this.innerProperties() == null ? null : this.innerProperties().environment();
+ return this.environment;
}
/**
@@ -170,10 +168,7 @@ public ClusterEnvironment environment() {
* @return the ClusterCodeVersionsResult object itself.
*/
public ClusterCodeVersionsResult withEnvironment(ClusterEnvironment environment) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterVersionDetails();
- }
- this.innerProperties().withEnvironment(environment);
+ this.environment = environment;
return this;
}
@@ -183,8 +178,5 @@ public ClusterCodeVersionsResult withEnvironment(ClusterEnvironment environment)
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
}
}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpdateParameters.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpdateParameters.java
index af174c4c9d2e..6bd17b1b1c07 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpdateParameters.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpdateParameters.java
@@ -5,8 +5,8 @@
package com.azure.resourcemanager.servicefabric.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.servicefabric.fluent.models.ClusterPropertiesUpdateParameters;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -15,17 +15,11 @@
import java.util.Map;
/** Cluster update request. */
+@JsonFlatten
@Fluent
-public final class ClusterUpdateParameters {
+public class ClusterUpdateParameters {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterUpdateParameters.class);
- /*
- * Describes the cluster resource properties that can be updated during
- * PATCH operation.
- */
- @JsonProperty(value = "properties")
- private ClusterPropertiesUpdateParameters innerProperties;
-
/*
* Cluster update parameters
*/
@@ -33,15 +27,169 @@ public final class ClusterUpdateParameters {
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
- /**
- * Get the innerProperties property: Describes the cluster resource properties that can be updated during PATCH
- * operation.
+ /*
+ * The list of add-on features to enable in the cluster.
+ */
+ @JsonProperty(value = "properties.addOnFeatures")
+ private List addOnFeatures;
+
+ /*
+ * The certificate to use for securing the cluster. The certificate
+ * provided will be used for node to node security within the cluster, SSL
+ * certificate for cluster management endpoint and default admin client.
+ */
+ @JsonProperty(value = "properties.certificate")
+ private CertificateDescription certificate;
+
+ /*
+ * Describes a list of server certificates referenced by common name that
+ * are used to secure the cluster.
+ */
+ @JsonProperty(value = "properties.certificateCommonNames")
+ private ServerCertificateCommonNames certificateCommonNames;
+
+ /*
+ * The list of client certificates referenced by common name that are
+ * allowed to manage the cluster. This will overwrite the existing list.
+ */
+ @JsonProperty(value = "properties.clientCertificateCommonNames")
+ private List clientCertificateCommonNames;
+
+ /*
+ * The list of client certificates referenced by thumbprint that are
+ * allowed to manage the cluster. This will overwrite the existing list.
+ */
+ @JsonProperty(value = "properties.clientCertificateThumbprints")
+ private List clientCertificateThumbprints;
+
+ /*
+ * The Service Fabric runtime version of the cluster. This property can
+ * only by set the user when **upgradeMode** is set to 'Manual'. To get
+ * list of available Service Fabric versions for new clusters use
+ * [ClusterVersion API](./ClusterVersion.md). To get the list of available
+ * version for existing clusters use **availableClusterVersions**.
+ */
+ @JsonProperty(value = "properties.clusterCodeVersion")
+ private String clusterCodeVersion;
+
+ /*
+ * Indicates if the event store service is enabled.
+ */
+ @JsonProperty(value = "properties.eventStoreServiceEnabled")
+ private Boolean eventStoreServiceEnabled;
+
+ /*
+ * The list of custom fabric settings to configure the cluster. This will
+ * overwrite the existing list.
+ */
+ @JsonProperty(value = "properties.fabricSettings")
+ private List fabricSettings;
+
+ /*
+ * The list of node types in the cluster. This will overwrite the existing
+ * list.
+ */
+ @JsonProperty(value = "properties.nodeTypes")
+ private List nodeTypes;
+
+ /*
+ * The reliability level sets the replica set size of system services.
+ * Learn about
+ * [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity).
+ *
+ * - None - Run the System services with a target replica set count of 1.
+ * This should only be used for test clusters.
+ * - Bronze - Run the System services with a target replica set count of 3.
+ * This should only be used for test clusters.
+ * - Silver - Run the System services with a target replica set count of 5.
+ * - Gold - Run the System services with a target replica set count of 7.
+ * - Platinum - Run the System services with a target replica set count of
+ * 9.
*
- * @return the innerProperties value.
*/
- private ClusterPropertiesUpdateParameters innerProperties() {
- return this.innerProperties;
- }
+ @JsonProperty(value = "properties.reliabilityLevel")
+ private ReliabilityLevel reliabilityLevel;
+
+ /*
+ * The server certificate used by reverse proxy.
+ */
+ @JsonProperty(value = "properties.reverseProxyCertificate")
+ private CertificateDescription reverseProxyCertificate;
+
+ /*
+ * The policy to use when upgrading the cluster.
+ */
+ @JsonProperty(value = "properties.upgradeDescription")
+ private ClusterUpgradePolicy upgradeDescription;
+
+ /*
+ * The policy used to clean up unused versions.
+ */
+ @JsonProperty(value = "properties.applicationTypeVersionsCleanupPolicy")
+ private ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy;
+
+ /*
+ * The upgrade mode of the cluster when new Service Fabric runtime version
+ * is available.
+ */
+ @JsonProperty(value = "properties.upgradeMode")
+ private UpgradeMode upgradeMode;
+
+ /*
+ * This property controls the logical grouping of VMs in upgrade domains
+ * (UDs). This property can't be modified if a node type with multiple
+ * Availability Zones is already present in the cluster.
+ */
+ @JsonProperty(value = "properties.sfZonalUpgradeMode")
+ private SfZonalUpgradeMode sfZonalUpgradeMode;
+
+ /*
+ * This property defines the upgrade mode for the virtual machine scale
+ * set, it is mandatory if a node type with multiple Availability Zones is
+ * added.
+ */
+ @JsonProperty(value = "properties.vmssZonalUpgradeMode")
+ private VmssZonalUpgradeMode vmssZonalUpgradeMode;
+
+ /*
+ * Indicates if infrastructure service manager is enabled.
+ */
+ @JsonProperty(value = "properties.infrastructureServiceManager")
+ private Boolean infrastructureServiceManager;
+
+ /*
+ * Indicates when new cluster runtime version upgrades will be applied
+ * after they are released. By default is Wave0. Only applies when
+ * **upgradeMode** is set to 'Automatic'.
+ */
+ @JsonProperty(value = "properties.upgradeWave")
+ private ClusterUpgradeCadence upgradeWave;
+
+ /*
+ * The start timestamp to pause runtime version upgrades on the cluster
+ * (UTC).
+ */
+ @JsonProperty(value = "properties.upgradePauseStartTimestampUtc")
+ private OffsetDateTime upgradePauseStartTimestampUtc;
+
+ /*
+ * The end timestamp of pause runtime version upgrades on the cluster
+ * (UTC).
+ */
+ @JsonProperty(value = "properties.upgradePauseEndTimestampUtc")
+ private OffsetDateTime upgradePauseEndTimestampUtc;
+
+ /*
+ * Boolean to pause automatic runtime version upgrades to the cluster.
+ */
+ @JsonProperty(value = "properties.waveUpgradePaused")
+ private Boolean waveUpgradePaused;
+
+ /*
+ * Indicates a list of notification channels for cluster events.
+ */
+ @JsonProperty(value = "properties.notifications")
+ private List notifications;
/**
* Get the tags property: Cluster update parameters.
@@ -69,7 +217,7 @@ public ClusterUpdateParameters withTags(Map tags) {
* @return the addOnFeatures value.
*/
public List addOnFeatures() {
- return this.innerProperties() == null ? null : this.innerProperties().addOnFeatures();
+ return this.addOnFeatures;
}
/**
@@ -79,10 +227,7 @@ public List addOnFeatures() {
* @return the ClusterUpdateParameters object itself.
*/
public ClusterUpdateParameters withAddOnFeatures(List addOnFeatures) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterPropertiesUpdateParameters();
- }
- this.innerProperties().withAddOnFeatures(addOnFeatures);
+ this.addOnFeatures = addOnFeatures;
return this;
}
@@ -94,7 +239,7 @@ public ClusterUpdateParameters withAddOnFeatures(List addOnFeatur
* @return the certificate value.
*/
public CertificateDescription certificate() {
- return this.innerProperties() == null ? null : this.innerProperties().certificate();
+ return this.certificate;
}
/**
@@ -106,10 +251,7 @@ public CertificateDescription certificate() {
* @return the ClusterUpdateParameters object itself.
*/
public ClusterUpdateParameters withCertificate(CertificateDescription certificate) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterPropertiesUpdateParameters();
- }
- this.innerProperties().withCertificate(certificate);
+ this.certificate = certificate;
return this;
}
@@ -120,7 +262,7 @@ public ClusterUpdateParameters withCertificate(CertificateDescription certificat
* @return the certificateCommonNames value.
*/
public ServerCertificateCommonNames certificateCommonNames() {
- return this.innerProperties() == null ? null : this.innerProperties().certificateCommonNames();
+ return this.certificateCommonNames;
}
/**
@@ -131,10 +273,7 @@ public ServerCertificateCommonNames certificateCommonNames() {
* @return the ClusterUpdateParameters object itself.
*/
public ClusterUpdateParameters withCertificateCommonNames(ServerCertificateCommonNames certificateCommonNames) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterPropertiesUpdateParameters();
- }
- this.innerProperties().withCertificateCommonNames(certificateCommonNames);
+ this.certificateCommonNames = certificateCommonNames;
return this;
}
@@ -145,7 +284,7 @@ public ClusterUpdateParameters withCertificateCommonNames(ServerCertificateCommo
* @return the clientCertificateCommonNames value.
*/
public List clientCertificateCommonNames() {
- return this.innerProperties() == null ? null : this.innerProperties().clientCertificateCommonNames();
+ return this.clientCertificateCommonNames;
}
/**
@@ -157,10 +296,7 @@ public List clientCertificateCommonNames() {
*/
public ClusterUpdateParameters withClientCertificateCommonNames(
List clientCertificateCommonNames) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterPropertiesUpdateParameters();
- }
- this.innerProperties().withClientCertificateCommonNames(clientCertificateCommonNames);
+ this.clientCertificateCommonNames = clientCertificateCommonNames;
return this;
}
@@ -171,7 +307,7 @@ public ClusterUpdateParameters withClientCertificateCommonNames(
* @return the clientCertificateThumbprints value.
*/
public List clientCertificateThumbprints() {
- return this.innerProperties() == null ? null : this.innerProperties().clientCertificateThumbprints();
+ return this.clientCertificateThumbprints;
}
/**
@@ -183,10 +319,7 @@ public List clientCertificateThumbprints() {
*/
public ClusterUpdateParameters withClientCertificateThumbprints(
List clientCertificateThumbprints) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterPropertiesUpdateParameters();
- }
- this.innerProperties().withClientCertificateThumbprints(clientCertificateThumbprints);
+ this.clientCertificateThumbprints = clientCertificateThumbprints;
return this;
}
@@ -199,7 +332,7 @@ public ClusterUpdateParameters withClientCertificateThumbprints(
* @return the clusterCodeVersion value.
*/
public String clusterCodeVersion() {
- return this.innerProperties() == null ? null : this.innerProperties().clusterCodeVersion();
+ return this.clusterCodeVersion;
}
/**
@@ -212,10 +345,7 @@ public String clusterCodeVersion() {
* @return the ClusterUpdateParameters object itself.
*/
public ClusterUpdateParameters withClusterCodeVersion(String clusterCodeVersion) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterPropertiesUpdateParameters();
- }
- this.innerProperties().withClusterCodeVersion(clusterCodeVersion);
+ this.clusterCodeVersion = clusterCodeVersion;
return this;
}
@@ -225,7 +355,7 @@ public ClusterUpdateParameters withClusterCodeVersion(String clusterCodeVersion)
* @return the eventStoreServiceEnabled value.
*/
public Boolean eventStoreServiceEnabled() {
- return this.innerProperties() == null ? null : this.innerProperties().eventStoreServiceEnabled();
+ return this.eventStoreServiceEnabled;
}
/**
@@ -235,10 +365,7 @@ public Boolean eventStoreServiceEnabled() {
* @return the ClusterUpdateParameters object itself.
*/
public ClusterUpdateParameters withEventStoreServiceEnabled(Boolean eventStoreServiceEnabled) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterPropertiesUpdateParameters();
- }
- this.innerProperties().withEventStoreServiceEnabled(eventStoreServiceEnabled);
+ this.eventStoreServiceEnabled = eventStoreServiceEnabled;
return this;
}
@@ -249,7 +376,7 @@ public ClusterUpdateParameters withEventStoreServiceEnabled(Boolean eventStoreSe
* @return the fabricSettings value.
*/
public List fabricSettings() {
- return this.innerProperties() == null ? null : this.innerProperties().fabricSettings();
+ return this.fabricSettings;
}
/**
@@ -260,10 +387,7 @@ public List fabricSettings() {
* @return the ClusterUpdateParameters object itself.
*/
public ClusterUpdateParameters withFabricSettings(List fabricSettings) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterPropertiesUpdateParameters();
- }
- this.innerProperties().withFabricSettings(fabricSettings);
+ this.fabricSettings = fabricSettings;
return this;
}
@@ -273,7 +397,7 @@ public ClusterUpdateParameters withFabricSettings(List nodeTypes() {
- return this.innerProperties() == null ? null : this.innerProperties().nodeTypes();
+ return this.nodeTypes;
}
/**
@@ -283,10 +407,7 @@ public List nodeTypes() {
* @return the ClusterUpdateParameters object itself.
*/
public ClusterUpdateParameters withNodeTypes(List nodeTypes) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterPropertiesUpdateParameters();
- }
- this.innerProperties().withNodeTypes(nodeTypes);
+ this.nodeTypes = nodeTypes;
return this;
}
@@ -303,7 +424,7 @@ public ClusterUpdateParameters withNodeTypes(List nodeTypes
* @return the reliabilityLevel value.
*/
public ReliabilityLevel reliabilityLevel() {
- return this.innerProperties() == null ? null : this.innerProperties().reliabilityLevel();
+ return this.reliabilityLevel;
}
/**
@@ -320,10 +441,7 @@ public ReliabilityLevel reliabilityLevel() {
* @return the ClusterUpdateParameters object itself.
*/
public ClusterUpdateParameters withReliabilityLevel(ReliabilityLevel reliabilityLevel) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterPropertiesUpdateParameters();
- }
- this.innerProperties().withReliabilityLevel(reliabilityLevel);
+ this.reliabilityLevel = reliabilityLevel;
return this;
}
@@ -333,7 +451,7 @@ public ClusterUpdateParameters withReliabilityLevel(ReliabilityLevel reliability
* @return the reverseProxyCertificate value.
*/
public CertificateDescription reverseProxyCertificate() {
- return this.innerProperties() == null ? null : this.innerProperties().reverseProxyCertificate();
+ return this.reverseProxyCertificate;
}
/**
@@ -343,10 +461,7 @@ public CertificateDescription reverseProxyCertificate() {
* @return the ClusterUpdateParameters object itself.
*/
public ClusterUpdateParameters withReverseProxyCertificate(CertificateDescription reverseProxyCertificate) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterPropertiesUpdateParameters();
- }
- this.innerProperties().withReverseProxyCertificate(reverseProxyCertificate);
+ this.reverseProxyCertificate = reverseProxyCertificate;
return this;
}
@@ -356,7 +471,7 @@ public ClusterUpdateParameters withReverseProxyCertificate(CertificateDescriptio
* @return the upgradeDescription value.
*/
public ClusterUpgradePolicy upgradeDescription() {
- return this.innerProperties() == null ? null : this.innerProperties().upgradeDescription();
+ return this.upgradeDescription;
}
/**
@@ -366,10 +481,7 @@ public ClusterUpgradePolicy upgradeDescription() {
* @return the ClusterUpdateParameters object itself.
*/
public ClusterUpdateParameters withUpgradeDescription(ClusterUpgradePolicy upgradeDescription) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterPropertiesUpdateParameters();
- }
- this.innerProperties().withUpgradeDescription(upgradeDescription);
+ this.upgradeDescription = upgradeDescription;
return this;
}
@@ -379,7 +491,7 @@ public ClusterUpdateParameters withUpgradeDescription(ClusterUpgradePolicy upgra
* @return the applicationTypeVersionsCleanupPolicy value.
*/
public ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy() {
- return this.innerProperties() == null ? null : this.innerProperties().applicationTypeVersionsCleanupPolicy();
+ return this.applicationTypeVersionsCleanupPolicy;
}
/**
@@ -390,10 +502,7 @@ public ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy
*/
public ClusterUpdateParameters withApplicationTypeVersionsCleanupPolicy(
ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterPropertiesUpdateParameters();
- }
- this.innerProperties().withApplicationTypeVersionsCleanupPolicy(applicationTypeVersionsCleanupPolicy);
+ this.applicationTypeVersionsCleanupPolicy = applicationTypeVersionsCleanupPolicy;
return this;
}
@@ -404,7 +513,7 @@ public ClusterUpdateParameters withApplicationTypeVersionsCleanupPolicy(
* @return the upgradeMode value.
*/
public UpgradeMode upgradeMode() {
- return this.innerProperties() == null ? null : this.innerProperties().upgradeMode();
+ return this.upgradeMode;
}
/**
@@ -415,10 +524,7 @@ public UpgradeMode upgradeMode() {
* @return the ClusterUpdateParameters object itself.
*/
public ClusterUpdateParameters withUpgradeMode(UpgradeMode upgradeMode) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterPropertiesUpdateParameters();
- }
- this.innerProperties().withUpgradeMode(upgradeMode);
+ this.upgradeMode = upgradeMode;
return this;
}
@@ -430,7 +536,7 @@ public ClusterUpdateParameters withUpgradeMode(UpgradeMode upgradeMode) {
* @return the sfZonalUpgradeMode value.
*/
public SfZonalUpgradeMode sfZonalUpgradeMode() {
- return this.innerProperties() == null ? null : this.innerProperties().sfZonalUpgradeMode();
+ return this.sfZonalUpgradeMode;
}
/**
@@ -442,10 +548,7 @@ public SfZonalUpgradeMode sfZonalUpgradeMode() {
* @return the ClusterUpdateParameters object itself.
*/
public ClusterUpdateParameters withSfZonalUpgradeMode(SfZonalUpgradeMode sfZonalUpgradeMode) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterPropertiesUpdateParameters();
- }
- this.innerProperties().withSfZonalUpgradeMode(sfZonalUpgradeMode);
+ this.sfZonalUpgradeMode = sfZonalUpgradeMode;
return this;
}
@@ -456,7 +559,7 @@ public ClusterUpdateParameters withSfZonalUpgradeMode(SfZonalUpgradeMode sfZonal
* @return the vmssZonalUpgradeMode value.
*/
public VmssZonalUpgradeMode vmssZonalUpgradeMode() {
- return this.innerProperties() == null ? null : this.innerProperties().vmssZonalUpgradeMode();
+ return this.vmssZonalUpgradeMode;
}
/**
@@ -467,10 +570,7 @@ public VmssZonalUpgradeMode vmssZonalUpgradeMode() {
* @return the ClusterUpdateParameters object itself.
*/
public ClusterUpdateParameters withVmssZonalUpgradeMode(VmssZonalUpgradeMode vmssZonalUpgradeMode) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterPropertiesUpdateParameters();
- }
- this.innerProperties().withVmssZonalUpgradeMode(vmssZonalUpgradeMode);
+ this.vmssZonalUpgradeMode = vmssZonalUpgradeMode;
return this;
}
@@ -480,7 +580,7 @@ public ClusterUpdateParameters withVmssZonalUpgradeMode(VmssZonalUpgradeMode vms
* @return the infrastructureServiceManager value.
*/
public Boolean infrastructureServiceManager() {
- return this.innerProperties() == null ? null : this.innerProperties().infrastructureServiceManager();
+ return this.infrastructureServiceManager;
}
/**
@@ -490,10 +590,7 @@ public Boolean infrastructureServiceManager() {
* @return the ClusterUpdateParameters object itself.
*/
public ClusterUpdateParameters withInfrastructureServiceManager(Boolean infrastructureServiceManager) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterPropertiesUpdateParameters();
- }
- this.innerProperties().withInfrastructureServiceManager(infrastructureServiceManager);
+ this.infrastructureServiceManager = infrastructureServiceManager;
return this;
}
@@ -504,7 +601,7 @@ public ClusterUpdateParameters withInfrastructureServiceManager(Boolean infrastr
* @return the upgradeWave value.
*/
public ClusterUpgradeCadence upgradeWave() {
- return this.innerProperties() == null ? null : this.innerProperties().upgradeWave();
+ return this.upgradeWave;
}
/**
@@ -515,10 +612,7 @@ public ClusterUpgradeCadence upgradeWave() {
* @return the ClusterUpdateParameters object itself.
*/
public ClusterUpdateParameters withUpgradeWave(ClusterUpgradeCadence upgradeWave) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterPropertiesUpdateParameters();
- }
- this.innerProperties().withUpgradeWave(upgradeWave);
+ this.upgradeWave = upgradeWave;
return this;
}
@@ -529,7 +623,7 @@ public ClusterUpdateParameters withUpgradeWave(ClusterUpgradeCadence upgradeWave
* @return the upgradePauseStartTimestampUtc value.
*/
public OffsetDateTime upgradePauseStartTimestampUtc() {
- return this.innerProperties() == null ? null : this.innerProperties().upgradePauseStartTimestampUtc();
+ return this.upgradePauseStartTimestampUtc;
}
/**
@@ -540,10 +634,7 @@ public OffsetDateTime upgradePauseStartTimestampUtc() {
* @return the ClusterUpdateParameters object itself.
*/
public ClusterUpdateParameters withUpgradePauseStartTimestampUtc(OffsetDateTime upgradePauseStartTimestampUtc) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterPropertiesUpdateParameters();
- }
- this.innerProperties().withUpgradePauseStartTimestampUtc(upgradePauseStartTimestampUtc);
+ this.upgradePauseStartTimestampUtc = upgradePauseStartTimestampUtc;
return this;
}
@@ -554,7 +645,7 @@ public ClusterUpdateParameters withUpgradePauseStartTimestampUtc(OffsetDateTime
* @return the upgradePauseEndTimestampUtc value.
*/
public OffsetDateTime upgradePauseEndTimestampUtc() {
- return this.innerProperties() == null ? null : this.innerProperties().upgradePauseEndTimestampUtc();
+ return this.upgradePauseEndTimestampUtc;
}
/**
@@ -565,10 +656,7 @@ public OffsetDateTime upgradePauseEndTimestampUtc() {
* @return the ClusterUpdateParameters object itself.
*/
public ClusterUpdateParameters withUpgradePauseEndTimestampUtc(OffsetDateTime upgradePauseEndTimestampUtc) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterPropertiesUpdateParameters();
- }
- this.innerProperties().withUpgradePauseEndTimestampUtc(upgradePauseEndTimestampUtc);
+ this.upgradePauseEndTimestampUtc = upgradePauseEndTimestampUtc;
return this;
}
@@ -578,7 +666,7 @@ public ClusterUpdateParameters withUpgradePauseEndTimestampUtc(OffsetDateTime up
* @return the waveUpgradePaused value.
*/
public Boolean waveUpgradePaused() {
- return this.innerProperties() == null ? null : this.innerProperties().waveUpgradePaused();
+ return this.waveUpgradePaused;
}
/**
@@ -588,10 +676,7 @@ public Boolean waveUpgradePaused() {
* @return the ClusterUpdateParameters object itself.
*/
public ClusterUpdateParameters withWaveUpgradePaused(Boolean waveUpgradePaused) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterPropertiesUpdateParameters();
- }
- this.innerProperties().withWaveUpgradePaused(waveUpgradePaused);
+ this.waveUpgradePaused = waveUpgradePaused;
return this;
}
@@ -601,7 +686,7 @@ public ClusterUpdateParameters withWaveUpgradePaused(Boolean waveUpgradePaused)
* @return the notifications value.
*/
public List notifications() {
- return this.innerProperties() == null ? null : this.innerProperties().notifications();
+ return this.notifications;
}
/**
@@ -611,10 +696,7 @@ public List notifications() {
* @return the ClusterUpdateParameters object itself.
*/
public ClusterUpdateParameters withNotifications(List notifications) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterPropertiesUpdateParameters();
- }
- this.innerProperties().withNotifications(notifications);
+ this.notifications = notifications;
return this;
}
@@ -624,8 +706,35 @@ public ClusterUpdateParameters withNotifications(List notification
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
+ if (certificate() != null) {
+ certificate().validate();
+ }
+ if (certificateCommonNames() != null) {
+ certificateCommonNames().validate();
+ }
+ if (clientCertificateCommonNames() != null) {
+ clientCertificateCommonNames().forEach(e -> e.validate());
+ }
+ if (clientCertificateThumbprints() != null) {
+ clientCertificateThumbprints().forEach(e -> e.validate());
+ }
+ if (fabricSettings() != null) {
+ fabricSettings().forEach(e -> e.validate());
+ }
+ if (nodeTypes() != null) {
+ nodeTypes().forEach(e -> e.validate());
+ }
+ if (reverseProxyCertificate() != null) {
+ reverseProxyCertificate().validate();
+ }
+ if (upgradeDescription() != null) {
+ upgradeDescription().validate();
+ }
+ if (applicationTypeVersionsCleanupPolicy() != null) {
+ applicationTypeVersionsCleanupPolicy().validate();
+ }
+ if (notifications() != null) {
+ notifications().forEach(e -> e.validate());
}
}
}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterVersionDetails.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterVersionDetails.java
similarity index 95%
rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterVersionDetails.java
rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterVersionDetails.java
index 4624f806dd6c..3d2608af6915 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterVersionDetails.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterVersionDetails.java
@@ -2,11 +2,10 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.resourcemanager.servicefabric.fluent.models;
+package com.azure.resourcemanager.servicefabric.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.servicefabric.models.ClusterEnvironment;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResource.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResource.java
index 2e1276b4b9ab..59b3a4dd8151 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResource.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResource.java
@@ -35,32 +35,44 @@ public interface ServiceResource {
String type();
/**
- * Gets the location property: It will be deprecated in New API, resource location depends on the parent resource.
+ * Gets the placementConstraints property: The placement constraints as a string. Placement constraints are boolean
+ * expressions on node properties and allow for restricting a service to particular nodes based on the service
+ * requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor
+ * == blue)".
*
- * @return the location value.
+ * @return the placementConstraints value.
*/
- String location();
+ String placementConstraints();
/**
- * Gets the tags property: Azure resource tags.
+ * Gets the correlationScheme property: A list that describes the correlation of the service with other services.
*
- * @return the tags value.
+ * @return the correlationScheme value.
*/
- Map tags();
+ List correlationScheme();
/**
- * Gets the etag property: Azure resource etag.
+ * Gets the serviceLoadMetrics property: The service load metrics is given as an array of
+ * ServiceLoadMetricDescription objects.
*
- * @return the etag value.
+ * @return the serviceLoadMetrics value.
*/
- String etag();
+ List serviceLoadMetrics();
/**
- * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
+ * Gets the servicePlacementPolicies property: A list that describes the correlation of the service with other
+ * services.
*
- * @return the systemData value.
+ * @return the servicePlacementPolicies value.
*/
- SystemData systemData();
+ List servicePlacementPolicies();
+
+ /**
+ * Gets the defaultMoveCost property: Specifies the move cost for the service.
+ *
+ * @return the defaultMoveCost value.
+ */
+ MoveCost defaultMoveCost();
/**
* Gets the provisioningState property: The current deployment or provisioning state, which only appears in the
@@ -100,44 +112,32 @@ public interface ServiceResource {
String serviceDnsName();
/**
- * Gets the placementConstraints property: The placement constraints as a string. Placement constraints are boolean
- * expressions on node properties and allow for restricting a service to particular nodes based on the service
- * requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor
- * == blue)".
- *
- * @return the placementConstraints value.
- */
- String placementConstraints();
-
- /**
- * Gets the correlationScheme property: A list that describes the correlation of the service with other services.
+ * Gets the location property: It will be deprecated in New API, resource location depends on the parent resource.
*
- * @return the correlationScheme value.
+ * @return the location value.
*/
- List correlationScheme();
+ String location();
/**
- * Gets the serviceLoadMetrics property: The service load metrics is given as an array of
- * ServiceLoadMetricDescription objects.
+ * Gets the tags property: Azure resource tags.
*
- * @return the serviceLoadMetrics value.
+ * @return the tags value.
*/
- List serviceLoadMetrics();
+ Map tags();
/**
- * Gets the servicePlacementPolicies property: A list that describes the correlation of the service with other
- * services.
+ * Gets the etag property: Azure resource etag.
*
- * @return the servicePlacementPolicies value.
+ * @return the etag value.
*/
- List servicePlacementPolicies();
+ String etag();
/**
- * Gets the defaultMoveCost property: Specifies the move cost for the service.
+ * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
*
- * @return the defaultMoveCost value.
+ * @return the systemData value.
*/
- MoveCost defaultMoveCost();
+ SystemData systemData();
/**
* Gets the region of the resource.
@@ -188,15 +188,15 @@ interface WithParentResource {
interface WithCreate
extends DefinitionStages.WithLocation,
DefinitionStages.WithTags,
- DefinitionStages.WithServiceTypeName,
- DefinitionStages.WithPartitionDescription,
- DefinitionStages.WithServicePackageActivationMode,
- DefinitionStages.WithServiceDnsName,
DefinitionStages.WithPlacementConstraints,
DefinitionStages.WithCorrelationScheme,
DefinitionStages.WithServiceLoadMetrics,
DefinitionStages.WithServicePlacementPolicies,
- DefinitionStages.WithDefaultMoveCost {
+ DefinitionStages.WithDefaultMoveCost,
+ DefinitionStages.WithServiceTypeName,
+ DefinitionStages.WithPartitionDescription,
+ DefinitionStages.WithServicePackageActivationMode,
+ DefinitionStages.WithServiceDnsName {
/**
* Executes the create request.
*
@@ -240,6 +240,66 @@ interface WithTags {
*/
WithCreate withTags(Map tags);
}
+ /** The stage of the ServiceResource definition allowing to specify placementConstraints. */
+ interface WithPlacementConstraints {
+ /**
+ * Specifies the placementConstraints property: The placement constraints as a string. Placement constraints
+ * are boolean expressions on node properties and allow for restricting a service to particular nodes based
+ * on the service requirements. For example, to place a service on nodes where NodeType is blue specify the
+ * following: "NodeColor == blue)"..
+ *
+ * @param placementConstraints The placement constraints as a string. Placement constraints are boolean
+ * expressions on node properties and allow for restricting a service to particular nodes based on the
+ * service requirements. For example, to place a service on nodes where NodeType is blue specify the
+ * following: "NodeColor == blue)".
+ * @return the next definition stage.
+ */
+ WithCreate withPlacementConstraints(String placementConstraints);
+ }
+ /** The stage of the ServiceResource definition allowing to specify correlationScheme. */
+ interface WithCorrelationScheme {
+ /**
+ * Specifies the correlationScheme property: A list that describes the correlation of the service with other
+ * services..
+ *
+ * @param correlationScheme A list that describes the correlation of the service with other services.
+ * @return the next definition stage.
+ */
+ WithCreate withCorrelationScheme(List correlationScheme);
+ }
+ /** The stage of the ServiceResource definition allowing to specify serviceLoadMetrics. */
+ interface WithServiceLoadMetrics {
+ /**
+ * Specifies the serviceLoadMetrics property: The service load metrics is given as an array of
+ * ServiceLoadMetricDescription objects..
+ *
+ * @param serviceLoadMetrics The service load metrics is given as an array of ServiceLoadMetricDescription
+ * objects.
+ * @return the next definition stage.
+ */
+ WithCreate withServiceLoadMetrics(List serviceLoadMetrics);
+ }
+ /** The stage of the ServiceResource definition allowing to specify servicePlacementPolicies. */
+ interface WithServicePlacementPolicies {
+ /**
+ * Specifies the servicePlacementPolicies property: A list that describes the correlation of the service
+ * with other services..
+ *
+ * @param servicePlacementPolicies A list that describes the correlation of the service with other services.
+ * @return the next definition stage.
+ */
+ WithCreate withServicePlacementPolicies(List servicePlacementPolicies);
+ }
+ /** The stage of the ServiceResource definition allowing to specify defaultMoveCost. */
+ interface WithDefaultMoveCost {
+ /**
+ * Specifies the defaultMoveCost property: Specifies the move cost for the service..
+ *
+ * @param defaultMoveCost Specifies the move cost for the service.
+ * @return the next definition stage.
+ */
+ WithCreate withDefaultMoveCost(MoveCost defaultMoveCost);
+ }
/** The stage of the ServiceResource definition allowing to specify serviceTypeName. */
interface WithServiceTypeName {
/**
@@ -282,7 +342,39 @@ interface WithServiceDnsName {
*/
WithCreate withServiceDnsName(String serviceDnsName);
}
- /** The stage of the ServiceResource definition allowing to specify placementConstraints. */
+ }
+ /**
+ * Begins update for the ServiceResource resource.
+ *
+ * @return the stage of resource update.
+ */
+ ServiceResource.Update update();
+
+ /** The template for ServiceResource update. */
+ interface Update
+ extends UpdateStages.WithPlacementConstraints,
+ UpdateStages.WithCorrelationScheme,
+ UpdateStages.WithServiceLoadMetrics,
+ UpdateStages.WithServicePlacementPolicies,
+ UpdateStages.WithDefaultMoveCost {
+ /**
+ * Executes the update request.
+ *
+ * @return the updated resource.
+ */
+ ServiceResource apply();
+
+ /**
+ * Executes the update request.
+ *
+ * @param context The context to associate with this operation.
+ * @return the updated resource.
+ */
+ ServiceResource apply(Context context);
+ }
+ /** The ServiceResource update stages. */
+ interface UpdateStages {
+ /** The stage of the ServiceResource update allowing to specify placementConstraints. */
interface WithPlacementConstraints {
/**
* Specifies the placementConstraints property: The placement constraints as a string. Placement constraints
@@ -296,9 +388,9 @@ interface WithPlacementConstraints {
* following: "NodeColor == blue)".
* @return the next definition stage.
*/
- WithCreate withPlacementConstraints(String placementConstraints);
+ Update withPlacementConstraints(String placementConstraints);
}
- /** The stage of the ServiceResource definition allowing to specify correlationScheme. */
+ /** The stage of the ServiceResource update allowing to specify correlationScheme. */
interface WithCorrelationScheme {
/**
* Specifies the correlationScheme property: A list that describes the correlation of the service with other
@@ -307,9 +399,9 @@ interface WithCorrelationScheme {
* @param correlationScheme A list that describes the correlation of the service with other services.
* @return the next definition stage.
*/
- WithCreate withCorrelationScheme(List correlationScheme);
+ Update withCorrelationScheme(List correlationScheme);
}
- /** The stage of the ServiceResource definition allowing to specify serviceLoadMetrics. */
+ /** The stage of the ServiceResource update allowing to specify serviceLoadMetrics. */
interface WithServiceLoadMetrics {
/**
* Specifies the serviceLoadMetrics property: The service load metrics is given as an array of
@@ -319,9 +411,9 @@ interface WithServiceLoadMetrics {
* objects.
* @return the next definition stage.
*/
- WithCreate withServiceLoadMetrics(List serviceLoadMetrics);
+ Update withServiceLoadMetrics(List serviceLoadMetrics);
}
- /** The stage of the ServiceResource definition allowing to specify servicePlacementPolicies. */
+ /** The stage of the ServiceResource update allowing to specify servicePlacementPolicies. */
interface WithServicePlacementPolicies {
/**
* Specifies the servicePlacementPolicies property: A list that describes the correlation of the service
@@ -330,9 +422,9 @@ interface WithServicePlacementPolicies {
* @param servicePlacementPolicies A list that describes the correlation of the service with other services.
* @return the next definition stage.
*/
- WithCreate withServicePlacementPolicies(List servicePlacementPolicies);
+ Update withServicePlacementPolicies(List servicePlacementPolicies);
}
- /** The stage of the ServiceResource definition allowing to specify defaultMoveCost. */
+ /** The stage of the ServiceResource update allowing to specify defaultMoveCost. */
interface WithDefaultMoveCost {
/**
* Specifies the defaultMoveCost property: Specifies the move cost for the service..
@@ -340,36 +432,9 @@ interface WithDefaultMoveCost {
* @param defaultMoveCost Specifies the move cost for the service.
* @return the next definition stage.
*/
- WithCreate withDefaultMoveCost(MoveCost defaultMoveCost);
+ Update withDefaultMoveCost(MoveCost defaultMoveCost);
}
}
- /**
- * Begins update for the ServiceResource resource.
- *
- * @return the stage of resource update.
- */
- ServiceResource.Update update();
-
- /** The template for ServiceResource update. */
- interface Update {
- /**
- * Executes the update request.
- *
- * @return the updated resource.
- */
- ServiceResource apply();
-
- /**
- * Executes the update request.
- *
- * @param context The context to associate with this operation.
- * @return the updated resource.
- */
- ServiceResource apply(Context context);
- }
- /** The ServiceResource update stages. */
- interface UpdateStages {
- }
/**
* Refreshes the resource to sync with Azure.
*
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourceProperties.java
similarity index 89%
rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceProperties.java
rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourceProperties.java
index 1738e6a22760..d08555971434 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceProperties.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourceProperties.java
@@ -2,19 +2,10 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.resourcemanager.servicefabric.fluent.models;
+package com.azure.resourcemanager.servicefabric.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.servicefabric.models.ArmServicePackageActivationMode;
-import com.azure.resourcemanager.servicefabric.models.MoveCost;
-import com.azure.resourcemanager.servicefabric.models.PartitionSchemeDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ServicePlacementPolicyDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceResourcePropertiesBase;
-import com.azure.resourcemanager.servicefabric.models.StatefulServiceProperties;
-import com.azure.resourcemanager.servicefabric.models.StatelessServiceProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourceUpdate.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourceUpdate.java
index 79101e4af884..125589fcbf30 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourceUpdate.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourceUpdate.java
@@ -5,25 +5,58 @@
package com.azure.resourcemanager.servicefabric.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.servicefabric.fluent.models.ServiceResourceUpdateProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
import java.util.Map;
/** The service resource for patch operations. */
+@JsonFlatten
@Fluent
-public final class ServiceResourceUpdate extends ProxyResource {
+public class ServiceResourceUpdate extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceResourceUpdate.class);
/*
- * The service resource properties for patch operations.
+ * The placement constraints as a string. Placement constraints are boolean
+ * expressions on node properties and allow for restricting a service to
+ * particular nodes based on the service requirements. For example, to
+ * place a service on nodes where NodeType is blue specify the following:
+ * "NodeColor == blue)".
*/
- @JsonProperty(value = "properties")
- private ServiceResourceUpdateProperties innerProperties;
+ @JsonProperty(value = "properties.placementConstraints")
+ private String placementConstraints;
+
+ /*
+ * A list that describes the correlation of the service with other
+ * services.
+ */
+ @JsonProperty(value = "properties.correlationScheme")
+ private List correlationScheme;
+
+ /*
+ * The service load metrics is given as an array of
+ * ServiceLoadMetricDescription objects.
+ */
+ @JsonProperty(value = "properties.serviceLoadMetrics")
+ private List serviceLoadMetrics;
+
+ /*
+ * A list that describes the correlation of the service with other
+ * services.
+ */
+ @JsonProperty(value = "properties.servicePlacementPolicies")
+ private List servicePlacementPolicies;
+
+ /*
+ * Specifies the move cost for the service.
+ */
+ @JsonProperty(value = "properties.defaultMoveCost")
+ private MoveCost defaultMoveCost;
/*
* It will be deprecated in New API, resource location depends on the
@@ -52,12 +85,114 @@ public final class ServiceResourceUpdate extends ProxyResource {
private SystemData systemData;
/**
- * Get the innerProperties property: The service resource properties for patch operations.
+ * Get the placementConstraints property: The placement constraints as a string. Placement constraints are boolean
+ * expressions on node properties and allow for restricting a service to particular nodes based on the service
+ * requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor
+ * == blue)".
*
- * @return the innerProperties value.
+ * @return the placementConstraints value.
*/
- private ServiceResourceUpdateProperties innerProperties() {
- return this.innerProperties;
+ public String placementConstraints() {
+ return this.placementConstraints;
+ }
+
+ /**
+ * Set the placementConstraints property: The placement constraints as a string. Placement constraints are boolean
+ * expressions on node properties and allow for restricting a service to particular nodes based on the service
+ * requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor
+ * == blue)".
+ *
+ * @param placementConstraints the placementConstraints value to set.
+ * @return the ServiceResourceUpdate object itself.
+ */
+ public ServiceResourceUpdate withPlacementConstraints(String placementConstraints) {
+ this.placementConstraints = placementConstraints;
+ return this;
+ }
+
+ /**
+ * Get the correlationScheme property: A list that describes the correlation of the service with other services.
+ *
+ * @return the correlationScheme value.
+ */
+ public List correlationScheme() {
+ return this.correlationScheme;
+ }
+
+ /**
+ * Set the correlationScheme property: A list that describes the correlation of the service with other services.
+ *
+ * @param correlationScheme the correlationScheme value to set.
+ * @return the ServiceResourceUpdate object itself.
+ */
+ public ServiceResourceUpdate withCorrelationScheme(List correlationScheme) {
+ this.correlationScheme = correlationScheme;
+ return this;
+ }
+
+ /**
+ * Get the serviceLoadMetrics property: The service load metrics is given as an array of
+ * ServiceLoadMetricDescription objects.
+ *
+ * @return the serviceLoadMetrics value.
+ */
+ public List serviceLoadMetrics() {
+ return this.serviceLoadMetrics;
+ }
+
+ /**
+ * Set the serviceLoadMetrics property: The service load metrics is given as an array of
+ * ServiceLoadMetricDescription objects.
+ *
+ * @param serviceLoadMetrics the serviceLoadMetrics value to set.
+ * @return the ServiceResourceUpdate object itself.
+ */
+ public ServiceResourceUpdate withServiceLoadMetrics(List serviceLoadMetrics) {
+ this.serviceLoadMetrics = serviceLoadMetrics;
+ return this;
+ }
+
+ /**
+ * Get the servicePlacementPolicies property: A list that describes the correlation of the service with other
+ * services.
+ *
+ * @return the servicePlacementPolicies value.
+ */
+ public List servicePlacementPolicies() {
+ return this.servicePlacementPolicies;
+ }
+
+ /**
+ * Set the servicePlacementPolicies property: A list that describes the correlation of the service with other
+ * services.
+ *
+ * @param servicePlacementPolicies the servicePlacementPolicies value to set.
+ * @return the ServiceResourceUpdate object itself.
+ */
+ public ServiceResourceUpdate withServicePlacementPolicies(
+ List servicePlacementPolicies) {
+ this.servicePlacementPolicies = servicePlacementPolicies;
+ return this;
+ }
+
+ /**
+ * Get the defaultMoveCost property: Specifies the move cost for the service.
+ *
+ * @return the defaultMoveCost value.
+ */
+ public MoveCost defaultMoveCost() {
+ return this.defaultMoveCost;
+ }
+
+ /**
+ * Set the defaultMoveCost property: Specifies the move cost for the service.
+ *
+ * @param defaultMoveCost the defaultMoveCost value to set.
+ * @return the ServiceResourceUpdate object itself.
+ */
+ public ServiceResourceUpdate withDefaultMoveCost(MoveCost defaultMoveCost) {
+ this.defaultMoveCost = defaultMoveCost;
+ return this;
}
/**
@@ -124,8 +259,14 @@ public SystemData systemData() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
+ if (correlationScheme() != null) {
+ correlationScheme().forEach(e -> e.validate());
+ }
+ if (serviceLoadMetrics() != null) {
+ serviceLoadMetrics().forEach(e -> e.validate());
+ }
+ if (servicePlacementPolicies() != null) {
+ servicePlacementPolicies().forEach(e -> e.validate());
}
}
}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceUpdateProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourceUpdateProperties.java
similarity index 80%
rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceUpdateProperties.java
rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourceUpdateProperties.java
index 3816cd8aface..87740c4f61de 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceUpdateProperties.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourceUpdateProperties.java
@@ -2,17 +2,10 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.resourcemanager.servicefabric.fluent.models;
+package com.azure.resourcemanager.servicefabric.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.servicefabric.models.MoveCost;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ServicePlacementPolicyDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceResourcePropertiesBase;
-import com.azure.resourcemanager.servicefabric.models.StatefulServiceUpdateProperties;
-import com.azure.resourcemanager.servicefabric.models.StatelessServiceUpdateProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatefulServiceProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatefulServiceProperties.java
index 7e4924f3e76c..49485be3f6ce 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatefulServiceProperties.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatefulServiceProperties.java
@@ -6,7 +6,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.servicefabric.fluent.models.ServiceResourceProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatefulServiceUpdateProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatefulServiceUpdateProperties.java
index 860dff844a1c..71664f2669a6 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatefulServiceUpdateProperties.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatefulServiceUpdateProperties.java
@@ -6,7 +6,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.servicefabric.fluent.models.ServiceResourceUpdateProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceProperties.java
index ff0b74ac14d6..d77b9c1e9a2c 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceProperties.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceProperties.java
@@ -6,7 +6,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.servicefabric.fluent.models.ServiceResourceProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceUpdateProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceUpdateProperties.java
index 8b83ea9f2ae2..9fb2274308d0 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceUpdateProperties.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceUpdateProperties.java
@@ -6,7 +6,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.servicefabric.fluent.models.ServiceResourceUpdateProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsCreateOrUpdateSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsCreateOrUpdateSamples.java
deleted file mode 100644
index c7bbce9a8fbd..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsCreateOrUpdateSamples.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/** Samples for ApplicationTypeVersions CreateOrUpdate. */
-public final class ApplicationTypeVersionsCreateOrUpdateSamples {
- /*
- * operationId: ApplicationTypeVersions_CreateOrUpdate
- * api-version: 2021-06-01
- * x-ms-examples: Put an application type version
- */
- /**
- * Sample code: Put an application type version.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void putAnApplicationTypeVersion(
- com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager
- .applicationTypeVersions()
- .define("1.0")
- .withExistingApplicationType("resRg", "myCluster", "myAppType")
- .withTags(mapOf())
- .withAppPackageUrl("http://fakelink.test.com/MyAppType")
- .create();
- }
-
- @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/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsDeleteSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsDeleteSamples.java
deleted file mode 100644
index c7860305b9eb..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsDeleteSamples.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.core.util.Context;
-
-/** Samples for ApplicationTypeVersions Delete. */
-public final class ApplicationTypeVersionsDeleteSamples {
- /*
- * operationId: ApplicationTypeVersions_Delete
- * api-version: 2021-06-01
- * x-ms-examples: Delete an application type version
- */
- /**
- * Sample code: Delete an application type version.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void deleteAnApplicationTypeVersion(
- com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager.applicationTypeVersions().delete("resRg", "myCluster", "myAppType", "1.0", Context.NONE);
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsGetSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsGetSamples.java
deleted file mode 100644
index bc9d95f17209..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsGetSamples.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.core.util.Context;
-
-/** Samples for ApplicationTypeVersions Get. */
-public final class ApplicationTypeVersionsGetSamples {
- /*
- * operationId: ApplicationTypeVersions_Get
- * api-version: 2021-06-01
- * x-ms-examples: Get an application type version
- */
- /**
- * Sample code: Get an application type version.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void getAnApplicationTypeVersion(
- com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager.applicationTypeVersions().getWithResponse("resRg", "myCluster", "myAppType", "1.0", Context.NONE);
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsListSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsListSamples.java
deleted file mode 100644
index 6dc0dded4a3e..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsListSamples.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.core.util.Context;
-
-/** Samples for ApplicationTypeVersions List. */
-public final class ApplicationTypeVersionsListSamples {
- /*
- * operationId: ApplicationTypeVersions_List
- * api-version: 2021-06-01
- * x-ms-examples: Get a list of application type version resources
- */
- /**
- * Sample code: Get a list of application type version resources.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void getAListOfApplicationTypeVersionResources(
- com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager.applicationTypeVersions().listWithResponse("resRg", "myCluster", "myAppType", Context.NONE);
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesCreateOrUpdateSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesCreateOrUpdateSamples.java
deleted file mode 100644
index 1634989812db..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesCreateOrUpdateSamples.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/** Samples for ApplicationTypes CreateOrUpdate. */
-public final class ApplicationTypesCreateOrUpdateSamples {
- /*
- * operationId: ApplicationTypes_CreateOrUpdate
- * api-version: 2021-06-01
- * x-ms-examples: Put an application type
- */
- /**
- * Sample code: Put an application type.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void putAnApplicationType(com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager
- .applicationTypes()
- .define("myAppType")
- .withExistingCluster("resRg", "myCluster")
- .withTags(mapOf())
- .create();
- }
-
- @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/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesDeleteSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesDeleteSamples.java
deleted file mode 100644
index 9fbd734b0b39..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesDeleteSamples.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.core.util.Context;
-
-/** Samples for ApplicationTypes Delete. */
-public final class ApplicationTypesDeleteSamples {
- /*
- * operationId: ApplicationTypes_Delete
- * api-version: 2021-06-01
- * x-ms-examples: Delete an application type
- */
- /**
- * Sample code: Delete an application type.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void deleteAnApplicationType(com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager.applicationTypes().delete("resRg", "myCluster", "myAppType", Context.NONE);
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesGetSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesGetSamples.java
deleted file mode 100644
index 85e6a0eec950..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesGetSamples.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.core.util.Context;
-
-/** Samples for ApplicationTypes Get. */
-public final class ApplicationTypesGetSamples {
- /*
- * operationId: ApplicationTypes_Get
- * api-version: 2021-06-01
- * x-ms-examples: Get an application type
- */
- /**
- * Sample code: Get an application type.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void getAnApplicationType(com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager.applicationTypes().getWithResponse("resRg", "myCluster", "myAppType", Context.NONE);
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesListSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesListSamples.java
deleted file mode 100644
index bcefac0a122e..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesListSamples.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.core.util.Context;
-
-/** Samples for ApplicationTypes List. */
-public final class ApplicationTypesListSamples {
- /*
- * operationId: ApplicationTypes_List
- * api-version: 2021-06-01
- * x-ms-examples: Get a list of application type name resources
- */
- /**
- * Sample code: Get a list of application type name resources.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void getAListOfApplicationTypeNameResources(
- com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager.applicationTypes().listWithResponse("resRg", "myCluster", Context.NONE);
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsCreateOrUpdateSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsCreateOrUpdateSamples.java
deleted file mode 100644
index 09334e7c2bfc..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsCreateOrUpdateSamples.java
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.resourcemanager.servicefabric.models.ApplicationMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ApplicationUpgradePolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmApplicationHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmRollingUpgradeMonitoringPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmServiceTypeHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmUpgradeFailureAction;
-import com.azure.resourcemanager.servicefabric.models.RollingUpgradeMode;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-/** Samples for Applications CreateOrUpdate. */
-public final class ApplicationsCreateOrUpdateSamples {
- /*
- * operationId: Applications_CreateOrUpdate
- * api-version: 2021-06-01
- * x-ms-examples: Put an application with maximum parameters
- */
- /**
- * Sample code: Put an application with maximum parameters.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void putAnApplicationWithMaximumParameters(
- com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager
- .applications()
- .define("myApp")
- .withExistingCluster("resRg", "myCluster")
- .withTags(mapOf())
- .withTypeName("myAppType")
- .withTypeVersion("1.0")
- .withParameters(mapOf("param1", "value1"))
- .withUpgradePolicy(
- new ApplicationUpgradePolicy()
- .withUpgradeReplicaSetCheckTimeout("01:00:00")
- .withForceRestart(false)
- .withRollingUpgradeMonitoringPolicy(
- new ArmRollingUpgradeMonitoringPolicy()
- .withFailureAction(ArmUpgradeFailureAction.ROLLBACK)
- .withHealthCheckWaitDuration("00:02:00")
- .withHealthCheckStableDuration("00:05:00")
- .withHealthCheckRetryTimeout("00:10:00")
- .withUpgradeTimeout("01:00:00")
- .withUpgradeDomainTimeout("1.06:00:00"))
- .withApplicationHealthPolicy(
- new ArmApplicationHealthPolicy()
- .withConsiderWarningAsError(true)
- .withMaxPercentUnhealthyDeployedApplications(0)
- .withDefaultServiceTypeHealthPolicy(
- new ArmServiceTypeHealthPolicy()
- .withMaxPercentUnhealthyServices(0)
- .withMaxPercentUnhealthyPartitionsPerService(0)
- .withMaxPercentUnhealthyReplicasPerPartition(0)))
- .withUpgradeMode(RollingUpgradeMode.MONITORED))
- .withMinimumNodes(1L)
- .withMaximumNodes(3L)
- .withRemoveApplicationCapacity(false)
- .withMetrics(
- Arrays
- .asList(
- new ApplicationMetricDescription()
- .withName("metric1")
- .withMaximumCapacity(3L)
- .withReservationCapacity(1L)
- .withTotalApplicationCapacity(5L)))
- .create();
- }
-
- /*
- * operationId: Applications_CreateOrUpdate
- * api-version: 2021-06-01
- * x-ms-examples: Put an application with minimum parameters
- */
- /**
- * Sample code: Put an application with minimum parameters.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void putAnApplicationWithMinimumParameters(
- com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager
- .applications()
- .define("myApp")
- .withExistingCluster("resRg", "myCluster")
- .withRegion("eastus")
- .withTags(mapOf())
- .withTypeName("myAppType")
- .withTypeVersion("1.0")
- .withRemoveApplicationCapacity(false)
- .create();
- }
-
- /*
- * operationId: Applications_CreateOrUpdate
- * api-version: 2021-06-01
- * x-ms-examples: Put an application with recreate option
- */
- /**
- * Sample code: Put an application with recreate option.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void putAnApplicationWithRecreateOption(
- com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager
- .applications()
- .define("myApp")
- .withExistingCluster("resRg", "myCluster")
- .withTags(mapOf())
- .withTypeName("myAppType")
- .withTypeVersion("1.0")
- .withParameters(mapOf("param1", "value1"))
- .withUpgradePolicy(new ApplicationUpgradePolicy().withRecreateApplication(true))
- .create();
- }
-
- @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/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsDeleteSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsDeleteSamples.java
deleted file mode 100644
index 7e05d287aa4a..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsDeleteSamples.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.core.util.Context;
-
-/** Samples for Applications Delete. */
-public final class ApplicationsDeleteSamples {
- /*
- * operationId: Applications_Delete
- * api-version: 2021-06-01
- * x-ms-examples: Delete an application
- */
- /**
- * Sample code: Delete an application.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void deleteAnApplication(com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager.applications().delete("resRg", "myCluster", "myApp", Context.NONE);
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsGetSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsGetSamples.java
deleted file mode 100644
index 29d88bd25167..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsGetSamples.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.core.util.Context;
-
-/** Samples for Applications Get. */
-public final class ApplicationsGetSamples {
- /*
- * operationId: Applications_Get
- * api-version: 2021-06-01
- * x-ms-examples: Get an application
- */
- /**
- * Sample code: Get an application.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void getAnApplication(com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager.applications().getWithResponse("resRg", "myCluster", "myApp", Context.NONE);
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsListSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsListSamples.java
deleted file mode 100644
index 07685a2bf5e1..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsListSamples.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.core.util.Context;
-
-/** Samples for Applications List. */
-public final class ApplicationsListSamples {
- /*
- * operationId: Applications_List
- * api-version: 2021-06-01
- * x-ms-examples: Get a list of application resources
- */
- /**
- * Sample code: Get a list of application resources.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void getAListOfApplicationResources(
- com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager.applications().listWithResponse("resRg", "myCluster", Context.NONE);
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsUpdateSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsUpdateSamples.java
deleted file mode 100644
index 6e90a78d85bc..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsUpdateSamples.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.servicefabric.models.ApplicationMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ApplicationResource;
-import java.util.Arrays;
-
-/** Samples for Applications Update. */
-public final class ApplicationsUpdateSamples {
- /*
- * operationId: Applications_Update
- * api-version: 2021-06-01
- * x-ms-examples: Patch an application
- */
- /**
- * Sample code: Patch an application.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void patchAnApplication(com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- ApplicationResource resource =
- manager.applications().getWithResponse("resRg", "myCluster", "myApp", Context.NONE).getValue();
- resource
- .update()
- .withTypeVersion("1.0")
- .withRemoveApplicationCapacity(false)
- .withMetrics(
- Arrays
- .asList(
- new ApplicationMetricDescription()
- .withName("metric1")
- .withMaximumCapacity(3L)
- .withReservationCapacity(1L)
- .withTotalApplicationCapacity(5L)))
- .apply();
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsGetByEnvironmentSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsGetByEnvironmentSamples.java
deleted file mode 100644
index b95b6df9b85a..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsGetByEnvironmentSamples.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.servicefabric.models.ClusterVersionsEnvironment;
-
-/** Samples for ClusterVersions GetByEnvironment. */
-public final class ClusterVersionsGetByEnvironmentSamples {
- /*
- * operationId: ClusterVersions_GetByEnvironment
- * api-version: 2021-06-01
- * x-ms-examples: Get cluster version by environment
- */
- /**
- * Sample code: Get cluster version by environment.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void getClusterVersionByEnvironment(
- com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager
- .clusterVersions()
- .getByEnvironmentWithResponse("eastus", ClusterVersionsEnvironment.WINDOWS, "6.1.480.9494", Context.NONE);
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsGetSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsGetSamples.java
deleted file mode 100644
index 91868c6ce2b4..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsGetSamples.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.core.util.Context;
-
-/** Samples for ClusterVersions Get. */
-public final class ClusterVersionsGetSamples {
- /*
- * operationId: ClusterVersions_Get
- * api-version: 2021-06-01
- * x-ms-examples: Get cluster version
- */
- /**
- * Sample code: Get cluster version.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void getClusterVersion(com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager.clusterVersions().getWithResponse("eastus", "6.1.480.9494", Context.NONE);
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsListByEnvironmentSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsListByEnvironmentSamples.java
deleted file mode 100644
index 56cfc30749dc..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsListByEnvironmentSamples.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.servicefabric.models.ClusterVersionsEnvironment;
-
-/** Samples for ClusterVersions ListByEnvironment. */
-public final class ClusterVersionsListByEnvironmentSamples {
- /*
- * operationId: ClusterVersions_ListByEnvironment
- * api-version: 2021-06-01
- * x-ms-examples: List cluster versions by environment
- */
- /**
- * Sample code: List cluster versions by environment.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void listClusterVersionsByEnvironment(
- com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager
- .clusterVersions()
- .listByEnvironmentWithResponse("eastus", ClusterVersionsEnvironment.WINDOWS, Context.NONE);
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsListSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsListSamples.java
deleted file mode 100644
index 76694f21c036..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsListSamples.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.core.util.Context;
-
-/** Samples for ClusterVersions List. */
-public final class ClusterVersionsListSamples {
- /*
- * operationId: ClusterVersions_List
- * api-version: 2021-06-01
- * x-ms-examples: List cluster versions
- */
- /**
- * Sample code: List cluster versions.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void listClusterVersions(com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager.clusterVersions().listWithResponse("eastus", Context.NONE);
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersCreateOrUpdateSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersCreateOrUpdateSamples.java
deleted file mode 100644
index d51587da1530..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersCreateOrUpdateSamples.java
+++ /dev/null
@@ -1,289 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.resourcemanager.servicefabric.models.AddOnFeatures;
-import com.azure.resourcemanager.servicefabric.models.ApplicationDeltaHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ApplicationHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ApplicationTypeVersionsCleanupPolicy;
-import com.azure.resourcemanager.servicefabric.models.AzureActiveDirectory;
-import com.azure.resourcemanager.servicefabric.models.ClientCertificateCommonName;
-import com.azure.resourcemanager.servicefabric.models.ClientCertificateThumbprint;
-import com.azure.resourcemanager.servicefabric.models.ClusterHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ClusterUpgradeCadence;
-import com.azure.resourcemanager.servicefabric.models.ClusterUpgradeDeltaHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ClusterUpgradePolicy;
-import com.azure.resourcemanager.servicefabric.models.DiagnosticsStorageAccountConfig;
-import com.azure.resourcemanager.servicefabric.models.DurabilityLevel;
-import com.azure.resourcemanager.servicefabric.models.EndpointRangeDescription;
-import com.azure.resourcemanager.servicefabric.models.NodeTypeDescription;
-import com.azure.resourcemanager.servicefabric.models.Notification;
-import com.azure.resourcemanager.servicefabric.models.NotificationCategory;
-import com.azure.resourcemanager.servicefabric.models.NotificationChannel;
-import com.azure.resourcemanager.servicefabric.models.NotificationLevel;
-import com.azure.resourcemanager.servicefabric.models.NotificationTarget;
-import com.azure.resourcemanager.servicefabric.models.ReliabilityLevel;
-import com.azure.resourcemanager.servicefabric.models.ServerCertificateCommonName;
-import com.azure.resourcemanager.servicefabric.models.ServerCertificateCommonNames;
-import com.azure.resourcemanager.servicefabric.models.ServiceTypeDeltaHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ServiceTypeHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.SettingsParameterDescription;
-import com.azure.resourcemanager.servicefabric.models.SettingsSectionDescription;
-import com.azure.resourcemanager.servicefabric.models.SfZonalUpgradeMode;
-import com.azure.resourcemanager.servicefabric.models.StoreName;
-import com.azure.resourcemanager.servicefabric.models.UpgradeMode;
-import com.azure.resourcemanager.servicefabric.models.VmssZonalUpgradeMode;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-/** Samples for Clusters CreateOrUpdate. */
-public final class ClustersCreateOrUpdateSamples {
- /*
- * operationId: Clusters_CreateOrUpdate
- * api-version: 2021-06-01
- * x-ms-examples: Put a cluster with maximum parameters
- */
- /**
- * Sample code: Put a cluster with maximum parameters.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void putAClusterWithMaximumParameters(
- com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager
- .clusters()
- .define("myCluster")
- .withRegion("eastus")
- .withExistingResourceGroup("resRg")
- .withTags(mapOf())
- .withAddOnFeatures(
- Arrays
- .asList(
- AddOnFeatures.REPAIR_MANAGER,
- AddOnFeatures.DNS_SERVICE,
- AddOnFeatures.BACKUP_RESTORE_SERVICE,
- AddOnFeatures.RESOURCE_MONITOR_SERVICE))
- .withAzureActiveDirectory(
- new AzureActiveDirectory()
- .withTenantId("6abcc6a0-8666-43f1-87b8-172cf86a9f9c")
- .withClusterApplication("5886372e-7bf4-4878-a497-8098aba608ae")
- .withClientApplication("d151ad89-4bce-4ae8-b3d1-1dc79679fa75"))
- .withCertificateCommonNames(
- new ServerCertificateCommonNames()
- .withCommonNames(
- Arrays
- .asList(
- new ServerCertificateCommonName()
- .withCertificateCommonName("abc.com")
- .withCertificateIssuerThumbprint("12599211F8F14C90AFA9532AD79A6F2CA1C00622")))
- .withX509StoreName(StoreName.MY))
- .withClientCertificateCommonNames(
- Arrays
- .asList(
- new ClientCertificateCommonName()
- .withIsAdmin(true)
- .withCertificateCommonName("abc.com")
- .withCertificateIssuerThumbprint("5F3660C715EBBDA31DB1FFDCF508302348DE8E7A")))
- .withClientCertificateThumbprints(
- Arrays
- .asList(
- new ClientCertificateThumbprint()
- .withIsAdmin(true)
- .withCertificateThumbprint("5F3660C715EBBDA31DB1FFDCF508302348DE8E7A")))
- .withClusterCodeVersion("7.0.470.9590")
- .withDiagnosticsStorageAccountConfig(
- new DiagnosticsStorageAccountConfig()
- .withStorageAccountName("diag")
- .withProtectedAccountKeyName("StorageAccountKey1")
- .withBlobEndpoint("https://diag.blob.core.windows.net/")
- .withQueueEndpoint("https://diag.queue.core.windows.net/")
- .withTableEndpoint("https://diag.table.core.windows.net/"))
- .withEventStoreServiceEnabled(true)
- .withFabricSettings(
- Arrays
- .asList(
- new SettingsSectionDescription()
- .withName("UpgradeService")
- .withParameters(
- Arrays
- .asList(
- new SettingsParameterDescription()
- .withName("AppPollIntervalInSeconds")
- .withValue("60")))))
- .withManagementEndpoint("https://myCluster.eastus.cloudapp.azure.com:19080")
- .withNodeTypes(
- Arrays
- .asList(
- new NodeTypeDescription()
- .withName("nt1vm")
- .withClientConnectionEndpointPort(19000)
- .withHttpGatewayEndpointPort(19007)
- .withDurabilityLevel(DurabilityLevel.SILVER)
- .withApplicationPorts(
- new EndpointRangeDescription().withStartPort(20000).withEndPort(30000))
- .withEphemeralPorts(new EndpointRangeDescription().withStartPort(49000).withEndPort(64000))
- .withIsPrimary(true)
- .withVmInstanceCount(5)
- .withIsStateless(false)
- .withMultipleAvailabilityZones(true)))
- .withReliabilityLevel(ReliabilityLevel.PLATINUM)
- .withReverseProxyCertificateCommonNames(
- new ServerCertificateCommonNames()
- .withCommonNames(
- Arrays
- .asList(
- new ServerCertificateCommonName()
- .withCertificateCommonName("abc.com")
- .withCertificateIssuerThumbprint("12599211F8F14C90AFA9532AD79A6F2CA1C00622")))
- .withX509StoreName(StoreName.MY))
- .withUpgradeDescription(
- new ClusterUpgradePolicy()
- .withForceRestart(false)
- .withUpgradeReplicaSetCheckTimeout("00:10:00")
- .withHealthCheckWaitDuration("00:00:30")
- .withHealthCheckStableDuration("00:00:30")
- .withHealthCheckRetryTimeout("00:05:00")
- .withUpgradeTimeout("01:00:00")
- .withUpgradeDomainTimeout("00:15:00")
- .withHealthPolicy(
- new ClusterHealthPolicy()
- .withMaxPercentUnhealthyNodes(0)
- .withMaxPercentUnhealthyApplications(0)
- .withApplicationHealthPolicies(
- mapOf(
- "fabric:/myApp1",
- new ApplicationHealthPolicy()
- .withDefaultServiceTypeHealthPolicy(
- new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(0))
- .withServiceTypeHealthPolicies(
- mapOf(
- "myServiceType1",
- new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(100))))))
- .withDeltaHealthPolicy(
- new ClusterUpgradeDeltaHealthPolicy()
- .withMaxPercentDeltaUnhealthyNodes(0)
- .withMaxPercentUpgradeDomainDeltaUnhealthyNodes(0)
- .withMaxPercentDeltaUnhealthyApplications(0)
- .withApplicationDeltaHealthPolicies(
- mapOf(
- "fabric:/myApp1",
- new ApplicationDeltaHealthPolicy()
- .withDefaultServiceTypeDeltaHealthPolicy(
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(0))
- .withServiceTypeDeltaHealthPolicies(
- mapOf(
- "myServiceType1",
- new ServiceTypeDeltaHealthPolicy()
- .withMaxPercentDeltaUnhealthyServices(0)))))))
- .withUpgradeMode(UpgradeMode.MANUAL)
- .withApplicationTypeVersionsCleanupPolicy(
- new ApplicationTypeVersionsCleanupPolicy().withMaxUnusedVersionsToKeep(2L))
- .withVmImage("Windows")
- .withSfZonalUpgradeMode(SfZonalUpgradeMode.HIERARCHICAL)
- .withVmssZonalUpgradeMode(VmssZonalUpgradeMode.PARALLEL)
- .withInfrastructureServiceManager(true)
- .withUpgradeWave(ClusterUpgradeCadence.WAVE1)
- .withUpgradePauseStartTimestampUtc(OffsetDateTime.parse("2021-06-21T22:00:00Z"))
- .withUpgradePauseEndTimestampUtc(OffsetDateTime.parse("2021-06-25T22:00:00Z"))
- .withNotifications(
- Arrays
- .asList(
- new Notification()
- .withIsEnabled(true)
- .withNotificationCategory(NotificationCategory.WAVE_PROGRESS)
- .withNotificationLevel(NotificationLevel.CRITICAL)
- .withNotificationTargets(
- Arrays
- .asList(
- new NotificationTarget()
- .withNotificationChannel(NotificationChannel.EMAIL_USER)
- .withReceivers(Arrays.asList("****@microsoft.com", "****@microsoft.com")),
- new NotificationTarget()
- .withNotificationChannel(NotificationChannel.EMAIL_SUBSCRIPTION)
- .withReceivers(Arrays.asList("Owner", "AccountAdmin")))),
- new Notification()
- .withIsEnabled(true)
- .withNotificationCategory(NotificationCategory.WAVE_PROGRESS)
- .withNotificationLevel(NotificationLevel.ALL)
- .withNotificationTargets(
- Arrays
- .asList(
- new NotificationTarget()
- .withNotificationChannel(NotificationChannel.EMAIL_USER)
- .withReceivers(Arrays.asList("****@microsoft.com", "****@microsoft.com")),
- new NotificationTarget()
- .withNotificationChannel(NotificationChannel.EMAIL_SUBSCRIPTION)
- .withReceivers(Arrays.asList("Owner", "AccountAdmin"))))))
- .create();
- }
-
- /*
- * operationId: Clusters_CreateOrUpdate
- * api-version: 2021-06-01
- * x-ms-examples: Put a cluster with minimum parameters
- */
- /**
- * Sample code: Put a cluster with minimum parameters.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void putAClusterWithMinimumParameters(
- com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager
- .clusters()
- .define("myCluster")
- .withRegion("eastus")
- .withExistingResourceGroup("resRg")
- .withTags(mapOf())
- .withDiagnosticsStorageAccountConfig(
- new DiagnosticsStorageAccountConfig()
- .withStorageAccountName("diag")
- .withProtectedAccountKeyName("StorageAccountKey1")
- .withBlobEndpoint("https://diag.blob.core.windows.net/")
- .withQueueEndpoint("https://diag.queue.core.windows.net/")
- .withTableEndpoint("https://diag.table.core.windows.net/"))
- .withFabricSettings(
- Arrays
- .asList(
- new SettingsSectionDescription()
- .withName("UpgradeService")
- .withParameters(
- Arrays
- .asList(
- new SettingsParameterDescription()
- .withName("AppPollIntervalInSeconds")
- .withValue("60")))))
- .withManagementEndpoint("http://myCluster.eastus.cloudapp.azure.com:19080")
- .withNodeTypes(
- Arrays
- .asList(
- new NodeTypeDescription()
- .withName("nt1vm")
- .withClientConnectionEndpointPort(19000)
- .withHttpGatewayEndpointPort(19007)
- .withDurabilityLevel(DurabilityLevel.BRONZE)
- .withApplicationPorts(
- new EndpointRangeDescription().withStartPort(20000).withEndPort(30000))
- .withEphemeralPorts(new EndpointRangeDescription().withStartPort(49000).withEndPort(64000))
- .withIsPrimary(true)
- .withVmInstanceCount(5)))
- .withReliabilityLevel(ReliabilityLevel.SILVER)
- .withUpgradeMode(UpgradeMode.AUTOMATIC)
- .create();
- }
-
- @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/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersDeleteSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersDeleteSamples.java
deleted file mode 100644
index d34e5a407cdc..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersDeleteSamples.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.core.util.Context;
-
-/** Samples for Clusters Delete. */
-public final class ClustersDeleteSamples {
- /*
- * operationId: Clusters_Delete
- * api-version: 2021-06-01
- * x-ms-examples: Delete a cluster
- */
- /**
- * Sample code: Delete a cluster.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void deleteACluster(com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager.clusters().deleteWithResponse("resRg", "myCluster", Context.NONE);
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersGetByResourceGroupSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersGetByResourceGroupSamples.java
deleted file mode 100644
index 889dffb0a4e9..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersGetByResourceGroupSamples.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.core.util.Context;
-
-/** Samples for Clusters GetByResourceGroup. */
-public final class ClustersGetByResourceGroupSamples {
- /*
- * operationId: Clusters_Get
- * api-version: 2021-06-01
- * x-ms-examples: Get a cluster
- */
- /**
- * Sample code: Get a cluster.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void getACluster(com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager.clusters().getByResourceGroupWithResponse("resRg", "myCluster", Context.NONE);
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersListByResourceGroupSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersListByResourceGroupSamples.java
deleted file mode 100644
index 2b0b29ffb08c..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersListByResourceGroupSamples.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.core.util.Context;
-
-/** Samples for Clusters ListByResourceGroup. */
-public final class ClustersListByResourceGroupSamples {
- /*
- * operationId: Clusters_ListByResourceGroup
- * api-version: 2021-06-01
- * x-ms-examples: List cluster by resource group
- */
- /**
- * Sample code: List cluster by resource group.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void listClusterByResourceGroup(
- com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager.clusters().listByResourceGroupWithResponse("resRg", Context.NONE);
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersListSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersListSamples.java
deleted file mode 100644
index a7efa640c451..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersListSamples.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.core.util.Context;
-
-/** Samples for Clusters List. */
-public final class ClustersListSamples {
- /*
- * operationId: Clusters_List
- * api-version: 2021-06-01
- * x-ms-examples: List clusters
- */
- /**
- * Sample code: List clusters.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void listClusters(com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager.clusters().listWithResponse(Context.NONE);
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersListUpgradableVersionsSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersListUpgradableVersionsSamples.java
deleted file mode 100644
index 4f72de7f4caf..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersListUpgradableVersionsSamples.java
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.servicefabric.models.UpgradableVersionsDescription;
-
-/** Samples for Clusters ListUpgradableVersions. */
-public final class ClustersListUpgradableVersionsSamples {
- /*
- * operationId: Clusters_ListUpgradableVersions
- * api-version: 2021-06-01
- * x-ms-examples: Get minimum and maximum code versions
- */
- /**
- * Sample code: Get minimum and maximum code versions.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void getMinimumAndMaximumCodeVersions(
- com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager.clusters().listUpgradableVersionsWithResponse("resRg", "myCluster", null, Context.NONE);
- }
-
- /*
- * operationId: Clusters_ListUpgradableVersions
- * api-version: 2021-06-01
- * x-ms-examples: Get upgrade path
- */
- /**
- * Sample code: Get upgrade path.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void getUpgradePath(com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager
- .clusters()
- .listUpgradableVersionsWithResponse(
- "resRg",
- "myCluster",
- new UpgradableVersionsDescription().withTargetVersion("7.2.432.9590"),
- Context.NONE);
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersUpdateSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersUpdateSamples.java
deleted file mode 100644
index a1d9f7b601cf..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersUpdateSamples.java
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.servicefabric.models.Cluster;
-import com.azure.resourcemanager.servicefabric.models.ClusterUpgradeCadence;
-import com.azure.resourcemanager.servicefabric.models.DurabilityLevel;
-import com.azure.resourcemanager.servicefabric.models.EndpointRangeDescription;
-import com.azure.resourcemanager.servicefabric.models.NodeTypeDescription;
-import com.azure.resourcemanager.servicefabric.models.ReliabilityLevel;
-import com.azure.resourcemanager.servicefabric.models.UpgradeMode;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-/** Samples for Clusters Update. */
-public final class ClustersUpdateSamples {
- /*
- * operationId: Clusters_Update
- * api-version: 2021-06-01
- * x-ms-examples: Patch a cluster
- */
- /**
- * Sample code: Patch a cluster.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void patchACluster(com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- Cluster resource =
- manager.clusters().getByResourceGroupWithResponse("resRg", "myCluster", Context.NONE).getValue();
- resource
- .update()
- .withTags(mapOf("a", "b"))
- .withEventStoreServiceEnabled(true)
- .withNodeTypes(
- Arrays
- .asList(
- new NodeTypeDescription()
- .withName("nt1vm")
- .withClientConnectionEndpointPort(19000)
- .withHttpGatewayEndpointPort(19007)
- .withDurabilityLevel(DurabilityLevel.BRONZE)
- .withApplicationPorts(
- new EndpointRangeDescription().withStartPort(20000).withEndPort(30000))
- .withEphemeralPorts(new EndpointRangeDescription().withStartPort(49000).withEndPort(64000))
- .withIsPrimary(true)
- .withVmInstanceCount(5),
- new NodeTypeDescription()
- .withName("testnt1")
- .withClientConnectionEndpointPort(0)
- .withHttpGatewayEndpointPort(0)
- .withDurabilityLevel(DurabilityLevel.BRONZE)
- .withApplicationPorts(new EndpointRangeDescription().withStartPort(1000).withEndPort(2000))
- .withEphemeralPorts(new EndpointRangeDescription().withStartPort(3000).withEndPort(4000))
- .withIsPrimary(false)
- .withVmInstanceCount(3)))
- .withReliabilityLevel(ReliabilityLevel.BRONZE)
- .withUpgradeMode(UpgradeMode.AUTOMATIC)
- .withUpgradeWave(ClusterUpgradeCadence.fromString("Wave"))
- .withUpgradePauseStartTimestampUtc(OffsetDateTime.parse("2021-06-21T22:00:00Z"))
- .withUpgradePauseEndTimestampUtc(OffsetDateTime.parse("2021-06-25T22:00:00Z"))
- .apply();
- }
-
- @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/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ServicesCreateOrUpdateSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ServicesCreateOrUpdateSamples.java
deleted file mode 100644
index 4a99a019d77a..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ServicesCreateOrUpdateSamples.java
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric;
-
-import com.azure.resourcemanager.servicefabric.models.ArmServicePackageActivationMode;
-import com.azure.resourcemanager.servicefabric.models.MoveCost;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationScheme;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricWeight;
-import com.azure.resourcemanager.servicefabric.models.SingletonPartitionSchemeDescription;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-/** Samples for Services CreateOrUpdate. */
-public final class ServicesCreateOrUpdateSamples {
- /*
- * operationId: Services_CreateOrUpdate
- * api-version: 2021-06-01
- * x-ms-examples: Put a service with minimum parameters
- */
- /**
- * Sample code: Put a service with minimum parameters.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void putAServiceWithMinimumParameters(
- com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager
- .services()
- .define("myService")
- .withExistingApplication("resRg", "myCluster", "myApp")
- .withTags(mapOf())
- .withServiceTypeName("myServiceType")
- .withPartitionDescription(new SingletonPartitionSchemeDescription())
- .create();
- }
-
- /*
- * operationId: Services_CreateOrUpdate
- * api-version: 2021-06-01
- * x-ms-examples: Put a service with maximum parameters
- */
- /**
- * Sample code: Put a service with maximum parameters.
- *
- * @param manager Entry point to ServiceFabricManager.
- */
- public static void putAServiceWithMaximumParameters(
- com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) {
- manager
- .services()
- .define("myService")
- .withExistingApplication("resRg", "myCluster", "myApp")
- .withTags(mapOf())
- .withServiceTypeName("myServiceType")
- .withPartitionDescription(new SingletonPartitionSchemeDescription())
- .withServicePackageActivationMode(ArmServicePackageActivationMode.SHARED_PROCESS)
- .withServiceDnsName("my.service.dns")
- .withPlacementConstraints("NodeType==frontend")
- .withCorrelationScheme(
- Arrays
- .asList(
- new ServiceCorrelationDescription()
- .withScheme(ServiceCorrelationScheme.AFFINITY)
- .withServiceName("fabric:/app1/app1~svc1")))
- .withServiceLoadMetrics(
- Arrays
- .asList(
- new ServiceLoadMetricDescription().withName("metric1").withWeight(ServiceLoadMetricWeight.LOW)))
- .withServicePlacementPolicies(Arrays.asList())
- .withDefaultMoveCost(MoveCost.MEDIUM)
- .create();
- }
-
- @SuppressWarnings("unchecked")
- private static