From 16ad58c5ed503d5da24a6c213853f0f3c2cbfe9e Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 27 Nov 2018 19:59:53 +0000 Subject: [PATCH 1/3] Generated from 6415c5920fc51ac978815e71c12089643a219c49 Swagger specification for Service Fabric runtime version 6.4 --- .../AddRemoveReplicaScalingMechanism.java | 103 + ...plicationContainerInstanceExitedEvent.java | 335 ++++ .../ApplicationNewHealthReportEvent.java | 257 +++ .../ApplicationProcessExitedEvent.java | 335 ++++ .../ApplicationScopedVolume.java | 43 + ...icationScopedVolumeCreationParameters.java | 51 + ...tionParametersServiceFabricVolumeDisk.java | 48 + .../ApplicationScopedVolumeKind.java | 38 + .../ApplicationUpgradeCompletedEvent.java | 100 + ...pplicationUpgradeDomainCompletedEvent.java | 178 ++ ...licationUpgradeRollbackCompletedEvent.java | 126 ++ ...pplicationUpgradeRollbackStartedEvent.java | 152 ++ .../ApplicationUpgradeStartedEvent.java | 178 ++ .../servicefabric/AutoScalingMechanism.java | 25 + .../AutoScalingMechanismKind.java | 38 + .../servicefabric/AutoScalingMetric.java | 25 + .../servicefabric/AutoScalingMetricKind.java | 38 + .../servicefabric/AutoScalingPolicy.java | 96 + .../AutoScalingResourceMetric.java | 47 + .../AutoScalingResourceMetricName.java | 41 + .../servicefabric/AutoScalingTrigger.java | 24 + .../servicefabric/AutoScalingTriggerKind.java | 38 + .../AverageLoadScalingTrigger.java | 127 ++ ...rnalMonitoringPipelineSinkDescription.java | 152 ++ .../azure/servicefabric/BackupInfo.java | 32 +- .../BasicRetentionPolicyDescription.java | 79 + ...ChaosCodePackageRestartScheduledEvent.java | 179 ++ .../ChaosNodeRestartScheduledEvent.java | 101 + ...aosPartitionPrimaryMoveScheduledEvent.java | 153 ++ ...sPartitionSecondaryMoveScheduledEvent.java | 179 ++ .../ChaosReplicaRemovalScheduledEvent.java | 101 + .../ChaosReplicaRestartScheduledEvent.java | 101 + ...lusterConfigurationUpgradeDescription.java | 22 +- .../ClusterNewHealthReportEvent.java | 231 +++ .../ClusterUpgradeCompletedEvent.java | 74 + .../ClusterUpgradeDomainCompletedEvent.java | 126 ++ .../ClusterUpgradeRollbackCompletedEvent.java | 100 + .../ClusterUpgradeRollbackStartedEvent.java | 100 + .../ClusterUpgradeStartedEvent.java | 152 ++ .../ContainerCodePackageProperties.java | 88 +- ...ployedApplicationNewHealthReportEvent.java | 283 +++ ...ervicePackageHealthReportExpiredEvent.java | 335 ++++ ...yedServicePackageNewHealthReportEvent.java | 335 ++++ .../DiagnosticsSinkProperties.java | 4 + .../DisableBackupDescription.java | 46 + .../azure/servicefabric/EndpointRef.java | 43 + .../azure/servicefabric/FabricErrorCodes.java | 3 + .../azure/servicefabric/FabricErrorError.java | 9 +- .../azure/servicefabric/FabricEventKind.java | 158 +- .../servicefabric/GatewayDestination.java | 95 + .../azure/servicefabric/HeaderMatchType.java | 38 + .../servicefabric/HealthInformation.java | 6 +- .../azure/servicefabric/HttpConfig.java | 97 + .../azure/servicefabric/HttpHostConfig.java | 72 + .../azure/servicefabric/HttpRouteConfig.java | 95 + .../servicefabric/HttpRouteMatchHeader.java | 95 + .../servicefabric/HttpRouteMatchPath.java | 103 + .../servicefabric/HttpRouteMatchRule.java | 70 + .../ImageRegistryCredential.java | 8 +- .../InlinedValueSecretResourceProperties.java | 24 + .../azure/servicefabric/LoadMetricReport.java | 33 +- .../servicefabric/LoadMetricReportInfo.java | 33 +- .../LocalNetworkResourceProperties.java | 48 + .../azure/servicefabric/NetworkKind.java | 38 + .../azure/servicefabric/NetworkRef.java | 27 + .../NetworkResourceProperties.java | 82 + .../NetworkResourcePropertiesBase.java | 25 + .../NodeAddedToClusterEvent.java | 178 ++ .../azure/servicefabric/NodeClosedEvent.java | 100 + .../NodeDeactivateCompletedEvent.java | 127 ++ .../NodeDeactivateStartedEvent.java | 100 + .../NodeNewHealthReportEvent.java | 257 +++ .../servicefabric/NodeOpenSucceededEvent.java | 230 +++ .../NodeRemovedFromClusterEvent.java | 178 ++ .../servicefabric/OperatingSystemType.java | 41 + .../servicefabric/PartitionBackupEntity.java | 10 +- .../PartitionNewHealthReportEvent.java | 231 +++ .../PartitionReconfiguredEvent.java | 360 ++++ .../servicefabric/ReliableCollectionsRef.java | 73 + .../azure/servicefabric/ResourceStatus.java | 53 + .../RetentionPolicyDescription.java | 24 + .../servicefabric/RetentionPolicyType.java | 41 + .../azure/servicefabric/SecretKind.java | 38 + .../SecretResourceProperties.java | 110 ++ .../SecretResourcePropertiesBase.java | 24 + .../servicefabric/SecretValueProperties.java | 43 + .../ServiceNewHealthReportEvent.java | 257 +++ ...tPreferPrimaryDomainPolicyDescription.java | 2 +- .../servicefabric/ServiceProperties.java | 161 ++ .../ServiceReplicaProperties.java | 14 +- .../ServiceTypeHealthPolicy.java | 8 +- .../azure/servicefabric/Setting.java | 4 +- .../azure/servicefabric/SizeTypes.java | 44 + .../StatefulReplicaNewHealthReportEvent.java | 257 +++ .../StatefulServicePartitionInfo.java | 16 +- .../StatelessReplicaNewHealthReportEvent.java | 231 +++ .../azure/servicefabric/TcpConfig.java | 96 + .../azure/servicefabric/VolumeProvider.java | 38 + .../azure/servicefabric/VolumeReference.java | 96 + .../implementation/ApplicationEventInner.java | 25 +- .../ApplicationResourceDescriptionInner.java | 184 +- .../BackupPolicyDescriptionInner.java | 27 + .../BackupProgressInfoInner.java | 8 +- .../implementation/ClusterEventInner.java | 12 +- .../implementation/ClusterVersionInner.java | 43 + .../implementation/FabricEventInner.java | 26 + .../GatewayResourceDescriptionInner.java | 227 +++ .../implementation/MeshApplicationsInner.java | 392 ++++ .../implementation/MeshCodePackagesInner.java | 256 +++ .../implementation/MeshGatewaysInner.java | 392 ++++ .../implementation/MeshNetworksInner.java | 392 ++++ .../implementation/MeshSecretValuesInner.java | 511 +++++ .../implementation/MeshSecretsInner.java | 392 ++++ .../MeshServiceReplicasInner.java | 241 +++ .../implementation/MeshServicesInner.java | 227 +++ .../implementation/MeshVolumesInner.java | 392 ++++ .../NetworkResourceDescriptionInner.java | 70 + .../implementation/NodeEventInner.java | 20 +- ...plicationResourceDescriptionListInner.java | 77 + ...edGatewayResourceDescriptionListInner.java | 77 + ...edNetworkResourceDescriptionListInner.java | 77 + ...gedSecretResourceDescriptionListInner.java | 77 + ...cretValueResourceDescriptionListInner.java | 78 + ...gedServiceReplicaDescriptionListInner.java | 78 + ...edServiceResourceDescriptionListInner.java | 13 +- ...gedVolumeResourceDescriptionListInner.java | 77 + ...PartitionBackupConfigurationInfoInner.java | 10 +- .../implementation/PartitionEventInner.java | 8 +- .../implementation/ReplicaEventInner.java | 9 +- .../RestoreProgressInfoInner.java | 8 +- .../SecretResourceDescriptionInner.java | 70 + .../implementation/SecretValueInner.java | 43 + .../SecretValueResourceDescriptionInner.java | 72 + .../implementation/ServiceEventInner.java | 2 +- .../ServiceFabricClientAPIsImpl.java | 1716 +++++++---------- .../ServiceReplicaDescriptionInner.java | 44 + .../ServiceResourceDescriptionInner.java | 129 +- .../VolumeResourceDescriptionInner.java | 88 +- 138 files changed, 15214 insertions(+), 1436 deletions(-) create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AddRemoveReplicaScalingMechanism.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationContainerInstanceExitedEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationNewHealthReportEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationProcessExitedEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationScopedVolume.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationScopedVolumeCreationParameters.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationScopedVolumeKind.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationUpgradeCompletedEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationUpgradeDomainCompletedEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationUpgradeRollbackCompletedEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationUpgradeRollbackStartedEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationUpgradeStartedEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingMechanism.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingMechanismKind.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingMetric.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingMetricKind.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingPolicy.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingResourceMetric.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingResourceMetricName.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingTrigger.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingTriggerKind.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AverageLoadScalingTrigger.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AzureInternalMonitoringPipelineSinkDescription.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/BasicRetentionPolicyDescription.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosCodePackageRestartScheduledEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosNodeRestartScheduledEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosPartitionPrimaryMoveScheduledEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosPartitionSecondaryMoveScheduledEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosReplicaRemovalScheduledEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosReplicaRestartScheduledEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterNewHealthReportEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterUpgradeCompletedEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterUpgradeDomainCompletedEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterUpgradeRollbackCompletedEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterUpgradeRollbackStartedEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterUpgradeStartedEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/DeployedApplicationNewHealthReportEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/DeployedServicePackageHealthReportExpiredEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/DeployedServicePackageNewHealthReportEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/DisableBackupDescription.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/EndpointRef.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/GatewayDestination.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HeaderMatchType.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpConfig.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpHostConfig.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpRouteConfig.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpRouteMatchHeader.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpRouteMatchPath.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpRouteMatchRule.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/InlinedValueSecretResourceProperties.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/LocalNetworkResourceProperties.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NetworkKind.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NetworkResourceProperties.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NetworkResourcePropertiesBase.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeAddedToClusterEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeClosedEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeDeactivateCompletedEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeDeactivateStartedEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeNewHealthReportEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeOpenSucceededEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeRemovedFromClusterEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/OperatingSystemType.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/PartitionNewHealthReportEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/PartitionReconfiguredEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ReliableCollectionsRef.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ResourceStatus.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/RetentionPolicyDescription.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/RetentionPolicyType.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/SecretKind.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/SecretResourceProperties.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/SecretResourcePropertiesBase.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/SecretValueProperties.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServiceNewHealthReportEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServiceProperties.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/SizeTypes.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/StatefulReplicaNewHealthReportEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/StatelessReplicaNewHealthReportEvent.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/TcpConfig.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/VolumeProvider.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/VolumeReference.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ClusterVersionInner.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/GatewayResourceDescriptionInner.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshApplicationsInner.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshCodePackagesInner.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshGatewaysInner.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshNetworksInner.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshSecretValuesInner.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshSecretsInner.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshServiceReplicasInner.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshServicesInner.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshVolumesInner.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/NetworkResourceDescriptionInner.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedApplicationResourceDescriptionListInner.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedGatewayResourceDescriptionListInner.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedNetworkResourceDescriptionListInner.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedSecretResourceDescriptionListInner.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedSecretValueResourceDescriptionListInner.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedServiceReplicaDescriptionListInner.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedVolumeResourceDescriptionListInner.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/SecretResourceDescriptionInner.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/SecretValueInner.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/SecretValueResourceDescriptionInner.java create mode 100644 azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ServiceReplicaDescriptionInner.java diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AddRemoveReplicaScalingMechanism.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AddRemoveReplicaScalingMechanism.java new file mode 100644 index 0000000000000..29029f063b811 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AddRemoveReplicaScalingMechanism.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Describes the horizontal auto scaling mechanism that adds or removes + * replicas (containers or container groups). + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("AddRemoveReplica") +public class AddRemoveReplicaScalingMechanism extends AutoScalingMechanism { + /** + * Minimum number of containers (scale down won't be performed below this + * number). + */ + @JsonProperty(value = "minCount", required = true) + private int minCount; + + /** + * Maximum number of containers (scale up won't be performed above this + * number). + */ + @JsonProperty(value = "maxCount", required = true) + private int maxCount; + + /** + * Each time auto scaling is performed, this number of containers will be + * added or removed. + */ + @JsonProperty(value = "scaleIncrement", required = true) + private int scaleIncrement; + + /** + * Get minimum number of containers (scale down won't be performed below this number). + * + * @return the minCount value + */ + public int minCount() { + return this.minCount; + } + + /** + * Set minimum number of containers (scale down won't be performed below this number). + * + * @param minCount the minCount value to set + * @return the AddRemoveReplicaScalingMechanism object itself. + */ + public AddRemoveReplicaScalingMechanism withMinCount(int minCount) { + this.minCount = minCount; + return this; + } + + /** + * Get maximum number of containers (scale up won't be performed above this number). + * + * @return the maxCount value + */ + public int maxCount() { + return this.maxCount; + } + + /** + * Set maximum number of containers (scale up won't be performed above this number). + * + * @param maxCount the maxCount value to set + * @return the AddRemoveReplicaScalingMechanism object itself. + */ + public AddRemoveReplicaScalingMechanism withMaxCount(int maxCount) { + this.maxCount = maxCount; + return this; + } + + /** + * Get each time auto scaling is performed, this number of containers will be added or removed. + * + * @return the scaleIncrement value + */ + public int scaleIncrement() { + return this.scaleIncrement; + } + + /** + * Set each time auto scaling is performed, this number of containers will be added or removed. + * + * @param scaleIncrement the scaleIncrement value to set + * @return the AddRemoveReplicaScalingMechanism object itself. + */ + public AddRemoveReplicaScalingMechanism withScaleIncrement(int scaleIncrement) { + this.scaleIncrement = scaleIncrement; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationContainerInstanceExitedEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationContainerInstanceExitedEvent.java new file mode 100644 index 0000000000000..4b3b3f93ee83b --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationContainerInstanceExitedEvent.java @@ -0,0 +1,335 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ApplicationEventInner; + +/** + * Container Exited event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("ApplicationContainerInstanceExited") +public class ApplicationContainerInstanceExitedEvent extends ApplicationEventInner { + /** + * Name of Service. + */ + @JsonProperty(value = "ServiceName", required = true) + private String serviceName; + + /** + * Name of Service package. + */ + @JsonProperty(value = "ServicePackageName", required = true) + private String servicePackageName; + + /** + * Activation Id of Service package. + */ + @JsonProperty(value = "ServicePackageActivationId", required = true) + private String servicePackageActivationId; + + /** + * Indicates IsExclusive flag. + */ + @JsonProperty(value = "IsExclusive", required = true) + private boolean isExclusive; + + /** + * Name of Code package. + */ + @JsonProperty(value = "CodePackageName", required = true) + private String codePackageName; + + /** + * Type of EntryPoint. + */ + @JsonProperty(value = "EntryPointType", required = true) + private String entryPointType; + + /** + * Name of Container image. + */ + @JsonProperty(value = "ImageName", required = true) + private String imageName; + + /** + * Name of Container. + */ + @JsonProperty(value = "ContainerName", required = true) + private String containerName; + + /** + * Host Id. + */ + @JsonProperty(value = "HostId", required = true) + private String hostId; + + /** + * Exit code of process. + */ + @JsonProperty(value = "ExitCode", required = true) + private long exitCode; + + /** + * Indicates if termination is unexpected. + */ + @JsonProperty(value = "UnexpectedTermination", required = true) + private boolean unexpectedTermination; + + /** + * Start time of process. + */ + @JsonProperty(value = "StartTime", required = true) + private DateTime startTime; + + /** + * Get name of Service. + * + * @return the serviceName value + */ + public String serviceName() { + return this.serviceName; + } + + /** + * Set name of Service. + * + * @param serviceName the serviceName value to set + * @return the ApplicationContainerInstanceExitedEvent object itself. + */ + public ApplicationContainerInstanceExitedEvent withServiceName(String serviceName) { + this.serviceName = serviceName; + return this; + } + + /** + * Get name of Service package. + * + * @return the servicePackageName value + */ + public String servicePackageName() { + return this.servicePackageName; + } + + /** + * Set name of Service package. + * + * @param servicePackageName the servicePackageName value to set + * @return the ApplicationContainerInstanceExitedEvent object itself. + */ + public ApplicationContainerInstanceExitedEvent withServicePackageName(String servicePackageName) { + this.servicePackageName = servicePackageName; + return this; + } + + /** + * Get activation Id of Service package. + * + * @return the servicePackageActivationId value + */ + public String servicePackageActivationId() { + return this.servicePackageActivationId; + } + + /** + * Set activation Id of Service package. + * + * @param servicePackageActivationId the servicePackageActivationId value to set + * @return the ApplicationContainerInstanceExitedEvent object itself. + */ + public ApplicationContainerInstanceExitedEvent withServicePackageActivationId(String servicePackageActivationId) { + this.servicePackageActivationId = servicePackageActivationId; + return this; + } + + /** + * Get indicates IsExclusive flag. + * + * @return the isExclusive value + */ + public boolean isExclusive() { + return this.isExclusive; + } + + /** + * Set indicates IsExclusive flag. + * + * @param isExclusive the isExclusive value to set + * @return the ApplicationContainerInstanceExitedEvent object itself. + */ + public ApplicationContainerInstanceExitedEvent withIsExclusive(boolean isExclusive) { + this.isExclusive = isExclusive; + return this; + } + + /** + * Get name of Code package. + * + * @return the codePackageName value + */ + public String codePackageName() { + return this.codePackageName; + } + + /** + * Set name of Code package. + * + * @param codePackageName the codePackageName value to set + * @return the ApplicationContainerInstanceExitedEvent object itself. + */ + public ApplicationContainerInstanceExitedEvent withCodePackageName(String codePackageName) { + this.codePackageName = codePackageName; + return this; + } + + /** + * Get type of EntryPoint. + * + * @return the entryPointType value + */ + public String entryPointType() { + return this.entryPointType; + } + + /** + * Set type of EntryPoint. + * + * @param entryPointType the entryPointType value to set + * @return the ApplicationContainerInstanceExitedEvent object itself. + */ + public ApplicationContainerInstanceExitedEvent withEntryPointType(String entryPointType) { + this.entryPointType = entryPointType; + return this; + } + + /** + * Get name of Container image. + * + * @return the imageName value + */ + public String imageName() { + return this.imageName; + } + + /** + * Set name of Container image. + * + * @param imageName the imageName value to set + * @return the ApplicationContainerInstanceExitedEvent object itself. + */ + public ApplicationContainerInstanceExitedEvent withImageName(String imageName) { + this.imageName = imageName; + return this; + } + + /** + * Get name of Container. + * + * @return the containerName value + */ + public String containerName() { + return this.containerName; + } + + /** + * Set name of Container. + * + * @param containerName the containerName value to set + * @return the ApplicationContainerInstanceExitedEvent object itself. + */ + public ApplicationContainerInstanceExitedEvent withContainerName(String containerName) { + this.containerName = containerName; + return this; + } + + /** + * Get host Id. + * + * @return the hostId value + */ + public String hostId() { + return this.hostId; + } + + /** + * Set host Id. + * + * @param hostId the hostId value to set + * @return the ApplicationContainerInstanceExitedEvent object itself. + */ + public ApplicationContainerInstanceExitedEvent withHostId(String hostId) { + this.hostId = hostId; + return this; + } + + /** + * Get exit code of process. + * + * @return the exitCode value + */ + public long exitCode() { + return this.exitCode; + } + + /** + * Set exit code of process. + * + * @param exitCode the exitCode value to set + * @return the ApplicationContainerInstanceExitedEvent object itself. + */ + public ApplicationContainerInstanceExitedEvent withExitCode(long exitCode) { + this.exitCode = exitCode; + return this; + } + + /** + * Get indicates if termination is unexpected. + * + * @return the unexpectedTermination value + */ + public boolean unexpectedTermination() { + return this.unexpectedTermination; + } + + /** + * Set indicates if termination is unexpected. + * + * @param unexpectedTermination the unexpectedTermination value to set + * @return the ApplicationContainerInstanceExitedEvent object itself. + */ + public ApplicationContainerInstanceExitedEvent withUnexpectedTermination(boolean unexpectedTermination) { + this.unexpectedTermination = unexpectedTermination; + return this; + } + + /** + * Get start time of process. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set start time of process. + * + * @param startTime the startTime value to set + * @return the ApplicationContainerInstanceExitedEvent object itself. + */ + public ApplicationContainerInstanceExitedEvent withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationNewHealthReportEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationNewHealthReportEvent.java new file mode 100644 index 0000000000000..0e8ff30dbc5c5 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationNewHealthReportEvent.java @@ -0,0 +1,257 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ApplicationEventInner; + +/** + * Application Health Report Created event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("ApplicationNewHealthReport") +public class ApplicationNewHealthReportEvent extends ApplicationEventInner { + /** + * Id of Application instance. + */ + @JsonProperty(value = "ApplicationInstanceId", required = true) + private long applicationInstanceId; + + /** + * Id of report source. + */ + @JsonProperty(value = "SourceId", required = true) + private String sourceId; + + /** + * Describes the property. + */ + @JsonProperty(value = "Property", required = true) + private String property; + + /** + * Describes the property health state. + */ + @JsonProperty(value = "HealthState", required = true) + private String healthState; + + /** + * Time to live in milli-seconds. + */ + @JsonProperty(value = "TimeToLiveMs", required = true) + private long timeToLiveMs; + + /** + * Sequence number of report. + */ + @JsonProperty(value = "SequenceNumber", required = true) + private long sequenceNumber; + + /** + * Description of report. + */ + @JsonProperty(value = "Description", required = true) + private String description; + + /** + * Indicates the removal when it expires. + */ + @JsonProperty(value = "RemoveWhenExpired", required = true) + private boolean removeWhenExpired; + + /** + * Source time. + */ + @JsonProperty(value = "SourceUtcTimestamp", required = true) + private DateTime sourceUtcTimestamp; + + /** + * Get id of Application instance. + * + * @return the applicationInstanceId value + */ + public long applicationInstanceId() { + return this.applicationInstanceId; + } + + /** + * Set id of Application instance. + * + * @param applicationInstanceId the applicationInstanceId value to set + * @return the ApplicationNewHealthReportEvent object itself. + */ + public ApplicationNewHealthReportEvent withApplicationInstanceId(long applicationInstanceId) { + this.applicationInstanceId = applicationInstanceId; + return this; + } + + /** + * Get id of report source. + * + * @return the sourceId value + */ + public String sourceId() { + return this.sourceId; + } + + /** + * Set id of report source. + * + * @param sourceId the sourceId value to set + * @return the ApplicationNewHealthReportEvent object itself. + */ + public ApplicationNewHealthReportEvent withSourceId(String sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Get describes the property. + * + * @return the property value + */ + public String property() { + return this.property; + } + + /** + * Set describes the property. + * + * @param property the property value to set + * @return the ApplicationNewHealthReportEvent object itself. + */ + public ApplicationNewHealthReportEvent withProperty(String property) { + this.property = property; + return this; + } + + /** + * Get describes the property health state. + * + * @return the healthState value + */ + public String healthState() { + return this.healthState; + } + + /** + * Set describes the property health state. + * + * @param healthState the healthState value to set + * @return the ApplicationNewHealthReportEvent object itself. + */ + public ApplicationNewHealthReportEvent withHealthState(String healthState) { + this.healthState = healthState; + return this; + } + + /** + * Get time to live in milli-seconds. + * + * @return the timeToLiveMs value + */ + public long timeToLiveMs() { + return this.timeToLiveMs; + } + + /** + * Set time to live in milli-seconds. + * + * @param timeToLiveMs the timeToLiveMs value to set + * @return the ApplicationNewHealthReportEvent object itself. + */ + public ApplicationNewHealthReportEvent withTimeToLiveMs(long timeToLiveMs) { + this.timeToLiveMs = timeToLiveMs; + return this; + } + + /** + * Get sequence number of report. + * + * @return the sequenceNumber value + */ + public long sequenceNumber() { + return this.sequenceNumber; + } + + /** + * Set sequence number of report. + * + * @param sequenceNumber the sequenceNumber value to set + * @return the ApplicationNewHealthReportEvent object itself. + */ + public ApplicationNewHealthReportEvent withSequenceNumber(long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + * Get description of report. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of report. + * + * @param description the description value to set + * @return the ApplicationNewHealthReportEvent object itself. + */ + public ApplicationNewHealthReportEvent withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get indicates the removal when it expires. + * + * @return the removeWhenExpired value + */ + public boolean removeWhenExpired() { + return this.removeWhenExpired; + } + + /** + * Set indicates the removal when it expires. + * + * @param removeWhenExpired the removeWhenExpired value to set + * @return the ApplicationNewHealthReportEvent object itself. + */ + public ApplicationNewHealthReportEvent withRemoveWhenExpired(boolean removeWhenExpired) { + this.removeWhenExpired = removeWhenExpired; + return this; + } + + /** + * Get source time. + * + * @return the sourceUtcTimestamp value + */ + public DateTime sourceUtcTimestamp() { + return this.sourceUtcTimestamp; + } + + /** + * Set source time. + * + * @param sourceUtcTimestamp the sourceUtcTimestamp value to set + * @return the ApplicationNewHealthReportEvent object itself. + */ + public ApplicationNewHealthReportEvent withSourceUtcTimestamp(DateTime sourceUtcTimestamp) { + this.sourceUtcTimestamp = sourceUtcTimestamp; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationProcessExitedEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationProcessExitedEvent.java new file mode 100644 index 0000000000000..554245b6d1800 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationProcessExitedEvent.java @@ -0,0 +1,335 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ApplicationEventInner; + +/** + * Process Exited event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("ApplicationProcessExited") +public class ApplicationProcessExitedEvent extends ApplicationEventInner { + /** + * Name of Service. + */ + @JsonProperty(value = "ServiceName", required = true) + private String serviceName; + + /** + * Name of Service package. + */ + @JsonProperty(value = "ServicePackageName", required = true) + private String servicePackageName; + + /** + * Activation Id of Service package. + */ + @JsonProperty(value = "ServicePackageActivationId", required = true) + private String servicePackageActivationId; + + /** + * Indicates IsExclusive flag. + */ + @JsonProperty(value = "IsExclusive", required = true) + private boolean isExclusive; + + /** + * Name of Code package. + */ + @JsonProperty(value = "CodePackageName", required = true) + private String codePackageName; + + /** + * Type of EntryPoint. + */ + @JsonProperty(value = "EntryPointType", required = true) + private String entryPointType; + + /** + * Name of executable. + */ + @JsonProperty(value = "ExeName", required = true) + private String exeName; + + /** + * Process Id. + */ + @JsonProperty(value = "ProcessId", required = true) + private long processId; + + /** + * Host Id. + */ + @JsonProperty(value = "HostId", required = true) + private String hostId; + + /** + * Exit code of process. + */ + @JsonProperty(value = "ExitCode", required = true) + private long exitCode; + + /** + * Indicates if termination is unexpected. + */ + @JsonProperty(value = "UnexpectedTermination", required = true) + private boolean unexpectedTermination; + + /** + * Start time of process. + */ + @JsonProperty(value = "StartTime", required = true) + private DateTime startTime; + + /** + * Get name of Service. + * + * @return the serviceName value + */ + public String serviceName() { + return this.serviceName; + } + + /** + * Set name of Service. + * + * @param serviceName the serviceName value to set + * @return the ApplicationProcessExitedEvent object itself. + */ + public ApplicationProcessExitedEvent withServiceName(String serviceName) { + this.serviceName = serviceName; + return this; + } + + /** + * Get name of Service package. + * + * @return the servicePackageName value + */ + public String servicePackageName() { + return this.servicePackageName; + } + + /** + * Set name of Service package. + * + * @param servicePackageName the servicePackageName value to set + * @return the ApplicationProcessExitedEvent object itself. + */ + public ApplicationProcessExitedEvent withServicePackageName(String servicePackageName) { + this.servicePackageName = servicePackageName; + return this; + } + + /** + * Get activation Id of Service package. + * + * @return the servicePackageActivationId value + */ + public String servicePackageActivationId() { + return this.servicePackageActivationId; + } + + /** + * Set activation Id of Service package. + * + * @param servicePackageActivationId the servicePackageActivationId value to set + * @return the ApplicationProcessExitedEvent object itself. + */ + public ApplicationProcessExitedEvent withServicePackageActivationId(String servicePackageActivationId) { + this.servicePackageActivationId = servicePackageActivationId; + return this; + } + + /** + * Get indicates IsExclusive flag. + * + * @return the isExclusive value + */ + public boolean isExclusive() { + return this.isExclusive; + } + + /** + * Set indicates IsExclusive flag. + * + * @param isExclusive the isExclusive value to set + * @return the ApplicationProcessExitedEvent object itself. + */ + public ApplicationProcessExitedEvent withIsExclusive(boolean isExclusive) { + this.isExclusive = isExclusive; + return this; + } + + /** + * Get name of Code package. + * + * @return the codePackageName value + */ + public String codePackageName() { + return this.codePackageName; + } + + /** + * Set name of Code package. + * + * @param codePackageName the codePackageName value to set + * @return the ApplicationProcessExitedEvent object itself. + */ + public ApplicationProcessExitedEvent withCodePackageName(String codePackageName) { + this.codePackageName = codePackageName; + return this; + } + + /** + * Get type of EntryPoint. + * + * @return the entryPointType value + */ + public String entryPointType() { + return this.entryPointType; + } + + /** + * Set type of EntryPoint. + * + * @param entryPointType the entryPointType value to set + * @return the ApplicationProcessExitedEvent object itself. + */ + public ApplicationProcessExitedEvent withEntryPointType(String entryPointType) { + this.entryPointType = entryPointType; + return this; + } + + /** + * Get name of executable. + * + * @return the exeName value + */ + public String exeName() { + return this.exeName; + } + + /** + * Set name of executable. + * + * @param exeName the exeName value to set + * @return the ApplicationProcessExitedEvent object itself. + */ + public ApplicationProcessExitedEvent withExeName(String exeName) { + this.exeName = exeName; + return this; + } + + /** + * Get process Id. + * + * @return the processId value + */ + public long processId() { + return this.processId; + } + + /** + * Set process Id. + * + * @param processId the processId value to set + * @return the ApplicationProcessExitedEvent object itself. + */ + public ApplicationProcessExitedEvent withProcessId(long processId) { + this.processId = processId; + return this; + } + + /** + * Get host Id. + * + * @return the hostId value + */ + public String hostId() { + return this.hostId; + } + + /** + * Set host Id. + * + * @param hostId the hostId value to set + * @return the ApplicationProcessExitedEvent object itself. + */ + public ApplicationProcessExitedEvent withHostId(String hostId) { + this.hostId = hostId; + return this; + } + + /** + * Get exit code of process. + * + * @return the exitCode value + */ + public long exitCode() { + return this.exitCode; + } + + /** + * Set exit code of process. + * + * @param exitCode the exitCode value to set + * @return the ApplicationProcessExitedEvent object itself. + */ + public ApplicationProcessExitedEvent withExitCode(long exitCode) { + this.exitCode = exitCode; + return this; + } + + /** + * Get indicates if termination is unexpected. + * + * @return the unexpectedTermination value + */ + public boolean unexpectedTermination() { + return this.unexpectedTermination; + } + + /** + * Set indicates if termination is unexpected. + * + * @param unexpectedTermination the unexpectedTermination value to set + * @return the ApplicationProcessExitedEvent object itself. + */ + public ApplicationProcessExitedEvent withUnexpectedTermination(boolean unexpectedTermination) { + this.unexpectedTermination = unexpectedTermination; + return this; + } + + /** + * Get start time of process. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set start time of process. + * + * @param startTime the startTime value to set + * @return the ApplicationProcessExitedEvent object itself. + */ + public ApplicationProcessExitedEvent withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationScopedVolume.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationScopedVolume.java new file mode 100644 index 0000000000000..f5c906f810f03 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationScopedVolume.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes a volume whose lifetime is scoped to the application's lifetime. + */ +public class ApplicationScopedVolume extends VolumeReference { + /** + * Describes parameters for creating application-scoped volumes. + */ + @JsonProperty(value = "creationParameters", required = true) + private ApplicationScopedVolumeCreationParameters creationParameters; + + /** + * Get describes parameters for creating application-scoped volumes. + * + * @return the creationParameters value + */ + public ApplicationScopedVolumeCreationParameters creationParameters() { + return this.creationParameters; + } + + /** + * Set describes parameters for creating application-scoped volumes. + * + * @param creationParameters the creationParameters value to set + * @return the ApplicationScopedVolume object itself. + */ + public ApplicationScopedVolume withCreationParameters(ApplicationScopedVolumeCreationParameters creationParameters) { + this.creationParameters = creationParameters; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationScopedVolumeCreationParameters.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationScopedVolumeCreationParameters.java new file mode 100644 index 0000000000000..ec9b88efda287 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationScopedVolumeCreationParameters.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Describes parameters for creating application-scoped volumes. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("ApplicationScopedVolumeCreationParameters") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "ServiceFabricVolumeDisk", value = ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk.class) +}) +public class ApplicationScopedVolumeCreationParameters { + /** + * User readable description of the volume. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get user readable description of the volume. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set user readable description of the volume. + * + * @param description the description value to set + * @return the ApplicationScopedVolumeCreationParameters object itself. + */ + public ApplicationScopedVolumeCreationParameters withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk.java new file mode 100644 index 0000000000000..b59f83c6cbc5c --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Describes parameters for creating application-scoped volumes provided by + * Service Fabric Volume Disks. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("ServiceFabricVolumeDisk") +public class ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk extends ApplicationScopedVolumeCreationParameters { + /** + * Volume size. Possible values include: 'Small', 'Medium', 'Large'. + */ + @JsonProperty(value = "sizeDisk", required = true) + private SizeTypes sizeDisk; + + /** + * Get volume size. Possible values include: 'Small', 'Medium', 'Large'. + * + * @return the sizeDisk value + */ + public SizeTypes sizeDisk() { + return this.sizeDisk; + } + + /** + * Set volume size. Possible values include: 'Small', 'Medium', 'Large'. + * + * @param sizeDisk the sizeDisk value to set + * @return the ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk object itself. + */ + public ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk withSizeDisk(SizeTypes sizeDisk) { + this.sizeDisk = sizeDisk; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationScopedVolumeKind.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationScopedVolumeKind.java new file mode 100644 index 0000000000000..499cf274ecc84 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationScopedVolumeKind.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ApplicationScopedVolumeKind. + */ +public final class ApplicationScopedVolumeKind extends ExpandableStringEnum { + /** Static value ServiceFabricVolumeDisk for ApplicationScopedVolumeKind. */ + public static final ApplicationScopedVolumeKind SERVICE_FABRIC_VOLUME_DISK = fromString("ServiceFabricVolumeDisk"); + + /** + * Creates or finds a ApplicationScopedVolumeKind from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationScopedVolumeKind + */ + @JsonCreator + public static ApplicationScopedVolumeKind fromString(String name) { + return fromString(name, ApplicationScopedVolumeKind.class); + } + + /** + * @return known ApplicationScopedVolumeKind values + */ + public static Collection values() { + return values(ApplicationScopedVolumeKind.class); + } +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationUpgradeCompletedEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationUpgradeCompletedEvent.java new file mode 100644 index 0000000000000..317c7def3310e --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationUpgradeCompletedEvent.java @@ -0,0 +1,100 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ApplicationEventInner; + +/** + * Application Upgrade Completed event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("ApplicationUpgradeCompleted") +public class ApplicationUpgradeCompletedEvent extends ApplicationEventInner { + /** + * Application type name. + */ + @JsonProperty(value = "ApplicationTypeName", required = true) + private String applicationTypeName; + + /** + * Application type version. + */ + @JsonProperty(value = "ApplicationTypeVersion", required = true) + private String applicationTypeVersion; + + /** + * Overall upgrade time in milli-seconds. + */ + @JsonProperty(value = "OverallUpgradeElapsedTimeInMs", required = true) + private double overallUpgradeElapsedTimeInMs; + + /** + * Get application type name. + * + * @return the applicationTypeName value + */ + public String applicationTypeName() { + return this.applicationTypeName; + } + + /** + * Set application type name. + * + * @param applicationTypeName the applicationTypeName value to set + * @return the ApplicationUpgradeCompletedEvent object itself. + */ + public ApplicationUpgradeCompletedEvent withApplicationTypeName(String applicationTypeName) { + this.applicationTypeName = applicationTypeName; + return this; + } + + /** + * Get application type version. + * + * @return the applicationTypeVersion value + */ + public String applicationTypeVersion() { + return this.applicationTypeVersion; + } + + /** + * Set application type version. + * + * @param applicationTypeVersion the applicationTypeVersion value to set + * @return the ApplicationUpgradeCompletedEvent object itself. + */ + public ApplicationUpgradeCompletedEvent withApplicationTypeVersion(String applicationTypeVersion) { + this.applicationTypeVersion = applicationTypeVersion; + return this; + } + + /** + * Get overall upgrade time in milli-seconds. + * + * @return the overallUpgradeElapsedTimeInMs value + */ + public double overallUpgradeElapsedTimeInMs() { + return this.overallUpgradeElapsedTimeInMs; + } + + /** + * Set overall upgrade time in milli-seconds. + * + * @param overallUpgradeElapsedTimeInMs the overallUpgradeElapsedTimeInMs value to set + * @return the ApplicationUpgradeCompletedEvent object itself. + */ + public ApplicationUpgradeCompletedEvent withOverallUpgradeElapsedTimeInMs(double overallUpgradeElapsedTimeInMs) { + this.overallUpgradeElapsedTimeInMs = overallUpgradeElapsedTimeInMs; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationUpgradeDomainCompletedEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationUpgradeDomainCompletedEvent.java new file mode 100644 index 0000000000000..8d51605e2f055 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationUpgradeDomainCompletedEvent.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ApplicationEventInner; + +/** + * Application Upgrade Domain Completed event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("ApplicationUpgradeDomainCompleted") +public class ApplicationUpgradeDomainCompletedEvent extends ApplicationEventInner { + /** + * Application type name. + */ + @JsonProperty(value = "ApplicationTypeName", required = true) + private String applicationTypeName; + + /** + * Current Application type version. + */ + @JsonProperty(value = "CurrentApplicationTypeVersion", required = true) + private String currentApplicationTypeVersion; + + /** + * Target Application type version. + */ + @JsonProperty(value = "ApplicationTypeVersion", required = true) + private String applicationTypeVersion; + + /** + * State of upgrade. + */ + @JsonProperty(value = "UpgradeState", required = true) + private String upgradeState; + + /** + * Upgrade domains. + */ + @JsonProperty(value = "UpgradeDomains", required = true) + private String upgradeDomains; + + /** + * Upgrade time of domain in milli-seconds. + */ + @JsonProperty(value = "UpgradeDomainElapsedTimeInMs", required = true) + private double upgradeDomainElapsedTimeInMs; + + /** + * Get application type name. + * + * @return the applicationTypeName value + */ + public String applicationTypeName() { + return this.applicationTypeName; + } + + /** + * Set application type name. + * + * @param applicationTypeName the applicationTypeName value to set + * @return the ApplicationUpgradeDomainCompletedEvent object itself. + */ + public ApplicationUpgradeDomainCompletedEvent withApplicationTypeName(String applicationTypeName) { + this.applicationTypeName = applicationTypeName; + return this; + } + + /** + * Get current Application type version. + * + * @return the currentApplicationTypeVersion value + */ + public String currentApplicationTypeVersion() { + return this.currentApplicationTypeVersion; + } + + /** + * Set current Application type version. + * + * @param currentApplicationTypeVersion the currentApplicationTypeVersion value to set + * @return the ApplicationUpgradeDomainCompletedEvent object itself. + */ + public ApplicationUpgradeDomainCompletedEvent withCurrentApplicationTypeVersion(String currentApplicationTypeVersion) { + this.currentApplicationTypeVersion = currentApplicationTypeVersion; + return this; + } + + /** + * Get target Application type version. + * + * @return the applicationTypeVersion value + */ + public String applicationTypeVersion() { + return this.applicationTypeVersion; + } + + /** + * Set target Application type version. + * + * @param applicationTypeVersion the applicationTypeVersion value to set + * @return the ApplicationUpgradeDomainCompletedEvent object itself. + */ + public ApplicationUpgradeDomainCompletedEvent withApplicationTypeVersion(String applicationTypeVersion) { + this.applicationTypeVersion = applicationTypeVersion; + return this; + } + + /** + * Get state of upgrade. + * + * @return the upgradeState value + */ + public String upgradeState() { + return this.upgradeState; + } + + /** + * Set state of upgrade. + * + * @param upgradeState the upgradeState value to set + * @return the ApplicationUpgradeDomainCompletedEvent object itself. + */ + public ApplicationUpgradeDomainCompletedEvent withUpgradeState(String upgradeState) { + this.upgradeState = upgradeState; + return this; + } + + /** + * Get upgrade domains. + * + * @return the upgradeDomains value + */ + public String upgradeDomains() { + return this.upgradeDomains; + } + + /** + * Set upgrade domains. + * + * @param upgradeDomains the upgradeDomains value to set + * @return the ApplicationUpgradeDomainCompletedEvent object itself. + */ + public ApplicationUpgradeDomainCompletedEvent withUpgradeDomains(String upgradeDomains) { + this.upgradeDomains = upgradeDomains; + return this; + } + + /** + * Get upgrade time of domain in milli-seconds. + * + * @return the upgradeDomainElapsedTimeInMs value + */ + public double upgradeDomainElapsedTimeInMs() { + return this.upgradeDomainElapsedTimeInMs; + } + + /** + * Set upgrade time of domain in milli-seconds. + * + * @param upgradeDomainElapsedTimeInMs the upgradeDomainElapsedTimeInMs value to set + * @return the ApplicationUpgradeDomainCompletedEvent object itself. + */ + public ApplicationUpgradeDomainCompletedEvent withUpgradeDomainElapsedTimeInMs(double upgradeDomainElapsedTimeInMs) { + this.upgradeDomainElapsedTimeInMs = upgradeDomainElapsedTimeInMs; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationUpgradeRollbackCompletedEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationUpgradeRollbackCompletedEvent.java new file mode 100644 index 0000000000000..6a68c9639f44c --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationUpgradeRollbackCompletedEvent.java @@ -0,0 +1,126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ApplicationEventInner; + +/** + * Application Upgrade Rollback Completed event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("ApplicationUpgradeRollbackCompleted") +public class ApplicationUpgradeRollbackCompletedEvent extends ApplicationEventInner { + /** + * Application type name. + */ + @JsonProperty(value = "ApplicationTypeName", required = true) + private String applicationTypeName; + + /** + * Application type version. + */ + @JsonProperty(value = "ApplicationTypeVersion", required = true) + private String applicationTypeVersion; + + /** + * Describes reason of failure. + */ + @JsonProperty(value = "FailureReason", required = true) + private String failureReason; + + /** + * Overall upgrade time in milli-seconds. + */ + @JsonProperty(value = "OverallUpgradeElapsedTimeInMs", required = true) + private double overallUpgradeElapsedTimeInMs; + + /** + * Get application type name. + * + * @return the applicationTypeName value + */ + public String applicationTypeName() { + return this.applicationTypeName; + } + + /** + * Set application type name. + * + * @param applicationTypeName the applicationTypeName value to set + * @return the ApplicationUpgradeRollbackCompletedEvent object itself. + */ + public ApplicationUpgradeRollbackCompletedEvent withApplicationTypeName(String applicationTypeName) { + this.applicationTypeName = applicationTypeName; + return this; + } + + /** + * Get application type version. + * + * @return the applicationTypeVersion value + */ + public String applicationTypeVersion() { + return this.applicationTypeVersion; + } + + /** + * Set application type version. + * + * @param applicationTypeVersion the applicationTypeVersion value to set + * @return the ApplicationUpgradeRollbackCompletedEvent object itself. + */ + public ApplicationUpgradeRollbackCompletedEvent withApplicationTypeVersion(String applicationTypeVersion) { + this.applicationTypeVersion = applicationTypeVersion; + return this; + } + + /** + * Get describes reason of failure. + * + * @return the failureReason value + */ + public String failureReason() { + return this.failureReason; + } + + /** + * Set describes reason of failure. + * + * @param failureReason the failureReason value to set + * @return the ApplicationUpgradeRollbackCompletedEvent object itself. + */ + public ApplicationUpgradeRollbackCompletedEvent withFailureReason(String failureReason) { + this.failureReason = failureReason; + return this; + } + + /** + * Get overall upgrade time in milli-seconds. + * + * @return the overallUpgradeElapsedTimeInMs value + */ + public double overallUpgradeElapsedTimeInMs() { + return this.overallUpgradeElapsedTimeInMs; + } + + /** + * Set overall upgrade time in milli-seconds. + * + * @param overallUpgradeElapsedTimeInMs the overallUpgradeElapsedTimeInMs value to set + * @return the ApplicationUpgradeRollbackCompletedEvent object itself. + */ + public ApplicationUpgradeRollbackCompletedEvent withOverallUpgradeElapsedTimeInMs(double overallUpgradeElapsedTimeInMs) { + this.overallUpgradeElapsedTimeInMs = overallUpgradeElapsedTimeInMs; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationUpgradeRollbackStartedEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationUpgradeRollbackStartedEvent.java new file mode 100644 index 0000000000000..8df551021bbe3 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationUpgradeRollbackStartedEvent.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ApplicationEventInner; + +/** + * Application Upgrade Rollback Started event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("ApplicationUpgradeRollbackStarted") +public class ApplicationUpgradeRollbackStartedEvent extends ApplicationEventInner { + /** + * Application type name. + */ + @JsonProperty(value = "ApplicationTypeName", required = true) + private String applicationTypeName; + + /** + * Current Application type version. + */ + @JsonProperty(value = "CurrentApplicationTypeVersion", required = true) + private String currentApplicationTypeVersion; + + /** + * Target Application type version. + */ + @JsonProperty(value = "ApplicationTypeVersion", required = true) + private String applicationTypeVersion; + + /** + * Describes reason of failure. + */ + @JsonProperty(value = "FailureReason", required = true) + private String failureReason; + + /** + * Overall upgrade time in milli-seconds. + */ + @JsonProperty(value = "OverallUpgradeElapsedTimeInMs", required = true) + private double overallUpgradeElapsedTimeInMs; + + /** + * Get application type name. + * + * @return the applicationTypeName value + */ + public String applicationTypeName() { + return this.applicationTypeName; + } + + /** + * Set application type name. + * + * @param applicationTypeName the applicationTypeName value to set + * @return the ApplicationUpgradeRollbackStartedEvent object itself. + */ + public ApplicationUpgradeRollbackStartedEvent withApplicationTypeName(String applicationTypeName) { + this.applicationTypeName = applicationTypeName; + return this; + } + + /** + * Get current Application type version. + * + * @return the currentApplicationTypeVersion value + */ + public String currentApplicationTypeVersion() { + return this.currentApplicationTypeVersion; + } + + /** + * Set current Application type version. + * + * @param currentApplicationTypeVersion the currentApplicationTypeVersion value to set + * @return the ApplicationUpgradeRollbackStartedEvent object itself. + */ + public ApplicationUpgradeRollbackStartedEvent withCurrentApplicationTypeVersion(String currentApplicationTypeVersion) { + this.currentApplicationTypeVersion = currentApplicationTypeVersion; + return this; + } + + /** + * Get target Application type version. + * + * @return the applicationTypeVersion value + */ + public String applicationTypeVersion() { + return this.applicationTypeVersion; + } + + /** + * Set target Application type version. + * + * @param applicationTypeVersion the applicationTypeVersion value to set + * @return the ApplicationUpgradeRollbackStartedEvent object itself. + */ + public ApplicationUpgradeRollbackStartedEvent withApplicationTypeVersion(String applicationTypeVersion) { + this.applicationTypeVersion = applicationTypeVersion; + return this; + } + + /** + * Get describes reason of failure. + * + * @return the failureReason value + */ + public String failureReason() { + return this.failureReason; + } + + /** + * Set describes reason of failure. + * + * @param failureReason the failureReason value to set + * @return the ApplicationUpgradeRollbackStartedEvent object itself. + */ + public ApplicationUpgradeRollbackStartedEvent withFailureReason(String failureReason) { + this.failureReason = failureReason; + return this; + } + + /** + * Get overall upgrade time in milli-seconds. + * + * @return the overallUpgradeElapsedTimeInMs value + */ + public double overallUpgradeElapsedTimeInMs() { + return this.overallUpgradeElapsedTimeInMs; + } + + /** + * Set overall upgrade time in milli-seconds. + * + * @param overallUpgradeElapsedTimeInMs the overallUpgradeElapsedTimeInMs value to set + * @return the ApplicationUpgradeRollbackStartedEvent object itself. + */ + public ApplicationUpgradeRollbackStartedEvent withOverallUpgradeElapsedTimeInMs(double overallUpgradeElapsedTimeInMs) { + this.overallUpgradeElapsedTimeInMs = overallUpgradeElapsedTimeInMs; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationUpgradeStartedEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationUpgradeStartedEvent.java new file mode 100644 index 0000000000000..42bfa7e3ee6dc --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ApplicationUpgradeStartedEvent.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ApplicationEventInner; + +/** + * Application Upgrade Started event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("ApplicationUpgradeStarted") +public class ApplicationUpgradeStartedEvent extends ApplicationEventInner { + /** + * Application type name. + */ + @JsonProperty(value = "ApplicationTypeName", required = true) + private String applicationTypeName; + + /** + * Current Application type version. + */ + @JsonProperty(value = "CurrentApplicationTypeVersion", required = true) + private String currentApplicationTypeVersion; + + /** + * Target Application type version. + */ + @JsonProperty(value = "ApplicationTypeVersion", required = true) + private String applicationTypeVersion; + + /** + * Type of upgrade. + */ + @JsonProperty(value = "UpgradeType", required = true) + private String upgradeType; + + /** + * Mode of upgrade. + */ + @JsonProperty(value = "RollingUpgradeMode", required = true) + private String rollingUpgradeMode; + + /** + * Action if failed. + */ + @JsonProperty(value = "FailureAction", required = true) + private String failureAction; + + /** + * Get application type name. + * + * @return the applicationTypeName value + */ + public String applicationTypeName() { + return this.applicationTypeName; + } + + /** + * Set application type name. + * + * @param applicationTypeName the applicationTypeName value to set + * @return the ApplicationUpgradeStartedEvent object itself. + */ + public ApplicationUpgradeStartedEvent withApplicationTypeName(String applicationTypeName) { + this.applicationTypeName = applicationTypeName; + return this; + } + + /** + * Get current Application type version. + * + * @return the currentApplicationTypeVersion value + */ + public String currentApplicationTypeVersion() { + return this.currentApplicationTypeVersion; + } + + /** + * Set current Application type version. + * + * @param currentApplicationTypeVersion the currentApplicationTypeVersion value to set + * @return the ApplicationUpgradeStartedEvent object itself. + */ + public ApplicationUpgradeStartedEvent withCurrentApplicationTypeVersion(String currentApplicationTypeVersion) { + this.currentApplicationTypeVersion = currentApplicationTypeVersion; + return this; + } + + /** + * Get target Application type version. + * + * @return the applicationTypeVersion value + */ + public String applicationTypeVersion() { + return this.applicationTypeVersion; + } + + /** + * Set target Application type version. + * + * @param applicationTypeVersion the applicationTypeVersion value to set + * @return the ApplicationUpgradeStartedEvent object itself. + */ + public ApplicationUpgradeStartedEvent withApplicationTypeVersion(String applicationTypeVersion) { + this.applicationTypeVersion = applicationTypeVersion; + return this; + } + + /** + * Get type of upgrade. + * + * @return the upgradeType value + */ + public String upgradeType() { + return this.upgradeType; + } + + /** + * Set type of upgrade. + * + * @param upgradeType the upgradeType value to set + * @return the ApplicationUpgradeStartedEvent object itself. + */ + public ApplicationUpgradeStartedEvent withUpgradeType(String upgradeType) { + this.upgradeType = upgradeType; + return this; + } + + /** + * Get mode of upgrade. + * + * @return the rollingUpgradeMode value + */ + public String rollingUpgradeMode() { + return this.rollingUpgradeMode; + } + + /** + * Set mode of upgrade. + * + * @param rollingUpgradeMode the rollingUpgradeMode value to set + * @return the ApplicationUpgradeStartedEvent object itself. + */ + public ApplicationUpgradeStartedEvent withRollingUpgradeMode(String rollingUpgradeMode) { + this.rollingUpgradeMode = rollingUpgradeMode; + return this; + } + + /** + * Get action if failed. + * + * @return the failureAction value + */ + public String failureAction() { + return this.failureAction; + } + + /** + * Set action if failed. + * + * @param failureAction the failureAction value to set + * @return the ApplicationUpgradeStartedEvent object itself. + */ + public ApplicationUpgradeStartedEvent withFailureAction(String failureAction) { + this.failureAction = failureAction; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingMechanism.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingMechanism.java new file mode 100644 index 0000000000000..bc35cfeaf5036 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingMechanism.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Describes the mechanism for performing auto scaling operation. Derived + * classes will describe the actual mechanism. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("AutoScalingMechanism") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AddRemoveReplica", value = AddRemoveReplicaScalingMechanism.class) +}) +public class AutoScalingMechanism { +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingMechanismKind.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingMechanismKind.java new file mode 100644 index 0000000000000..1a3dea0238e4b --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingMechanismKind.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AutoScalingMechanismKind. + */ +public final class AutoScalingMechanismKind extends ExpandableStringEnum { + /** Static value AddRemoveReplica for AutoScalingMechanismKind. */ + public static final AutoScalingMechanismKind ADD_REMOVE_REPLICA = fromString("AddRemoveReplica"); + + /** + * Creates or finds a AutoScalingMechanismKind from its string representation. + * @param name a name to look for + * @return the corresponding AutoScalingMechanismKind + */ + @JsonCreator + public static AutoScalingMechanismKind fromString(String name) { + return fromString(name, AutoScalingMechanismKind.class); + } + + /** + * @return known AutoScalingMechanismKind values + */ + public static Collection values() { + return values(AutoScalingMechanismKind.class); + } +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingMetric.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingMetric.java new file mode 100644 index 0000000000000..f2d5507a24675 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingMetric.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Describes the metric that is used for triggering auto scaling operation. + * Derived classes will describe resources or metrics. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("AutoScalingMetric") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Resource", value = AutoScalingResourceMetric.class) +}) +public class AutoScalingMetric { +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingMetricKind.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingMetricKind.java new file mode 100644 index 0000000000000..df7e4ae92dc07 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingMetricKind.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AutoScalingMetricKind. + */ +public final class AutoScalingMetricKind extends ExpandableStringEnum { + /** Static value Resource for AutoScalingMetricKind. */ + public static final AutoScalingMetricKind RESOURCE = fromString("Resource"); + + /** + * Creates or finds a AutoScalingMetricKind from its string representation. + * @param name a name to look for + * @return the corresponding AutoScalingMetricKind + */ + @JsonCreator + public static AutoScalingMetricKind fromString(String name) { + return fromString(name, AutoScalingMetricKind.class); + } + + /** + * @return known AutoScalingMetricKind values + */ + public static Collection values() { + return values(AutoScalingMetricKind.class); + } +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingPolicy.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingPolicy.java new file mode 100644 index 0000000000000..07bdbdb2f2a4b --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingPolicy.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the auto scaling policy. + */ +public class AutoScalingPolicy { + /** + * The name of the auto scaling policy. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Determines when auto scaling operation will be invoked. + */ + @JsonProperty(value = "trigger", required = true) + private AutoScalingTrigger trigger; + + /** + * The mechanism that is used to scale when auto scaling operation is + * invoked. + */ + @JsonProperty(value = "mechanism", required = true) + private AutoScalingMechanism mechanism; + + /** + * Get the name of the auto scaling policy. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the auto scaling policy. + * + * @param name the name value to set + * @return the AutoScalingPolicy object itself. + */ + public AutoScalingPolicy withName(String name) { + this.name = name; + return this; + } + + /** + * Get determines when auto scaling operation will be invoked. + * + * @return the trigger value + */ + public AutoScalingTrigger trigger() { + return this.trigger; + } + + /** + * Set determines when auto scaling operation will be invoked. + * + * @param trigger the trigger value to set + * @return the AutoScalingPolicy object itself. + */ + public AutoScalingPolicy withTrigger(AutoScalingTrigger trigger) { + this.trigger = trigger; + return this; + } + + /** + * Get the mechanism that is used to scale when auto scaling operation is invoked. + * + * @return the mechanism value + */ + public AutoScalingMechanism mechanism() { + return this.mechanism; + } + + /** + * Set the mechanism that is used to scale when auto scaling operation is invoked. + * + * @param mechanism the mechanism value to set + * @return the AutoScalingPolicy object itself. + */ + public AutoScalingPolicy withMechanism(AutoScalingMechanism mechanism) { + this.mechanism = mechanism; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingResourceMetric.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingResourceMetric.java new file mode 100644 index 0000000000000..190a22dac543c --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingResourceMetric.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Describes the resource that is used for triggering auto scaling. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("Resource") +public class AutoScalingResourceMetric extends AutoScalingMetric { + /** + * Name of the resource. Possible values include: 'cpu', 'memoryInGB'. + */ + @JsonProperty(value = "name", required = true) + private AutoScalingResourceMetricName name; + + /** + * Get name of the resource. Possible values include: 'cpu', 'memoryInGB'. + * + * @return the name value + */ + public AutoScalingResourceMetricName name() { + return this.name; + } + + /** + * Set name of the resource. Possible values include: 'cpu', 'memoryInGB'. + * + * @param name the name value to set + * @return the AutoScalingResourceMetric object itself. + */ + public AutoScalingResourceMetric withName(AutoScalingResourceMetricName name) { + this.name = name; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingResourceMetricName.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingResourceMetricName.java new file mode 100644 index 0000000000000..e445505167afb --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingResourceMetricName.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AutoScalingResourceMetricName. + */ +public final class AutoScalingResourceMetricName extends ExpandableStringEnum { + /** Static value cpu for AutoScalingResourceMetricName. */ + public static final AutoScalingResourceMetricName CPU = fromString("cpu"); + + /** Static value memoryInGB for AutoScalingResourceMetricName. */ + public static final AutoScalingResourceMetricName MEMORY_IN_GB = fromString("memoryInGB"); + + /** + * Creates or finds a AutoScalingResourceMetricName from its string representation. + * @param name a name to look for + * @return the corresponding AutoScalingResourceMetricName + */ + @JsonCreator + public static AutoScalingResourceMetricName fromString(String name) { + return fromString(name, AutoScalingResourceMetricName.class); + } + + /** + * @return known AutoScalingResourceMetricName values + */ + public static Collection values() { + return values(AutoScalingResourceMetricName.class); + } +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingTrigger.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingTrigger.java new file mode 100644 index 0000000000000..97772a7949873 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingTrigger.java @@ -0,0 +1,24 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Describes the trigger for performing auto scaling operation. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("AutoScalingTrigger") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AverageLoad", value = AverageLoadScalingTrigger.class) +}) +public class AutoScalingTrigger { +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingTriggerKind.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingTriggerKind.java new file mode 100644 index 0000000000000..f0456b2f52e0a --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AutoScalingTriggerKind.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AutoScalingTriggerKind. + */ +public final class AutoScalingTriggerKind extends ExpandableStringEnum { + /** Static value AverageLoad for AutoScalingTriggerKind. */ + public static final AutoScalingTriggerKind AVERAGE_LOAD = fromString("AverageLoad"); + + /** + * Creates or finds a AutoScalingTriggerKind from its string representation. + * @param name a name to look for + * @return the corresponding AutoScalingTriggerKind + */ + @JsonCreator + public static AutoScalingTriggerKind fromString(String name) { + return fromString(name, AutoScalingTriggerKind.class); + } + + /** + * @return known AutoScalingTriggerKind values + */ + public static Collection values() { + return values(AutoScalingTriggerKind.class); + } +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AverageLoadScalingTrigger.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AverageLoadScalingTrigger.java new file mode 100644 index 0000000000000..ba6072abfe816 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AverageLoadScalingTrigger.java @@ -0,0 +1,127 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Describes the average load trigger used for auto scaling. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("AverageLoad") +public class AverageLoadScalingTrigger extends AutoScalingTrigger { + /** + * Description of the metric that is used for scaling. + */ + @JsonProperty(value = "metric", required = true) + private AutoScalingMetric metric; + + /** + * Lower load threshold (if average load is below this threshold, service + * will scale down). + */ + @JsonProperty(value = "lowerLoadThreshold", required = true) + private double lowerLoadThreshold; + + /** + * Upper load threshold (if average load is above this threshold, service + * will scale up). + */ + @JsonProperty(value = "upperLoadThreshold", required = true) + private double upperLoadThreshold; + + /** + * Scale interval that indicates how often will this trigger be checked. + */ + @JsonProperty(value = "scaleIntervalInSeconds", required = true) + private int scaleIntervalInSeconds; + + /** + * Get description of the metric that is used for scaling. + * + * @return the metric value + */ + public AutoScalingMetric metric() { + return this.metric; + } + + /** + * Set description of the metric that is used for scaling. + * + * @param metric the metric value to set + * @return the AverageLoadScalingTrigger object itself. + */ + public AverageLoadScalingTrigger withMetric(AutoScalingMetric metric) { + this.metric = metric; + return this; + } + + /** + * Get lower load threshold (if average load is below this threshold, service will scale down). + * + * @return the lowerLoadThreshold value + */ + public double lowerLoadThreshold() { + return this.lowerLoadThreshold; + } + + /** + * Set lower load threshold (if average load is below this threshold, service will scale down). + * + * @param lowerLoadThreshold the lowerLoadThreshold value to set + * @return the AverageLoadScalingTrigger object itself. + */ + public AverageLoadScalingTrigger withLowerLoadThreshold(double lowerLoadThreshold) { + this.lowerLoadThreshold = lowerLoadThreshold; + return this; + } + + /** + * Get upper load threshold (if average load is above this threshold, service will scale up). + * + * @return the upperLoadThreshold value + */ + public double upperLoadThreshold() { + return this.upperLoadThreshold; + } + + /** + * Set upper load threshold (if average load is above this threshold, service will scale up). + * + * @param upperLoadThreshold the upperLoadThreshold value to set + * @return the AverageLoadScalingTrigger object itself. + */ + public AverageLoadScalingTrigger withUpperLoadThreshold(double upperLoadThreshold) { + this.upperLoadThreshold = upperLoadThreshold; + return this; + } + + /** + * Get scale interval that indicates how often will this trigger be checked. + * + * @return the scaleIntervalInSeconds value + */ + public int scaleIntervalInSeconds() { + return this.scaleIntervalInSeconds; + } + + /** + * Set scale interval that indicates how often will this trigger be checked. + * + * @param scaleIntervalInSeconds the scaleIntervalInSeconds value to set + * @return the AverageLoadScalingTrigger object itself. + */ + public AverageLoadScalingTrigger withScaleIntervalInSeconds(int scaleIntervalInSeconds) { + this.scaleIntervalInSeconds = scaleIntervalInSeconds; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AzureInternalMonitoringPipelineSinkDescription.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AzureInternalMonitoringPipelineSinkDescription.java new file mode 100644 index 0000000000000..0ef7a9f6436e6 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/AzureInternalMonitoringPipelineSinkDescription.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Diagnostics settings for Geneva. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("AzureInternalMonitoringPipeline") +public class AzureInternalMonitoringPipelineSinkDescription extends DiagnosticsSinkProperties { + /** + * Azure Internal monitoring pipeline account. + */ + @JsonProperty(value = "accountName") + private String accountName; + + /** + * Azure Internal monitoring pipeline account namespace. + */ + @JsonProperty(value = "namespace") + private String namespace; + + /** + * Azure Internal monitoring agent configuration. + */ + @JsonProperty(value = "maConfigUrl") + private String maConfigUrl; + + /** + * Azure Internal monitoring agent fluentd configuration. + */ + @JsonProperty(value = "fluentdConfigUrl") + private Object fluentdConfigUrl; + + /** + * Azure Internal monitoring pipeline autokey associated with the + * certificate. + */ + @JsonProperty(value = "autoKeyConfigUrl") + private String autoKeyConfigUrl; + + /** + * Get azure Internal monitoring pipeline account. + * + * @return the accountName value + */ + public String accountName() { + return this.accountName; + } + + /** + * Set azure Internal monitoring pipeline account. + * + * @param accountName the accountName value to set + * @return the AzureInternalMonitoringPipelineSinkDescription object itself. + */ + public AzureInternalMonitoringPipelineSinkDescription withAccountName(String accountName) { + this.accountName = accountName; + return this; + } + + /** + * Get azure Internal monitoring pipeline account namespace. + * + * @return the namespace value + */ + public String namespace() { + return this.namespace; + } + + /** + * Set azure Internal monitoring pipeline account namespace. + * + * @param namespace the namespace value to set + * @return the AzureInternalMonitoringPipelineSinkDescription object itself. + */ + public AzureInternalMonitoringPipelineSinkDescription withNamespace(String namespace) { + this.namespace = namespace; + return this; + } + + /** + * Get azure Internal monitoring agent configuration. + * + * @return the maConfigUrl value + */ + public String maConfigUrl() { + return this.maConfigUrl; + } + + /** + * Set azure Internal monitoring agent configuration. + * + * @param maConfigUrl the maConfigUrl value to set + * @return the AzureInternalMonitoringPipelineSinkDescription object itself. + */ + public AzureInternalMonitoringPipelineSinkDescription withMaConfigUrl(String maConfigUrl) { + this.maConfigUrl = maConfigUrl; + return this; + } + + /** + * Get azure Internal monitoring agent fluentd configuration. + * + * @return the fluentdConfigUrl value + */ + public Object fluentdConfigUrl() { + return this.fluentdConfigUrl; + } + + /** + * Set azure Internal monitoring agent fluentd configuration. + * + * @param fluentdConfigUrl the fluentdConfigUrl value to set + * @return the AzureInternalMonitoringPipelineSinkDescription object itself. + */ + public AzureInternalMonitoringPipelineSinkDescription withFluentdConfigUrl(Object fluentdConfigUrl) { + this.fluentdConfigUrl = fluentdConfigUrl; + return this; + } + + /** + * Get azure Internal monitoring pipeline autokey associated with the certificate. + * + * @return the autoKeyConfigUrl value + */ + public String autoKeyConfigUrl() { + return this.autoKeyConfigUrl; + } + + /** + * Set azure Internal monitoring pipeline autokey associated with the certificate. + * + * @param autoKeyConfigUrl the autoKeyConfigUrl value to set + * @return the AzureInternalMonitoringPipelineSinkDescription object itself. + */ + public AzureInternalMonitoringPipelineSinkDescription withAutoKeyConfigUrl(String autoKeyConfigUrl) { + this.autoKeyConfigUrl = autoKeyConfigUrl; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/BackupInfo.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/BackupInfo.java index b555577803026..e6f66775fc71a 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/BackupInfo.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/BackupInfo.java @@ -65,7 +65,7 @@ public class BackupInfo { * Epoch of the last record in this backup. */ @JsonProperty(value = "EpochOfLastBackupRecord") - private BackupEpoch epochOfLastBackupRecord; + private Epoch epochOfLastBackupRecord; /** * LSN of the last record in this backup. @@ -79,6 +79,12 @@ public class BackupInfo { @JsonProperty(value = "CreationTimeUtc") private DateTime creationTimeUtc; + /** + * Manifest Version of the service this partition backup belongs to. + */ + @JsonProperty(value = "ServiceManifestVersion") + private String serviceManifestVersion; + /** * Denotes the failure encountered in getting backup point information. */ @@ -230,7 +236,7 @@ public BackupInfo withBackupType(BackupType backupType) { * * @return the epochOfLastBackupRecord value */ - public BackupEpoch epochOfLastBackupRecord() { + public Epoch epochOfLastBackupRecord() { return this.epochOfLastBackupRecord; } @@ -240,7 +246,7 @@ public BackupEpoch epochOfLastBackupRecord() { * @param epochOfLastBackupRecord the epochOfLastBackupRecord value to set * @return the BackupInfo object itself. */ - public BackupInfo withEpochOfLastBackupRecord(BackupEpoch epochOfLastBackupRecord) { + public BackupInfo withEpochOfLastBackupRecord(Epoch epochOfLastBackupRecord) { this.epochOfLastBackupRecord = epochOfLastBackupRecord; return this; } @@ -285,6 +291,26 @@ public BackupInfo withCreationTimeUtc(DateTime creationTimeUtc) { return this; } + /** + * Get manifest Version of the service this partition backup belongs to. + * + * @return the serviceManifestVersion value + */ + public String serviceManifestVersion() { + return this.serviceManifestVersion; + } + + /** + * Set manifest Version of the service this partition backup belongs to. + * + * @param serviceManifestVersion the serviceManifestVersion value to set + * @return the BackupInfo object itself. + */ + public BackupInfo withServiceManifestVersion(String serviceManifestVersion) { + this.serviceManifestVersion = serviceManifestVersion; + return this; + } + /** * Get denotes the failure encountered in getting backup point information. * diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/BasicRetentionPolicyDescription.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/BasicRetentionPolicyDescription.java new file mode 100644 index 0000000000000..fe1e90d1b46b7 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/BasicRetentionPolicyDescription.java @@ -0,0 +1,79 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import org.joda.time.Period; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Describes basic retention policy. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "RetentionPolicyType") +@JsonTypeName("Basic") +public class BasicRetentionPolicyDescription extends RetentionPolicyDescription { + /** + * It is the minimum duration for which a backup created, will remain + * stored in the storage and might get deleted after that span of time. It + * should be specified in ISO8601 format. + */ + @JsonProperty(value = "RetentionDuration", required = true) + private Period retentionDuration; + + /** + * It is the minimum number of backups to be retained at any point of time. + * If specified with a non zero value, backups will not be deleted even if + * the backups have gone past retention duration and have number of backups + * less than or equal to it. + */ + @JsonProperty(value = "MinimumNumberOfBackups") + private Integer minimumNumberOfBackups; + + /** + * Get it is the minimum duration for which a backup created, will remain stored in the storage and might get deleted after that span of time. It should be specified in ISO8601 format. + * + * @return the retentionDuration value + */ + public Period retentionDuration() { + return this.retentionDuration; + } + + /** + * Set it is the minimum duration for which a backup created, will remain stored in the storage and might get deleted after that span of time. It should be specified in ISO8601 format. + * + * @param retentionDuration the retentionDuration value to set + * @return the BasicRetentionPolicyDescription object itself. + */ + public BasicRetentionPolicyDescription withRetentionDuration(Period retentionDuration) { + this.retentionDuration = retentionDuration; + return this; + } + + /** + * Get it is the minimum number of backups to be retained at any point of time. If specified with a non zero value, backups will not be deleted even if the backups have gone past retention duration and have number of backups less than or equal to it. + * + * @return the minimumNumberOfBackups value + */ + public Integer minimumNumberOfBackups() { + return this.minimumNumberOfBackups; + } + + /** + * Set it is the minimum number of backups to be retained at any point of time. If specified with a non zero value, backups will not be deleted even if the backups have gone past retention duration and have number of backups less than or equal to it. + * + * @param minimumNumberOfBackups the minimumNumberOfBackups value to set + * @return the BasicRetentionPolicyDescription object itself. + */ + public BasicRetentionPolicyDescription withMinimumNumberOfBackups(Integer minimumNumberOfBackups) { + this.minimumNumberOfBackups = minimumNumberOfBackups; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosCodePackageRestartScheduledEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosCodePackageRestartScheduledEvent.java new file mode 100644 index 0000000000000..1207055c2ff7f --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosCodePackageRestartScheduledEvent.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ApplicationEventInner; + +/** + * Chaos Restart Code Package Fault Scheduled event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("ChaosCodePackageRestartScheduled") +public class ChaosCodePackageRestartScheduledEvent extends ApplicationEventInner { + /** + * Id of fault group. + */ + @JsonProperty(value = "FaultGroupId", required = true) + private UUID faultGroupId; + + /** + * Id of fault. + */ + @JsonProperty(value = "FaultId", required = true) + private UUID faultId; + + /** + * The name of a Service Fabric node. + */ + @JsonProperty(value = "NodeName", required = true) + private String nodeName; + + /** + * Service manifest name. + */ + @JsonProperty(value = "ServiceManifestName", required = true) + private String serviceManifestName; + + /** + * Code package name. + */ + @JsonProperty(value = "CodePackageName", required = true) + private String codePackageName; + + /** + * Id of Service package activation. + */ + @JsonProperty(value = "ServicePackageActivationId", required = true) + private String servicePackageActivationId; + + /** + * Get id of fault group. + * + * @return the faultGroupId value + */ + public UUID faultGroupId() { + return this.faultGroupId; + } + + /** + * Set id of fault group. + * + * @param faultGroupId the faultGroupId value to set + * @return the ChaosCodePackageRestartScheduledEvent object itself. + */ + public ChaosCodePackageRestartScheduledEvent withFaultGroupId(UUID faultGroupId) { + this.faultGroupId = faultGroupId; + return this; + } + + /** + * Get id of fault. + * + * @return the faultId value + */ + public UUID faultId() { + return this.faultId; + } + + /** + * Set id of fault. + * + * @param faultId the faultId value to set + * @return the ChaosCodePackageRestartScheduledEvent object itself. + */ + public ChaosCodePackageRestartScheduledEvent withFaultId(UUID faultId) { + this.faultId = faultId; + return this; + } + + /** + * Get the name of a Service Fabric node. + * + * @return the nodeName value + */ + public String nodeName() { + return this.nodeName; + } + + /** + * Set the name of a Service Fabric node. + * + * @param nodeName the nodeName value to set + * @return the ChaosCodePackageRestartScheduledEvent object itself. + */ + public ChaosCodePackageRestartScheduledEvent withNodeName(String nodeName) { + this.nodeName = nodeName; + return this; + } + + /** + * Get service manifest name. + * + * @return the serviceManifestName value + */ + public String serviceManifestName() { + return this.serviceManifestName; + } + + /** + * Set service manifest name. + * + * @param serviceManifestName the serviceManifestName value to set + * @return the ChaosCodePackageRestartScheduledEvent object itself. + */ + public ChaosCodePackageRestartScheduledEvent withServiceManifestName(String serviceManifestName) { + this.serviceManifestName = serviceManifestName; + return this; + } + + /** + * Get code package name. + * + * @return the codePackageName value + */ + public String codePackageName() { + return this.codePackageName; + } + + /** + * Set code package name. + * + * @param codePackageName the codePackageName value to set + * @return the ChaosCodePackageRestartScheduledEvent object itself. + */ + public ChaosCodePackageRestartScheduledEvent withCodePackageName(String codePackageName) { + this.codePackageName = codePackageName; + return this; + } + + /** + * Get id of Service package activation. + * + * @return the servicePackageActivationId value + */ + public String servicePackageActivationId() { + return this.servicePackageActivationId; + } + + /** + * Set id of Service package activation. + * + * @param servicePackageActivationId the servicePackageActivationId value to set + * @return the ChaosCodePackageRestartScheduledEvent object itself. + */ + public ChaosCodePackageRestartScheduledEvent withServicePackageActivationId(String servicePackageActivationId) { + this.servicePackageActivationId = servicePackageActivationId; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosNodeRestartScheduledEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosNodeRestartScheduledEvent.java new file mode 100644 index 0000000000000..c3d5ca6af9a51 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosNodeRestartScheduledEvent.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.NodeEventInner; + +/** + * Chaos Restart Node Fault Scheduled event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("ChaosNodeRestartScheduled") +public class ChaosNodeRestartScheduledEvent extends NodeEventInner { + /** + * Id of Node instance. + */ + @JsonProperty(value = "NodeInstanceId", required = true) + private long nodeInstanceId; + + /** + * Id of fault group. + */ + @JsonProperty(value = "FaultGroupId", required = true) + private UUID faultGroupId; + + /** + * Id of fault. + */ + @JsonProperty(value = "FaultId", required = true) + private UUID faultId; + + /** + * Get id of Node instance. + * + * @return the nodeInstanceId value + */ + public long nodeInstanceId() { + return this.nodeInstanceId; + } + + /** + * Set id of Node instance. + * + * @param nodeInstanceId the nodeInstanceId value to set + * @return the ChaosNodeRestartScheduledEvent object itself. + */ + public ChaosNodeRestartScheduledEvent withNodeInstanceId(long nodeInstanceId) { + this.nodeInstanceId = nodeInstanceId; + return this; + } + + /** + * Get id of fault group. + * + * @return the faultGroupId value + */ + public UUID faultGroupId() { + return this.faultGroupId; + } + + /** + * Set id of fault group. + * + * @param faultGroupId the faultGroupId value to set + * @return the ChaosNodeRestartScheduledEvent object itself. + */ + public ChaosNodeRestartScheduledEvent withFaultGroupId(UUID faultGroupId) { + this.faultGroupId = faultGroupId; + return this; + } + + /** + * Get id of fault. + * + * @return the faultId value + */ + public UUID faultId() { + return this.faultId; + } + + /** + * Set id of fault. + * + * @param faultId the faultId value to set + * @return the ChaosNodeRestartScheduledEvent object itself. + */ + public ChaosNodeRestartScheduledEvent withFaultId(UUID faultId) { + this.faultId = faultId; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosPartitionPrimaryMoveScheduledEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosPartitionPrimaryMoveScheduledEvent.java new file mode 100644 index 0000000000000..6898739434bf1 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosPartitionPrimaryMoveScheduledEvent.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.PartitionEventInner; + +/** + * Chaos Move Primary Fault Scheduled event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("ChaosPartitionPrimaryMoveScheduled") +public class ChaosPartitionPrimaryMoveScheduledEvent extends PartitionEventInner { + /** + * Id of fault group. + */ + @JsonProperty(value = "FaultGroupId", required = true) + private UUID faultGroupId; + + /** + * Id of fault. + */ + @JsonProperty(value = "FaultId", required = true) + private UUID faultId; + + /** + * Service name. + */ + @JsonProperty(value = "ServiceName", required = true) + private String serviceName; + + /** + * The name of a Service Fabric node. + */ + @JsonProperty(value = "NodeTo", required = true) + private String nodeTo; + + /** + * Indicates a forced move. + */ + @JsonProperty(value = "ForcedMove", required = true) + private boolean forcedMove; + + /** + * Get id of fault group. + * + * @return the faultGroupId value + */ + public UUID faultGroupId() { + return this.faultGroupId; + } + + /** + * Set id of fault group. + * + * @param faultGroupId the faultGroupId value to set + * @return the ChaosPartitionPrimaryMoveScheduledEvent object itself. + */ + public ChaosPartitionPrimaryMoveScheduledEvent withFaultGroupId(UUID faultGroupId) { + this.faultGroupId = faultGroupId; + return this; + } + + /** + * Get id of fault. + * + * @return the faultId value + */ + public UUID faultId() { + return this.faultId; + } + + /** + * Set id of fault. + * + * @param faultId the faultId value to set + * @return the ChaosPartitionPrimaryMoveScheduledEvent object itself. + */ + public ChaosPartitionPrimaryMoveScheduledEvent withFaultId(UUID faultId) { + this.faultId = faultId; + return this; + } + + /** + * Get service name. + * + * @return the serviceName value + */ + public String serviceName() { + return this.serviceName; + } + + /** + * Set service name. + * + * @param serviceName the serviceName value to set + * @return the ChaosPartitionPrimaryMoveScheduledEvent object itself. + */ + public ChaosPartitionPrimaryMoveScheduledEvent withServiceName(String serviceName) { + this.serviceName = serviceName; + return this; + } + + /** + * Get the name of a Service Fabric node. + * + * @return the nodeTo value + */ + public String nodeTo() { + return this.nodeTo; + } + + /** + * Set the name of a Service Fabric node. + * + * @param nodeTo the nodeTo value to set + * @return the ChaosPartitionPrimaryMoveScheduledEvent object itself. + */ + public ChaosPartitionPrimaryMoveScheduledEvent withNodeTo(String nodeTo) { + this.nodeTo = nodeTo; + return this; + } + + /** + * Get indicates a forced move. + * + * @return the forcedMove value + */ + public boolean forcedMove() { + return this.forcedMove; + } + + /** + * Set indicates a forced move. + * + * @param forcedMove the forcedMove value to set + * @return the ChaosPartitionPrimaryMoveScheduledEvent object itself. + */ + public ChaosPartitionPrimaryMoveScheduledEvent withForcedMove(boolean forcedMove) { + this.forcedMove = forcedMove; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosPartitionSecondaryMoveScheduledEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosPartitionSecondaryMoveScheduledEvent.java new file mode 100644 index 0000000000000..3613101e6e1d8 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosPartitionSecondaryMoveScheduledEvent.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.PartitionEventInner; + +/** + * Chaos Move Secondary Fault Scheduled event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("ChaosPartitionSecondaryMoveScheduled") +public class ChaosPartitionSecondaryMoveScheduledEvent extends PartitionEventInner { + /** + * Id of fault group. + */ + @JsonProperty(value = "FaultGroupId", required = true) + private UUID faultGroupId; + + /** + * Id of fault. + */ + @JsonProperty(value = "FaultId", required = true) + private UUID faultId; + + /** + * Service name. + */ + @JsonProperty(value = "ServiceName", required = true) + private String serviceName; + + /** + * The name of a Service Fabric node. + */ + @JsonProperty(value = "SourceNode", required = true) + private String sourceNode; + + /** + * The name of a Service Fabric node. + */ + @JsonProperty(value = "DestinationNode", required = true) + private String destinationNode; + + /** + * Indicates a forced move. + */ + @JsonProperty(value = "ForcedMove", required = true) + private boolean forcedMove; + + /** + * Get id of fault group. + * + * @return the faultGroupId value + */ + public UUID faultGroupId() { + return this.faultGroupId; + } + + /** + * Set id of fault group. + * + * @param faultGroupId the faultGroupId value to set + * @return the ChaosPartitionSecondaryMoveScheduledEvent object itself. + */ + public ChaosPartitionSecondaryMoveScheduledEvent withFaultGroupId(UUID faultGroupId) { + this.faultGroupId = faultGroupId; + return this; + } + + /** + * Get id of fault. + * + * @return the faultId value + */ + public UUID faultId() { + return this.faultId; + } + + /** + * Set id of fault. + * + * @param faultId the faultId value to set + * @return the ChaosPartitionSecondaryMoveScheduledEvent object itself. + */ + public ChaosPartitionSecondaryMoveScheduledEvent withFaultId(UUID faultId) { + this.faultId = faultId; + return this; + } + + /** + * Get service name. + * + * @return the serviceName value + */ + public String serviceName() { + return this.serviceName; + } + + /** + * Set service name. + * + * @param serviceName the serviceName value to set + * @return the ChaosPartitionSecondaryMoveScheduledEvent object itself. + */ + public ChaosPartitionSecondaryMoveScheduledEvent withServiceName(String serviceName) { + this.serviceName = serviceName; + return this; + } + + /** + * Get the name of a Service Fabric node. + * + * @return the sourceNode value + */ + public String sourceNode() { + return this.sourceNode; + } + + /** + * Set the name of a Service Fabric node. + * + * @param sourceNode the sourceNode value to set + * @return the ChaosPartitionSecondaryMoveScheduledEvent object itself. + */ + public ChaosPartitionSecondaryMoveScheduledEvent withSourceNode(String sourceNode) { + this.sourceNode = sourceNode; + return this; + } + + /** + * Get the name of a Service Fabric node. + * + * @return the destinationNode value + */ + public String destinationNode() { + return this.destinationNode; + } + + /** + * Set the name of a Service Fabric node. + * + * @param destinationNode the destinationNode value to set + * @return the ChaosPartitionSecondaryMoveScheduledEvent object itself. + */ + public ChaosPartitionSecondaryMoveScheduledEvent withDestinationNode(String destinationNode) { + this.destinationNode = destinationNode; + return this; + } + + /** + * Get indicates a forced move. + * + * @return the forcedMove value + */ + public boolean forcedMove() { + return this.forcedMove; + } + + /** + * Set indicates a forced move. + * + * @param forcedMove the forcedMove value to set + * @return the ChaosPartitionSecondaryMoveScheduledEvent object itself. + */ + public ChaosPartitionSecondaryMoveScheduledEvent withForcedMove(boolean forcedMove) { + this.forcedMove = forcedMove; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosReplicaRemovalScheduledEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosReplicaRemovalScheduledEvent.java new file mode 100644 index 0000000000000..9903b9b2e590c --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosReplicaRemovalScheduledEvent.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ReplicaEventInner; + +/** + * Chaos Remove Replica Fault Scheduled event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("ChaosReplicaRemovalScheduled") +public class ChaosReplicaRemovalScheduledEvent extends ReplicaEventInner { + /** + * Id of fault group. + */ + @JsonProperty(value = "FaultGroupId", required = true) + private UUID faultGroupId; + + /** + * Id of fault. + */ + @JsonProperty(value = "FaultId", required = true) + private UUID faultId; + + /** + * Service name. + */ + @JsonProperty(value = "ServiceUri", required = true) + private String serviceUri; + + /** + * Get id of fault group. + * + * @return the faultGroupId value + */ + public UUID faultGroupId() { + return this.faultGroupId; + } + + /** + * Set id of fault group. + * + * @param faultGroupId the faultGroupId value to set + * @return the ChaosReplicaRemovalScheduledEvent object itself. + */ + public ChaosReplicaRemovalScheduledEvent withFaultGroupId(UUID faultGroupId) { + this.faultGroupId = faultGroupId; + return this; + } + + /** + * Get id of fault. + * + * @return the faultId value + */ + public UUID faultId() { + return this.faultId; + } + + /** + * Set id of fault. + * + * @param faultId the faultId value to set + * @return the ChaosReplicaRemovalScheduledEvent object itself. + */ + public ChaosReplicaRemovalScheduledEvent withFaultId(UUID faultId) { + this.faultId = faultId; + return this; + } + + /** + * Get service name. + * + * @return the serviceUri value + */ + public String serviceUri() { + return this.serviceUri; + } + + /** + * Set service name. + * + * @param serviceUri the serviceUri value to set + * @return the ChaosReplicaRemovalScheduledEvent object itself. + */ + public ChaosReplicaRemovalScheduledEvent withServiceUri(String serviceUri) { + this.serviceUri = serviceUri; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosReplicaRestartScheduledEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosReplicaRestartScheduledEvent.java new file mode 100644 index 0000000000000..65cb4d98ad132 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ChaosReplicaRestartScheduledEvent.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ReplicaEventInner; + +/** + * Chaos Restart Replica Fault Scheduled event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("ChaosReplicaRestartScheduled") +public class ChaosReplicaRestartScheduledEvent extends ReplicaEventInner { + /** + * Id of fault group. + */ + @JsonProperty(value = "FaultGroupId", required = true) + private UUID faultGroupId; + + /** + * Id of fault. + */ + @JsonProperty(value = "FaultId", required = true) + private UUID faultId; + + /** + * Service name. + */ + @JsonProperty(value = "ServiceUri", required = true) + private String serviceUri; + + /** + * Get id of fault group. + * + * @return the faultGroupId value + */ + public UUID faultGroupId() { + return this.faultGroupId; + } + + /** + * Set id of fault group. + * + * @param faultGroupId the faultGroupId value to set + * @return the ChaosReplicaRestartScheduledEvent object itself. + */ + public ChaosReplicaRestartScheduledEvent withFaultGroupId(UUID faultGroupId) { + this.faultGroupId = faultGroupId; + return this; + } + + /** + * Get id of fault. + * + * @return the faultId value + */ + public UUID faultId() { + return this.faultId; + } + + /** + * Set id of fault. + * + * @param faultId the faultId value to set + * @return the ChaosReplicaRestartScheduledEvent object itself. + */ + public ChaosReplicaRestartScheduledEvent withFaultId(UUID faultId) { + this.faultId = faultId; + return this; + } + + /** + * Get service name. + * + * @return the serviceUri value + */ + public String serviceUri() { + return this.serviceUri; + } + + /** + * Set service name. + * + * @param serviceUri the serviceUri value to set + * @return the ChaosReplicaRestartScheduledEvent object itself. + */ + public ChaosReplicaRestartScheduledEvent withServiceUri(String serviceUri) { + this.serviceUri = serviceUri; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterConfigurationUpgradeDescription.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterConfigurationUpgradeDescription.java index 44dff11288c0d..1c83c932df832 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterConfigurationUpgradeDescription.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterConfigurationUpgradeDescription.java @@ -16,13 +16,16 @@ */ public class ClusterConfigurationUpgradeDescription { /** - * The cluster configuration. + * The cluster configuration as a JSON string. For example, [this + * file](https://github.com/Azure-Samples/service-fabric-dotnet-standalone-cluster-configuration/blob/master/Samples/ClusterConfig.Unsecure.DevCluster.json) + * contains JSON describing the [nodes and other properties of the + * cluster](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-manifest). */ @JsonProperty(value = "ClusterConfig", required = true) private String clusterConfig; /** - * The length of time between attempts to perform a health checks if the + * The length of time between attempts to perform health checks if the * application or cluster is not healthy. */ @JsonProperty(value = "HealthCheckRetryTimeout") @@ -36,7 +39,8 @@ public class ClusterConfigurationUpgradeDescription { private Period healthCheckWaitDurationInSeconds; /** - * The length of time that the application or cluster must remain healthy. + * The length of time that the application or cluster must remain healthy + * before the upgrade proceeds to the next upgrade domain. */ @JsonProperty(value = "HealthCheckStableDurationInSeconds") private Period healthCheckStableDurationInSeconds; @@ -90,7 +94,7 @@ public class ClusterConfigurationUpgradeDescription { private ApplicationHealthPolicies applicationHealthPolicies; /** - * Get the cluster configuration. + * Get the cluster configuration as a JSON string. For example, [this file](https://github.com/Azure-Samples/service-fabric-dotnet-standalone-cluster-configuration/blob/master/Samples/ClusterConfig.Unsecure.DevCluster.json) contains JSON describing the [nodes and other properties of the cluster](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-manifest). * * @return the clusterConfig value */ @@ -99,7 +103,7 @@ public String clusterConfig() { } /** - * Set the cluster configuration. + * Set the cluster configuration as a JSON string. For example, [this file](https://github.com/Azure-Samples/service-fabric-dotnet-standalone-cluster-configuration/blob/master/Samples/ClusterConfig.Unsecure.DevCluster.json) contains JSON describing the [nodes and other properties of the cluster](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-manifest). * * @param clusterConfig the clusterConfig value to set * @return the ClusterConfigurationUpgradeDescription object itself. @@ -110,7 +114,7 @@ public ClusterConfigurationUpgradeDescription withClusterConfig(String clusterCo } /** - * Get the length of time between attempts to perform a health checks if the application or cluster is not healthy. + * Get the length of time between attempts to perform health checks if the application or cluster is not healthy. * * @return the healthCheckRetryTimeout value */ @@ -119,7 +123,7 @@ public Period healthCheckRetryTimeout() { } /** - * Set the length of time between attempts to perform a health checks if the application or cluster is not healthy. + * Set the length of time between attempts to perform health checks if the application or cluster is not healthy. * * @param healthCheckRetryTimeout the healthCheckRetryTimeout value to set * @return the ClusterConfigurationUpgradeDescription object itself. @@ -150,7 +154,7 @@ public ClusterConfigurationUpgradeDescription withHealthCheckWaitDurationInSecon } /** - * Get the length of time that the application or cluster must remain healthy. + * Get the length of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. * * @return the healthCheckStableDurationInSeconds value */ @@ -159,7 +163,7 @@ public Period healthCheckStableDurationInSeconds() { } /** - * Set the length of time that the application or cluster must remain healthy. + * Set the length of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. * * @param healthCheckStableDurationInSeconds the healthCheckStableDurationInSeconds value to set * @return the ClusterConfigurationUpgradeDescription object itself. diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterNewHealthReportEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterNewHealthReportEvent.java new file mode 100644 index 0000000000000..b85dde79c03db --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterNewHealthReportEvent.java @@ -0,0 +1,231 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ClusterEventInner; + +/** + * Cluster Health Report Created event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("ClusterNewHealthReport") +public class ClusterNewHealthReportEvent extends ClusterEventInner { + /** + * Id of report source. + */ + @JsonProperty(value = "SourceId", required = true) + private String sourceId; + + /** + * Describes the property. + */ + @JsonProperty(value = "Property", required = true) + private String property; + + /** + * Describes the property health state. + */ + @JsonProperty(value = "HealthState", required = true) + private String healthState; + + /** + * Time to live in milli-seconds. + */ + @JsonProperty(value = "TimeToLiveMs", required = true) + private long timeToLiveMs; + + /** + * Sequence number of report. + */ + @JsonProperty(value = "SequenceNumber", required = true) + private long sequenceNumber; + + /** + * Description of report. + */ + @JsonProperty(value = "Description", required = true) + private String description; + + /** + * Indicates the removal when it expires. + */ + @JsonProperty(value = "RemoveWhenExpired", required = true) + private boolean removeWhenExpired; + + /** + * Source time. + */ + @JsonProperty(value = "SourceUtcTimestamp", required = true) + private DateTime sourceUtcTimestamp; + + /** + * Get id of report source. + * + * @return the sourceId value + */ + public String sourceId() { + return this.sourceId; + } + + /** + * Set id of report source. + * + * @param sourceId the sourceId value to set + * @return the ClusterNewHealthReportEvent object itself. + */ + public ClusterNewHealthReportEvent withSourceId(String sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Get describes the property. + * + * @return the property value + */ + public String property() { + return this.property; + } + + /** + * Set describes the property. + * + * @param property the property value to set + * @return the ClusterNewHealthReportEvent object itself. + */ + public ClusterNewHealthReportEvent withProperty(String property) { + this.property = property; + return this; + } + + /** + * Get describes the property health state. + * + * @return the healthState value + */ + public String healthState() { + return this.healthState; + } + + /** + * Set describes the property health state. + * + * @param healthState the healthState value to set + * @return the ClusterNewHealthReportEvent object itself. + */ + public ClusterNewHealthReportEvent withHealthState(String healthState) { + this.healthState = healthState; + return this; + } + + /** + * Get time to live in milli-seconds. + * + * @return the timeToLiveMs value + */ + public long timeToLiveMs() { + return this.timeToLiveMs; + } + + /** + * Set time to live in milli-seconds. + * + * @param timeToLiveMs the timeToLiveMs value to set + * @return the ClusterNewHealthReportEvent object itself. + */ + public ClusterNewHealthReportEvent withTimeToLiveMs(long timeToLiveMs) { + this.timeToLiveMs = timeToLiveMs; + return this; + } + + /** + * Get sequence number of report. + * + * @return the sequenceNumber value + */ + public long sequenceNumber() { + return this.sequenceNumber; + } + + /** + * Set sequence number of report. + * + * @param sequenceNumber the sequenceNumber value to set + * @return the ClusterNewHealthReportEvent object itself. + */ + public ClusterNewHealthReportEvent withSequenceNumber(long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + * Get description of report. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of report. + * + * @param description the description value to set + * @return the ClusterNewHealthReportEvent object itself. + */ + public ClusterNewHealthReportEvent withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get indicates the removal when it expires. + * + * @return the removeWhenExpired value + */ + public boolean removeWhenExpired() { + return this.removeWhenExpired; + } + + /** + * Set indicates the removal when it expires. + * + * @param removeWhenExpired the removeWhenExpired value to set + * @return the ClusterNewHealthReportEvent object itself. + */ + public ClusterNewHealthReportEvent withRemoveWhenExpired(boolean removeWhenExpired) { + this.removeWhenExpired = removeWhenExpired; + return this; + } + + /** + * Get source time. + * + * @return the sourceUtcTimestamp value + */ + public DateTime sourceUtcTimestamp() { + return this.sourceUtcTimestamp; + } + + /** + * Set source time. + * + * @param sourceUtcTimestamp the sourceUtcTimestamp value to set + * @return the ClusterNewHealthReportEvent object itself. + */ + public ClusterNewHealthReportEvent withSourceUtcTimestamp(DateTime sourceUtcTimestamp) { + this.sourceUtcTimestamp = sourceUtcTimestamp; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterUpgradeCompletedEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterUpgradeCompletedEvent.java new file mode 100644 index 0000000000000..b6a9aa0363072 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterUpgradeCompletedEvent.java @@ -0,0 +1,74 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ClusterEventInner; + +/** + * Cluster Upgrade Completed event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("ClusterUpgradeCompleted") +public class ClusterUpgradeCompletedEvent extends ClusterEventInner { + /** + * Target Cluster version. + */ + @JsonProperty(value = "TargetClusterVersion", required = true) + private String targetClusterVersion; + + /** + * Overall duration of upgrade in milli-seconds. + */ + @JsonProperty(value = "OverallUpgradeElapsedTimeInMs", required = true) + private double overallUpgradeElapsedTimeInMs; + + /** + * Get target Cluster version. + * + * @return the targetClusterVersion value + */ + public String targetClusterVersion() { + return this.targetClusterVersion; + } + + /** + * Set target Cluster version. + * + * @param targetClusterVersion the targetClusterVersion value to set + * @return the ClusterUpgradeCompletedEvent object itself. + */ + public ClusterUpgradeCompletedEvent withTargetClusterVersion(String targetClusterVersion) { + this.targetClusterVersion = targetClusterVersion; + return this; + } + + /** + * Get overall duration of upgrade in milli-seconds. + * + * @return the overallUpgradeElapsedTimeInMs value + */ + public double overallUpgradeElapsedTimeInMs() { + return this.overallUpgradeElapsedTimeInMs; + } + + /** + * Set overall duration of upgrade in milli-seconds. + * + * @param overallUpgradeElapsedTimeInMs the overallUpgradeElapsedTimeInMs value to set + * @return the ClusterUpgradeCompletedEvent object itself. + */ + public ClusterUpgradeCompletedEvent withOverallUpgradeElapsedTimeInMs(double overallUpgradeElapsedTimeInMs) { + this.overallUpgradeElapsedTimeInMs = overallUpgradeElapsedTimeInMs; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterUpgradeDomainCompletedEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterUpgradeDomainCompletedEvent.java new file mode 100644 index 0000000000000..c1397d9dad825 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterUpgradeDomainCompletedEvent.java @@ -0,0 +1,126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ClusterEventInner; + +/** + * Cluster Upgrade Domain Completed event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("ClusterUpgradeDomainCompleted") +public class ClusterUpgradeDomainCompletedEvent extends ClusterEventInner { + /** + * Target Cluster version. + */ + @JsonProperty(value = "TargetClusterVersion", required = true) + private String targetClusterVersion; + + /** + * State of upgrade. + */ + @JsonProperty(value = "UpgradeState", required = true) + private String upgradeState; + + /** + * Upgrade domains. + */ + @JsonProperty(value = "UpgradeDomains", required = true) + private String upgradeDomains; + + /** + * Duration of domain upgrade in milli-seconds. + */ + @JsonProperty(value = "UpgradeDomainElapsedTimeInMs", required = true) + private double upgradeDomainElapsedTimeInMs; + + /** + * Get target Cluster version. + * + * @return the targetClusterVersion value + */ + public String targetClusterVersion() { + return this.targetClusterVersion; + } + + /** + * Set target Cluster version. + * + * @param targetClusterVersion the targetClusterVersion value to set + * @return the ClusterUpgradeDomainCompletedEvent object itself. + */ + public ClusterUpgradeDomainCompletedEvent withTargetClusterVersion(String targetClusterVersion) { + this.targetClusterVersion = targetClusterVersion; + return this; + } + + /** + * Get state of upgrade. + * + * @return the upgradeState value + */ + public String upgradeState() { + return this.upgradeState; + } + + /** + * Set state of upgrade. + * + * @param upgradeState the upgradeState value to set + * @return the ClusterUpgradeDomainCompletedEvent object itself. + */ + public ClusterUpgradeDomainCompletedEvent withUpgradeState(String upgradeState) { + this.upgradeState = upgradeState; + return this; + } + + /** + * Get upgrade domains. + * + * @return the upgradeDomains value + */ + public String upgradeDomains() { + return this.upgradeDomains; + } + + /** + * Set upgrade domains. + * + * @param upgradeDomains the upgradeDomains value to set + * @return the ClusterUpgradeDomainCompletedEvent object itself. + */ + public ClusterUpgradeDomainCompletedEvent withUpgradeDomains(String upgradeDomains) { + this.upgradeDomains = upgradeDomains; + return this; + } + + /** + * Get duration of domain upgrade in milli-seconds. + * + * @return the upgradeDomainElapsedTimeInMs value + */ + public double upgradeDomainElapsedTimeInMs() { + return this.upgradeDomainElapsedTimeInMs; + } + + /** + * Set duration of domain upgrade in milli-seconds. + * + * @param upgradeDomainElapsedTimeInMs the upgradeDomainElapsedTimeInMs value to set + * @return the ClusterUpgradeDomainCompletedEvent object itself. + */ + public ClusterUpgradeDomainCompletedEvent withUpgradeDomainElapsedTimeInMs(double upgradeDomainElapsedTimeInMs) { + this.upgradeDomainElapsedTimeInMs = upgradeDomainElapsedTimeInMs; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterUpgradeRollbackCompletedEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterUpgradeRollbackCompletedEvent.java new file mode 100644 index 0000000000000..8ed713a4a2aa1 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterUpgradeRollbackCompletedEvent.java @@ -0,0 +1,100 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ClusterEventInner; + +/** + * Cluster Upgrade Rollback Completed event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("ClusterUpgradeRollbackCompleted") +public class ClusterUpgradeRollbackCompletedEvent extends ClusterEventInner { + /** + * Target Cluster version. + */ + @JsonProperty(value = "TargetClusterVersion", required = true) + private String targetClusterVersion; + + /** + * Describes failure. + */ + @JsonProperty(value = "FailureReason", required = true) + private String failureReason; + + /** + * Overall duration of upgrade in milli-seconds. + */ + @JsonProperty(value = "OverallUpgradeElapsedTimeInMs", required = true) + private double overallUpgradeElapsedTimeInMs; + + /** + * Get target Cluster version. + * + * @return the targetClusterVersion value + */ + public String targetClusterVersion() { + return this.targetClusterVersion; + } + + /** + * Set target Cluster version. + * + * @param targetClusterVersion the targetClusterVersion value to set + * @return the ClusterUpgradeRollbackCompletedEvent object itself. + */ + public ClusterUpgradeRollbackCompletedEvent withTargetClusterVersion(String targetClusterVersion) { + this.targetClusterVersion = targetClusterVersion; + return this; + } + + /** + * Get describes failure. + * + * @return the failureReason value + */ + public String failureReason() { + return this.failureReason; + } + + /** + * Set describes failure. + * + * @param failureReason the failureReason value to set + * @return the ClusterUpgradeRollbackCompletedEvent object itself. + */ + public ClusterUpgradeRollbackCompletedEvent withFailureReason(String failureReason) { + this.failureReason = failureReason; + return this; + } + + /** + * Get overall duration of upgrade in milli-seconds. + * + * @return the overallUpgradeElapsedTimeInMs value + */ + public double overallUpgradeElapsedTimeInMs() { + return this.overallUpgradeElapsedTimeInMs; + } + + /** + * Set overall duration of upgrade in milli-seconds. + * + * @param overallUpgradeElapsedTimeInMs the overallUpgradeElapsedTimeInMs value to set + * @return the ClusterUpgradeRollbackCompletedEvent object itself. + */ + public ClusterUpgradeRollbackCompletedEvent withOverallUpgradeElapsedTimeInMs(double overallUpgradeElapsedTimeInMs) { + this.overallUpgradeElapsedTimeInMs = overallUpgradeElapsedTimeInMs; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterUpgradeRollbackStartedEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterUpgradeRollbackStartedEvent.java new file mode 100644 index 0000000000000..be9a6c6500330 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterUpgradeRollbackStartedEvent.java @@ -0,0 +1,100 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ClusterEventInner; + +/** + * Cluster Upgrade Rollback Started event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("ClusterUpgradeRollbackStarted") +public class ClusterUpgradeRollbackStartedEvent extends ClusterEventInner { + /** + * Target Cluster version. + */ + @JsonProperty(value = "TargetClusterVersion", required = true) + private String targetClusterVersion; + + /** + * Describes failure. + */ + @JsonProperty(value = "FailureReason", required = true) + private String failureReason; + + /** + * Overall duration of upgrade in milli-seconds. + */ + @JsonProperty(value = "OverallUpgradeElapsedTimeInMs", required = true) + private double overallUpgradeElapsedTimeInMs; + + /** + * Get target Cluster version. + * + * @return the targetClusterVersion value + */ + public String targetClusterVersion() { + return this.targetClusterVersion; + } + + /** + * Set target Cluster version. + * + * @param targetClusterVersion the targetClusterVersion value to set + * @return the ClusterUpgradeRollbackStartedEvent object itself. + */ + public ClusterUpgradeRollbackStartedEvent withTargetClusterVersion(String targetClusterVersion) { + this.targetClusterVersion = targetClusterVersion; + return this; + } + + /** + * Get describes failure. + * + * @return the failureReason value + */ + public String failureReason() { + return this.failureReason; + } + + /** + * Set describes failure. + * + * @param failureReason the failureReason value to set + * @return the ClusterUpgradeRollbackStartedEvent object itself. + */ + public ClusterUpgradeRollbackStartedEvent withFailureReason(String failureReason) { + this.failureReason = failureReason; + return this; + } + + /** + * Get overall duration of upgrade in milli-seconds. + * + * @return the overallUpgradeElapsedTimeInMs value + */ + public double overallUpgradeElapsedTimeInMs() { + return this.overallUpgradeElapsedTimeInMs; + } + + /** + * Set overall duration of upgrade in milli-seconds. + * + * @param overallUpgradeElapsedTimeInMs the overallUpgradeElapsedTimeInMs value to set + * @return the ClusterUpgradeRollbackStartedEvent object itself. + */ + public ClusterUpgradeRollbackStartedEvent withOverallUpgradeElapsedTimeInMs(double overallUpgradeElapsedTimeInMs) { + this.overallUpgradeElapsedTimeInMs = overallUpgradeElapsedTimeInMs; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterUpgradeStartedEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterUpgradeStartedEvent.java new file mode 100644 index 0000000000000..daace77daa2c2 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ClusterUpgradeStartedEvent.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ClusterEventInner; + +/** + * Cluster Upgrade Started event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("ClusterUpgradeStarted") +public class ClusterUpgradeStartedEvent extends ClusterEventInner { + /** + * Current Cluster version. + */ + @JsonProperty(value = "CurrentClusterVersion", required = true) + private String currentClusterVersion; + + /** + * Target Cluster version. + */ + @JsonProperty(value = "TargetClusterVersion", required = true) + private String targetClusterVersion; + + /** + * Type of upgrade. + */ + @JsonProperty(value = "UpgradeType", required = true) + private String upgradeType; + + /** + * Mode of upgrade. + */ + @JsonProperty(value = "RollingUpgradeMode", required = true) + private String rollingUpgradeMode; + + /** + * Action if failed. + */ + @JsonProperty(value = "FailureAction", required = true) + private String failureAction; + + /** + * Get current Cluster version. + * + * @return the currentClusterVersion value + */ + public String currentClusterVersion() { + return this.currentClusterVersion; + } + + /** + * Set current Cluster version. + * + * @param currentClusterVersion the currentClusterVersion value to set + * @return the ClusterUpgradeStartedEvent object itself. + */ + public ClusterUpgradeStartedEvent withCurrentClusterVersion(String currentClusterVersion) { + this.currentClusterVersion = currentClusterVersion; + return this; + } + + /** + * Get target Cluster version. + * + * @return the targetClusterVersion value + */ + public String targetClusterVersion() { + return this.targetClusterVersion; + } + + /** + * Set target Cluster version. + * + * @param targetClusterVersion the targetClusterVersion value to set + * @return the ClusterUpgradeStartedEvent object itself. + */ + public ClusterUpgradeStartedEvent withTargetClusterVersion(String targetClusterVersion) { + this.targetClusterVersion = targetClusterVersion; + return this; + } + + /** + * Get type of upgrade. + * + * @return the upgradeType value + */ + public String upgradeType() { + return this.upgradeType; + } + + /** + * Set type of upgrade. + * + * @param upgradeType the upgradeType value to set + * @return the ClusterUpgradeStartedEvent object itself. + */ + public ClusterUpgradeStartedEvent withUpgradeType(String upgradeType) { + this.upgradeType = upgradeType; + return this; + } + + /** + * Get mode of upgrade. + * + * @return the rollingUpgradeMode value + */ + public String rollingUpgradeMode() { + return this.rollingUpgradeMode; + } + + /** + * Set mode of upgrade. + * + * @param rollingUpgradeMode the rollingUpgradeMode value to set + * @return the ClusterUpgradeStartedEvent object itself. + */ + public ClusterUpgradeStartedEvent withRollingUpgradeMode(String rollingUpgradeMode) { + this.rollingUpgradeMode = rollingUpgradeMode; + return this; + } + + /** + * Get action if failed. + * + * @return the failureAction value + */ + public String failureAction() { + return this.failureAction; + } + + /** + * Set action if failed. + * + * @param failureAction the failureAction value to set + * @return the ClusterUpgradeStartedEvent object itself. + */ + public ClusterUpgradeStartedEvent withFailureAction(String failureAction) { + this.failureAction = failureAction; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ContainerCodePackageProperties.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ContainerCodePackageProperties.java index 9030324328116..a9c01150e0c83 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ContainerCodePackageProperties.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ContainerCodePackageProperties.java @@ -73,23 +73,24 @@ public class ContainerCodePackageProperties { private List endpoints; /** - * This type describes the resource requirements for a container or a - * service. + * The resources required by this container. */ @JsonProperty(value = "resources", required = true) private ResourceRequirements resources; /** - * The volumes to be attached to the container. + * Volumes to be attached to the container. The lifetime of these volumes + * is independent of the application's lifetime. */ @JsonProperty(value = "volumeRefs") - private List volumeRefs; + private List volumeRefs; /** - * Runtime information of a container instance. + * Volumes to be attached to the container. The lifetime of these volumes + * is scoped to the application's lifetime. */ - @JsonProperty(value = "instanceView", access = JsonProperty.Access.WRITE_ONLY) - private ContainerInstanceView instanceView; + @JsonProperty(value = "volumes") + private List volumes; /** * Reference to sinks in DiagnosticsDescription. @@ -97,6 +98,19 @@ public class ContainerCodePackageProperties { @JsonProperty(value = "diagnostics") private DiagnosticsRef diagnostics; + /** + * A list of ReliableCollection resources used by this particular code + * package. Please refer to ReliablecollectionsRef for more details. + */ + @JsonProperty(value = "reliableCollectionsRefs") + private List reliableCollectionsRefs; + + /** + * Runtime information of a container instance. + */ + @JsonProperty(value = "instanceView", access = JsonProperty.Access.WRITE_ONLY) + private ContainerInstanceView instanceView; + /** * Get the name of the code package. * @@ -278,7 +292,7 @@ public ContainerCodePackageProperties withEndpoints(List end } /** - * Get this type describes the resource requirements for a container or a service. + * Get the resources required by this container. * * @return the resources value */ @@ -287,7 +301,7 @@ public ResourceRequirements resources() { } /** - * Set this type describes the resource requirements for a container or a service. + * Set the resources required by this container. * * @param resources the resources value to set * @return the ContainerCodePackageProperties object itself. @@ -298,32 +312,43 @@ public ContainerCodePackageProperties withResources(ResourceRequirements resourc } /** - * Get the volumes to be attached to the container. + * Get volumes to be attached to the container. The lifetime of these volumes is independent of the application's lifetime. * * @return the volumeRefs value */ - public List volumeRefs() { + public List volumeRefs() { return this.volumeRefs; } /** - * Set the volumes to be attached to the container. + * Set volumes to be attached to the container. The lifetime of these volumes is independent of the application's lifetime. * * @param volumeRefs the volumeRefs value to set * @return the ContainerCodePackageProperties object itself. */ - public ContainerCodePackageProperties withVolumeRefs(List volumeRefs) { + public ContainerCodePackageProperties withVolumeRefs(List volumeRefs) { this.volumeRefs = volumeRefs; return this; } /** - * Get runtime information of a container instance. + * Get volumes to be attached to the container. The lifetime of these volumes is scoped to the application's lifetime. * - * @return the instanceView value + * @return the volumes value */ - public ContainerInstanceView instanceView() { - return this.instanceView; + public List volumes() { + return this.volumes; + } + + /** + * Set volumes to be attached to the container. The lifetime of these volumes is scoped to the application's lifetime. + * + * @param volumes the volumes value to set + * @return the ContainerCodePackageProperties object itself. + */ + public ContainerCodePackageProperties withVolumes(List volumes) { + this.volumes = volumes; + return this; } /** @@ -346,4 +371,33 @@ public ContainerCodePackageProperties withDiagnostics(DiagnosticsRef diagnostics return this; } + /** + * Get a list of ReliableCollection resources used by this particular code package. Please refer to ReliablecollectionsRef for more details. + * + * @return the reliableCollectionsRefs value + */ + public List reliableCollectionsRefs() { + return this.reliableCollectionsRefs; + } + + /** + * Set a list of ReliableCollection resources used by this particular code package. Please refer to ReliablecollectionsRef for more details. + * + * @param reliableCollectionsRefs the reliableCollectionsRefs value to set + * @return the ContainerCodePackageProperties object itself. + */ + public ContainerCodePackageProperties withReliableCollectionsRefs(List reliableCollectionsRefs) { + this.reliableCollectionsRefs = reliableCollectionsRefs; + return this; + } + + /** + * Get runtime information of a container instance. + * + * @return the instanceView value + */ + public ContainerInstanceView instanceView() { + return this.instanceView; + } + } diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/DeployedApplicationNewHealthReportEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/DeployedApplicationNewHealthReportEvent.java new file mode 100644 index 0000000000000..1833fa431a0bd --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/DeployedApplicationNewHealthReportEvent.java @@ -0,0 +1,283 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ApplicationEventInner; + +/** + * Deployed Application Health Report Created event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("DeployedApplicationNewHealthReport") +public class DeployedApplicationNewHealthReportEvent extends ApplicationEventInner { + /** + * Id of Application instance. + */ + @JsonProperty(value = "ApplicationInstanceId", required = true) + private long applicationInstanceId; + + /** + * The name of a Service Fabric node. + */ + @JsonProperty(value = "NodeName", required = true) + private String nodeName; + + /** + * Id of report source. + */ + @JsonProperty(value = "SourceId", required = true) + private String sourceId; + + /** + * Describes the property. + */ + @JsonProperty(value = "Property", required = true) + private String property; + + /** + * Describes the property health state. + */ + @JsonProperty(value = "HealthState", required = true) + private String healthState; + + /** + * Time to live in milli-seconds. + */ + @JsonProperty(value = "TimeToLiveMs", required = true) + private long timeToLiveMs; + + /** + * Sequence number of report. + */ + @JsonProperty(value = "SequenceNumber", required = true) + private long sequenceNumber; + + /** + * Description of report. + */ + @JsonProperty(value = "Description", required = true) + private String description; + + /** + * Indicates the removal when it expires. + */ + @JsonProperty(value = "RemoveWhenExpired", required = true) + private boolean removeWhenExpired; + + /** + * Source time. + */ + @JsonProperty(value = "SourceUtcTimestamp", required = true) + private DateTime sourceUtcTimestamp; + + /** + * Get id of Application instance. + * + * @return the applicationInstanceId value + */ + public long applicationInstanceId() { + return this.applicationInstanceId; + } + + /** + * Set id of Application instance. + * + * @param applicationInstanceId the applicationInstanceId value to set + * @return the DeployedApplicationNewHealthReportEvent object itself. + */ + public DeployedApplicationNewHealthReportEvent withApplicationInstanceId(long applicationInstanceId) { + this.applicationInstanceId = applicationInstanceId; + return this; + } + + /** + * Get the name of a Service Fabric node. + * + * @return the nodeName value + */ + public String nodeName() { + return this.nodeName; + } + + /** + * Set the name of a Service Fabric node. + * + * @param nodeName the nodeName value to set + * @return the DeployedApplicationNewHealthReportEvent object itself. + */ + public DeployedApplicationNewHealthReportEvent withNodeName(String nodeName) { + this.nodeName = nodeName; + return this; + } + + /** + * Get id of report source. + * + * @return the sourceId value + */ + public String sourceId() { + return this.sourceId; + } + + /** + * Set id of report source. + * + * @param sourceId the sourceId value to set + * @return the DeployedApplicationNewHealthReportEvent object itself. + */ + public DeployedApplicationNewHealthReportEvent withSourceId(String sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Get describes the property. + * + * @return the property value + */ + public String property() { + return this.property; + } + + /** + * Set describes the property. + * + * @param property the property value to set + * @return the DeployedApplicationNewHealthReportEvent object itself. + */ + public DeployedApplicationNewHealthReportEvent withProperty(String property) { + this.property = property; + return this; + } + + /** + * Get describes the property health state. + * + * @return the healthState value + */ + public String healthState() { + return this.healthState; + } + + /** + * Set describes the property health state. + * + * @param healthState the healthState value to set + * @return the DeployedApplicationNewHealthReportEvent object itself. + */ + public DeployedApplicationNewHealthReportEvent withHealthState(String healthState) { + this.healthState = healthState; + return this; + } + + /** + * Get time to live in milli-seconds. + * + * @return the timeToLiveMs value + */ + public long timeToLiveMs() { + return this.timeToLiveMs; + } + + /** + * Set time to live in milli-seconds. + * + * @param timeToLiveMs the timeToLiveMs value to set + * @return the DeployedApplicationNewHealthReportEvent object itself. + */ + public DeployedApplicationNewHealthReportEvent withTimeToLiveMs(long timeToLiveMs) { + this.timeToLiveMs = timeToLiveMs; + return this; + } + + /** + * Get sequence number of report. + * + * @return the sequenceNumber value + */ + public long sequenceNumber() { + return this.sequenceNumber; + } + + /** + * Set sequence number of report. + * + * @param sequenceNumber the sequenceNumber value to set + * @return the DeployedApplicationNewHealthReportEvent object itself. + */ + public DeployedApplicationNewHealthReportEvent withSequenceNumber(long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + * Get description of report. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of report. + * + * @param description the description value to set + * @return the DeployedApplicationNewHealthReportEvent object itself. + */ + public DeployedApplicationNewHealthReportEvent withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get indicates the removal when it expires. + * + * @return the removeWhenExpired value + */ + public boolean removeWhenExpired() { + return this.removeWhenExpired; + } + + /** + * Set indicates the removal when it expires. + * + * @param removeWhenExpired the removeWhenExpired value to set + * @return the DeployedApplicationNewHealthReportEvent object itself. + */ + public DeployedApplicationNewHealthReportEvent withRemoveWhenExpired(boolean removeWhenExpired) { + this.removeWhenExpired = removeWhenExpired; + return this; + } + + /** + * Get source time. + * + * @return the sourceUtcTimestamp value + */ + public DateTime sourceUtcTimestamp() { + return this.sourceUtcTimestamp; + } + + /** + * Set source time. + * + * @param sourceUtcTimestamp the sourceUtcTimestamp value to set + * @return the DeployedApplicationNewHealthReportEvent object itself. + */ + public DeployedApplicationNewHealthReportEvent withSourceUtcTimestamp(DateTime sourceUtcTimestamp) { + this.sourceUtcTimestamp = sourceUtcTimestamp; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/DeployedServicePackageHealthReportExpiredEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/DeployedServicePackageHealthReportExpiredEvent.java new file mode 100644 index 0000000000000..06c7e3ed6351d --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/DeployedServicePackageHealthReportExpiredEvent.java @@ -0,0 +1,335 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ApplicationEventInner; + +/** + * Deployed Service Health Report Expired event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("DeployedServicePackageHealthReportExpired") +public class DeployedServicePackageHealthReportExpiredEvent extends ApplicationEventInner { + /** + * Service manifest name. + */ + @JsonProperty(value = "ServiceManifest", required = true) + private String serviceManifest; + + /** + * Id of Service package instance. + */ + @JsonProperty(value = "ServicePackageInstanceId", required = true) + private long servicePackageInstanceId; + + /** + * Id of Service package activation. + */ + @JsonProperty(value = "ServicePackageActivationId", required = true) + private String servicePackageActivationId; + + /** + * The name of a Service Fabric node. + */ + @JsonProperty(value = "NodeName", required = true) + private String nodeName; + + /** + * Id of report source. + */ + @JsonProperty(value = "SourceId", required = true) + private String sourceId; + + /** + * Describes the property. + */ + @JsonProperty(value = "Property", required = true) + private String property; + + /** + * Describes the property health state. + */ + @JsonProperty(value = "HealthState", required = true) + private String healthState; + + /** + * Time to live in milli-seconds. + */ + @JsonProperty(value = "TimeToLiveMs", required = true) + private long timeToLiveMs; + + /** + * Sequence number of report. + */ + @JsonProperty(value = "SequenceNumber", required = true) + private long sequenceNumber; + + /** + * Description of report. + */ + @JsonProperty(value = "Description", required = true) + private String description; + + /** + * Indicates the removal when it expires. + */ + @JsonProperty(value = "RemoveWhenExpired", required = true) + private boolean removeWhenExpired; + + /** + * Source time. + */ + @JsonProperty(value = "SourceUtcTimestamp", required = true) + private DateTime sourceUtcTimestamp; + + /** + * Get service manifest name. + * + * @return the serviceManifest value + */ + public String serviceManifest() { + return this.serviceManifest; + } + + /** + * Set service manifest name. + * + * @param serviceManifest the serviceManifest value to set + * @return the DeployedServicePackageHealthReportExpiredEvent object itself. + */ + public DeployedServicePackageHealthReportExpiredEvent withServiceManifest(String serviceManifest) { + this.serviceManifest = serviceManifest; + return this; + } + + /** + * Get id of Service package instance. + * + * @return the servicePackageInstanceId value + */ + public long servicePackageInstanceId() { + return this.servicePackageInstanceId; + } + + /** + * Set id of Service package instance. + * + * @param servicePackageInstanceId the servicePackageInstanceId value to set + * @return the DeployedServicePackageHealthReportExpiredEvent object itself. + */ + public DeployedServicePackageHealthReportExpiredEvent withServicePackageInstanceId(long servicePackageInstanceId) { + this.servicePackageInstanceId = servicePackageInstanceId; + return this; + } + + /** + * Get id of Service package activation. + * + * @return the servicePackageActivationId value + */ + public String servicePackageActivationId() { + return this.servicePackageActivationId; + } + + /** + * Set id of Service package activation. + * + * @param servicePackageActivationId the servicePackageActivationId value to set + * @return the DeployedServicePackageHealthReportExpiredEvent object itself. + */ + public DeployedServicePackageHealthReportExpiredEvent withServicePackageActivationId(String servicePackageActivationId) { + this.servicePackageActivationId = servicePackageActivationId; + return this; + } + + /** + * Get the name of a Service Fabric node. + * + * @return the nodeName value + */ + public String nodeName() { + return this.nodeName; + } + + /** + * Set the name of a Service Fabric node. + * + * @param nodeName the nodeName value to set + * @return the DeployedServicePackageHealthReportExpiredEvent object itself. + */ + public DeployedServicePackageHealthReportExpiredEvent withNodeName(String nodeName) { + this.nodeName = nodeName; + return this; + } + + /** + * Get id of report source. + * + * @return the sourceId value + */ + public String sourceId() { + return this.sourceId; + } + + /** + * Set id of report source. + * + * @param sourceId the sourceId value to set + * @return the DeployedServicePackageHealthReportExpiredEvent object itself. + */ + public DeployedServicePackageHealthReportExpiredEvent withSourceId(String sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Get describes the property. + * + * @return the property value + */ + public String property() { + return this.property; + } + + /** + * Set describes the property. + * + * @param property the property value to set + * @return the DeployedServicePackageHealthReportExpiredEvent object itself. + */ + public DeployedServicePackageHealthReportExpiredEvent withProperty(String property) { + this.property = property; + return this; + } + + /** + * Get describes the property health state. + * + * @return the healthState value + */ + public String healthState() { + return this.healthState; + } + + /** + * Set describes the property health state. + * + * @param healthState the healthState value to set + * @return the DeployedServicePackageHealthReportExpiredEvent object itself. + */ + public DeployedServicePackageHealthReportExpiredEvent withHealthState(String healthState) { + this.healthState = healthState; + return this; + } + + /** + * Get time to live in milli-seconds. + * + * @return the timeToLiveMs value + */ + public long timeToLiveMs() { + return this.timeToLiveMs; + } + + /** + * Set time to live in milli-seconds. + * + * @param timeToLiveMs the timeToLiveMs value to set + * @return the DeployedServicePackageHealthReportExpiredEvent object itself. + */ + public DeployedServicePackageHealthReportExpiredEvent withTimeToLiveMs(long timeToLiveMs) { + this.timeToLiveMs = timeToLiveMs; + return this; + } + + /** + * Get sequence number of report. + * + * @return the sequenceNumber value + */ + public long sequenceNumber() { + return this.sequenceNumber; + } + + /** + * Set sequence number of report. + * + * @param sequenceNumber the sequenceNumber value to set + * @return the DeployedServicePackageHealthReportExpiredEvent object itself. + */ + public DeployedServicePackageHealthReportExpiredEvent withSequenceNumber(long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + * Get description of report. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of report. + * + * @param description the description value to set + * @return the DeployedServicePackageHealthReportExpiredEvent object itself. + */ + public DeployedServicePackageHealthReportExpiredEvent withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get indicates the removal when it expires. + * + * @return the removeWhenExpired value + */ + public boolean removeWhenExpired() { + return this.removeWhenExpired; + } + + /** + * Set indicates the removal when it expires. + * + * @param removeWhenExpired the removeWhenExpired value to set + * @return the DeployedServicePackageHealthReportExpiredEvent object itself. + */ + public DeployedServicePackageHealthReportExpiredEvent withRemoveWhenExpired(boolean removeWhenExpired) { + this.removeWhenExpired = removeWhenExpired; + return this; + } + + /** + * Get source time. + * + * @return the sourceUtcTimestamp value + */ + public DateTime sourceUtcTimestamp() { + return this.sourceUtcTimestamp; + } + + /** + * Set source time. + * + * @param sourceUtcTimestamp the sourceUtcTimestamp value to set + * @return the DeployedServicePackageHealthReportExpiredEvent object itself. + */ + public DeployedServicePackageHealthReportExpiredEvent withSourceUtcTimestamp(DateTime sourceUtcTimestamp) { + this.sourceUtcTimestamp = sourceUtcTimestamp; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/DeployedServicePackageNewHealthReportEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/DeployedServicePackageNewHealthReportEvent.java new file mode 100644 index 0000000000000..8bf7038556783 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/DeployedServicePackageNewHealthReportEvent.java @@ -0,0 +1,335 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ApplicationEventInner; + +/** + * Deployed Service Health Report Created event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("DeployedServicePackageNewHealthReport") +public class DeployedServicePackageNewHealthReportEvent extends ApplicationEventInner { + /** + * Service manifest name. + */ + @JsonProperty(value = "ServiceManifestName", required = true) + private String serviceManifestName; + + /** + * Id of Service package instance. + */ + @JsonProperty(value = "ServicePackageInstanceId", required = true) + private long servicePackageInstanceId; + + /** + * Id of Service package activation. + */ + @JsonProperty(value = "ServicePackageActivationId", required = true) + private String servicePackageActivationId; + + /** + * The name of a Service Fabric node. + */ + @JsonProperty(value = "NodeName", required = true) + private String nodeName; + + /** + * Id of report source. + */ + @JsonProperty(value = "SourceId", required = true) + private String sourceId; + + /** + * Describes the property. + */ + @JsonProperty(value = "Property", required = true) + private String property; + + /** + * Describes the property health state. + */ + @JsonProperty(value = "HealthState", required = true) + private String healthState; + + /** + * Time to live in milli-seconds. + */ + @JsonProperty(value = "TimeToLiveMs", required = true) + private long timeToLiveMs; + + /** + * Sequence number of report. + */ + @JsonProperty(value = "SequenceNumber", required = true) + private long sequenceNumber; + + /** + * Description of report. + */ + @JsonProperty(value = "Description", required = true) + private String description; + + /** + * Indicates the removal when it expires. + */ + @JsonProperty(value = "RemoveWhenExpired", required = true) + private boolean removeWhenExpired; + + /** + * Source time. + */ + @JsonProperty(value = "SourceUtcTimestamp", required = true) + private DateTime sourceUtcTimestamp; + + /** + * Get service manifest name. + * + * @return the serviceManifestName value + */ + public String serviceManifestName() { + return this.serviceManifestName; + } + + /** + * Set service manifest name. + * + * @param serviceManifestName the serviceManifestName value to set + * @return the DeployedServicePackageNewHealthReportEvent object itself. + */ + public DeployedServicePackageNewHealthReportEvent withServiceManifestName(String serviceManifestName) { + this.serviceManifestName = serviceManifestName; + return this; + } + + /** + * Get id of Service package instance. + * + * @return the servicePackageInstanceId value + */ + public long servicePackageInstanceId() { + return this.servicePackageInstanceId; + } + + /** + * Set id of Service package instance. + * + * @param servicePackageInstanceId the servicePackageInstanceId value to set + * @return the DeployedServicePackageNewHealthReportEvent object itself. + */ + public DeployedServicePackageNewHealthReportEvent withServicePackageInstanceId(long servicePackageInstanceId) { + this.servicePackageInstanceId = servicePackageInstanceId; + return this; + } + + /** + * Get id of Service package activation. + * + * @return the servicePackageActivationId value + */ + public String servicePackageActivationId() { + return this.servicePackageActivationId; + } + + /** + * Set id of Service package activation. + * + * @param servicePackageActivationId the servicePackageActivationId value to set + * @return the DeployedServicePackageNewHealthReportEvent object itself. + */ + public DeployedServicePackageNewHealthReportEvent withServicePackageActivationId(String servicePackageActivationId) { + this.servicePackageActivationId = servicePackageActivationId; + return this; + } + + /** + * Get the name of a Service Fabric node. + * + * @return the nodeName value + */ + public String nodeName() { + return this.nodeName; + } + + /** + * Set the name of a Service Fabric node. + * + * @param nodeName the nodeName value to set + * @return the DeployedServicePackageNewHealthReportEvent object itself. + */ + public DeployedServicePackageNewHealthReportEvent withNodeName(String nodeName) { + this.nodeName = nodeName; + return this; + } + + /** + * Get id of report source. + * + * @return the sourceId value + */ + public String sourceId() { + return this.sourceId; + } + + /** + * Set id of report source. + * + * @param sourceId the sourceId value to set + * @return the DeployedServicePackageNewHealthReportEvent object itself. + */ + public DeployedServicePackageNewHealthReportEvent withSourceId(String sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Get describes the property. + * + * @return the property value + */ + public String property() { + return this.property; + } + + /** + * Set describes the property. + * + * @param property the property value to set + * @return the DeployedServicePackageNewHealthReportEvent object itself. + */ + public DeployedServicePackageNewHealthReportEvent withProperty(String property) { + this.property = property; + return this; + } + + /** + * Get describes the property health state. + * + * @return the healthState value + */ + public String healthState() { + return this.healthState; + } + + /** + * Set describes the property health state. + * + * @param healthState the healthState value to set + * @return the DeployedServicePackageNewHealthReportEvent object itself. + */ + public DeployedServicePackageNewHealthReportEvent withHealthState(String healthState) { + this.healthState = healthState; + return this; + } + + /** + * Get time to live in milli-seconds. + * + * @return the timeToLiveMs value + */ + public long timeToLiveMs() { + return this.timeToLiveMs; + } + + /** + * Set time to live in milli-seconds. + * + * @param timeToLiveMs the timeToLiveMs value to set + * @return the DeployedServicePackageNewHealthReportEvent object itself. + */ + public DeployedServicePackageNewHealthReportEvent withTimeToLiveMs(long timeToLiveMs) { + this.timeToLiveMs = timeToLiveMs; + return this; + } + + /** + * Get sequence number of report. + * + * @return the sequenceNumber value + */ + public long sequenceNumber() { + return this.sequenceNumber; + } + + /** + * Set sequence number of report. + * + * @param sequenceNumber the sequenceNumber value to set + * @return the DeployedServicePackageNewHealthReportEvent object itself. + */ + public DeployedServicePackageNewHealthReportEvent withSequenceNumber(long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + * Get description of report. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of report. + * + * @param description the description value to set + * @return the DeployedServicePackageNewHealthReportEvent object itself. + */ + public DeployedServicePackageNewHealthReportEvent withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get indicates the removal when it expires. + * + * @return the removeWhenExpired value + */ + public boolean removeWhenExpired() { + return this.removeWhenExpired; + } + + /** + * Set indicates the removal when it expires. + * + * @param removeWhenExpired the removeWhenExpired value to set + * @return the DeployedServicePackageNewHealthReportEvent object itself. + */ + public DeployedServicePackageNewHealthReportEvent withRemoveWhenExpired(boolean removeWhenExpired) { + this.removeWhenExpired = removeWhenExpired; + return this; + } + + /** + * Get source time. + * + * @return the sourceUtcTimestamp value + */ + public DateTime sourceUtcTimestamp() { + return this.sourceUtcTimestamp; + } + + /** + * Set source time. + * + * @param sourceUtcTimestamp the sourceUtcTimestamp value to set + * @return the DeployedServicePackageNewHealthReportEvent object itself. + */ + public DeployedServicePackageNewHealthReportEvent withSourceUtcTimestamp(DateTime sourceUtcTimestamp) { + this.sourceUtcTimestamp = sourceUtcTimestamp; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/DiagnosticsSinkProperties.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/DiagnosticsSinkProperties.java index 7770c6ac40345..a0f84455f5518 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/DiagnosticsSinkProperties.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/DiagnosticsSinkProperties.java @@ -11,12 +11,16 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; /** * Properties of a DiagnosticsSink. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("DiagnosticsSinkProperties") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AzureInternalMonitoringPipeline", value = AzureInternalMonitoringPipelineSinkDescription.class) +}) public class DiagnosticsSinkProperties { /** * Name of the sink. This value is referenced by diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/DisableBackupDescription.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/DisableBackupDescription.java new file mode 100644 index 0000000000000..b10c496755025 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/DisableBackupDescription.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * It describes the body parameters while disabling backup of a backup + * entity(Application/Service/Partition). + */ +public class DisableBackupDescription { + /** + * Boolean flag to delete backups. It can be set to true for deleting all + * the backups which were created for the backup entity that is getting + * disabled for backup. + */ + @JsonProperty(value = "CleanBackup", required = true) + private boolean cleanBackup; + + /** + * Get boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. + * + * @return the cleanBackup value + */ + public boolean cleanBackup() { + return this.cleanBackup; + } + + /** + * Set boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. + * + * @param cleanBackup the cleanBackup value to set + * @return the DisableBackupDescription object itself. + */ + public DisableBackupDescription withCleanBackup(boolean cleanBackup) { + this.cleanBackup = cleanBackup; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/EndpointRef.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/EndpointRef.java new file mode 100644 index 0000000000000..596c26e975439 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/EndpointRef.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes a reference to a service endpoint. + */ +public class EndpointRef { + /** + * Name of the endpoint. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Get name of the endpoint. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the endpoint. + * + * @param name the name value to set + * @return the EndpointRef object itself. + */ + public EndpointRef withName(String name) { + this.name = name; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/FabricErrorCodes.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/FabricErrorCodes.java index 533453189cb6e..1ddcc42f084dd 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/FabricErrorCodes.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/FabricErrorCodes.java @@ -265,6 +265,9 @@ public final class FabricErrorCodes extends ExpandableStringEnum /** Static value ApplicationDeleted for FabricEventKind. */ public static final FabricEventKind APPLICATION_DELETED = fromString("ApplicationDeleted"); - /** Static value ApplicationHealthReportCreated for FabricEventKind. */ - public static final FabricEventKind APPLICATION_HEALTH_REPORT_CREATED = fromString("ApplicationHealthReportCreated"); + /** Static value ApplicationNewHealthReport for FabricEventKind. */ + public static final FabricEventKind APPLICATION_NEW_HEALTH_REPORT = fromString("ApplicationNewHealthReport"); /** Static value ApplicationHealthReportExpired for FabricEventKind. */ public static final FabricEventKind APPLICATION_HEALTH_REPORT_EXPIRED = fromString("ApplicationHealthReportExpired"); - /** Static value ApplicationUpgradeComplete for FabricEventKind. */ - public static final FabricEventKind APPLICATION_UPGRADE_COMPLETE = fromString("ApplicationUpgradeComplete"); + /** Static value ApplicationUpgradeCompleted for FabricEventKind. */ + public static final FabricEventKind APPLICATION_UPGRADE_COMPLETED = fromString("ApplicationUpgradeCompleted"); - /** Static value ApplicationUpgradeDomainComplete for FabricEventKind. */ - public static final FabricEventKind APPLICATION_UPGRADE_DOMAIN_COMPLETE = fromString("ApplicationUpgradeDomainComplete"); + /** Static value ApplicationUpgradeDomainCompleted for FabricEventKind. */ + public static final FabricEventKind APPLICATION_UPGRADE_DOMAIN_COMPLETED = fromString("ApplicationUpgradeDomainCompleted"); - /** Static value ApplicationUpgradeRollbackComplete for FabricEventKind. */ - public static final FabricEventKind APPLICATION_UPGRADE_ROLLBACK_COMPLETE = fromString("ApplicationUpgradeRollbackComplete"); + /** Static value ApplicationUpgradeRollbackCompleted for FabricEventKind. */ + public static final FabricEventKind APPLICATION_UPGRADE_ROLLBACK_COMPLETED = fromString("ApplicationUpgradeRollbackCompleted"); - /** Static value ApplicationUpgradeRollbackStart for FabricEventKind. */ - public static final FabricEventKind APPLICATION_UPGRADE_ROLLBACK_START = fromString("ApplicationUpgradeRollbackStart"); + /** Static value ApplicationUpgradeRollbackStarted for FabricEventKind. */ + public static final FabricEventKind APPLICATION_UPGRADE_ROLLBACK_STARTED = fromString("ApplicationUpgradeRollbackStarted"); - /** Static value ApplicationUpgradeStart for FabricEventKind. */ - public static final FabricEventKind APPLICATION_UPGRADE_START = fromString("ApplicationUpgradeStart"); + /** Static value ApplicationUpgradeStarted for FabricEventKind. */ + public static final FabricEventKind APPLICATION_UPGRADE_STARTED = fromString("ApplicationUpgradeStarted"); - /** Static value DeployedApplicationHealthReportCreated for FabricEventKind. */ - public static final FabricEventKind DEPLOYED_APPLICATION_HEALTH_REPORT_CREATED = fromString("DeployedApplicationHealthReportCreated"); + /** Static value DeployedApplicationNewHealthReport for FabricEventKind. */ + public static final FabricEventKind DEPLOYED_APPLICATION_NEW_HEALTH_REPORT = fromString("DeployedApplicationNewHealthReport"); /** Static value DeployedApplicationHealthReportExpired for FabricEventKind. */ public static final FabricEventKind DEPLOYED_APPLICATION_HEALTH_REPORT_EXPIRED = fromString("DeployedApplicationHealthReportExpired"); - /** Static value ProcessDeactivated for FabricEventKind. */ - public static final FabricEventKind PROCESS_DEACTIVATED = fromString("ProcessDeactivated"); + /** Static value ApplicationProcessExited for FabricEventKind. */ + public static final FabricEventKind APPLICATION_PROCESS_EXITED = fromString("ApplicationProcessExited"); - /** Static value ContainerDeactivated for FabricEventKind. */ - public static final FabricEventKind CONTAINER_DEACTIVATED = fromString("ContainerDeactivated"); + /** Static value ApplicationContainerInstanceExited for FabricEventKind. */ + public static final FabricEventKind APPLICATION_CONTAINER_INSTANCE_EXITED = fromString("ApplicationContainerInstanceExited"); /** Static value NodeAborted for FabricEventKind. */ public static final FabricEventKind NODE_ABORTED = fromString("NodeAborted"); - /** Static value NodeAborting for FabricEventKind. */ - public static final FabricEventKind NODE_ABORTING = fromString("NodeAborting"); + /** Static value NodeAddedToCluster for FabricEventKind. */ + public static final FabricEventKind NODE_ADDED_TO_CLUSTER = fromString("NodeAddedToCluster"); - /** Static value NodeAdded for FabricEventKind. */ - public static final FabricEventKind NODE_ADDED = fromString("NodeAdded"); + /** Static value NodeClosed for FabricEventKind. */ + public static final FabricEventKind NODE_CLOSED = fromString("NodeClosed"); - /** Static value NodeClose for FabricEventKind. */ - public static final FabricEventKind NODE_CLOSE = fromString("NodeClose"); + /** Static value NodeDeactivateCompleted for FabricEventKind. */ + public static final FabricEventKind NODE_DEACTIVATE_COMPLETED = fromString("NodeDeactivateCompleted"); - /** Static value NodeClosing for FabricEventKind. */ - public static final FabricEventKind NODE_CLOSING = fromString("NodeClosing"); - - /** Static value NodeDeactivateComplete for FabricEventKind. */ - public static final FabricEventKind NODE_DEACTIVATE_COMPLETE = fromString("NodeDeactivateComplete"); - - /** Static value NodeDeactivateStart for FabricEventKind. */ - public static final FabricEventKind NODE_DEACTIVATE_START = fromString("NodeDeactivateStart"); + /** Static value NodeDeactivateStarted for FabricEventKind. */ + public static final FabricEventKind NODE_DEACTIVATE_STARTED = fromString("NodeDeactivateStarted"); /** Static value NodeDown for FabricEventKind. */ public static final FabricEventKind NODE_DOWN = fromString("NodeDown"); - /** Static value NodeHealthReportCreated for FabricEventKind. */ - public static final FabricEventKind NODE_HEALTH_REPORT_CREATED = fromString("NodeHealthReportCreated"); + /** Static value NodeNewHealthReport for FabricEventKind. */ + public static final FabricEventKind NODE_NEW_HEALTH_REPORT = fromString("NodeNewHealthReport"); /** Static value NodeHealthReportExpired for FabricEventKind. */ public static final FabricEventKind NODE_HEALTH_REPORT_EXPIRED = fromString("NodeHealthReportExpired"); - /** Static value NodeOpenedSuccess for FabricEventKind. */ - public static final FabricEventKind NODE_OPENED_SUCCESS = fromString("NodeOpenedSuccess"); + /** Static value NodeOpenSucceeded for FabricEventKind. */ + public static final FabricEventKind NODE_OPEN_SUCCEEDED = fromString("NodeOpenSucceeded"); /** Static value NodeOpenFailed for FabricEventKind. */ public static final FabricEventKind NODE_OPEN_FAILED = fromString("NodeOpenFailed"); - /** Static value NodeOpening for FabricEventKind. */ - public static final FabricEventKind NODE_OPENING = fromString("NodeOpening"); - - /** Static value NodeRemoved for FabricEventKind. */ - public static final FabricEventKind NODE_REMOVED = fromString("NodeRemoved"); + /** Static value NodeRemovedFromCluster for FabricEventKind. */ + public static final FabricEventKind NODE_REMOVED_FROM_CLUSTER = fromString("NodeRemovedFromCluster"); /** Static value NodeUp for FabricEventKind. */ public static final FabricEventKind NODE_UP = fromString("NodeUp"); - /** Static value PartitionHealthReportCreated for FabricEventKind. */ - public static final FabricEventKind PARTITION_HEALTH_REPORT_CREATED = fromString("PartitionHealthReportCreated"); + /** Static value PartitionNewHealthReport for FabricEventKind. */ + public static final FabricEventKind PARTITION_NEW_HEALTH_REPORT = fromString("PartitionNewHealthReport"); /** Static value PartitionHealthReportExpired for FabricEventKind. */ public static final FabricEventKind PARTITION_HEALTH_REPORT_EXPIRED = fromString("PartitionHealthReportExpired"); - /** Static value PartitionReconfigurationCompleted for FabricEventKind. */ - public static final FabricEventKind PARTITION_RECONFIGURATION_COMPLETED = fromString("PartitionReconfigurationCompleted"); + /** Static value PartitionReconfigured for FabricEventKind. */ + public static final FabricEventKind PARTITION_RECONFIGURED = fromString("PartitionReconfigured"); /** Static value PartitionPrimaryMoveAnalysis for FabricEventKind. */ public static final FabricEventKind PARTITION_PRIMARY_MOVE_ANALYSIS = fromString("PartitionPrimaryMoveAnalysis"); @@ -142,50 +133,50 @@ public final class FabricEventKind extends ExpandableStringEnum /** Static value ServiceDeleted for FabricEventKind. */ public static final FabricEventKind SERVICE_DELETED = fromString("ServiceDeleted"); - /** Static value ServiceHealthReportCreated for FabricEventKind. */ - public static final FabricEventKind SERVICE_HEALTH_REPORT_CREATED = fromString("ServiceHealthReportCreated"); + /** Static value ServiceNewHealthReport for FabricEventKind. */ + public static final FabricEventKind SERVICE_NEW_HEALTH_REPORT = fromString("ServiceNewHealthReport"); /** Static value ServiceHealthReportExpired for FabricEventKind. */ public static final FabricEventKind SERVICE_HEALTH_REPORT_EXPIRED = fromString("ServiceHealthReportExpired"); - /** Static value DeployedServiceHealthReportCreated for FabricEventKind. */ - public static final FabricEventKind DEPLOYED_SERVICE_HEALTH_REPORT_CREATED = fromString("DeployedServiceHealthReportCreated"); + /** Static value DeployedServicePackageNewHealthReport for FabricEventKind. */ + public static final FabricEventKind DEPLOYED_SERVICE_PACKAGE_NEW_HEALTH_REPORT = fromString("DeployedServicePackageNewHealthReport"); - /** Static value DeployedServiceHealthReportExpired for FabricEventKind. */ - public static final FabricEventKind DEPLOYED_SERVICE_HEALTH_REPORT_EXPIRED = fromString("DeployedServiceHealthReportExpired"); + /** Static value DeployedServicePackageHealthReportExpired for FabricEventKind. */ + public static final FabricEventKind DEPLOYED_SERVICE_PACKAGE_HEALTH_REPORT_EXPIRED = fromString("DeployedServicePackageHealthReportExpired"); - /** Static value StatefulReplicaHealthReportCreated for FabricEventKind. */ - public static final FabricEventKind STATEFUL_REPLICA_HEALTH_REPORT_CREATED = fromString("StatefulReplicaHealthReportCreated"); + /** Static value StatefulReplicaNewHealthReport for FabricEventKind. */ + public static final FabricEventKind STATEFUL_REPLICA_NEW_HEALTH_REPORT = fromString("StatefulReplicaNewHealthReport"); /** Static value StatefulReplicaHealthReportExpired for FabricEventKind. */ public static final FabricEventKind STATEFUL_REPLICA_HEALTH_REPORT_EXPIRED = fromString("StatefulReplicaHealthReportExpired"); - /** Static value StatelessReplicaHealthReportCreated for FabricEventKind. */ - public static final FabricEventKind STATELESS_REPLICA_HEALTH_REPORT_CREATED = fromString("StatelessReplicaHealthReportCreated"); + /** Static value StatelessReplicaNewHealthReport for FabricEventKind. */ + public static final FabricEventKind STATELESS_REPLICA_NEW_HEALTH_REPORT = fromString("StatelessReplicaNewHealthReport"); /** Static value StatelessReplicaHealthReportExpired for FabricEventKind. */ public static final FabricEventKind STATELESS_REPLICA_HEALTH_REPORT_EXPIRED = fromString("StatelessReplicaHealthReportExpired"); - /** Static value ClusterHealthReportCreated for FabricEventKind. */ - public static final FabricEventKind CLUSTER_HEALTH_REPORT_CREATED = fromString("ClusterHealthReportCreated"); + /** Static value ClusterNewHealthReport for FabricEventKind. */ + public static final FabricEventKind CLUSTER_NEW_HEALTH_REPORT = fromString("ClusterNewHealthReport"); /** Static value ClusterHealthReportExpired for FabricEventKind. */ public static final FabricEventKind CLUSTER_HEALTH_REPORT_EXPIRED = fromString("ClusterHealthReportExpired"); - /** Static value ClusterUpgradeComplete for FabricEventKind. */ - public static final FabricEventKind CLUSTER_UPGRADE_COMPLETE = fromString("ClusterUpgradeComplete"); + /** Static value ClusterUpgradeCompleted for FabricEventKind. */ + public static final FabricEventKind CLUSTER_UPGRADE_COMPLETED = fromString("ClusterUpgradeCompleted"); - /** Static value ClusterUpgradeDomainComplete for FabricEventKind. */ - public static final FabricEventKind CLUSTER_UPGRADE_DOMAIN_COMPLETE = fromString("ClusterUpgradeDomainComplete"); + /** Static value ClusterUpgradeDomainCompleted for FabricEventKind. */ + public static final FabricEventKind CLUSTER_UPGRADE_DOMAIN_COMPLETED = fromString("ClusterUpgradeDomainCompleted"); - /** Static value ClusterUpgradeRollbackComplete for FabricEventKind. */ - public static final FabricEventKind CLUSTER_UPGRADE_ROLLBACK_COMPLETE = fromString("ClusterUpgradeRollbackComplete"); + /** Static value ClusterUpgradeRollbackCompleted for FabricEventKind. */ + public static final FabricEventKind CLUSTER_UPGRADE_ROLLBACK_COMPLETED = fromString("ClusterUpgradeRollbackCompleted"); - /** Static value ClusterUpgradeRollbackStart for FabricEventKind. */ - public static final FabricEventKind CLUSTER_UPGRADE_ROLLBACK_START = fromString("ClusterUpgradeRollbackStart"); + /** Static value ClusterUpgradeRollbackStarted for FabricEventKind. */ + public static final FabricEventKind CLUSTER_UPGRADE_ROLLBACK_STARTED = fromString("ClusterUpgradeRollbackStarted"); - /** Static value ClusterUpgradeStart for FabricEventKind. */ - public static final FabricEventKind CLUSTER_UPGRADE_START = fromString("ClusterUpgradeStart"); + /** Static value ClusterUpgradeStarted for FabricEventKind. */ + public static final FabricEventKind CLUSTER_UPGRADE_STARTED = fromString("ClusterUpgradeStarted"); /** Static value ChaosStopped for FabricEventKind. */ public static final FabricEventKind CHAOS_STOPPED = fromString("ChaosStopped"); @@ -193,32 +184,23 @@ public final class FabricEventKind extends ExpandableStringEnum /** Static value ChaosStarted for FabricEventKind. */ public static final FabricEventKind CHAOS_STARTED = fromString("ChaosStarted"); - /** Static value ChaosRestartNodeFaultCompleted for FabricEventKind. */ - public static final FabricEventKind CHAOS_RESTART_NODE_FAULT_COMPLETED = fromString("ChaosRestartNodeFaultCompleted"); - - /** Static value ChaosRestartCodePackageFaultScheduled for FabricEventKind. */ - public static final FabricEventKind CHAOS_RESTART_CODE_PACKAGE_FAULT_SCHEDULED = fromString("ChaosRestartCodePackageFaultScheduled"); - - /** Static value ChaosRestartCodePackageFaultCompleted for FabricEventKind. */ - public static final FabricEventKind CHAOS_RESTART_CODE_PACKAGE_FAULT_COMPLETED = fromString("ChaosRestartCodePackageFaultCompleted"); - - /** Static value ChaosRemoveReplicaFaultScheduled for FabricEventKind. */ - public static final FabricEventKind CHAOS_REMOVE_REPLICA_FAULT_SCHEDULED = fromString("ChaosRemoveReplicaFaultScheduled"); + /** Static value ChaosCodePackageRestartScheduled for FabricEventKind. */ + public static final FabricEventKind CHAOS_CODE_PACKAGE_RESTART_SCHEDULED = fromString("ChaosCodePackageRestartScheduled"); - /** Static value ChaosRemoveReplicaFaultCompleted for FabricEventKind. */ - public static final FabricEventKind CHAOS_REMOVE_REPLICA_FAULT_COMPLETED = fromString("ChaosRemoveReplicaFaultCompleted"); + /** Static value ChaosReplicaRemovalScheduled for FabricEventKind. */ + public static final FabricEventKind CHAOS_REPLICA_REMOVAL_SCHEDULED = fromString("ChaosReplicaRemovalScheduled"); - /** Static value ChaosMoveSecondaryFaultScheduled for FabricEventKind. */ - public static final FabricEventKind CHAOS_MOVE_SECONDARY_FAULT_SCHEDULED = fromString("ChaosMoveSecondaryFaultScheduled"); + /** Static value ChaosPartitionSecondaryMoveScheduled for FabricEventKind. */ + public static final FabricEventKind CHAOS_PARTITION_SECONDARY_MOVE_SCHEDULED = fromString("ChaosPartitionSecondaryMoveScheduled"); - /** Static value ChaosMovePrimaryFaultScheduled for FabricEventKind. */ - public static final FabricEventKind CHAOS_MOVE_PRIMARY_FAULT_SCHEDULED = fromString("ChaosMovePrimaryFaultScheduled"); + /** Static value ChaosPartitionPrimaryMoveScheduled for FabricEventKind. */ + public static final FabricEventKind CHAOS_PARTITION_PRIMARY_MOVE_SCHEDULED = fromString("ChaosPartitionPrimaryMoveScheduled"); - /** Static value ChaosRestartReplicaFaultScheduled for FabricEventKind. */ - public static final FabricEventKind CHAOS_RESTART_REPLICA_FAULT_SCHEDULED = fromString("ChaosRestartReplicaFaultScheduled"); + /** Static value ChaosReplicaRestartScheduled for FabricEventKind. */ + public static final FabricEventKind CHAOS_REPLICA_RESTART_SCHEDULED = fromString("ChaosReplicaRestartScheduled"); - /** Static value ChaosRestartNodeFaultScheduled for FabricEventKind. */ - public static final FabricEventKind CHAOS_RESTART_NODE_FAULT_SCHEDULED = fromString("ChaosRestartNodeFaultScheduled"); + /** Static value ChaosNodeRestartScheduled for FabricEventKind. */ + public static final FabricEventKind CHAOS_NODE_RESTART_SCHEDULED = fromString("ChaosNodeRestartScheduled"); /** * Creates or finds a FabricEventKind from its string representation. diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/GatewayDestination.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/GatewayDestination.java new file mode 100644 index 0000000000000..1d39e80225bde --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/GatewayDestination.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes destination endpoint for routing traffic. + */ +public class GatewayDestination { + /** + * Name of the service fabric Mesh application. + */ + @JsonProperty(value = "applicationName", required = true) + private String applicationName; + + /** + * service that contains the endpoint. + */ + @JsonProperty(value = "serviceName", required = true) + private String serviceName; + + /** + * name of the endpoint in the service. + */ + @JsonProperty(value = "endpointName", required = true) + private String endpointName; + + /** + * Get name of the service fabric Mesh application. + * + * @return the applicationName value + */ + public String applicationName() { + return this.applicationName; + } + + /** + * Set name of the service fabric Mesh application. + * + * @param applicationName the applicationName value to set + * @return the GatewayDestination object itself. + */ + public GatewayDestination withApplicationName(String applicationName) { + this.applicationName = applicationName; + return this; + } + + /** + * Get service that contains the endpoint. + * + * @return the serviceName value + */ + public String serviceName() { + return this.serviceName; + } + + /** + * Set service that contains the endpoint. + * + * @param serviceName the serviceName value to set + * @return the GatewayDestination object itself. + */ + public GatewayDestination withServiceName(String serviceName) { + this.serviceName = serviceName; + return this; + } + + /** + * Get name of the endpoint in the service. + * + * @return the endpointName value + */ + public String endpointName() { + return this.endpointName; + } + + /** + * Set name of the endpoint in the service. + * + * @param endpointName the endpointName value to set + * @return the GatewayDestination object itself. + */ + public GatewayDestination withEndpointName(String endpointName) { + this.endpointName = endpointName; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HeaderMatchType.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HeaderMatchType.java new file mode 100644 index 0000000000000..548765033f88f --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HeaderMatchType.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for HeaderMatchType. + */ +public final class HeaderMatchType extends ExpandableStringEnum { + /** Static value exact for HeaderMatchType. */ + public static final HeaderMatchType EXACT = fromString("exact"); + + /** + * Creates or finds a HeaderMatchType from its string representation. + * @param name a name to look for + * @return the corresponding HeaderMatchType + */ + @JsonCreator + public static HeaderMatchType fromString(String name) { + return fromString(name, HeaderMatchType.class); + } + + /** + * @return known HeaderMatchType values + */ + public static Collection values() { + return values(HeaderMatchType.class); + } +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HealthInformation.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HealthInformation.java index 819f86d7dfb01..669ab550be09b 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HealthInformation.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HealthInformation.java @@ -102,7 +102,7 @@ public class HealthInformation { * value of this property is false by default. * When clients report periodically, they should set RemoveWhenExpired * false (default). - * This way, is the reporter has issues (eg. deadlock) and can't report, + * This way, if the reporter has issues (e.g. deadlock) and can't report, * the entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. */ @@ -270,7 +270,7 @@ public HealthInformation withSequenceNumber(String sequenceNumber) { If set to true, the report is removed from the health store after it expires. If set to false, the report is treated as an error when expired. The value of this property is false by default. When clients report periodically, they should set RemoveWhenExpired false (default). - This way, is the reporter has issues (eg. deadlock) and can't report, the entity is evaluated at error when the health report expires. + This way, if the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated at error when the health report expires. This flags the entity as being in Error health state. * * @return the removeWhenExpired value @@ -284,7 +284,7 @@ public Boolean removeWhenExpired() { If set to true, the report is removed from the health store after it expires. If set to false, the report is treated as an error when expired. The value of this property is false by default. When clients report periodically, they should set RemoveWhenExpired false (default). - This way, is the reporter has issues (eg. deadlock) and can't report, the entity is evaluated at error when the health report expires. + This way, if the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated at error when the health report expires. This flags the entity as being in Error health state. * * @param removeWhenExpired the removeWhenExpired value to set diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpConfig.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpConfig.java new file mode 100644 index 0000000000000..4ad28b789de46 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpConfig.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the http configuration for external connectivity for this network. + */ +public class HttpConfig { + /** + * http gateway config name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Specifies the port at which the service endpoint below needs to be + * exposed. + */ + @JsonProperty(value = "port", required = true) + private int port; + + /** + * description for routing. + */ + @JsonProperty(value = "hosts", required = true) + private List hosts; + + /** + * Get http gateway config name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set http gateway config name. + * + * @param name the name value to set + * @return the HttpConfig object itself. + */ + public HttpConfig withName(String name) { + this.name = name; + return this; + } + + /** + * Get specifies the port at which the service endpoint below needs to be exposed. + * + * @return the port value + */ + public int port() { + return this.port; + } + + /** + * Set specifies the port at which the service endpoint below needs to be exposed. + * + * @param port the port value to set + * @return the HttpConfig object itself. + */ + public HttpConfig withPort(int port) { + this.port = port; + return this; + } + + /** + * Get description for routing. + * + * @return the hosts value + */ + public List hosts() { + return this.hosts; + } + + /** + * Set description for routing. + * + * @param hosts the hosts value to set + * @return the HttpConfig object itself. + */ + public HttpConfig withHosts(List hosts) { + this.hosts = hosts; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpHostConfig.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpHostConfig.java new file mode 100644 index 0000000000000..486de76695a68 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpHostConfig.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the hostname properties for http routing. + */ +public class HttpHostConfig { + /** + * http hostname config name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Route information to use for routing. Routes are processed in the order + * they are specified. Specify routes that are more specific before routes + * that can hamdle general cases. + */ + @JsonProperty(value = "routes", required = true) + private List routes; + + /** + * Get http hostname config name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set http hostname config name. + * + * @param name the name value to set + * @return the HttpHostConfig object itself. + */ + public HttpHostConfig withName(String name) { + this.name = name; + return this; + } + + /** + * Get route information to use for routing. Routes are processed in the order they are specified. Specify routes that are more specific before routes that can hamdle general cases. + * + * @return the routes value + */ + public List routes() { + return this.routes; + } + + /** + * Set route information to use for routing. Routes are processed in the order they are specified. Specify routes that are more specific before routes that can hamdle general cases. + * + * @param routes the routes value to set + * @return the HttpHostConfig object itself. + */ + public HttpHostConfig withRoutes(List routes) { + this.routes = routes; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpRouteConfig.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpRouteConfig.java new file mode 100644 index 0000000000000..c08089098a037 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpRouteConfig.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the hostname properties for http routing. + */ +public class HttpRouteConfig { + /** + * http route name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Describes a rule for http route matching. + */ + @JsonProperty(value = "match", required = true) + private HttpRouteMatchRule match; + + /** + * Describes destination endpoint for routing traffic. + */ + @JsonProperty(value = "destination", required = true) + private GatewayDestination destination; + + /** + * Get http route name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set http route name. + * + * @param name the name value to set + * @return the HttpRouteConfig object itself. + */ + public HttpRouteConfig withName(String name) { + this.name = name; + return this; + } + + /** + * Get describes a rule for http route matching. + * + * @return the match value + */ + public HttpRouteMatchRule match() { + return this.match; + } + + /** + * Set describes a rule for http route matching. + * + * @param match the match value to set + * @return the HttpRouteConfig object itself. + */ + public HttpRouteConfig withMatch(HttpRouteMatchRule match) { + this.match = match; + return this; + } + + /** + * Get describes destination endpoint for routing traffic. + * + * @return the destination value + */ + public GatewayDestination destination() { + return this.destination; + } + + /** + * Set describes destination endpoint for routing traffic. + * + * @param destination the destination value to set + * @return the HttpRouteConfig object itself. + */ + public HttpRouteConfig withDestination(GatewayDestination destination) { + this.destination = destination; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpRouteMatchHeader.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpRouteMatchHeader.java new file mode 100644 index 0000000000000..b4726ed59a5f2 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpRouteMatchHeader.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes header information for http route matching. + */ +public class HttpRouteMatchHeader { + /** + * Name of header to match in request. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Value of header to match in request. + */ + @JsonProperty(value = "value") + private String value; + + /** + * how to match header value. Possible values include: 'exact'. + */ + @JsonProperty(value = "type") + private HeaderMatchType type; + + /** + * Get name of header to match in request. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of header to match in request. + * + * @param name the name value to set + * @return the HttpRouteMatchHeader object itself. + */ + public HttpRouteMatchHeader withName(String name) { + this.name = name; + return this; + } + + /** + * Get value of header to match in request. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set value of header to match in request. + * + * @param value the value value to set + * @return the HttpRouteMatchHeader object itself. + */ + public HttpRouteMatchHeader withValue(String value) { + this.value = value; + return this; + } + + /** + * Get how to match header value. Possible values include: 'exact'. + * + * @return the type value + */ + public HeaderMatchType type() { + return this.type; + } + + /** + * Set how to match header value. Possible values include: 'exact'. + * + * @param type the type value to set + * @return the HttpRouteMatchHeader object itself. + */ + public HttpRouteMatchHeader withType(HeaderMatchType type) { + this.type = type; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpRouteMatchPath.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpRouteMatchPath.java new file mode 100644 index 0000000000000..abd94fb5a926f --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpRouteMatchPath.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Path to match for routing. + */ +public class HttpRouteMatchPath { + /** + * Uri path to match for request. + */ + @JsonProperty(value = "value", required = true) + private String value; + + /** + * replacement string for matched part of the Uri. + */ + @JsonProperty(value = "rewrite") + private String rewrite; + + /** + * how to match value in the Uri. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** + * Creates an instance of HttpRouteMatchPath class. + * @param value uri path to match for request. + */ + public HttpRouteMatchPath() { + type = "prefix"; + } + + /** + * Get uri path to match for request. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set uri path to match for request. + * + * @param value the value value to set + * @return the HttpRouteMatchPath object itself. + */ + public HttpRouteMatchPath withValue(String value) { + this.value = value; + return this; + } + + /** + * Get replacement string for matched part of the Uri. + * + * @return the rewrite value + */ + public String rewrite() { + return this.rewrite; + } + + /** + * Set replacement string for matched part of the Uri. + * + * @param rewrite the rewrite value to set + * @return the HttpRouteMatchPath object itself. + */ + public HttpRouteMatchPath withRewrite(String rewrite) { + this.rewrite = rewrite; + return this; + } + + /** + * Get how to match value in the Uri. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set how to match value in the Uri. + * + * @param type the type value to set + * @return the HttpRouteMatchPath object itself. + */ + public HttpRouteMatchPath withType(String type) { + this.type = type; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpRouteMatchRule.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpRouteMatchRule.java new file mode 100644 index 0000000000000..6ac8eb0d2cfce --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/HttpRouteMatchRule.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes a rule for http route matching. + */ +public class HttpRouteMatchRule { + /** + * Path to match for routing. + */ + @JsonProperty(value = "path", required = true) + private HttpRouteMatchPath path; + + /** + * headers and their values to match in request. + */ + @JsonProperty(value = "headers") + private List headers; + + /** + * Get path to match for routing. + * + * @return the path value + */ + public HttpRouteMatchPath path() { + return this.path; + } + + /** + * Set path to match for routing. + * + * @param path the path value to set + * @return the HttpRouteMatchRule object itself. + */ + public HttpRouteMatchRule withPath(HttpRouteMatchPath path) { + this.path = path; + return this; + } + + /** + * Get headers and their values to match in request. + * + * @return the headers value + */ + public List headers() { + return this.headers; + } + + /** + * Set headers and their values to match in request. + * + * @param headers the headers value to set + * @return the HttpRouteMatchRule object itself. + */ + public HttpRouteMatchRule withHeaders(List headers) { + this.headers = headers; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ImageRegistryCredential.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ImageRegistryCredential.java index 981d485e04338..ca5187e47ee12 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ImageRegistryCredential.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ImageRegistryCredential.java @@ -28,7 +28,9 @@ public class ImageRegistryCredential { private String username; /** - * The password for the private registry. + * The password for the private registry. The password is required for + * create or update operations, however it is not returned in the get or + * list operations. */ @JsonProperty(value = "password") private String password; @@ -74,7 +76,7 @@ public ImageRegistryCredential withUsername(String username) { } /** - * Get the password for the private registry. + * Get the password for the private registry. The password is required for create or update operations, however it is not returned in the get or list operations. * * @return the password value */ @@ -83,7 +85,7 @@ public String password() { } /** - * Set the password for the private registry. + * Set the password for the private registry. The password is required for create or update operations, however it is not returned in the get or list operations. * * @param password the password value to set * @return the ImageRegistryCredential object itself. diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/InlinedValueSecretResourceProperties.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/InlinedValueSecretResourceProperties.java new file mode 100644 index 0000000000000..22af6c2cfe3a2 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/InlinedValueSecretResourceProperties.java @@ -0,0 +1,24 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Describes the properties of a secret resource whose value is provided + * explicitly as plaintext. The secret resource may have multiple values, each + * being uniquely versioned. The secret value of each version is stored + * encrypted, and delivered as plaintext into the context of applications + * referencing it. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("inlinedValue") +public class InlinedValueSecretResourceProperties extends SecretResourceProperties { +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/LoadMetricReport.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/LoadMetricReport.java index 39903421dffa0..f147e1b522b60 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/LoadMetricReport.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/LoadMetricReport.java @@ -29,11 +29,18 @@ public class LoadMetricReport { private String name; /** - * The value of the load metric. + * The value of the load metric. In future releases of Service Fabric this + * parameter will be deprecated in favor of CurrentValue. */ @JsonProperty(value = "Value") private String value; + /** + * The value of the load metric. + */ + @JsonProperty(value = "CurrentValue") + private String currentValue; + /** * Get gets the UTC time when the load was reported. * @@ -75,7 +82,7 @@ public LoadMetricReport withName(String name) { } /** - * Get the value of the load metric. + * Get the value of the load metric. In future releases of Service Fabric this parameter will be deprecated in favor of CurrentValue. * * @return the value value */ @@ -84,7 +91,7 @@ public String value() { } /** - * Set the value of the load metric. + * Set the value of the load metric. In future releases of Service Fabric this parameter will be deprecated in favor of CurrentValue. * * @param value the value value to set * @return the LoadMetricReport object itself. @@ -94,4 +101,24 @@ public LoadMetricReport withValue(String value) { return this; } + /** + * Get the value of the load metric. + * + * @return the currentValue value + */ + public String currentValue() { + return this.currentValue; + } + + /** + * Set the value of the load metric. + * + * @param currentValue the currentValue value to set + * @return the LoadMetricReport object itself. + */ + public LoadMetricReport withCurrentValue(String currentValue) { + this.currentValue = currentValue; + return this; + } + } diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/LoadMetricReportInfo.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/LoadMetricReportInfo.java index 2e152d1d58513..d52178ac3faec 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/LoadMetricReportInfo.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/LoadMetricReportInfo.java @@ -22,11 +22,18 @@ public class LoadMetricReportInfo { private String name; /** - * The value of the load for the metric.. + * The value of the load for the metric. In future releases of Service + * Fabric this parameter will be deprecated in favor of CurrentValue. */ @JsonProperty(value = "Value") private Integer value; + /** + * The double value of the load for the metric. + */ + @JsonProperty(value = "CurrentValue") + private String currentValue; + /** * The UTC time when the load is reported. */ @@ -54,7 +61,7 @@ public LoadMetricReportInfo withName(String name) { } /** - * Get the value of the load for the metric.. + * Get the value of the load for the metric. In future releases of Service Fabric this parameter will be deprecated in favor of CurrentValue. * * @return the value value */ @@ -63,7 +70,7 @@ public Integer value() { } /** - * Set the value of the load for the metric.. + * Set the value of the load for the metric. In future releases of Service Fabric this parameter will be deprecated in favor of CurrentValue. * * @param value the value value to set * @return the LoadMetricReportInfo object itself. @@ -73,6 +80,26 @@ public LoadMetricReportInfo withValue(Integer value) { return this; } + /** + * Get the double value of the load for the metric. + * + * @return the currentValue value + */ + public String currentValue() { + return this.currentValue; + } + + /** + * Set the double value of the load for the metric. + * + * @param currentValue the currentValue value to set + * @return the LoadMetricReportInfo object itself. + */ + public LoadMetricReportInfo withCurrentValue(String currentValue) { + this.currentValue = currentValue; + return this; + } + /** * Get the UTC time when the load is reported. * diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/LocalNetworkResourceProperties.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/LocalNetworkResourceProperties.java new file mode 100644 index 0000000000000..ae2c099b1e7c5 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/LocalNetworkResourceProperties.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Information about a Service Fabric container network local to a single + * Service Fabric cluster. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("Local") +public class LocalNetworkResourceProperties extends NetworkResourceProperties { + /** + * Address space for the local container network. + */ + @JsonProperty(value = "networkAddressPrefix") + private String networkAddressPrefix; + + /** + * Get address space for the local container network. + * + * @return the networkAddressPrefix value + */ + public String networkAddressPrefix() { + return this.networkAddressPrefix; + } + + /** + * Set address space for the local container network. + * + * @param networkAddressPrefix the networkAddressPrefix value to set + * @return the LocalNetworkResourceProperties object itself. + */ + public LocalNetworkResourceProperties withNetworkAddressPrefix(String networkAddressPrefix) { + this.networkAddressPrefix = networkAddressPrefix; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NetworkKind.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NetworkKind.java new file mode 100644 index 0000000000000..bf131d1c2f3ff --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NetworkKind.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for NetworkKind. + */ +public final class NetworkKind extends ExpandableStringEnum { + /** Static value Local for NetworkKind. */ + public static final NetworkKind LOCAL = fromString("Local"); + + /** + * Creates or finds a NetworkKind from its string representation. + * @param name a name to look for + * @return the corresponding NetworkKind + */ + @JsonCreator + public static NetworkKind fromString(String name) { + return fromString(name, NetworkKind.class); + } + + /** + * @return known NetworkKind values + */ + public static Collection values() { + return values(NetworkKind.class); + } +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NetworkRef.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NetworkRef.java index 441a63282b5c3..9dde47cc18d4a 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NetworkRef.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NetworkRef.java @@ -8,6 +8,7 @@ package com.microsoft.azure.servicefabric; +import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -20,6 +21,12 @@ public class NetworkRef { @JsonProperty(value = "name") private String name; + /** + * A list of endpoints that are exposed on this network. + */ + @JsonProperty(value = "endpointRefs") + private List endpointRefs; + /** * Get name of the network. * @@ -40,4 +47,24 @@ public NetworkRef withName(String name) { return this; } + /** + * Get a list of endpoints that are exposed on this network. + * + * @return the endpointRefs value + */ + public List endpointRefs() { + return this.endpointRefs; + } + + /** + * Set a list of endpoints that are exposed on this network. + * + * @param endpointRefs the endpointRefs value to set + * @return the NetworkRef object itself. + */ + public NetworkRef withEndpointRefs(List endpointRefs) { + this.endpointRefs = endpointRefs; + return this; + } + } diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NetworkResourceProperties.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NetworkResourceProperties.java new file mode 100644 index 0000000000000..01c2244b1d4e6 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NetworkResourceProperties.java @@ -0,0 +1,82 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Describes properties of a network resource. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("NetworkResourceProperties") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Local", value = LocalNetworkResourceProperties.class) +}) +public class NetworkResourceProperties extends NetworkResourcePropertiesBase { + /** + * User readable description of the network. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Status of the network. Possible values include: 'Unknown', 'Ready', + * 'Upgrading', 'Creating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private ResourceStatus status; + + /** + * Gives additional information about the current status of the network. + */ + @JsonProperty(value = "statusDetails", access = JsonProperty.Access.WRITE_ONLY) + private String statusDetails; + + /** + * Get user readable description of the network. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set user readable description of the network. + * + * @param description the description value to set + * @return the NetworkResourceProperties object itself. + */ + public NetworkResourceProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get status of the network. Possible values include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed'. + * + * @return the status value + */ + public ResourceStatus status() { + return this.status; + } + + /** + * Get gives additional information about the current status of the network. + * + * @return the statusDetails value + */ + public String statusDetails() { + return this.statusDetails; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NetworkResourcePropertiesBase.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NetworkResourcePropertiesBase.java new file mode 100644 index 0000000000000..fc74fcb6f82f1 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NetworkResourcePropertiesBase.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * This type describes the properties of a network resource, including its + * kind. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("NetworkResourcePropertiesBase") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "NetworkResourceProperties", value = NetworkResourceProperties.class) +}) +public class NetworkResourcePropertiesBase { +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeAddedToClusterEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeAddedToClusterEvent.java new file mode 100644 index 0000000000000..8f74f33354cbb --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeAddedToClusterEvent.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.NodeEventInner; + +/** + * Node Added event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("NodeAddedToCluster") +public class NodeAddedToClusterEvent extends NodeEventInner { + /** + * Id of Node. + */ + @JsonProperty(value = "NodeId", required = true) + private String nodeId; + + /** + * Id of Node instance. + */ + @JsonProperty(value = "NodeInstance", required = true) + private long nodeInstance; + + /** + * Type of Node. + */ + @JsonProperty(value = "NodeType", required = true) + private String nodeType; + + /** + * Fabric version. + */ + @JsonProperty(value = "FabricVersion", required = true) + private String fabricVersion; + + /** + * IP address or FQDN. + */ + @JsonProperty(value = "IpAddressOrFQDN", required = true) + private String ipAddressOrFQDN; + + /** + * Capacities. + */ + @JsonProperty(value = "NodeCapacities", required = true) + private String nodeCapacities; + + /** + * Get id of Node. + * + * @return the nodeId value + */ + public String nodeId() { + return this.nodeId; + } + + /** + * Set id of Node. + * + * @param nodeId the nodeId value to set + * @return the NodeAddedToClusterEvent object itself. + */ + public NodeAddedToClusterEvent withNodeId(String nodeId) { + this.nodeId = nodeId; + return this; + } + + /** + * Get id of Node instance. + * + * @return the nodeInstance value + */ + public long nodeInstance() { + return this.nodeInstance; + } + + /** + * Set id of Node instance. + * + * @param nodeInstance the nodeInstance value to set + * @return the NodeAddedToClusterEvent object itself. + */ + public NodeAddedToClusterEvent withNodeInstance(long nodeInstance) { + this.nodeInstance = nodeInstance; + return this; + } + + /** + * Get type of Node. + * + * @return the nodeType value + */ + public String nodeType() { + return this.nodeType; + } + + /** + * Set type of Node. + * + * @param nodeType the nodeType value to set + * @return the NodeAddedToClusterEvent object itself. + */ + public NodeAddedToClusterEvent withNodeType(String nodeType) { + this.nodeType = nodeType; + return this; + } + + /** + * Get fabric version. + * + * @return the fabricVersion value + */ + public String fabricVersion() { + return this.fabricVersion; + } + + /** + * Set fabric version. + * + * @param fabricVersion the fabricVersion value to set + * @return the NodeAddedToClusterEvent object itself. + */ + public NodeAddedToClusterEvent withFabricVersion(String fabricVersion) { + this.fabricVersion = fabricVersion; + return this; + } + + /** + * Get iP address or FQDN. + * + * @return the ipAddressOrFQDN value + */ + public String ipAddressOrFQDN() { + return this.ipAddressOrFQDN; + } + + /** + * Set iP address or FQDN. + * + * @param ipAddressOrFQDN the ipAddressOrFQDN value to set + * @return the NodeAddedToClusterEvent object itself. + */ + public NodeAddedToClusterEvent withIpAddressOrFQDN(String ipAddressOrFQDN) { + this.ipAddressOrFQDN = ipAddressOrFQDN; + return this; + } + + /** + * Get capacities. + * + * @return the nodeCapacities value + */ + public String nodeCapacities() { + return this.nodeCapacities; + } + + /** + * Set capacities. + * + * @param nodeCapacities the nodeCapacities value to set + * @return the NodeAddedToClusterEvent object itself. + */ + public NodeAddedToClusterEvent withNodeCapacities(String nodeCapacities) { + this.nodeCapacities = nodeCapacities; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeClosedEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeClosedEvent.java new file mode 100644 index 0000000000000..a20cb6f33e215 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeClosedEvent.java @@ -0,0 +1,100 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.NodeEventInner; + +/** + * Node Closed event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("NodeClosed") +public class NodeClosedEvent extends NodeEventInner { + /** + * Id of Node. + */ + @JsonProperty(value = "NodeId", required = true) + private String nodeId; + + /** + * Id of Node instance. + */ + @JsonProperty(value = "NodeInstance", required = true) + private long nodeInstance; + + /** + * Describes error. + */ + @JsonProperty(value = "Error", required = true) + private String error; + + /** + * Get id of Node. + * + * @return the nodeId value + */ + public String nodeId() { + return this.nodeId; + } + + /** + * Set id of Node. + * + * @param nodeId the nodeId value to set + * @return the NodeClosedEvent object itself. + */ + public NodeClosedEvent withNodeId(String nodeId) { + this.nodeId = nodeId; + return this; + } + + /** + * Get id of Node instance. + * + * @return the nodeInstance value + */ + public long nodeInstance() { + return this.nodeInstance; + } + + /** + * Set id of Node instance. + * + * @param nodeInstance the nodeInstance value to set + * @return the NodeClosedEvent object itself. + */ + public NodeClosedEvent withNodeInstance(long nodeInstance) { + this.nodeInstance = nodeInstance; + return this; + } + + /** + * Get describes error. + * + * @return the error value + */ + public String error() { + return this.error; + } + + /** + * Set describes error. + * + * @param error the error value to set + * @return the NodeClosedEvent object itself. + */ + public NodeClosedEvent withError(String error) { + this.error = error; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeDeactivateCompletedEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeDeactivateCompletedEvent.java new file mode 100644 index 0000000000000..2fa93e3f801e8 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeDeactivateCompletedEvent.java @@ -0,0 +1,127 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.NodeEventInner; + +/** + * Node Deactivate Completed event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("NodeDeactivateCompleted") +public class NodeDeactivateCompletedEvent extends NodeEventInner { + /** + * Id of Node instance. + */ + @JsonProperty(value = "NodeInstance", required = true) + private long nodeInstance; + + /** + * Describes deactivate intent. + */ + @JsonProperty(value = "EffectiveDeactivateIntent", required = true) + private String effectiveDeactivateIntent; + + /** + * Batch Ids. + */ + @JsonProperty(value = "BatchIdsWithDeactivateIntent", required = true) + private String batchIdsWithDeactivateIntent; + + /** + * Start time. + */ + @JsonProperty(value = "StartTime", required = true) + private DateTime startTime; + + /** + * Get id of Node instance. + * + * @return the nodeInstance value + */ + public long nodeInstance() { + return this.nodeInstance; + } + + /** + * Set id of Node instance. + * + * @param nodeInstance the nodeInstance value to set + * @return the NodeDeactivateCompletedEvent object itself. + */ + public NodeDeactivateCompletedEvent withNodeInstance(long nodeInstance) { + this.nodeInstance = nodeInstance; + return this; + } + + /** + * Get describes deactivate intent. + * + * @return the effectiveDeactivateIntent value + */ + public String effectiveDeactivateIntent() { + return this.effectiveDeactivateIntent; + } + + /** + * Set describes deactivate intent. + * + * @param effectiveDeactivateIntent the effectiveDeactivateIntent value to set + * @return the NodeDeactivateCompletedEvent object itself. + */ + public NodeDeactivateCompletedEvent withEffectiveDeactivateIntent(String effectiveDeactivateIntent) { + this.effectiveDeactivateIntent = effectiveDeactivateIntent; + return this; + } + + /** + * Get batch Ids. + * + * @return the batchIdsWithDeactivateIntent value + */ + public String batchIdsWithDeactivateIntent() { + return this.batchIdsWithDeactivateIntent; + } + + /** + * Set batch Ids. + * + * @param batchIdsWithDeactivateIntent the batchIdsWithDeactivateIntent value to set + * @return the NodeDeactivateCompletedEvent object itself. + */ + public NodeDeactivateCompletedEvent withBatchIdsWithDeactivateIntent(String batchIdsWithDeactivateIntent) { + this.batchIdsWithDeactivateIntent = batchIdsWithDeactivateIntent; + return this; + } + + /** + * Get start time. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set start time. + * + * @param startTime the startTime value to set + * @return the NodeDeactivateCompletedEvent object itself. + */ + public NodeDeactivateCompletedEvent withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeDeactivateStartedEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeDeactivateStartedEvent.java new file mode 100644 index 0000000000000..a3fdbb98211fc --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeDeactivateStartedEvent.java @@ -0,0 +1,100 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.NodeEventInner; + +/** + * Node Deactivate Started event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("NodeDeactivateStarted") +public class NodeDeactivateStartedEvent extends NodeEventInner { + /** + * Id of Node instance. + */ + @JsonProperty(value = "NodeInstance", required = true) + private long nodeInstance; + + /** + * Batch Id. + */ + @JsonProperty(value = "BatchId", required = true) + private String batchId; + + /** + * Describes deactivate intent. + */ + @JsonProperty(value = "DeactivateIntent", required = true) + private String deactivateIntent; + + /** + * Get id of Node instance. + * + * @return the nodeInstance value + */ + public long nodeInstance() { + return this.nodeInstance; + } + + /** + * Set id of Node instance. + * + * @param nodeInstance the nodeInstance value to set + * @return the NodeDeactivateStartedEvent object itself. + */ + public NodeDeactivateStartedEvent withNodeInstance(long nodeInstance) { + this.nodeInstance = nodeInstance; + return this; + } + + /** + * Get batch Id. + * + * @return the batchId value + */ + public String batchId() { + return this.batchId; + } + + /** + * Set batch Id. + * + * @param batchId the batchId value to set + * @return the NodeDeactivateStartedEvent object itself. + */ + public NodeDeactivateStartedEvent withBatchId(String batchId) { + this.batchId = batchId; + return this; + } + + /** + * Get describes deactivate intent. + * + * @return the deactivateIntent value + */ + public String deactivateIntent() { + return this.deactivateIntent; + } + + /** + * Set describes deactivate intent. + * + * @param deactivateIntent the deactivateIntent value to set + * @return the NodeDeactivateStartedEvent object itself. + */ + public NodeDeactivateStartedEvent withDeactivateIntent(String deactivateIntent) { + this.deactivateIntent = deactivateIntent; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeNewHealthReportEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeNewHealthReportEvent.java new file mode 100644 index 0000000000000..8713959777784 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeNewHealthReportEvent.java @@ -0,0 +1,257 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.NodeEventInner; + +/** + * Node Health Report Created event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("NodeNewHealthReport") +public class NodeNewHealthReportEvent extends NodeEventInner { + /** + * Id of Node instance. + */ + @JsonProperty(value = "NodeInstanceId", required = true) + private long nodeInstanceId; + + /** + * Id of report source. + */ + @JsonProperty(value = "SourceId", required = true) + private String sourceId; + + /** + * Describes the property. + */ + @JsonProperty(value = "Property", required = true) + private String property; + + /** + * Describes the property health state. + */ + @JsonProperty(value = "HealthState", required = true) + private String healthState; + + /** + * Time to live in milli-seconds. + */ + @JsonProperty(value = "TimeToLiveMs", required = true) + private long timeToLiveMs; + + /** + * Sequence number of report. + */ + @JsonProperty(value = "SequenceNumber", required = true) + private long sequenceNumber; + + /** + * Description of report. + */ + @JsonProperty(value = "Description", required = true) + private String description; + + /** + * Indicates the removal when it expires. + */ + @JsonProperty(value = "RemoveWhenExpired", required = true) + private boolean removeWhenExpired; + + /** + * Source time. + */ + @JsonProperty(value = "SourceUtcTimestamp", required = true) + private DateTime sourceUtcTimestamp; + + /** + * Get id of Node instance. + * + * @return the nodeInstanceId value + */ + public long nodeInstanceId() { + return this.nodeInstanceId; + } + + /** + * Set id of Node instance. + * + * @param nodeInstanceId the nodeInstanceId value to set + * @return the NodeNewHealthReportEvent object itself. + */ + public NodeNewHealthReportEvent withNodeInstanceId(long nodeInstanceId) { + this.nodeInstanceId = nodeInstanceId; + return this; + } + + /** + * Get id of report source. + * + * @return the sourceId value + */ + public String sourceId() { + return this.sourceId; + } + + /** + * Set id of report source. + * + * @param sourceId the sourceId value to set + * @return the NodeNewHealthReportEvent object itself. + */ + public NodeNewHealthReportEvent withSourceId(String sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Get describes the property. + * + * @return the property value + */ + public String property() { + return this.property; + } + + /** + * Set describes the property. + * + * @param property the property value to set + * @return the NodeNewHealthReportEvent object itself. + */ + public NodeNewHealthReportEvent withProperty(String property) { + this.property = property; + return this; + } + + /** + * Get describes the property health state. + * + * @return the healthState value + */ + public String healthState() { + return this.healthState; + } + + /** + * Set describes the property health state. + * + * @param healthState the healthState value to set + * @return the NodeNewHealthReportEvent object itself. + */ + public NodeNewHealthReportEvent withHealthState(String healthState) { + this.healthState = healthState; + return this; + } + + /** + * Get time to live in milli-seconds. + * + * @return the timeToLiveMs value + */ + public long timeToLiveMs() { + return this.timeToLiveMs; + } + + /** + * Set time to live in milli-seconds. + * + * @param timeToLiveMs the timeToLiveMs value to set + * @return the NodeNewHealthReportEvent object itself. + */ + public NodeNewHealthReportEvent withTimeToLiveMs(long timeToLiveMs) { + this.timeToLiveMs = timeToLiveMs; + return this; + } + + /** + * Get sequence number of report. + * + * @return the sequenceNumber value + */ + public long sequenceNumber() { + return this.sequenceNumber; + } + + /** + * Set sequence number of report. + * + * @param sequenceNumber the sequenceNumber value to set + * @return the NodeNewHealthReportEvent object itself. + */ + public NodeNewHealthReportEvent withSequenceNumber(long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + * Get description of report. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of report. + * + * @param description the description value to set + * @return the NodeNewHealthReportEvent object itself. + */ + public NodeNewHealthReportEvent withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get indicates the removal when it expires. + * + * @return the removeWhenExpired value + */ + public boolean removeWhenExpired() { + return this.removeWhenExpired; + } + + /** + * Set indicates the removal when it expires. + * + * @param removeWhenExpired the removeWhenExpired value to set + * @return the NodeNewHealthReportEvent object itself. + */ + public NodeNewHealthReportEvent withRemoveWhenExpired(boolean removeWhenExpired) { + this.removeWhenExpired = removeWhenExpired; + return this; + } + + /** + * Get source time. + * + * @return the sourceUtcTimestamp value + */ + public DateTime sourceUtcTimestamp() { + return this.sourceUtcTimestamp; + } + + /** + * Set source time. + * + * @param sourceUtcTimestamp the sourceUtcTimestamp value to set + * @return the NodeNewHealthReportEvent object itself. + */ + public NodeNewHealthReportEvent withSourceUtcTimestamp(DateTime sourceUtcTimestamp) { + this.sourceUtcTimestamp = sourceUtcTimestamp; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeOpenSucceededEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeOpenSucceededEvent.java new file mode 100644 index 0000000000000..7af9e670a297d --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeOpenSucceededEvent.java @@ -0,0 +1,230 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.NodeEventInner; + +/** + * Node Opened Succeeded event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("NodeOpenSucceeded") +public class NodeOpenSucceededEvent extends NodeEventInner { + /** + * Id of Node instance. + */ + @JsonProperty(value = "NodeInstance", required = true) + private long nodeInstance; + + /** + * Id of Node. + */ + @JsonProperty(value = "NodeId", required = true) + private String nodeId; + + /** + * Upgrade domain of Node. + */ + @JsonProperty(value = "UpgradeDomain", required = true) + private String upgradeDomain; + + /** + * Fault domain of Node. + */ + @JsonProperty(value = "FaultDomain", required = true) + private String faultDomain; + + /** + * IP address or FQDN. + */ + @JsonProperty(value = "IpAddressOrFQDN", required = true) + private String ipAddressOrFQDN; + + /** + * Name of Host. + */ + @JsonProperty(value = "Hostname", required = true) + private String hostname; + + /** + * Indicates if it is seed node. + */ + @JsonProperty(value = "IsSeedNode", required = true) + private boolean isSeedNode; + + /** + * Version of Node. + */ + @JsonProperty(value = "NodeVersion", required = true) + private String nodeVersion; + + /** + * Get id of Node instance. + * + * @return the nodeInstance value + */ + public long nodeInstance() { + return this.nodeInstance; + } + + /** + * Set id of Node instance. + * + * @param nodeInstance the nodeInstance value to set + * @return the NodeOpenSucceededEvent object itself. + */ + public NodeOpenSucceededEvent withNodeInstance(long nodeInstance) { + this.nodeInstance = nodeInstance; + return this; + } + + /** + * Get id of Node. + * + * @return the nodeId value + */ + public String nodeId() { + return this.nodeId; + } + + /** + * Set id of Node. + * + * @param nodeId the nodeId value to set + * @return the NodeOpenSucceededEvent object itself. + */ + public NodeOpenSucceededEvent withNodeId(String nodeId) { + this.nodeId = nodeId; + return this; + } + + /** + * Get upgrade domain of Node. + * + * @return the upgradeDomain value + */ + public String upgradeDomain() { + return this.upgradeDomain; + } + + /** + * Set upgrade domain of Node. + * + * @param upgradeDomain the upgradeDomain value to set + * @return the NodeOpenSucceededEvent object itself. + */ + public NodeOpenSucceededEvent withUpgradeDomain(String upgradeDomain) { + this.upgradeDomain = upgradeDomain; + return this; + } + + /** + * Get fault domain of Node. + * + * @return the faultDomain value + */ + public String faultDomain() { + return this.faultDomain; + } + + /** + * Set fault domain of Node. + * + * @param faultDomain the faultDomain value to set + * @return the NodeOpenSucceededEvent object itself. + */ + public NodeOpenSucceededEvent withFaultDomain(String faultDomain) { + this.faultDomain = faultDomain; + return this; + } + + /** + * Get iP address or FQDN. + * + * @return the ipAddressOrFQDN value + */ + public String ipAddressOrFQDN() { + return this.ipAddressOrFQDN; + } + + /** + * Set iP address or FQDN. + * + * @param ipAddressOrFQDN the ipAddressOrFQDN value to set + * @return the NodeOpenSucceededEvent object itself. + */ + public NodeOpenSucceededEvent withIpAddressOrFQDN(String ipAddressOrFQDN) { + this.ipAddressOrFQDN = ipAddressOrFQDN; + return this; + } + + /** + * Get name of Host. + * + * @return the hostname value + */ + public String hostname() { + return this.hostname; + } + + /** + * Set name of Host. + * + * @param hostname the hostname value to set + * @return the NodeOpenSucceededEvent object itself. + */ + public NodeOpenSucceededEvent withHostname(String hostname) { + this.hostname = hostname; + return this; + } + + /** + * Get indicates if it is seed node. + * + * @return the isSeedNode value + */ + public boolean isSeedNode() { + return this.isSeedNode; + } + + /** + * Set indicates if it is seed node. + * + * @param isSeedNode the isSeedNode value to set + * @return the NodeOpenSucceededEvent object itself. + */ + public NodeOpenSucceededEvent withIsSeedNode(boolean isSeedNode) { + this.isSeedNode = isSeedNode; + return this; + } + + /** + * Get version of Node. + * + * @return the nodeVersion value + */ + public String nodeVersion() { + return this.nodeVersion; + } + + /** + * Set version of Node. + * + * @param nodeVersion the nodeVersion value to set + * @return the NodeOpenSucceededEvent object itself. + */ + public NodeOpenSucceededEvent withNodeVersion(String nodeVersion) { + this.nodeVersion = nodeVersion; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeRemovedFromClusterEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeRemovedFromClusterEvent.java new file mode 100644 index 0000000000000..123c39b1164b8 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/NodeRemovedFromClusterEvent.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.NodeEventInner; + +/** + * Node Removed event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("NodeRemovedFromCluster") +public class NodeRemovedFromClusterEvent extends NodeEventInner { + /** + * Id of Node. + */ + @JsonProperty(value = "NodeId", required = true) + private String nodeId; + + /** + * Id of Node instance. + */ + @JsonProperty(value = "NodeInstance", required = true) + private long nodeInstance; + + /** + * Type of Node. + */ + @JsonProperty(value = "NodeType", required = true) + private String nodeType; + + /** + * Fabric version. + */ + @JsonProperty(value = "FabricVersion", required = true) + private String fabricVersion; + + /** + * IP address or FQDN. + */ + @JsonProperty(value = "IpAddressOrFQDN", required = true) + private String ipAddressOrFQDN; + + /** + * Capacities. + */ + @JsonProperty(value = "NodeCapacities", required = true) + private String nodeCapacities; + + /** + * Get id of Node. + * + * @return the nodeId value + */ + public String nodeId() { + return this.nodeId; + } + + /** + * Set id of Node. + * + * @param nodeId the nodeId value to set + * @return the NodeRemovedFromClusterEvent object itself. + */ + public NodeRemovedFromClusterEvent withNodeId(String nodeId) { + this.nodeId = nodeId; + return this; + } + + /** + * Get id of Node instance. + * + * @return the nodeInstance value + */ + public long nodeInstance() { + return this.nodeInstance; + } + + /** + * Set id of Node instance. + * + * @param nodeInstance the nodeInstance value to set + * @return the NodeRemovedFromClusterEvent object itself. + */ + public NodeRemovedFromClusterEvent withNodeInstance(long nodeInstance) { + this.nodeInstance = nodeInstance; + return this; + } + + /** + * Get type of Node. + * + * @return the nodeType value + */ + public String nodeType() { + return this.nodeType; + } + + /** + * Set type of Node. + * + * @param nodeType the nodeType value to set + * @return the NodeRemovedFromClusterEvent object itself. + */ + public NodeRemovedFromClusterEvent withNodeType(String nodeType) { + this.nodeType = nodeType; + return this; + } + + /** + * Get fabric version. + * + * @return the fabricVersion value + */ + public String fabricVersion() { + return this.fabricVersion; + } + + /** + * Set fabric version. + * + * @param fabricVersion the fabricVersion value to set + * @return the NodeRemovedFromClusterEvent object itself. + */ + public NodeRemovedFromClusterEvent withFabricVersion(String fabricVersion) { + this.fabricVersion = fabricVersion; + return this; + } + + /** + * Get iP address or FQDN. + * + * @return the ipAddressOrFQDN value + */ + public String ipAddressOrFQDN() { + return this.ipAddressOrFQDN; + } + + /** + * Set iP address or FQDN. + * + * @param ipAddressOrFQDN the ipAddressOrFQDN value to set + * @return the NodeRemovedFromClusterEvent object itself. + */ + public NodeRemovedFromClusterEvent withIpAddressOrFQDN(String ipAddressOrFQDN) { + this.ipAddressOrFQDN = ipAddressOrFQDN; + return this; + } + + /** + * Get capacities. + * + * @return the nodeCapacities value + */ + public String nodeCapacities() { + return this.nodeCapacities; + } + + /** + * Set capacities. + * + * @param nodeCapacities the nodeCapacities value to set + * @return the NodeRemovedFromClusterEvent object itself. + */ + public NodeRemovedFromClusterEvent withNodeCapacities(String nodeCapacities) { + this.nodeCapacities = nodeCapacities; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/OperatingSystemType.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/OperatingSystemType.java new file mode 100644 index 0000000000000..0a48ad44ca057 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/OperatingSystemType.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for OperatingSystemType. + */ +public final class OperatingSystemType extends ExpandableStringEnum { + /** Static value Linux for OperatingSystemType. */ + public static final OperatingSystemType LINUX = fromString("Linux"); + + /** Static value Windows for OperatingSystemType. */ + public static final OperatingSystemType WINDOWS = fromString("Windows"); + + /** + * Creates or finds a OperatingSystemType from its string representation. + * @param name a name to look for + * @return the corresponding OperatingSystemType + */ + @JsonCreator + public static OperatingSystemType fromString(String name) { + return fromString(name, OperatingSystemType.class); + } + + /** + * @return known OperatingSystemType values + */ + public static Collection values() { + return values(OperatingSystemType.class); + } +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/PartitionBackupEntity.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/PartitionBackupEntity.java index e9d4be26766bb..673423b74939c 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/PartitionBackupEntity.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/PartitionBackupEntity.java @@ -26,11 +26,7 @@ public class PartitionBackupEntity extends BackupEntity { private String serviceName; /** - * An internal ID used by Service Fabric to uniquely identify a partition. - * This is a randomly generated GUID when the service was created. The - * partition ID is unique and does not change for the lifetime of the - * service. If the same service was deleted and recreated the IDs of its - * partitions would be different. + * The partition ID indentifying the partition. */ @JsonProperty(value = "PartitionId") private UUID partitionId; @@ -56,7 +52,7 @@ public PartitionBackupEntity withServiceName(String serviceName) { } /** - * Get an internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + * Get the partition ID indentifying the partition. * * @return the partitionId value */ @@ -65,7 +61,7 @@ public UUID partitionId() { } /** - * Set an internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + * Set the partition ID indentifying the partition. * * @param partitionId the partitionId value to set * @return the PartitionBackupEntity object itself. diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/PartitionNewHealthReportEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/PartitionNewHealthReportEvent.java new file mode 100644 index 0000000000000..6963136511e8b --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/PartitionNewHealthReportEvent.java @@ -0,0 +1,231 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.PartitionEventInner; + +/** + * Partition Health Report Created event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("PartitionNewHealthReport") +public class PartitionNewHealthReportEvent extends PartitionEventInner { + /** + * Id of report source. + */ + @JsonProperty(value = "SourceId", required = true) + private String sourceId; + + /** + * Describes the property. + */ + @JsonProperty(value = "Property", required = true) + private String property; + + /** + * Describes the property health state. + */ + @JsonProperty(value = "HealthState", required = true) + private String healthState; + + /** + * Time to live in milli-seconds. + */ + @JsonProperty(value = "TimeToLiveMs", required = true) + private long timeToLiveMs; + + /** + * Sequence number of report. + */ + @JsonProperty(value = "SequenceNumber", required = true) + private long sequenceNumber; + + /** + * Description of report. + */ + @JsonProperty(value = "Description", required = true) + private String description; + + /** + * Indicates the removal when it expires. + */ + @JsonProperty(value = "RemoveWhenExpired", required = true) + private boolean removeWhenExpired; + + /** + * Source time. + */ + @JsonProperty(value = "SourceUtcTimestamp", required = true) + private DateTime sourceUtcTimestamp; + + /** + * Get id of report source. + * + * @return the sourceId value + */ + public String sourceId() { + return this.sourceId; + } + + /** + * Set id of report source. + * + * @param sourceId the sourceId value to set + * @return the PartitionNewHealthReportEvent object itself. + */ + public PartitionNewHealthReportEvent withSourceId(String sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Get describes the property. + * + * @return the property value + */ + public String property() { + return this.property; + } + + /** + * Set describes the property. + * + * @param property the property value to set + * @return the PartitionNewHealthReportEvent object itself. + */ + public PartitionNewHealthReportEvent withProperty(String property) { + this.property = property; + return this; + } + + /** + * Get describes the property health state. + * + * @return the healthState value + */ + public String healthState() { + return this.healthState; + } + + /** + * Set describes the property health state. + * + * @param healthState the healthState value to set + * @return the PartitionNewHealthReportEvent object itself. + */ + public PartitionNewHealthReportEvent withHealthState(String healthState) { + this.healthState = healthState; + return this; + } + + /** + * Get time to live in milli-seconds. + * + * @return the timeToLiveMs value + */ + public long timeToLiveMs() { + return this.timeToLiveMs; + } + + /** + * Set time to live in milli-seconds. + * + * @param timeToLiveMs the timeToLiveMs value to set + * @return the PartitionNewHealthReportEvent object itself. + */ + public PartitionNewHealthReportEvent withTimeToLiveMs(long timeToLiveMs) { + this.timeToLiveMs = timeToLiveMs; + return this; + } + + /** + * Get sequence number of report. + * + * @return the sequenceNumber value + */ + public long sequenceNumber() { + return this.sequenceNumber; + } + + /** + * Set sequence number of report. + * + * @param sequenceNumber the sequenceNumber value to set + * @return the PartitionNewHealthReportEvent object itself. + */ + public PartitionNewHealthReportEvent withSequenceNumber(long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + * Get description of report. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of report. + * + * @param description the description value to set + * @return the PartitionNewHealthReportEvent object itself. + */ + public PartitionNewHealthReportEvent withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get indicates the removal when it expires. + * + * @return the removeWhenExpired value + */ + public boolean removeWhenExpired() { + return this.removeWhenExpired; + } + + /** + * Set indicates the removal when it expires. + * + * @param removeWhenExpired the removeWhenExpired value to set + * @return the PartitionNewHealthReportEvent object itself. + */ + public PartitionNewHealthReportEvent withRemoveWhenExpired(boolean removeWhenExpired) { + this.removeWhenExpired = removeWhenExpired; + return this; + } + + /** + * Get source time. + * + * @return the sourceUtcTimestamp value + */ + public DateTime sourceUtcTimestamp() { + return this.sourceUtcTimestamp; + } + + /** + * Set source time. + * + * @param sourceUtcTimestamp the sourceUtcTimestamp value to set + * @return the PartitionNewHealthReportEvent object itself. + */ + public PartitionNewHealthReportEvent withSourceUtcTimestamp(DateTime sourceUtcTimestamp) { + this.sourceUtcTimestamp = sourceUtcTimestamp; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/PartitionReconfiguredEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/PartitionReconfiguredEvent.java new file mode 100644 index 0000000000000..c22bf7df234db --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/PartitionReconfiguredEvent.java @@ -0,0 +1,360 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.PartitionEventInner; + +/** + * Partition Reconfiguration event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("PartitionReconfigured") +public class PartitionReconfiguredEvent extends PartitionEventInner { + /** + * The name of a Service Fabric node. + */ + @JsonProperty(value = "NodeName", required = true) + private String nodeName; + + /** + * Id of Node instance. + */ + @JsonProperty(value = "NodeInstanceId", required = true) + private String nodeInstanceId; + + /** + * Type of Service. + */ + @JsonProperty(value = "ServiceType", required = true) + private String serviceType; + + /** + * CcEpochDataLoss version. + */ + @JsonProperty(value = "CcEpochDataLossVersion", required = true) + private long ccEpochDataLossVersion; + + /** + * CcEpochConfig version. + */ + @JsonProperty(value = "CcEpochConfigVersion", required = true) + private long ccEpochConfigVersion; + + /** + * Type of reconfiguration. + */ + @JsonProperty(value = "ReconfigType", required = true) + private String reconfigType; + + /** + * Describes reconfiguration result. + */ + @JsonProperty(value = "Result", required = true) + private String result; + + /** + * Duration of Phase0 in milli-seconds. + */ + @JsonProperty(value = "Phase0DurationMs", required = true) + private double phase0DurationMs; + + /** + * Duration of Phase1 in milli-seconds. + */ + @JsonProperty(value = "Phase1DurationMs", required = true) + private double phase1DurationMs; + + /** + * Duration of Phase2 in milli-seconds. + */ + @JsonProperty(value = "Phase2DurationMs", required = true) + private double phase2DurationMs; + + /** + * Duration of Phase3 in milli-seconds. + */ + @JsonProperty(value = "Phase3DurationMs", required = true) + private double phase3DurationMs; + + /** + * Duration of Phase4 in milli-seconds. + */ + @JsonProperty(value = "Phase4DurationMs", required = true) + private double phase4DurationMs; + + /** + * Total duration in milli-seconds. + */ + @JsonProperty(value = "TotalDurationMs", required = true) + private double totalDurationMs; + + /** + * Get the name of a Service Fabric node. + * + * @return the nodeName value + */ + public String nodeName() { + return this.nodeName; + } + + /** + * Set the name of a Service Fabric node. + * + * @param nodeName the nodeName value to set + * @return the PartitionReconfiguredEvent object itself. + */ + public PartitionReconfiguredEvent withNodeName(String nodeName) { + this.nodeName = nodeName; + return this; + } + + /** + * Get id of Node instance. + * + * @return the nodeInstanceId value + */ + public String nodeInstanceId() { + return this.nodeInstanceId; + } + + /** + * Set id of Node instance. + * + * @param nodeInstanceId the nodeInstanceId value to set + * @return the PartitionReconfiguredEvent object itself. + */ + public PartitionReconfiguredEvent withNodeInstanceId(String nodeInstanceId) { + this.nodeInstanceId = nodeInstanceId; + return this; + } + + /** + * Get type of Service. + * + * @return the serviceType value + */ + public String serviceType() { + return this.serviceType; + } + + /** + * Set type of Service. + * + * @param serviceType the serviceType value to set + * @return the PartitionReconfiguredEvent object itself. + */ + public PartitionReconfiguredEvent withServiceType(String serviceType) { + this.serviceType = serviceType; + return this; + } + + /** + * Get ccEpochDataLoss version. + * + * @return the ccEpochDataLossVersion value + */ + public long ccEpochDataLossVersion() { + return this.ccEpochDataLossVersion; + } + + /** + * Set ccEpochDataLoss version. + * + * @param ccEpochDataLossVersion the ccEpochDataLossVersion value to set + * @return the PartitionReconfiguredEvent object itself. + */ + public PartitionReconfiguredEvent withCcEpochDataLossVersion(long ccEpochDataLossVersion) { + this.ccEpochDataLossVersion = ccEpochDataLossVersion; + return this; + } + + /** + * Get ccEpochConfig version. + * + * @return the ccEpochConfigVersion value + */ + public long ccEpochConfigVersion() { + return this.ccEpochConfigVersion; + } + + /** + * Set ccEpochConfig version. + * + * @param ccEpochConfigVersion the ccEpochConfigVersion value to set + * @return the PartitionReconfiguredEvent object itself. + */ + public PartitionReconfiguredEvent withCcEpochConfigVersion(long ccEpochConfigVersion) { + this.ccEpochConfigVersion = ccEpochConfigVersion; + return this; + } + + /** + * Get type of reconfiguration. + * + * @return the reconfigType value + */ + public String reconfigType() { + return this.reconfigType; + } + + /** + * Set type of reconfiguration. + * + * @param reconfigType the reconfigType value to set + * @return the PartitionReconfiguredEvent object itself. + */ + public PartitionReconfiguredEvent withReconfigType(String reconfigType) { + this.reconfigType = reconfigType; + return this; + } + + /** + * Get describes reconfiguration result. + * + * @return the result value + */ + public String result() { + return this.result; + } + + /** + * Set describes reconfiguration result. + * + * @param result the result value to set + * @return the PartitionReconfiguredEvent object itself. + */ + public PartitionReconfiguredEvent withResult(String result) { + this.result = result; + return this; + } + + /** + * Get duration of Phase0 in milli-seconds. + * + * @return the phase0DurationMs value + */ + public double phase0DurationMs() { + return this.phase0DurationMs; + } + + /** + * Set duration of Phase0 in milli-seconds. + * + * @param phase0DurationMs the phase0DurationMs value to set + * @return the PartitionReconfiguredEvent object itself. + */ + public PartitionReconfiguredEvent withPhase0DurationMs(double phase0DurationMs) { + this.phase0DurationMs = phase0DurationMs; + return this; + } + + /** + * Get duration of Phase1 in milli-seconds. + * + * @return the phase1DurationMs value + */ + public double phase1DurationMs() { + return this.phase1DurationMs; + } + + /** + * Set duration of Phase1 in milli-seconds. + * + * @param phase1DurationMs the phase1DurationMs value to set + * @return the PartitionReconfiguredEvent object itself. + */ + public PartitionReconfiguredEvent withPhase1DurationMs(double phase1DurationMs) { + this.phase1DurationMs = phase1DurationMs; + return this; + } + + /** + * Get duration of Phase2 in milli-seconds. + * + * @return the phase2DurationMs value + */ + public double phase2DurationMs() { + return this.phase2DurationMs; + } + + /** + * Set duration of Phase2 in milli-seconds. + * + * @param phase2DurationMs the phase2DurationMs value to set + * @return the PartitionReconfiguredEvent object itself. + */ + public PartitionReconfiguredEvent withPhase2DurationMs(double phase2DurationMs) { + this.phase2DurationMs = phase2DurationMs; + return this; + } + + /** + * Get duration of Phase3 in milli-seconds. + * + * @return the phase3DurationMs value + */ + public double phase3DurationMs() { + return this.phase3DurationMs; + } + + /** + * Set duration of Phase3 in milli-seconds. + * + * @param phase3DurationMs the phase3DurationMs value to set + * @return the PartitionReconfiguredEvent object itself. + */ + public PartitionReconfiguredEvent withPhase3DurationMs(double phase3DurationMs) { + this.phase3DurationMs = phase3DurationMs; + return this; + } + + /** + * Get duration of Phase4 in milli-seconds. + * + * @return the phase4DurationMs value + */ + public double phase4DurationMs() { + return this.phase4DurationMs; + } + + /** + * Set duration of Phase4 in milli-seconds. + * + * @param phase4DurationMs the phase4DurationMs value to set + * @return the PartitionReconfiguredEvent object itself. + */ + public PartitionReconfiguredEvent withPhase4DurationMs(double phase4DurationMs) { + this.phase4DurationMs = phase4DurationMs; + return this; + } + + /** + * Get total duration in milli-seconds. + * + * @return the totalDurationMs value + */ + public double totalDurationMs() { + return this.totalDurationMs; + } + + /** + * Set total duration in milli-seconds. + * + * @param totalDurationMs the totalDurationMs value to set + * @return the PartitionReconfiguredEvent object itself. + */ + public PartitionReconfiguredEvent withTotalDurationMs(double totalDurationMs) { + this.totalDurationMs = totalDurationMs; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ReliableCollectionsRef.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ReliableCollectionsRef.java new file mode 100644 index 0000000000000..d854031665294 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ReliableCollectionsRef.java @@ -0,0 +1,73 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifying this parameter adds support for reliable collections. + */ +public class ReliableCollectionsRef { + /** + * Name of ReliableCollection resource. Right now it's not used and you can + * use any string. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * False (the default) if ReliableCollections state is persisted to disk as + * usual. True if you do not want to persist state, in which case + * replication is still enabled and you can use ReliableCollections as + * distributed cache. + */ + @JsonProperty(value = "doNotPersistState") + private Boolean doNotPersistState; + + /** + * Get name of ReliableCollection resource. Right now it's not used and you can use any string. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of ReliableCollection resource. Right now it's not used and you can use any string. + * + * @param name the name value to set + * @return the ReliableCollectionsRef object itself. + */ + public ReliableCollectionsRef withName(String name) { + this.name = name; + return this; + } + + /** + * Get false (the default) if ReliableCollections state is persisted to disk as usual. True if you do not want to persist state, in which case replication is still enabled and you can use ReliableCollections as distributed cache. + * + * @return the doNotPersistState value + */ + public Boolean doNotPersistState() { + return this.doNotPersistState; + } + + /** + * Set false (the default) if ReliableCollections state is persisted to disk as usual. True if you do not want to persist state, in which case replication is still enabled and you can use ReliableCollections as distributed cache. + * + * @param doNotPersistState the doNotPersistState value to set + * @return the ReliableCollectionsRef object itself. + */ + public ReliableCollectionsRef withDoNotPersistState(Boolean doNotPersistState) { + this.doNotPersistState = doNotPersistState; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ResourceStatus.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ResourceStatus.java new file mode 100644 index 0000000000000..f075015aeede8 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ResourceStatus.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ResourceStatus. + */ +public final class ResourceStatus extends ExpandableStringEnum { + /** Static value Unknown for ResourceStatus. */ + public static final ResourceStatus UNKNOWN = fromString("Unknown"); + + /** Static value Ready for ResourceStatus. */ + public static final ResourceStatus READY = fromString("Ready"); + + /** Static value Upgrading for ResourceStatus. */ + public static final ResourceStatus UPGRADING = fromString("Upgrading"); + + /** Static value Creating for ResourceStatus. */ + public static final ResourceStatus CREATING = fromString("Creating"); + + /** Static value Deleting for ResourceStatus. */ + public static final ResourceStatus DELETING = fromString("Deleting"); + + /** Static value Failed for ResourceStatus. */ + public static final ResourceStatus FAILED = fromString("Failed"); + + /** + * Creates or finds a ResourceStatus from its string representation. + * @param name a name to look for + * @return the corresponding ResourceStatus + */ + @JsonCreator + public static ResourceStatus fromString(String name) { + return fromString(name, ResourceStatus.class); + } + + /** + * @return known ResourceStatus values + */ + public static Collection values() { + return values(ResourceStatus.class); + } +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/RetentionPolicyDescription.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/RetentionPolicyDescription.java new file mode 100644 index 0000000000000..690c7e27a941c --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/RetentionPolicyDescription.java @@ -0,0 +1,24 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Describes the retention policy configured. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "RetentionPolicyType") +@JsonTypeName("RetentionPolicyDescription") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Basic", value = BasicRetentionPolicyDescription.class) +}) +public class RetentionPolicyDescription { +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/RetentionPolicyType.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/RetentionPolicyType.java new file mode 100644 index 0000000000000..72a3e32ab7bd5 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/RetentionPolicyType.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for RetentionPolicyType. + */ +public final class RetentionPolicyType extends ExpandableStringEnum { + /** Static value Basic for RetentionPolicyType. */ + public static final RetentionPolicyType BASIC = fromString("Basic"); + + /** Static value Invalid for RetentionPolicyType. */ + public static final RetentionPolicyType INVALID = fromString("Invalid"); + + /** + * Creates or finds a RetentionPolicyType from its string representation. + * @param name a name to look for + * @return the corresponding RetentionPolicyType + */ + @JsonCreator + public static RetentionPolicyType fromString(String name) { + return fromString(name, RetentionPolicyType.class); + } + + /** + * @return known RetentionPolicyType values + */ + public static Collection values() { + return values(RetentionPolicyType.class); + } +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/SecretKind.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/SecretKind.java new file mode 100644 index 0000000000000..dd0d341749d15 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/SecretKind.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SecretKind. + */ +public final class SecretKind extends ExpandableStringEnum { + /** Static value inlinedValue for SecretKind. */ + public static final SecretKind INLINED_VALUE = fromString("inlinedValue"); + + /** + * Creates or finds a SecretKind from its string representation. + * @param name a name to look for + * @return the corresponding SecretKind + */ + @JsonCreator + public static SecretKind fromString(String name) { + return fromString(name, SecretKind.class); + } + + /** + * @return known SecretKind values + */ + public static Collection values() { + return values(SecretKind.class); + } +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/SecretResourceProperties.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/SecretResourceProperties.java new file mode 100644 index 0000000000000..ac81c3ab689d6 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/SecretResourceProperties.java @@ -0,0 +1,110 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Describes the properties of a secret resource. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("SecretResourceProperties") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "inlinedValue", value = InlinedValueSecretResourceProperties.class) +}) +public class SecretResourceProperties extends SecretResourcePropertiesBase { + /** + * User readable description of the secret. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Status of the resource. Possible values include: 'Unknown', 'Ready', + * 'Upgrading', 'Creating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private ResourceStatus status; + + /** + * Gives additional information about the current status of the secret. + */ + @JsonProperty(value = "statusDetails", access = JsonProperty.Access.WRITE_ONLY) + private String statusDetails; + + /** + * The type of the content stored in the secret value. The value of this + * property is opaque to Service Fabric. Once set, the value of this + * property cannot be changed. + */ + @JsonProperty(value = "contentType") + private String contentType; + + /** + * Get user readable description of the secret. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set user readable description of the secret. + * + * @param description the description value to set + * @return the SecretResourceProperties object itself. + */ + public SecretResourceProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get status of the resource. Possible values include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed'. + * + * @return the status value + */ + public ResourceStatus status() { + return this.status; + } + + /** + * Get gives additional information about the current status of the secret. + * + * @return the statusDetails value + */ + public String statusDetails() { + return this.statusDetails; + } + + /** + * Get the type of the content stored in the secret value. The value of this property is opaque to Service Fabric. Once set, the value of this property cannot be changed. + * + * @return the contentType value + */ + public String contentType() { + return this.contentType; + } + + /** + * Set the type of the content stored in the secret value. The value of this property is opaque to Service Fabric. Once set, the value of this property cannot be changed. + * + * @param contentType the contentType value to set + * @return the SecretResourceProperties object itself. + */ + public SecretResourceProperties withContentType(String contentType) { + this.contentType = contentType; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/SecretResourcePropertiesBase.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/SecretResourcePropertiesBase.java new file mode 100644 index 0000000000000..66db7bd99cf2e --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/SecretResourcePropertiesBase.java @@ -0,0 +1,24 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * This type describes the properties of a secret resource, including its kind. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("SecretResourcePropertiesBase") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "SecretResourceProperties", value = SecretResourceProperties.class) +}) +public class SecretResourcePropertiesBase { +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/SecretValueProperties.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/SecretValueProperties.java new file mode 100644 index 0000000000000..68bc159184cc0 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/SecretValueProperties.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * This type describes properties of secret value resource. + */ +public class SecretValueProperties { + /** + * The actual value of the secret. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get the actual value of the secret. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set the actual value of the secret. + * + * @param value the value value to set + * @return the SecretValueProperties object itself. + */ + public SecretValueProperties withValue(String value) { + this.value = value; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServiceNewHealthReportEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServiceNewHealthReportEvent.java new file mode 100644 index 0000000000000..41fa487e79ee2 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServiceNewHealthReportEvent.java @@ -0,0 +1,257 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ServiceEventInner; + +/** + * Service Health Report Created event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("ServiceNewHealthReport") +public class ServiceNewHealthReportEvent extends ServiceEventInner { + /** + * Id of Service instance. + */ + @JsonProperty(value = "InstanceId", required = true) + private long instanceId; + + /** + * Id of report source. + */ + @JsonProperty(value = "SourceId", required = true) + private String sourceId; + + /** + * Describes the property. + */ + @JsonProperty(value = "Property", required = true) + private String property; + + /** + * Describes the property health state. + */ + @JsonProperty(value = "HealthState", required = true) + private String healthState; + + /** + * Time to live in milli-seconds. + */ + @JsonProperty(value = "TimeToLiveMs", required = true) + private long timeToLiveMs; + + /** + * Sequence number of report. + */ + @JsonProperty(value = "SequenceNumber", required = true) + private long sequenceNumber; + + /** + * Description of report. + */ + @JsonProperty(value = "Description", required = true) + private String description; + + /** + * Indicates the removal when it expires. + */ + @JsonProperty(value = "RemoveWhenExpired", required = true) + private boolean removeWhenExpired; + + /** + * Source time. + */ + @JsonProperty(value = "SourceUtcTimestamp", required = true) + private DateTime sourceUtcTimestamp; + + /** + * Get id of Service instance. + * + * @return the instanceId value + */ + public long instanceId() { + return this.instanceId; + } + + /** + * Set id of Service instance. + * + * @param instanceId the instanceId value to set + * @return the ServiceNewHealthReportEvent object itself. + */ + public ServiceNewHealthReportEvent withInstanceId(long instanceId) { + this.instanceId = instanceId; + return this; + } + + /** + * Get id of report source. + * + * @return the sourceId value + */ + public String sourceId() { + return this.sourceId; + } + + /** + * Set id of report source. + * + * @param sourceId the sourceId value to set + * @return the ServiceNewHealthReportEvent object itself. + */ + public ServiceNewHealthReportEvent withSourceId(String sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Get describes the property. + * + * @return the property value + */ + public String property() { + return this.property; + } + + /** + * Set describes the property. + * + * @param property the property value to set + * @return the ServiceNewHealthReportEvent object itself. + */ + public ServiceNewHealthReportEvent withProperty(String property) { + this.property = property; + return this; + } + + /** + * Get describes the property health state. + * + * @return the healthState value + */ + public String healthState() { + return this.healthState; + } + + /** + * Set describes the property health state. + * + * @param healthState the healthState value to set + * @return the ServiceNewHealthReportEvent object itself. + */ + public ServiceNewHealthReportEvent withHealthState(String healthState) { + this.healthState = healthState; + return this; + } + + /** + * Get time to live in milli-seconds. + * + * @return the timeToLiveMs value + */ + public long timeToLiveMs() { + return this.timeToLiveMs; + } + + /** + * Set time to live in milli-seconds. + * + * @param timeToLiveMs the timeToLiveMs value to set + * @return the ServiceNewHealthReportEvent object itself. + */ + public ServiceNewHealthReportEvent withTimeToLiveMs(long timeToLiveMs) { + this.timeToLiveMs = timeToLiveMs; + return this; + } + + /** + * Get sequence number of report. + * + * @return the sequenceNumber value + */ + public long sequenceNumber() { + return this.sequenceNumber; + } + + /** + * Set sequence number of report. + * + * @param sequenceNumber the sequenceNumber value to set + * @return the ServiceNewHealthReportEvent object itself. + */ + public ServiceNewHealthReportEvent withSequenceNumber(long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + * Get description of report. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of report. + * + * @param description the description value to set + * @return the ServiceNewHealthReportEvent object itself. + */ + public ServiceNewHealthReportEvent withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get indicates the removal when it expires. + * + * @return the removeWhenExpired value + */ + public boolean removeWhenExpired() { + return this.removeWhenExpired; + } + + /** + * Set indicates the removal when it expires. + * + * @param removeWhenExpired the removeWhenExpired value to set + * @return the ServiceNewHealthReportEvent object itself. + */ + public ServiceNewHealthReportEvent withRemoveWhenExpired(boolean removeWhenExpired) { + this.removeWhenExpired = removeWhenExpired; + return this; + } + + /** + * Get source time. + * + * @return the sourceUtcTimestamp value + */ + public DateTime sourceUtcTimestamp() { + return this.sourceUtcTimestamp; + } + + /** + * Set source time. + * + * @param sourceUtcTimestamp the sourceUtcTimestamp value to set + * @return the ServiceNewHealthReportEvent object itself. + */ + public ServiceNewHealthReportEvent withSourceUtcTimestamp(DateTime sourceUtcTimestamp) { + this.sourceUtcTimestamp = sourceUtcTimestamp; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServicePlacementPreferPrimaryDomainPolicyDescription.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServicePlacementPreferPrimaryDomainPolicyDescription.java index 2619ee30dd962..013c41b30d4c2 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServicePlacementPreferPrimaryDomainPolicyDescription.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServicePlacementPreferPrimaryDomainPolicyDescription.java @@ -19,7 +19,7 @@ * * This placement policy is usually used with fault domains in scenarios where * the Service Fabric cluster is geographically distributed in order to - * indicate that a service's primary replica should be located in a particular + * indicate that a service�s primary replica should be located in a particular * fault domain, which in geo-distributed scenarios usually aligns with * regional or datacenter boundaries. Note that since this is an optimization * it is possible that the Primary replica may not end up located in this diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServiceProperties.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServiceProperties.java new file mode 100644 index 0000000000000..43da3fb58d83e --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServiceProperties.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes properties of a service resource. + */ +public class ServiceProperties { + /** + * User readable description of the service. + */ + @JsonProperty(value = "description") + private String description; + + /** + * The number of replicas of the service to create. Defaults to 1 if not + * specified. + */ + @JsonProperty(value = "replicaCount") + private Integer replicaCount; + + /** + * Auto scaling policies. + */ + @JsonProperty(value = "autoScalingPolicies") + private List autoScalingPolicies; + + /** + * Status of the service. Possible values include: 'Unknown', 'Ready', + * 'Upgrading', 'Creating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private ResourceStatus status; + + /** + * Gives additional information about the current status of the service. + */ + @JsonProperty(value = "statusDetails", access = JsonProperty.Access.WRITE_ONLY) + private String statusDetails; + + /** + * Describes the health state of an application resource. Possible values + * include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'. + */ + @JsonProperty(value = "healthState", access = JsonProperty.Access.WRITE_ONLY) + private HealthState healthState; + + /** + * When the service's health state is not 'Ok', this additional details + * from service fabric Health Manager for the user to know why the service + * is marked unhealthy. + */ + @JsonProperty(value = "unhealthyEvaluation", access = JsonProperty.Access.WRITE_ONLY) + private String unhealthyEvaluation; + + /** + * Get user readable description of the service. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set user readable description of the service. + * + * @param description the description value to set + * @return the ServiceProperties object itself. + */ + public ServiceProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the number of replicas of the service to create. Defaults to 1 if not specified. + * + * @return the replicaCount value + */ + public Integer replicaCount() { + return this.replicaCount; + } + + /** + * Set the number of replicas of the service to create. Defaults to 1 if not specified. + * + * @param replicaCount the replicaCount value to set + * @return the ServiceProperties object itself. + */ + public ServiceProperties withReplicaCount(Integer replicaCount) { + this.replicaCount = replicaCount; + return this; + } + + /** + * Get auto scaling policies. + * + * @return the autoScalingPolicies value + */ + public List autoScalingPolicies() { + return this.autoScalingPolicies; + } + + /** + * Set auto scaling policies. + * + * @param autoScalingPolicies the autoScalingPolicies value to set + * @return the ServiceProperties object itself. + */ + public ServiceProperties withAutoScalingPolicies(List autoScalingPolicies) { + this.autoScalingPolicies = autoScalingPolicies; + return this; + } + + /** + * Get status of the service. Possible values include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed'. + * + * @return the status value + */ + public ResourceStatus status() { + return this.status; + } + + /** + * Get gives additional information about the current status of the service. + * + * @return the statusDetails value + */ + public String statusDetails() { + return this.statusDetails; + } + + /** + * Get describes the health state of an application resource. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'. + * + * @return the healthState value + */ + public HealthState healthState() { + return this.healthState; + } + + /** + * Get when the service's health state is not 'Ok', this additional details from service fabric Health Manager for the user to know why the service is marked unhealthy. + * + * @return the unhealthyEvaluation value + */ + public String unhealthyEvaluation() { + return this.unhealthyEvaluation; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServiceReplicaProperties.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServiceReplicaProperties.java index 13470b75a2157..24fd9c79eee31 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServiceReplicaProperties.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServiceReplicaProperties.java @@ -16,11 +16,11 @@ */ public class ServiceReplicaProperties { /** - * The Operating system type required by the code in service. Possible - * values include: 'Linux', 'Windows'. + * The operation system required by the code in service. Possible values + * include: 'Linux', 'Windows'. */ @JsonProperty(value = "osType", required = true) - private OperatingSystemTypes osType; + private OperatingSystemType osType; /** * Describes the set of code packages that forms the service. A code @@ -44,21 +44,21 @@ public class ServiceReplicaProperties { private DiagnosticsRef diagnostics; /** - * Get the Operating system type required by the code in service. Possible values include: 'Linux', 'Windows'. + * Get the operation system required by the code in service. Possible values include: 'Linux', 'Windows'. * * @return the osType value */ - public OperatingSystemTypes osType() { + public OperatingSystemType osType() { return this.osType; } /** - * Set the Operating system type required by the code in service. Possible values include: 'Linux', 'Windows'. + * Set the operation system required by the code in service. Possible values include: 'Linux', 'Windows'. * * @param osType the osType value to set * @return the ServiceReplicaProperties object itself. */ - public ServiceReplicaProperties withOsType(OperatingSystemTypes osType) { + public ServiceReplicaProperties withOsType(OperatingSystemType osType) { this.osType = osType; return this; } diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServiceTypeHealthPolicy.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServiceTypeHealthPolicy.java index f7acdc7ed897f..c8c0f1978d254 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServiceTypeHealthPolicy.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServiceTypeHealthPolicy.java @@ -48,8 +48,8 @@ public class ServiceTypeHealthPolicy { private Integer maxPercentUnhealthyReplicasPerPartition; /** - * The maximum allowed percentage of unhealthy services. Allowed values are - * Byte values from zero to 100. + * The maximum maximum allowed percentage of unhealthy services. Allowed + * values are Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services * that can be unhealthy before the application is considered in error. @@ -121,7 +121,7 @@ public ServiceTypeHealthPolicy withMaxPercentUnhealthyReplicasPerPartition(Integ } /** - * Get the maximum allowed percentage of unhealthy services. Allowed values are Byte values from zero to 100. + * Get the maximum maximum allowed percentage of unhealthy services. Allowed values are Byte values from zero to 100. The percentage represents the maximum tolerated percentage of services that can be unhealthy before the application is considered in error. If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. This is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type. @@ -134,7 +134,7 @@ public Integer maxPercentUnhealthyServices() { } /** - * Set the maximum allowed percentage of unhealthy services. Allowed values are Byte values from zero to 100. + * Set the maximum maximum allowed percentage of unhealthy services. Allowed values are Byte values from zero to 100. The percentage represents the maximum tolerated percentage of services that can be unhealthy before the application is considered in error. If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. This is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type. diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/Setting.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/Setting.java index d97b8ae4336f8..cc042ae1a2284 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/Setting.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/Setting.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Describes a setting for the container. + * Describes a setting for the container. The setting file path can be fetched + * from environment variable "Fabric_SettingPath". The path for Windows + * container is "C:\\secrets". The path for Linux container is "/var/secrets". */ public class Setting { /** diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/SizeTypes.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/SizeTypes.java new file mode 100644 index 0000000000000..b286307c30577 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/SizeTypes.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SizeTypes. + */ +public final class SizeTypes extends ExpandableStringEnum { + /** Static value Small for SizeTypes. */ + public static final SizeTypes SMALL = fromString("Small"); + + /** Static value Medium for SizeTypes. */ + public static final SizeTypes MEDIUM = fromString("Medium"); + + /** Static value Large for SizeTypes. */ + public static final SizeTypes LARGE = fromString("Large"); + + /** + * Creates or finds a SizeTypes from its string representation. + * @param name a name to look for + * @return the corresponding SizeTypes + */ + @JsonCreator + public static SizeTypes fromString(String name) { + return fromString(name, SizeTypes.class); + } + + /** + * @return known SizeTypes values + */ + public static Collection values() { + return values(SizeTypes.class); + } +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/StatefulReplicaNewHealthReportEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/StatefulReplicaNewHealthReportEvent.java new file mode 100644 index 0000000000000..a4e4fc98d6257 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/StatefulReplicaNewHealthReportEvent.java @@ -0,0 +1,257 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ReplicaEventInner; + +/** + * Stateful Replica Health Report Created event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("StatefulReplicaNewHealthReport") +public class StatefulReplicaNewHealthReportEvent extends ReplicaEventInner { + /** + * Id of Replica instance. + */ + @JsonProperty(value = "ReplicaInstanceId", required = true) + private long replicaInstanceId; + + /** + * Id of report source. + */ + @JsonProperty(value = "SourceId", required = true) + private String sourceId; + + /** + * Describes the property. + */ + @JsonProperty(value = "Property", required = true) + private String property; + + /** + * Describes the property health state. + */ + @JsonProperty(value = "HealthState", required = true) + private String healthState; + + /** + * Time to live in milli-seconds. + */ + @JsonProperty(value = "TimeToLiveMs", required = true) + private long timeToLiveMs; + + /** + * Sequence number of report. + */ + @JsonProperty(value = "SequenceNumber", required = true) + private long sequenceNumber; + + /** + * Description of report. + */ + @JsonProperty(value = "Description", required = true) + private String description; + + /** + * Indicates the removal when it expires. + */ + @JsonProperty(value = "RemoveWhenExpired", required = true) + private boolean removeWhenExpired; + + /** + * Source time. + */ + @JsonProperty(value = "SourceUtcTimestamp", required = true) + private DateTime sourceUtcTimestamp; + + /** + * Get id of Replica instance. + * + * @return the replicaInstanceId value + */ + public long replicaInstanceId() { + return this.replicaInstanceId; + } + + /** + * Set id of Replica instance. + * + * @param replicaInstanceId the replicaInstanceId value to set + * @return the StatefulReplicaNewHealthReportEvent object itself. + */ + public StatefulReplicaNewHealthReportEvent withReplicaInstanceId(long replicaInstanceId) { + this.replicaInstanceId = replicaInstanceId; + return this; + } + + /** + * Get id of report source. + * + * @return the sourceId value + */ + public String sourceId() { + return this.sourceId; + } + + /** + * Set id of report source. + * + * @param sourceId the sourceId value to set + * @return the StatefulReplicaNewHealthReportEvent object itself. + */ + public StatefulReplicaNewHealthReportEvent withSourceId(String sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Get describes the property. + * + * @return the property value + */ + public String property() { + return this.property; + } + + /** + * Set describes the property. + * + * @param property the property value to set + * @return the StatefulReplicaNewHealthReportEvent object itself. + */ + public StatefulReplicaNewHealthReportEvent withProperty(String property) { + this.property = property; + return this; + } + + /** + * Get describes the property health state. + * + * @return the healthState value + */ + public String healthState() { + return this.healthState; + } + + /** + * Set describes the property health state. + * + * @param healthState the healthState value to set + * @return the StatefulReplicaNewHealthReportEvent object itself. + */ + public StatefulReplicaNewHealthReportEvent withHealthState(String healthState) { + this.healthState = healthState; + return this; + } + + /** + * Get time to live in milli-seconds. + * + * @return the timeToLiveMs value + */ + public long timeToLiveMs() { + return this.timeToLiveMs; + } + + /** + * Set time to live in milli-seconds. + * + * @param timeToLiveMs the timeToLiveMs value to set + * @return the StatefulReplicaNewHealthReportEvent object itself. + */ + public StatefulReplicaNewHealthReportEvent withTimeToLiveMs(long timeToLiveMs) { + this.timeToLiveMs = timeToLiveMs; + return this; + } + + /** + * Get sequence number of report. + * + * @return the sequenceNumber value + */ + public long sequenceNumber() { + return this.sequenceNumber; + } + + /** + * Set sequence number of report. + * + * @param sequenceNumber the sequenceNumber value to set + * @return the StatefulReplicaNewHealthReportEvent object itself. + */ + public StatefulReplicaNewHealthReportEvent withSequenceNumber(long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + * Get description of report. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of report. + * + * @param description the description value to set + * @return the StatefulReplicaNewHealthReportEvent object itself. + */ + public StatefulReplicaNewHealthReportEvent withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get indicates the removal when it expires. + * + * @return the removeWhenExpired value + */ + public boolean removeWhenExpired() { + return this.removeWhenExpired; + } + + /** + * Set indicates the removal when it expires. + * + * @param removeWhenExpired the removeWhenExpired value to set + * @return the StatefulReplicaNewHealthReportEvent object itself. + */ + public StatefulReplicaNewHealthReportEvent withRemoveWhenExpired(boolean removeWhenExpired) { + this.removeWhenExpired = removeWhenExpired; + return this; + } + + /** + * Get source time. + * + * @return the sourceUtcTimestamp value + */ + public DateTime sourceUtcTimestamp() { + return this.sourceUtcTimestamp; + } + + /** + * Set source time. + * + * @param sourceUtcTimestamp the sourceUtcTimestamp value to set + * @return the StatefulReplicaNewHealthReportEvent object itself. + */ + public StatefulReplicaNewHealthReportEvent withSourceUtcTimestamp(DateTime sourceUtcTimestamp) { + this.sourceUtcTimestamp = sourceUtcTimestamp; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/StatefulServicePartitionInfo.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/StatefulServicePartitionInfo.java index 07821770f3efc..0c7e9b769f498 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/StatefulServicePartitionInfo.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/StatefulServicePartitionInfo.java @@ -48,8 +48,8 @@ public class StatefulServicePartitionInfo extends ServicePartitionInfoInner { * Primary replica are said to be a new Epoch from the ones which were sent * by the old Primary replica. */ - @JsonProperty(value = "CurrentConfigurationEpoch") - private Epoch currentConfigurationEpoch; + @JsonProperty(value = "PrimaryEpoch") + private Epoch primaryEpoch; /** * Get the target replica set size as a number. @@ -114,20 +114,20 @@ public StatefulServicePartitionInfo withLastQuorumLossDuration(Period lastQuorum /** * Get an Epoch is a configuration number for the partition as a whole. When the configuration of the replica set changes, for example when the Primary replica changes, the operations that are replicated from the new Primary replica are said to be a new Epoch from the ones which were sent by the old Primary replica. * - * @return the currentConfigurationEpoch value + * @return the primaryEpoch value */ - public Epoch currentConfigurationEpoch() { - return this.currentConfigurationEpoch; + public Epoch primaryEpoch() { + return this.primaryEpoch; } /** * Set an Epoch is a configuration number for the partition as a whole. When the configuration of the replica set changes, for example when the Primary replica changes, the operations that are replicated from the new Primary replica are said to be a new Epoch from the ones which were sent by the old Primary replica. * - * @param currentConfigurationEpoch the currentConfigurationEpoch value to set + * @param primaryEpoch the primaryEpoch value to set * @return the StatefulServicePartitionInfo object itself. */ - public StatefulServicePartitionInfo withCurrentConfigurationEpoch(Epoch currentConfigurationEpoch) { - this.currentConfigurationEpoch = currentConfigurationEpoch; + public StatefulServicePartitionInfo withPrimaryEpoch(Epoch primaryEpoch) { + this.primaryEpoch = primaryEpoch; return this; } diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/StatelessReplicaNewHealthReportEvent.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/StatelessReplicaNewHealthReportEvent.java new file mode 100644 index 0000000000000..ccb649eafa7a1 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/StatelessReplicaNewHealthReportEvent.java @@ -0,0 +1,231 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.servicefabric.implementation.ReplicaEventInner; + +/** + * Stateless Replica Health Report Created event. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") +@JsonTypeName("StatelessReplicaNewHealthReport") +public class StatelessReplicaNewHealthReportEvent extends ReplicaEventInner { + /** + * Id of report source. + */ + @JsonProperty(value = "SourceId", required = true) + private String sourceId; + + /** + * Describes the property. + */ + @JsonProperty(value = "Property", required = true) + private String property; + + /** + * Describes the property health state. + */ + @JsonProperty(value = "HealthState", required = true) + private String healthState; + + /** + * Time to live in milli-seconds. + */ + @JsonProperty(value = "TimeToLiveMs", required = true) + private long timeToLiveMs; + + /** + * Sequence number of report. + */ + @JsonProperty(value = "SequenceNumber", required = true) + private long sequenceNumber; + + /** + * Description of report. + */ + @JsonProperty(value = "Description", required = true) + private String description; + + /** + * Indicates the removal when it expires. + */ + @JsonProperty(value = "RemoveWhenExpired", required = true) + private boolean removeWhenExpired; + + /** + * Source time. + */ + @JsonProperty(value = "SourceUtcTimestamp", required = true) + private DateTime sourceUtcTimestamp; + + /** + * Get id of report source. + * + * @return the sourceId value + */ + public String sourceId() { + return this.sourceId; + } + + /** + * Set id of report source. + * + * @param sourceId the sourceId value to set + * @return the StatelessReplicaNewHealthReportEvent object itself. + */ + public StatelessReplicaNewHealthReportEvent withSourceId(String sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Get describes the property. + * + * @return the property value + */ + public String property() { + return this.property; + } + + /** + * Set describes the property. + * + * @param property the property value to set + * @return the StatelessReplicaNewHealthReportEvent object itself. + */ + public StatelessReplicaNewHealthReportEvent withProperty(String property) { + this.property = property; + return this; + } + + /** + * Get describes the property health state. + * + * @return the healthState value + */ + public String healthState() { + return this.healthState; + } + + /** + * Set describes the property health state. + * + * @param healthState the healthState value to set + * @return the StatelessReplicaNewHealthReportEvent object itself. + */ + public StatelessReplicaNewHealthReportEvent withHealthState(String healthState) { + this.healthState = healthState; + return this; + } + + /** + * Get time to live in milli-seconds. + * + * @return the timeToLiveMs value + */ + public long timeToLiveMs() { + return this.timeToLiveMs; + } + + /** + * Set time to live in milli-seconds. + * + * @param timeToLiveMs the timeToLiveMs value to set + * @return the StatelessReplicaNewHealthReportEvent object itself. + */ + public StatelessReplicaNewHealthReportEvent withTimeToLiveMs(long timeToLiveMs) { + this.timeToLiveMs = timeToLiveMs; + return this; + } + + /** + * Get sequence number of report. + * + * @return the sequenceNumber value + */ + public long sequenceNumber() { + return this.sequenceNumber; + } + + /** + * Set sequence number of report. + * + * @param sequenceNumber the sequenceNumber value to set + * @return the StatelessReplicaNewHealthReportEvent object itself. + */ + public StatelessReplicaNewHealthReportEvent withSequenceNumber(long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + * Get description of report. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of report. + * + * @param description the description value to set + * @return the StatelessReplicaNewHealthReportEvent object itself. + */ + public StatelessReplicaNewHealthReportEvent withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get indicates the removal when it expires. + * + * @return the removeWhenExpired value + */ + public boolean removeWhenExpired() { + return this.removeWhenExpired; + } + + /** + * Set indicates the removal when it expires. + * + * @param removeWhenExpired the removeWhenExpired value to set + * @return the StatelessReplicaNewHealthReportEvent object itself. + */ + public StatelessReplicaNewHealthReportEvent withRemoveWhenExpired(boolean removeWhenExpired) { + this.removeWhenExpired = removeWhenExpired; + return this; + } + + /** + * Get source time. + * + * @return the sourceUtcTimestamp value + */ + public DateTime sourceUtcTimestamp() { + return this.sourceUtcTimestamp; + } + + /** + * Set source time. + * + * @param sourceUtcTimestamp the sourceUtcTimestamp value to set + * @return the StatelessReplicaNewHealthReportEvent object itself. + */ + public StatelessReplicaNewHealthReportEvent withSourceUtcTimestamp(DateTime sourceUtcTimestamp) { + this.sourceUtcTimestamp = sourceUtcTimestamp; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/TcpConfig.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/TcpConfig.java new file mode 100644 index 0000000000000..4b79dc5e287fb --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/TcpConfig.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the tcp configuration for external connectivity for this network. + */ +public class TcpConfig { + /** + * tcp gateway config name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Specifies the port at which the service endpoint below needs to be + * exposed. + */ + @JsonProperty(value = "port", required = true) + private int port; + + /** + * Describes destination endpoint for routing traffic. + */ + @JsonProperty(value = "destination", required = true) + private GatewayDestination destination; + + /** + * Get tcp gateway config name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set tcp gateway config name. + * + * @param name the name value to set + * @return the TcpConfig object itself. + */ + public TcpConfig withName(String name) { + this.name = name; + return this; + } + + /** + * Get specifies the port at which the service endpoint below needs to be exposed. + * + * @return the port value + */ + public int port() { + return this.port; + } + + /** + * Set specifies the port at which the service endpoint below needs to be exposed. + * + * @param port the port value to set + * @return the TcpConfig object itself. + */ + public TcpConfig withPort(int port) { + this.port = port; + return this; + } + + /** + * Get describes destination endpoint for routing traffic. + * + * @return the destination value + */ + public GatewayDestination destination() { + return this.destination; + } + + /** + * Set describes destination endpoint for routing traffic. + * + * @param destination the destination value to set + * @return the TcpConfig object itself. + */ + public TcpConfig withDestination(GatewayDestination destination) { + this.destination = destination; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/VolumeProvider.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/VolumeProvider.java new file mode 100644 index 0000000000000..c1bcaf071a040 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/VolumeProvider.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VolumeProvider. + */ +public final class VolumeProvider extends ExpandableStringEnum { + /** Static value SFAzureFile for VolumeProvider. */ + public static final VolumeProvider SFAZURE_FILE = fromString("SFAzureFile"); + + /** + * Creates or finds a VolumeProvider from its string representation. + * @param name a name to look for + * @return the corresponding VolumeProvider + */ + @JsonCreator + public static VolumeProvider fromString(String name) { + return fromString(name, VolumeProvider.class); + } + + /** + * @return known VolumeProvider values + */ + public static Collection values() { + return values(VolumeProvider.class); + } +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/VolumeReference.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/VolumeReference.java new file mode 100644 index 0000000000000..ed91c22aa2c5f --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/VolumeReference.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes a reference to a volume resource. + */ +public class VolumeReference { + /** + * Name of the volume being referenced. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The flag indicating whether the volume is read only. Default is 'false'. + */ + @JsonProperty(value = "readOnly") + private Boolean readOnly; + + /** + * The path within the container at which the volume should be mounted. + * Only valid path characters are allowed. + */ + @JsonProperty(value = "destinationPath", required = true) + private String destinationPath; + + /** + * Get name of the volume being referenced. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the volume being referenced. + * + * @param name the name value to set + * @return the VolumeReference object itself. + */ + public VolumeReference withName(String name) { + this.name = name; + return this; + } + + /** + * Get the flag indicating whether the volume is read only. Default is 'false'. + * + * @return the readOnly value + */ + public Boolean readOnly() { + return this.readOnly; + } + + /** + * Set the flag indicating whether the volume is read only. Default is 'false'. + * + * @param readOnly the readOnly value to set + * @return the VolumeReference object itself. + */ + public VolumeReference withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return this; + } + + /** + * Get the path within the container at which the volume should be mounted. Only valid path characters are allowed. + * + * @return the destinationPath value + */ + public String destinationPath() { + return this.destinationPath; + } + + /** + * Set the path within the container at which the volume should be mounted. Only valid path characters are allowed. + * + * @param destinationPath the destinationPath value to set + * @return the VolumeReference object itself. + */ + public VolumeReference withDestinationPath(String destinationPath) { + this.destinationPath = destinationPath; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ApplicationEventInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ApplicationEventInner.java index 58aa9f10fd743..52b44afd2bea6 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ApplicationEventInner.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ApplicationEventInner.java @@ -21,21 +21,20 @@ @JsonSubTypes({ @JsonSubTypes.Type(name = "ApplicationCreated", value = ApplicationCreatedEvent.class), @JsonSubTypes.Type(name = "ApplicationDeleted", value = ApplicationDeletedEvent.class), - @JsonSubTypes.Type(name = "ApplicationHealthReportCreated", value = ApplicationHealthReportCreatedEvent.class), + @JsonSubTypes.Type(name = "ApplicationNewHealthReport", value = ApplicationNewHealthReportEvent.class), @JsonSubTypes.Type(name = "ApplicationHealthReportExpired", value = ApplicationHealthReportExpiredEvent.class), - @JsonSubTypes.Type(name = "ApplicationUpgradeComplete", value = ApplicationUpgradeCompleteEvent.class), - @JsonSubTypes.Type(name = "ApplicationUpgradeDomainComplete", value = ApplicationUpgradeDomainCompleteEvent.class), - @JsonSubTypes.Type(name = "ApplicationUpgradeRollbackComplete", value = ApplicationUpgradeRollbackCompleteEvent.class), - @JsonSubTypes.Type(name = "ApplicationUpgradeRollbackStart", value = ApplicationUpgradeRollbackStartEvent.class), - @JsonSubTypes.Type(name = "ApplicationUpgradeStart", value = ApplicationUpgradeStartEvent.class), - @JsonSubTypes.Type(name = "DeployedApplicationHealthReportCreated", value = DeployedApplicationHealthReportCreatedEvent.class), + @JsonSubTypes.Type(name = "ApplicationUpgradeCompleted", value = ApplicationUpgradeCompletedEvent.class), + @JsonSubTypes.Type(name = "ApplicationUpgradeDomainCompleted", value = ApplicationUpgradeDomainCompletedEvent.class), + @JsonSubTypes.Type(name = "ApplicationUpgradeRollbackCompleted", value = ApplicationUpgradeRollbackCompletedEvent.class), + @JsonSubTypes.Type(name = "ApplicationUpgradeRollbackStarted", value = ApplicationUpgradeRollbackStartedEvent.class), + @JsonSubTypes.Type(name = "ApplicationUpgradeStarted", value = ApplicationUpgradeStartedEvent.class), + @JsonSubTypes.Type(name = "DeployedApplicationNewHealthReport", value = DeployedApplicationNewHealthReportEvent.class), @JsonSubTypes.Type(name = "DeployedApplicationHealthReportExpired", value = DeployedApplicationHealthReportExpiredEvent.class), - @JsonSubTypes.Type(name = "ProcessDeactivated", value = ProcessDeactivatedEvent.class), - @JsonSubTypes.Type(name = "ContainerDeactivated", value = ContainerDeactivatedEvent.class), - @JsonSubTypes.Type(name = "DeployedServiceHealthReportCreated", value = DeployedServiceHealthReportCreatedEvent.class), - @JsonSubTypes.Type(name = "DeployedServiceHealthReportExpired", value = DeployedServiceHealthReportExpiredEvent.class), - @JsonSubTypes.Type(name = "ChaosRestartCodePackageFaultScheduled", value = ChaosRestartCodePackageFaultScheduledEvent.class), - @JsonSubTypes.Type(name = "ChaosRestartCodePackageFaultCompleted", value = ChaosRestartCodePackageFaultCompletedEvent.class) + @JsonSubTypes.Type(name = "ApplicationProcessExited", value = ApplicationProcessExitedEvent.class), + @JsonSubTypes.Type(name = "ApplicationContainerInstanceExited", value = ApplicationContainerInstanceExitedEvent.class), + @JsonSubTypes.Type(name = "DeployedServicePackageNewHealthReport", value = DeployedServicePackageNewHealthReportEvent.class), + @JsonSubTypes.Type(name = "DeployedServicePackageHealthReportExpired", value = DeployedServicePackageHealthReportExpiredEvent.class), + @JsonSubTypes.Type(name = "ChaosCodePackageRestartScheduled", value = ChaosCodePackageRestartScheduledEvent.class) }) public class ApplicationEventInner extends FabricEventInner { /** diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ApplicationResourceDescriptionInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ApplicationResourceDescriptionInner.java index 9877fdc5ae8c7..e7add0045b4ad 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ApplicationResourceDescriptionInner.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ApplicationResourceDescriptionInner.java @@ -9,17 +9,23 @@ package com.microsoft.azure.servicefabric.implementation; import java.util.List; -import com.microsoft.azure.servicefabric.HealthState; -import com.microsoft.azure.servicefabric.ApplicationResourceStatus; import com.microsoft.azure.servicefabric.DiagnosticsDescription; +import com.microsoft.azure.servicefabric.ResourceStatus; +import com.microsoft.azure.servicefabric.HealthState; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; /** - * Describes a service fabric application resource. + * This type describes a application resource. */ @JsonFlatten public class ApplicationResourceDescriptionInner { + /** + * Name of the Application resource. + */ + @JsonProperty(value = "name", required = true) + private String name; + /** * User readable description of the application. */ @@ -27,107 +33,105 @@ public class ApplicationResourceDescriptionInner { private String description; /** - * Internal use. + * Describes the services in the application. This property is used to + * create or modify services of the application. On get only the name of + * the service is returned. The service description can be obtained by + * querying for the service resource. */ - @JsonProperty(value = "properties.debugParams") - private String debugParams; + @JsonProperty(value = "properties.services") + private List services; /** - * describes the services in the application. + * Describes the diagnostics definition and usage for an application + * resource. */ - @JsonProperty(value = "properties.services") - private List services; + @JsonProperty(value = "properties.diagnostics") + private DiagnosticsDescription diagnostics; /** - * Describes the health state of an application resource. Possible values - * include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'. + * Internal - used by Visual Studio to setup the debugging session on the + * local development environment. */ - @JsonProperty(value = "properties.healthState", access = JsonProperty.Access.WRITE_ONLY) - private HealthState healthState; + @JsonProperty(value = "properties.debugParams") + private String debugParams; /** - * When the application's health state is not 'Ok', this additional details - * from service fabric Health Manager for the user to know why the - * application is marked unhealthy. + * Names of the services in the application. */ - @JsonProperty(value = "properties.unhealthyEvaluation", access = JsonProperty.Access.WRITE_ONLY) - private String unhealthyEvaluation; + @JsonProperty(value = "properties.serviceNames", access = JsonProperty.Access.WRITE_ONLY) + private List serviceNames; /** - * Status of the application resource. Possible values include: 'Invalid', - * 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed'. + * Status of the application. Possible values include: 'Unknown', 'Ready', + * 'Upgrading', 'Creating', 'Deleting', 'Failed'. */ @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) - private ApplicationResourceStatus status; + private ResourceStatus status; /** - * Gives additional information about the current status of the application - * deployment. + * Gives additional information about the current status of the + * application. */ @JsonProperty(value = "properties.statusDetails", access = JsonProperty.Access.WRITE_ONLY) private String statusDetails; /** - * Names of the services in the application. - */ - @JsonProperty(value = "properties.serviceNames", access = JsonProperty.Access.WRITE_ONLY) - private List serviceNames; - - /** - * Describes the diagnostics definition and usage for an application - * resource. + * Describes the health state of an application resource. Possible values + * include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'. */ - @JsonProperty(value = "properties.diagnostics") - private DiagnosticsDescription diagnostics; + @JsonProperty(value = "properties.healthState", access = JsonProperty.Access.WRITE_ONLY) + private HealthState healthState; /** - * Application resource name. + * When the application's health state is not 'Ok', this additional details + * from service fabric Health Manager for the user to know why the + * application is marked unhealthy. */ - @JsonProperty(value = "name", required = true) - private String name; + @JsonProperty(value = "properties.unhealthyEvaluation", access = JsonProperty.Access.WRITE_ONLY) + private String unhealthyEvaluation; /** - * Get user readable description of the application. + * Get name of the Application resource. * - * @return the description value + * @return the name value */ - public String description() { - return this.description; + public String name() { + return this.name; } /** - * Set user readable description of the application. + * Set name of the Application resource. * - * @param description the description value to set + * @param name the name value to set * @return the ApplicationResourceDescriptionInner object itself. */ - public ApplicationResourceDescriptionInner withDescription(String description) { - this.description = description; + public ApplicationResourceDescriptionInner withName(String name) { + this.name = name; return this; } /** - * Get internal use. + * Get user readable description of the application. * - * @return the debugParams value + * @return the description value */ - public String debugParams() { - return this.debugParams; + public String description() { + return this.description; } /** - * Set internal use. + * Set user readable description of the application. * - * @param debugParams the debugParams value to set + * @param description the description value to set * @return the ApplicationResourceDescriptionInner object itself. */ - public ApplicationResourceDescriptionInner withDebugParams(String debugParams) { - this.debugParams = debugParams; + public ApplicationResourceDescriptionInner withDescription(String description) { + this.description = description; return this; } /** - * Get describes the services in the application. + * Get describes the services in the application. This property is used to create or modify services of the application. On get only the name of the service is returned. The service description can be obtained by querying for the service resource. * * @return the services value */ @@ -136,7 +140,7 @@ public List services() { } /** - * Set describes the services in the application. + * Set describes the services in the application. This property is used to create or modify services of the application. On get only the name of the service is returned. The service description can be obtained by querying for the service resource. * * @param services the services value to set * @return the ApplicationResourceDescriptionInner object itself. @@ -147,39 +151,43 @@ public ApplicationResourceDescriptionInner withServices(List serviceNames() { } /** - * Get describes the diagnostics definition and usage for an application resource. + * Get status of the application. Possible values include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed'. * - * @return the diagnostics value + * @return the status value */ - public DiagnosticsDescription diagnostics() { - return this.diagnostics; + public ResourceStatus status() { + return this.status; } /** - * Set describes the diagnostics definition and usage for an application resource. + * Get gives additional information about the current status of the application. * - * @param diagnostics the diagnostics value to set - * @return the ApplicationResourceDescriptionInner object itself. + * @return the statusDetails value */ - public ApplicationResourceDescriptionInner withDiagnostics(DiagnosticsDescription diagnostics) { - this.diagnostics = diagnostics; - return this; + public String statusDetails() { + return this.statusDetails; } /** - * Get application resource name. + * Get describes the health state of an application resource. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'. * - * @return the name value + * @return the healthState value */ - public String name() { - return this.name; + public HealthState healthState() { + return this.healthState; } /** - * Set application resource name. + * Get when the application's health state is not 'Ok', this additional details from service fabric Health Manager for the user to know why the application is marked unhealthy. * - * @param name the name value to set - * @return the ApplicationResourceDescriptionInner object itself. + * @return the unhealthyEvaluation value */ - public ApplicationResourceDescriptionInner withName(String name) { - this.name = name; - return this; + public String unhealthyEvaluation() { + return this.unhealthyEvaluation; } } diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/BackupPolicyDescriptionInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/BackupPolicyDescriptionInner.java index a438c29ff08a5..72d281897c8c7 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/BackupPolicyDescriptionInner.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/BackupPolicyDescriptionInner.java @@ -10,6 +10,7 @@ import com.microsoft.azure.servicefabric.BackupScheduleDescription; import com.microsoft.azure.servicefabric.BackupStorageDescription; +import com.microsoft.azure.servicefabric.RetentionPolicyDescription; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -54,6 +55,12 @@ public class BackupPolicyDescriptionInner { @JsonProperty(value = "Storage", required = true) private BackupStorageDescription storage; + /** + * Describes the policy to retain backups in storage. + */ + @JsonProperty(value = "RetentionPolicy") + private RetentionPolicyDescription retentionPolicy; + /** * Get the unique name identifying this backup policy. * @@ -160,4 +167,24 @@ public BackupPolicyDescriptionInner withStorage(BackupStorageDescription storage return this; } + /** + * Get describes the policy to retain backups in storage. + * + * @return the retentionPolicy value + */ + public RetentionPolicyDescription retentionPolicy() { + return this.retentionPolicy; + } + + /** + * Set describes the policy to retain backups in storage. + * + * @param retentionPolicy the retentionPolicy value to set + * @return the BackupPolicyDescriptionInner object itself. + */ + public BackupPolicyDescriptionInner withRetentionPolicy(RetentionPolicyDescription retentionPolicy) { + this.retentionPolicy = retentionPolicy; + return this; + } + } diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/BackupProgressInfoInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/BackupProgressInfoInner.java index a2b3109e072fa..0f85c354ee47c 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/BackupProgressInfoInner.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/BackupProgressInfoInner.java @@ -11,7 +11,7 @@ import com.microsoft.azure.servicefabric.BackupState; import org.joda.time.DateTime; import java.util.UUID; -import com.microsoft.azure.servicefabric.BackupEpoch; +import com.microsoft.azure.servicefabric.Epoch; import com.microsoft.azure.servicefabric.FabricErrorError; import com.fasterxml.jackson.annotation.JsonProperty; @@ -49,7 +49,7 @@ public class BackupProgressInfoInner { * Specifies the epoch of the last record included in backup. */ @JsonProperty(value = "EpochOfLastBackupRecord") - private BackupEpoch epochOfLastBackupRecord; + private Epoch epochOfLastBackupRecord; /** * The LSN of last record included in backup. @@ -148,7 +148,7 @@ public BackupProgressInfoInner withBackupLocation(String backupLocation) { * * @return the epochOfLastBackupRecord value */ - public BackupEpoch epochOfLastBackupRecord() { + public Epoch epochOfLastBackupRecord() { return this.epochOfLastBackupRecord; } @@ -158,7 +158,7 @@ public BackupEpoch epochOfLastBackupRecord() { * @param epochOfLastBackupRecord the epochOfLastBackupRecord value to set * @return the BackupProgressInfoInner object itself. */ - public BackupProgressInfoInner withEpochOfLastBackupRecord(BackupEpoch epochOfLastBackupRecord) { + public BackupProgressInfoInner withEpochOfLastBackupRecord(Epoch epochOfLastBackupRecord) { this.epochOfLastBackupRecord = epochOfLastBackupRecord; return this; } diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ClusterEventInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ClusterEventInner.java index db95730519c91..6a4919bb88cfb 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ClusterEventInner.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ClusterEventInner.java @@ -18,13 +18,13 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") @JsonTypeName("ClusterEvent") @JsonSubTypes({ - @JsonSubTypes.Type(name = "ClusterHealthReportCreated", value = ClusterHealthReportCreatedEvent.class), + @JsonSubTypes.Type(name = "ClusterNewHealthReport", value = ClusterNewHealthReportEvent.class), @JsonSubTypes.Type(name = "ClusterHealthReportExpired", value = ClusterHealthReportExpiredEvent.class), - @JsonSubTypes.Type(name = "ClusterUpgradeComplete", value = ClusterUpgradeCompleteEvent.class), - @JsonSubTypes.Type(name = "ClusterUpgradeDomainComplete", value = ClusterUpgradeDomainCompleteEvent.class), - @JsonSubTypes.Type(name = "ClusterUpgradeRollbackComplete", value = ClusterUpgradeRollbackCompleteEvent.class), - @JsonSubTypes.Type(name = "ClusterUpgradeRollbackStart", value = ClusterUpgradeRollbackStartEvent.class), - @JsonSubTypes.Type(name = "ClusterUpgradeStart", value = ClusterUpgradeStartEvent.class), + @JsonSubTypes.Type(name = "ClusterUpgradeCompleted", value = ClusterUpgradeCompletedEvent.class), + @JsonSubTypes.Type(name = "ClusterUpgradeDomainCompleted", value = ClusterUpgradeDomainCompletedEvent.class), + @JsonSubTypes.Type(name = "ClusterUpgradeRollbackCompleted", value = ClusterUpgradeRollbackCompletedEvent.class), + @JsonSubTypes.Type(name = "ClusterUpgradeRollbackStarted", value = ClusterUpgradeRollbackStartedEvent.class), + @JsonSubTypes.Type(name = "ClusterUpgradeStarted", value = ClusterUpgradeStartedEvent.class), @JsonSubTypes.Type(name = "ChaosStopped", value = ChaosStoppedEvent.class), @JsonSubTypes.Type(name = "ChaosStarted", value = ChaosStartedEvent.class) }) diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ClusterVersionInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ClusterVersionInner.java new file mode 100644 index 0000000000000..4ffcda738a0fb --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ClusterVersionInner.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The cluster version. + */ +public class ClusterVersionInner { + /** + * The Service Fabric cluster runtime version. + */ + @JsonProperty(value = "Version") + private String version; + + /** + * Get the Service Fabric cluster runtime version. + * + * @return the version value + */ + public String version() { + return this.version; + } + + /** + * Set the Service Fabric cluster runtime version. + * + * @param version the version value to set + * @return the ClusterVersionInner object itself. + */ + public ClusterVersionInner withVersion(String version) { + this.version = version; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/FabricEventInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/FabricEventInner.java index f53e08e34d341..55ed2d8593e3b 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/FabricEventInner.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/FabricEventInner.java @@ -36,6 +36,12 @@ public class FabricEventInner { @JsonProperty(value = "EventInstanceId", required = true) private UUID eventInstanceId; + /** + * The category of event. + */ + @JsonProperty(value = "Category") + private String category; + /** * The time event was logged. */ @@ -68,6 +74,26 @@ public FabricEventInner withEventInstanceId(UUID eventInstanceId) { return this; } + /** + * Get the category of event. + * + * @return the category value + */ + public String category() { + return this.category; + } + + /** + * Set the category of event. + * + * @param category the category value to set + * @return the FabricEventInner object itself. + */ + public FabricEventInner withCategory(String category) { + this.category = category; + return this; + } + /** * Get the time event was logged. * diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/GatewayResourceDescriptionInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/GatewayResourceDescriptionInner.java new file mode 100644 index 0000000000000..eded09f5f1d77 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/GatewayResourceDescriptionInner.java @@ -0,0 +1,227 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import com.microsoft.azure.servicefabric.NetworkRef; +import java.util.List; +import com.microsoft.azure.servicefabric.TcpConfig; +import com.microsoft.azure.servicefabric.HttpConfig; +import com.microsoft.azure.servicefabric.ResourceStatus; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * This type describes a gateway resource. + */ +@JsonFlatten +public class GatewayResourceDescriptionInner { + /** + * Name of the Gateway resource. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * User readable description of the gateway. + */ + @JsonProperty(value = "properties.description") + private String description; + + /** + * Network the gateway should listen on for requests. + */ + @JsonProperty(value = "properties.sourceNetwork", required = true) + private NetworkRef sourceNetwork; + + /** + * Network that the Application is using. + */ + @JsonProperty(value = "properties.destinationNetwork", required = true) + private NetworkRef destinationNetwork; + + /** + * Configuration for tcp connectivity for this gateway. + */ + @JsonProperty(value = "properties.tcp") + private List tcp; + + /** + * Configuration for http connectivity for this gateway. + */ + @JsonProperty(value = "properties.http") + private List http; + + /** + * Status of the resource. Possible values include: 'Unknown', 'Ready', + * 'Upgrading', 'Creating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) + private ResourceStatus status; + + /** + * Gives additional information about the current status of the gateway. + */ + @JsonProperty(value = "properties.statusDetails", access = JsonProperty.Access.WRITE_ONLY) + private String statusDetails; + + /** + * IP address of the gateway. This is populated in the response and is + * ignored for incoming requests. + */ + @JsonProperty(value = "properties.ipAddress", access = JsonProperty.Access.WRITE_ONLY) + private String ipAddress; + + /** + * Get name of the Gateway resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the Gateway resource. + * + * @param name the name value to set + * @return the GatewayResourceDescriptionInner object itself. + */ + public GatewayResourceDescriptionInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get user readable description of the gateway. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set user readable description of the gateway. + * + * @param description the description value to set + * @return the GatewayResourceDescriptionInner object itself. + */ + public GatewayResourceDescriptionInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get network the gateway should listen on for requests. + * + * @return the sourceNetwork value + */ + public NetworkRef sourceNetwork() { + return this.sourceNetwork; + } + + /** + * Set network the gateway should listen on for requests. + * + * @param sourceNetwork the sourceNetwork value to set + * @return the GatewayResourceDescriptionInner object itself. + */ + public GatewayResourceDescriptionInner withSourceNetwork(NetworkRef sourceNetwork) { + this.sourceNetwork = sourceNetwork; + return this; + } + + /** + * Get network that the Application is using. + * + * @return the destinationNetwork value + */ + public NetworkRef destinationNetwork() { + return this.destinationNetwork; + } + + /** + * Set network that the Application is using. + * + * @param destinationNetwork the destinationNetwork value to set + * @return the GatewayResourceDescriptionInner object itself. + */ + public GatewayResourceDescriptionInner withDestinationNetwork(NetworkRef destinationNetwork) { + this.destinationNetwork = destinationNetwork; + return this; + } + + /** + * Get configuration for tcp connectivity for this gateway. + * + * @return the tcp value + */ + public List tcp() { + return this.tcp; + } + + /** + * Set configuration for tcp connectivity for this gateway. + * + * @param tcp the tcp value to set + * @return the GatewayResourceDescriptionInner object itself. + */ + public GatewayResourceDescriptionInner withTcp(List tcp) { + this.tcp = tcp; + return this; + } + + /** + * Get configuration for http connectivity for this gateway. + * + * @return the http value + */ + public List http() { + return this.http; + } + + /** + * Set configuration for http connectivity for this gateway. + * + * @param http the http value to set + * @return the GatewayResourceDescriptionInner object itself. + */ + public GatewayResourceDescriptionInner withHttp(List http) { + this.http = http; + return this; + } + + /** + * Get status of the resource. Possible values include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed'. + * + * @return the status value + */ + public ResourceStatus status() { + return this.status; + } + + /** + * Get gives additional information about the current status of the gateway. + * + * @return the statusDetails value + */ + public String statusDetails() { + return this.statusDetails; + } + + /** + * Get iP address of the gateway. This is populated in the response and is ignored for incoming requests. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshApplicationsInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshApplicationsInner.java new file mode 100644 index 0000000000000..17398b7e26c5d --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshApplicationsInner.java @@ -0,0 +1,392 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.servicefabric.FabricErrorException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in MeshApplications. + */ +public class MeshApplicationsInner { + /** The Retrofit service to perform REST calls. */ + private MeshApplicationsService service; + /** The service client containing this operation class. */ + private ServiceFabricClientAPIsImpl client; + + /** + * Initializes an instance of MeshApplicationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public MeshApplicationsInner(Retrofit retrofit, ServiceFabricClientAPIsImpl client) { + this.service = retrofit.create(MeshApplicationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for MeshApplications to be + * used by Retrofit to perform actually REST calls. + */ + interface MeshApplicationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshApplications createOrUpdate" }) + @PUT("Resources/Applications/{applicationResourceName}") + Observable> createOrUpdate(@Path(value = "applicationResourceName", encoded = true) String applicationResourceName, @Query("api-version") String apiVersion, @Body ApplicationResourceDescriptionInner applicationResourceDescription, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshApplications get" }) + @GET("Resources/Applications/{applicationResourceName}") + Observable> get(@Path(value = "applicationResourceName", encoded = true) String applicationResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshApplications delete" }) + @HTTP(path = "Resources/Applications/{applicationResourceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path(value = "applicationResourceName", encoded = true) String applicationResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshApplications list" }) + @GET("Resources/Applications") + Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Creates or updates a Application resource. + * Creates a Application resource with the specified name, description and properties. If Application resource with the same name exists, then it is updated with the specified description and properties. + * + * @param applicationResourceName The identity of the application. + * @param applicationResourceDescription Description for creating a Application resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ApplicationResourceDescriptionInner object if successful. + */ + public ApplicationResourceDescriptionInner createOrUpdate(String applicationResourceName, ApplicationResourceDescriptionInner applicationResourceDescription) { + return createOrUpdateWithServiceResponseAsync(applicationResourceName, applicationResourceDescription).toBlocking().single().body(); + } + + /** + * Creates or updates a Application resource. + * Creates a Application resource with the specified name, description and properties. If Application resource with the same name exists, then it is updated with the specified description and properties. + * + * @param applicationResourceName The identity of the application. + * @param applicationResourceDescription Description for creating a Application resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String applicationResourceName, ApplicationResourceDescriptionInner applicationResourceDescription, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(applicationResourceName, applicationResourceDescription), serviceCallback); + } + + /** + * Creates or updates a Application resource. + * Creates a Application resource with the specified name, description and properties. If Application resource with the same name exists, then it is updated with the specified description and properties. + * + * @param applicationResourceName The identity of the application. + * @param applicationResourceDescription Description for creating a Application resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationResourceDescriptionInner object + */ + public Observable createOrUpdateAsync(String applicationResourceName, ApplicationResourceDescriptionInner applicationResourceDescription) { + return createOrUpdateWithServiceResponseAsync(applicationResourceName, applicationResourceDescription).map(new Func1, ApplicationResourceDescriptionInner>() { + @Override + public ApplicationResourceDescriptionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a Application resource. + * Creates a Application resource with the specified name, description and properties. If Application resource with the same name exists, then it is updated with the specified description and properties. + * + * @param applicationResourceName The identity of the application. + * @param applicationResourceDescription Description for creating a Application resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationResourceDescriptionInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String applicationResourceName, ApplicationResourceDescriptionInner applicationResourceDescription) { + if (applicationResourceName == null) { + throw new IllegalArgumentException("Parameter applicationResourceName is required and cannot be null."); + } + if (applicationResourceDescription == null) { + throw new IllegalArgumentException("Parameter applicationResourceDescription is required and cannot be null."); + } + Validator.validate(applicationResourceDescription); + final String apiVersion = "6.4-preview"; + return service.createOrUpdate(applicationResourceName, apiVersion, applicationResourceDescription, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + + /** + * Gets the Application resource with the given name. + * Gets the information about the Application resource with the given name. The information include the description and other properties of the Application. + * + * @param applicationResourceName The identity of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ApplicationResourceDescriptionInner object if successful. + */ + public ApplicationResourceDescriptionInner get(String applicationResourceName) { + return getWithServiceResponseAsync(applicationResourceName).toBlocking().single().body(); + } + + /** + * Gets the Application resource with the given name. + * Gets the information about the Application resource with the given name. The information include the description and other properties of the Application. + * + * @param applicationResourceName The identity of the application. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String applicationResourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(applicationResourceName), serviceCallback); + } + + /** + * Gets the Application resource with the given name. + * Gets the information about the Application resource with the given name. The information include the description and other properties of the Application. + * + * @param applicationResourceName The identity of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationResourceDescriptionInner object + */ + public Observable getAsync(String applicationResourceName) { + return getWithServiceResponseAsync(applicationResourceName).map(new Func1, ApplicationResourceDescriptionInner>() { + @Override + public ApplicationResourceDescriptionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the Application resource with the given name. + * Gets the information about the Application resource with the given name. The information include the description and other properties of the Application. + * + * @param applicationResourceName The identity of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ApplicationResourceDescriptionInner object + */ + public Observable> getWithServiceResponseAsync(String applicationResourceName) { + if (applicationResourceName == null) { + throw new IllegalArgumentException("Parameter applicationResourceName is required and cannot be null."); + } + final String apiVersion = "6.4-preview"; + return service.get(applicationResourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + + /** + * Deletes the Application resource. + * Deletes the Application resource identified by the name. + * + * @param applicationResourceName The identity of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String applicationResourceName) { + deleteWithServiceResponseAsync(applicationResourceName).toBlocking().single().body(); + } + + /** + * Deletes the Application resource. + * Deletes the Application resource identified by the name. + * + * @param applicationResourceName The identity of the application. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String applicationResourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(applicationResourceName), serviceCallback); + } + + /** + * Deletes the Application resource. + * Deletes the Application resource identified by the name. + * + * @param applicationResourceName The identity of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String applicationResourceName) { + return deleteWithServiceResponseAsync(applicationResourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the Application resource. + * Deletes the Application resource identified by the name. + * + * @param applicationResourceName The identity of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String applicationResourceName) { + if (applicationResourceName == null) { + throw new IllegalArgumentException("Parameter applicationResourceName is required and cannot be null."); + } + final String apiVersion = "6.4-preview"; + return service.delete(applicationResourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + + /** + * Lists all the application resources. + * Gets the information about all application resources in a given resource group. The information include the description and other properties of the Application. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedApplicationResourceDescriptionListInner object if successful. + */ + public PagedApplicationResourceDescriptionListInner list() { + return listWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Lists all the application resources. + * Gets the information about all application resources in a given resource group. The information include the description and other properties of the Application. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); + } + + /** + * Lists all the application resources. + * Gets the information about all application resources in a given resource group. The information include the description and other properties of the Application. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedApplicationResourceDescriptionListInner object + */ + public Observable listAsync() { + return listWithServiceResponseAsync().map(new Func1, PagedApplicationResourceDescriptionListInner>() { + @Override + public PagedApplicationResourceDescriptionListInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists all the application resources. + * Gets the information about all application resources in a given resource group. The information include the description and other properties of the Application. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedApplicationResourceDescriptionListInner object + */ + public Observable> listWithServiceResponseAsync() { + final String apiVersion = "6.4-preview"; + return service.list(apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listDelegate(Response response) throws FabricErrorException, IOException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshCodePackagesInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshCodePackagesInner.java new file mode 100644 index 0000000000000..5cd573f0dc284 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshCodePackagesInner.java @@ -0,0 +1,256 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.servicefabric.FabricErrorException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in MeshCodePackages. + */ +public class MeshCodePackagesInner { + /** The Retrofit service to perform REST calls. */ + private MeshCodePackagesService service; + /** The service client containing this operation class. */ + private ServiceFabricClientAPIsImpl client; + + /** + * Initializes an instance of MeshCodePackagesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public MeshCodePackagesInner(Retrofit retrofit, ServiceFabricClientAPIsImpl client) { + this.service = retrofit.create(MeshCodePackagesService.class); + this.client = client; + } + + /** + * The interface defining all the services for MeshCodePackages to be + * used by Retrofit to perform actually REST calls. + */ + interface MeshCodePackagesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshCodePackages getContainerLogs" }) + @GET("Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}/CodePackages/{codePackageName}/Logs") + Observable> getContainerLogs(@Path(value = "applicationResourceName", encoded = true) String applicationResourceName, @Path(value = "serviceResourceName", encoded = true) String serviceResourceName, @Path(value = "replicaName", encoded = true) String replicaName, @Path("codePackageName") String codePackageName, @Query("api-version") String apiVersion, @Query("Tail") String tail, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the logs from the container. + * Gets the logs for the container of the specified code package of the service replica. + * + * @param applicationResourceName The identity of the application. + * @param serviceResourceName The identity of the service. + * @param replicaName Service Fabric replica name. + * @param codePackageName The name of code package of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ContainerLogsInner object if successful. + */ + public ContainerLogsInner getContainerLogs(String applicationResourceName, String serviceResourceName, String replicaName, String codePackageName) { + return getContainerLogsWithServiceResponseAsync(applicationResourceName, serviceResourceName, replicaName, codePackageName).toBlocking().single().body(); + } + + /** + * Gets the logs from the container. + * Gets the logs for the container of the specified code package of the service replica. + * + * @param applicationResourceName The identity of the application. + * @param serviceResourceName The identity of the service. + * @param replicaName Service Fabric replica name. + * @param codePackageName The name of code package of the service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getContainerLogsAsync(String applicationResourceName, String serviceResourceName, String replicaName, String codePackageName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getContainerLogsWithServiceResponseAsync(applicationResourceName, serviceResourceName, replicaName, codePackageName), serviceCallback); + } + + /** + * Gets the logs from the container. + * Gets the logs for the container of the specified code package of the service replica. + * + * @param applicationResourceName The identity of the application. + * @param serviceResourceName The identity of the service. + * @param replicaName Service Fabric replica name. + * @param codePackageName The name of code package of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ContainerLogsInner object + */ + public Observable getContainerLogsAsync(String applicationResourceName, String serviceResourceName, String replicaName, String codePackageName) { + return getContainerLogsWithServiceResponseAsync(applicationResourceName, serviceResourceName, replicaName, codePackageName).map(new Func1, ContainerLogsInner>() { + @Override + public ContainerLogsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the logs from the container. + * Gets the logs for the container of the specified code package of the service replica. + * + * @param applicationResourceName The identity of the application. + * @param serviceResourceName The identity of the service. + * @param replicaName Service Fabric replica name. + * @param codePackageName The name of code package of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ContainerLogsInner object + */ + public Observable> getContainerLogsWithServiceResponseAsync(String applicationResourceName, String serviceResourceName, String replicaName, String codePackageName) { + if (applicationResourceName == null) { + throw new IllegalArgumentException("Parameter applicationResourceName is required and cannot be null."); + } + if (serviceResourceName == null) { + throw new IllegalArgumentException("Parameter serviceResourceName is required and cannot be null."); + } + if (replicaName == null) { + throw new IllegalArgumentException("Parameter replicaName is required and cannot be null."); + } + if (codePackageName == null) { + throw new IllegalArgumentException("Parameter codePackageName is required and cannot be null."); + } + final String apiVersion = "6.4-preview"; + final String tail = null; + return service.getContainerLogs(applicationResourceName, serviceResourceName, replicaName, codePackageName, apiVersion, tail, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getContainerLogsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the logs from the container. + * Gets the logs for the container of the specified code package of the service replica. + * + * @param applicationResourceName The identity of the application. + * @param serviceResourceName The identity of the service. + * @param replicaName Service Fabric replica name. + * @param codePackageName The name of code package of the service. + * @param tail Number of lines to show from the end of the logs. Default is 100. 'all' to show the complete logs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ContainerLogsInner object if successful. + */ + public ContainerLogsInner getContainerLogs(String applicationResourceName, String serviceResourceName, String replicaName, String codePackageName, String tail) { + return getContainerLogsWithServiceResponseAsync(applicationResourceName, serviceResourceName, replicaName, codePackageName, tail).toBlocking().single().body(); + } + + /** + * Gets the logs from the container. + * Gets the logs for the container of the specified code package of the service replica. + * + * @param applicationResourceName The identity of the application. + * @param serviceResourceName The identity of the service. + * @param replicaName Service Fabric replica name. + * @param codePackageName The name of code package of the service. + * @param tail Number of lines to show from the end of the logs. Default is 100. 'all' to show the complete logs. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getContainerLogsAsync(String applicationResourceName, String serviceResourceName, String replicaName, String codePackageName, String tail, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getContainerLogsWithServiceResponseAsync(applicationResourceName, serviceResourceName, replicaName, codePackageName, tail), serviceCallback); + } + + /** + * Gets the logs from the container. + * Gets the logs for the container of the specified code package of the service replica. + * + * @param applicationResourceName The identity of the application. + * @param serviceResourceName The identity of the service. + * @param replicaName Service Fabric replica name. + * @param codePackageName The name of code package of the service. + * @param tail Number of lines to show from the end of the logs. Default is 100. 'all' to show the complete logs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ContainerLogsInner object + */ + public Observable getContainerLogsAsync(String applicationResourceName, String serviceResourceName, String replicaName, String codePackageName, String tail) { + return getContainerLogsWithServiceResponseAsync(applicationResourceName, serviceResourceName, replicaName, codePackageName, tail).map(new Func1, ContainerLogsInner>() { + @Override + public ContainerLogsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the logs from the container. + * Gets the logs for the container of the specified code package of the service replica. + * + * @param applicationResourceName The identity of the application. + * @param serviceResourceName The identity of the service. + * @param replicaName Service Fabric replica name. + * @param codePackageName The name of code package of the service. + * @param tail Number of lines to show from the end of the logs. Default is 100. 'all' to show the complete logs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ContainerLogsInner object + */ + public Observable> getContainerLogsWithServiceResponseAsync(String applicationResourceName, String serviceResourceName, String replicaName, String codePackageName, String tail) { + if (applicationResourceName == null) { + throw new IllegalArgumentException("Parameter applicationResourceName is required and cannot be null."); + } + if (serviceResourceName == null) { + throw new IllegalArgumentException("Parameter serviceResourceName is required and cannot be null."); + } + if (replicaName == null) { + throw new IllegalArgumentException("Parameter replicaName is required and cannot be null."); + } + if (codePackageName == null) { + throw new IllegalArgumentException("Parameter codePackageName is required and cannot be null."); + } + final String apiVersion = "6.4-preview"; + return service.getContainerLogs(applicationResourceName, serviceResourceName, replicaName, codePackageName, apiVersion, tail, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getContainerLogsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getContainerLogsDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshGatewaysInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshGatewaysInner.java new file mode 100644 index 0000000000000..68970f4d9238e --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshGatewaysInner.java @@ -0,0 +1,392 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.servicefabric.FabricErrorException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in MeshGateways. + */ +public class MeshGatewaysInner { + /** The Retrofit service to perform REST calls. */ + private MeshGatewaysService service; + /** The service client containing this operation class. */ + private ServiceFabricClientAPIsImpl client; + + /** + * Initializes an instance of MeshGatewaysInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public MeshGatewaysInner(Retrofit retrofit, ServiceFabricClientAPIsImpl client) { + this.service = retrofit.create(MeshGatewaysService.class); + this.client = client; + } + + /** + * The interface defining all the services for MeshGateways to be + * used by Retrofit to perform actually REST calls. + */ + interface MeshGatewaysService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshGateways createOrUpdate" }) + @PUT("Resources/Gateways/{gatewayResourceName}") + Observable> createOrUpdate(@Path(value = "gatewayResourceName", encoded = true) String gatewayResourceName, @Query("api-version") String apiVersion, @Body GatewayResourceDescriptionInner gatewayResourceDescription, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshGateways get" }) + @GET("Resources/Gateways/{gatewayResourceName}") + Observable> get(@Path(value = "gatewayResourceName", encoded = true) String gatewayResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshGateways delete" }) + @HTTP(path = "Resources/Gateways/{gatewayResourceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path(value = "gatewayResourceName", encoded = true) String gatewayResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshGateways list" }) + @GET("Resources/Gateways") + Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Creates or updates a Gateway resource. + * Creates a Gateway resource with the specified name, description and properties. If Gateway resource with the same name exists, then it is updated with the specified description and properties. Use Gateway resource to provide public connectivity to application services. + * + * @param gatewayResourceName The identity of the gateway. + * @param gatewayResourceDescription Description for creating a Gateway resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GatewayResourceDescriptionInner object if successful. + */ + public GatewayResourceDescriptionInner createOrUpdate(String gatewayResourceName, GatewayResourceDescriptionInner gatewayResourceDescription) { + return createOrUpdateWithServiceResponseAsync(gatewayResourceName, gatewayResourceDescription).toBlocking().single().body(); + } + + /** + * Creates or updates a Gateway resource. + * Creates a Gateway resource with the specified name, description and properties. If Gateway resource with the same name exists, then it is updated with the specified description and properties. Use Gateway resource to provide public connectivity to application services. + * + * @param gatewayResourceName The identity of the gateway. + * @param gatewayResourceDescription Description for creating a Gateway resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String gatewayResourceName, GatewayResourceDescriptionInner gatewayResourceDescription, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(gatewayResourceName, gatewayResourceDescription), serviceCallback); + } + + /** + * Creates or updates a Gateway resource. + * Creates a Gateway resource with the specified name, description and properties. If Gateway resource with the same name exists, then it is updated with the specified description and properties. Use Gateway resource to provide public connectivity to application services. + * + * @param gatewayResourceName The identity of the gateway. + * @param gatewayResourceDescription Description for creating a Gateway resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GatewayResourceDescriptionInner object + */ + public Observable createOrUpdateAsync(String gatewayResourceName, GatewayResourceDescriptionInner gatewayResourceDescription) { + return createOrUpdateWithServiceResponseAsync(gatewayResourceName, gatewayResourceDescription).map(new Func1, GatewayResourceDescriptionInner>() { + @Override + public GatewayResourceDescriptionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a Gateway resource. + * Creates a Gateway resource with the specified name, description and properties. If Gateway resource with the same name exists, then it is updated with the specified description and properties. Use Gateway resource to provide public connectivity to application services. + * + * @param gatewayResourceName The identity of the gateway. + * @param gatewayResourceDescription Description for creating a Gateway resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GatewayResourceDescriptionInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String gatewayResourceName, GatewayResourceDescriptionInner gatewayResourceDescription) { + if (gatewayResourceName == null) { + throw new IllegalArgumentException("Parameter gatewayResourceName is required and cannot be null."); + } + if (gatewayResourceDescription == null) { + throw new IllegalArgumentException("Parameter gatewayResourceDescription is required and cannot be null."); + } + Validator.validate(gatewayResourceDescription); + final String apiVersion = "6.4-preview"; + return service.createOrUpdate(gatewayResourceName, apiVersion, gatewayResourceDescription, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + + /** + * Gets the Gateway resource with the given name. + * Gets the information about the Gateway resource with the given name. The information include the description and other properties of the Gateway. + * + * @param gatewayResourceName The identity of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GatewayResourceDescriptionInner object if successful. + */ + public GatewayResourceDescriptionInner get(String gatewayResourceName) { + return getWithServiceResponseAsync(gatewayResourceName).toBlocking().single().body(); + } + + /** + * Gets the Gateway resource with the given name. + * Gets the information about the Gateway resource with the given name. The information include the description and other properties of the Gateway. + * + * @param gatewayResourceName The identity of the gateway. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String gatewayResourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(gatewayResourceName), serviceCallback); + } + + /** + * Gets the Gateway resource with the given name. + * Gets the information about the Gateway resource with the given name. The information include the description and other properties of the Gateway. + * + * @param gatewayResourceName The identity of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GatewayResourceDescriptionInner object + */ + public Observable getAsync(String gatewayResourceName) { + return getWithServiceResponseAsync(gatewayResourceName).map(new Func1, GatewayResourceDescriptionInner>() { + @Override + public GatewayResourceDescriptionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the Gateway resource with the given name. + * Gets the information about the Gateway resource with the given name. The information include the description and other properties of the Gateway. + * + * @param gatewayResourceName The identity of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GatewayResourceDescriptionInner object + */ + public Observable> getWithServiceResponseAsync(String gatewayResourceName) { + if (gatewayResourceName == null) { + throw new IllegalArgumentException("Parameter gatewayResourceName is required and cannot be null."); + } + final String apiVersion = "6.4-preview"; + return service.get(gatewayResourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + + /** + * Deletes the Gateway resource. + * Deletes the Gateway resource identified by the name. + * + * @param gatewayResourceName The identity of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String gatewayResourceName) { + deleteWithServiceResponseAsync(gatewayResourceName).toBlocking().single().body(); + } + + /** + * Deletes the Gateway resource. + * Deletes the Gateway resource identified by the name. + * + * @param gatewayResourceName The identity of the gateway. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String gatewayResourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(gatewayResourceName), serviceCallback); + } + + /** + * Deletes the Gateway resource. + * Deletes the Gateway resource identified by the name. + * + * @param gatewayResourceName The identity of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String gatewayResourceName) { + return deleteWithServiceResponseAsync(gatewayResourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the Gateway resource. + * Deletes the Gateway resource identified by the name. + * + * @param gatewayResourceName The identity of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String gatewayResourceName) { + if (gatewayResourceName == null) { + throw new IllegalArgumentException("Parameter gatewayResourceName is required and cannot be null."); + } + final String apiVersion = "6.4-preview"; + return service.delete(gatewayResourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + + /** + * Lists all the gateway resources. + * Gets the information about all gateway resources in a given resource group. The information include the description and other properties of the Gateway. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedGatewayResourceDescriptionListInner object if successful. + */ + public PagedGatewayResourceDescriptionListInner list() { + return listWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Lists all the gateway resources. + * Gets the information about all gateway resources in a given resource group. The information include the description and other properties of the Gateway. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); + } + + /** + * Lists all the gateway resources. + * Gets the information about all gateway resources in a given resource group. The information include the description and other properties of the Gateway. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedGatewayResourceDescriptionListInner object + */ + public Observable listAsync() { + return listWithServiceResponseAsync().map(new Func1, PagedGatewayResourceDescriptionListInner>() { + @Override + public PagedGatewayResourceDescriptionListInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists all the gateway resources. + * Gets the information about all gateway resources in a given resource group. The information include the description and other properties of the Gateway. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedGatewayResourceDescriptionListInner object + */ + public Observable> listWithServiceResponseAsync() { + final String apiVersion = "6.4-preview"; + return service.list(apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listDelegate(Response response) throws FabricErrorException, IOException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshNetworksInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshNetworksInner.java new file mode 100644 index 0000000000000..294b8d7d1e7ac --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshNetworksInner.java @@ -0,0 +1,392 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.servicefabric.FabricErrorException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in MeshNetworks. + */ +public class MeshNetworksInner { + /** The Retrofit service to perform REST calls. */ + private MeshNetworksService service; + /** The service client containing this operation class. */ + private ServiceFabricClientAPIsImpl client; + + /** + * Initializes an instance of MeshNetworksInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public MeshNetworksInner(Retrofit retrofit, ServiceFabricClientAPIsImpl client) { + this.service = retrofit.create(MeshNetworksService.class); + this.client = client; + } + + /** + * The interface defining all the services for MeshNetworks to be + * used by Retrofit to perform actually REST calls. + */ + interface MeshNetworksService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshNetworks createOrUpdate" }) + @PUT("Resources/Networks/{networkResourceName}") + Observable> createOrUpdate(@Path(value = "networkResourceName", encoded = true) String networkResourceName, @Query("api-version") String apiVersion, @Body NetworkResourceDescriptionInner networkResourceDescription, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshNetworks get" }) + @GET("Resources/Networks/{networkResourceName}") + Observable> get(@Path(value = "networkResourceName", encoded = true) String networkResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshNetworks delete" }) + @HTTP(path = "Resources/Networks/{networkResourceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path(value = "networkResourceName", encoded = true) String networkResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshNetworks list" }) + @GET("Resources/Networks") + Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Creates or updates a Network resource. + * Creates a Network resource with the specified name, description and properties. If Network resource with the same name exists, then it is updated with the specified description and properties. Network resource provides connectivity between application services. + * + * @param networkResourceName The identity of the network. + * @param networkResourceDescription Description for creating a Network resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NetworkResourceDescriptionInner object if successful. + */ + public NetworkResourceDescriptionInner createOrUpdate(String networkResourceName, NetworkResourceDescriptionInner networkResourceDescription) { + return createOrUpdateWithServiceResponseAsync(networkResourceName, networkResourceDescription).toBlocking().single().body(); + } + + /** + * Creates or updates a Network resource. + * Creates a Network resource with the specified name, description and properties. If Network resource with the same name exists, then it is updated with the specified description and properties. Network resource provides connectivity between application services. + * + * @param networkResourceName The identity of the network. + * @param networkResourceDescription Description for creating a Network resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String networkResourceName, NetworkResourceDescriptionInner networkResourceDescription, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(networkResourceName, networkResourceDescription), serviceCallback); + } + + /** + * Creates or updates a Network resource. + * Creates a Network resource with the specified name, description and properties. If Network resource with the same name exists, then it is updated with the specified description and properties. Network resource provides connectivity between application services. + * + * @param networkResourceName The identity of the network. + * @param networkResourceDescription Description for creating a Network resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkResourceDescriptionInner object + */ + public Observable createOrUpdateAsync(String networkResourceName, NetworkResourceDescriptionInner networkResourceDescription) { + return createOrUpdateWithServiceResponseAsync(networkResourceName, networkResourceDescription).map(new Func1, NetworkResourceDescriptionInner>() { + @Override + public NetworkResourceDescriptionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a Network resource. + * Creates a Network resource with the specified name, description and properties. If Network resource with the same name exists, then it is updated with the specified description and properties. Network resource provides connectivity between application services. + * + * @param networkResourceName The identity of the network. + * @param networkResourceDescription Description for creating a Network resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkResourceDescriptionInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String networkResourceName, NetworkResourceDescriptionInner networkResourceDescription) { + if (networkResourceName == null) { + throw new IllegalArgumentException("Parameter networkResourceName is required and cannot be null."); + } + if (networkResourceDescription == null) { + throw new IllegalArgumentException("Parameter networkResourceDescription is required and cannot be null."); + } + Validator.validate(networkResourceDescription); + final String apiVersion = "6.4-preview"; + return service.createOrUpdate(networkResourceName, apiVersion, networkResourceDescription, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + + /** + * Gets the Network resource with the given name. + * Gets the information about the Network resource with the given name. The information include the description and other properties of the Network. + * + * @param networkResourceName The identity of the network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NetworkResourceDescriptionInner object if successful. + */ + public NetworkResourceDescriptionInner get(String networkResourceName) { + return getWithServiceResponseAsync(networkResourceName).toBlocking().single().body(); + } + + /** + * Gets the Network resource with the given name. + * Gets the information about the Network resource with the given name. The information include the description and other properties of the Network. + * + * @param networkResourceName The identity of the network. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String networkResourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(networkResourceName), serviceCallback); + } + + /** + * Gets the Network resource with the given name. + * Gets the information about the Network resource with the given name. The information include the description and other properties of the Network. + * + * @param networkResourceName The identity of the network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkResourceDescriptionInner object + */ + public Observable getAsync(String networkResourceName) { + return getWithServiceResponseAsync(networkResourceName).map(new Func1, NetworkResourceDescriptionInner>() { + @Override + public NetworkResourceDescriptionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the Network resource with the given name. + * Gets the information about the Network resource with the given name. The information include the description and other properties of the Network. + * + * @param networkResourceName The identity of the network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkResourceDescriptionInner object + */ + public Observable> getWithServiceResponseAsync(String networkResourceName) { + if (networkResourceName == null) { + throw new IllegalArgumentException("Parameter networkResourceName is required and cannot be null."); + } + final String apiVersion = "6.4-preview"; + return service.get(networkResourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + + /** + * Deletes the Network resource. + * Deletes the Network resource identified by the name. + * + * @param networkResourceName The identity of the network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String networkResourceName) { + deleteWithServiceResponseAsync(networkResourceName).toBlocking().single().body(); + } + + /** + * Deletes the Network resource. + * Deletes the Network resource identified by the name. + * + * @param networkResourceName The identity of the network. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String networkResourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(networkResourceName), serviceCallback); + } + + /** + * Deletes the Network resource. + * Deletes the Network resource identified by the name. + * + * @param networkResourceName The identity of the network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String networkResourceName) { + return deleteWithServiceResponseAsync(networkResourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the Network resource. + * Deletes the Network resource identified by the name. + * + * @param networkResourceName The identity of the network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String networkResourceName) { + if (networkResourceName == null) { + throw new IllegalArgumentException("Parameter networkResourceName is required and cannot be null."); + } + final String apiVersion = "6.4-preview"; + return service.delete(networkResourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + + /** + * Lists all the network resources. + * Gets the information about all network resources in a given resource group. The information include the description and other properties of the Network. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedNetworkResourceDescriptionListInner object if successful. + */ + public PagedNetworkResourceDescriptionListInner list() { + return listWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Lists all the network resources. + * Gets the information about all network resources in a given resource group. The information include the description and other properties of the Network. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); + } + + /** + * Lists all the network resources. + * Gets the information about all network resources in a given resource group. The information include the description and other properties of the Network. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedNetworkResourceDescriptionListInner object + */ + public Observable listAsync() { + return listWithServiceResponseAsync().map(new Func1, PagedNetworkResourceDescriptionListInner>() { + @Override + public PagedNetworkResourceDescriptionListInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists all the network resources. + * Gets the information about all network resources in a given resource group. The information include the description and other properties of the Network. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedNetworkResourceDescriptionListInner object + */ + public Observable> listWithServiceResponseAsync() { + final String apiVersion = "6.4-preview"; + return service.list(apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listDelegate(Response response) throws FabricErrorException, IOException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshSecretValuesInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshSecretValuesInner.java new file mode 100644 index 0000000000000..d5993db292e52 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshSecretValuesInner.java @@ -0,0 +1,511 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.servicefabric.FabricErrorException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in MeshSecretValues. + */ +public class MeshSecretValuesInner implements InnerSupportsDelete { + /** The Retrofit service to perform REST calls. */ + private MeshSecretValuesService service; + /** The service client containing this operation class. */ + private ServiceFabricClientAPIsImpl client; + + /** + * Initializes an instance of MeshSecretValuesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public MeshSecretValuesInner(Retrofit retrofit, ServiceFabricClientAPIsImpl client) { + this.service = retrofit.create(MeshSecretValuesService.class); + this.client = client; + } + + /** + * The interface defining all the services for MeshSecretValues to be + * used by Retrofit to perform actually REST calls. + */ + interface MeshSecretValuesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshSecretValues addValue" }) + @PUT("Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}") + Observable> addValue(@Path(value = "secretResourceName", encoded = true) String secretResourceName, @Path(value = "secretValueResourceName", encoded = true) String secretValueResourceName, @Query("api-version") String apiVersion, @Body SecretValueResourceDescriptionInner secretValueResourceDescription, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshSecretValues get" }) + @GET("Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}") + Observable> get(@Path(value = "secretResourceName", encoded = true) String secretResourceName, @Path(value = "secretValueResourceName", encoded = true) String secretValueResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshSecretValues delete" }) + @HTTP(path = "Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path(value = "secretResourceName", encoded = true) String secretResourceName, @Path(value = "secretValueResourceName", encoded = true) String secretValueResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshSecretValues list" }) + @GET("Resources/Secrets/{secretResourceName}/values") + Observable> list(@Path(value = "secretResourceName", encoded = true) String secretResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshSecretValues show" }) + @POST("Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}/list_value") + Observable> show(@Path(value = "secretResourceName", encoded = true) String secretResourceName, @Path(value = "secretValueResourceName", encoded = true) String secretValueResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Adds the specified value as a new version of the specified secret resource. + * Creates a new value of the specified secret resource. The name of the value is typically the version identifier. Once created the value cannot be changed. + * + * @param secretResourceName The name of the secret resource. + * @param secretValueResourceName The name of the secret resource value which is typically the version identifier for the value. + * @param secretValueResourceDescription Description for creating a value of a secret resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SecretValueResourceDescriptionInner object if successful. + */ + public SecretValueResourceDescriptionInner addValue(String secretResourceName, String secretValueResourceName, SecretValueResourceDescriptionInner secretValueResourceDescription) { + return addValueWithServiceResponseAsync(secretResourceName, secretValueResourceName, secretValueResourceDescription).toBlocking().single().body(); + } + + /** + * Adds the specified value as a new version of the specified secret resource. + * Creates a new value of the specified secret resource. The name of the value is typically the version identifier. Once created the value cannot be changed. + * + * @param secretResourceName The name of the secret resource. + * @param secretValueResourceName The name of the secret resource value which is typically the version identifier for the value. + * @param secretValueResourceDescription Description for creating a value of a secret resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture addValueAsync(String secretResourceName, String secretValueResourceName, SecretValueResourceDescriptionInner secretValueResourceDescription, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addValueWithServiceResponseAsync(secretResourceName, secretValueResourceName, secretValueResourceDescription), serviceCallback); + } + + /** + * Adds the specified value as a new version of the specified secret resource. + * Creates a new value of the specified secret resource. The name of the value is typically the version identifier. Once created the value cannot be changed. + * + * @param secretResourceName The name of the secret resource. + * @param secretValueResourceName The name of the secret resource value which is typically the version identifier for the value. + * @param secretValueResourceDescription Description for creating a value of a secret resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SecretValueResourceDescriptionInner object + */ + public Observable addValueAsync(String secretResourceName, String secretValueResourceName, SecretValueResourceDescriptionInner secretValueResourceDescription) { + return addValueWithServiceResponseAsync(secretResourceName, secretValueResourceName, secretValueResourceDescription).map(new Func1, SecretValueResourceDescriptionInner>() { + @Override + public SecretValueResourceDescriptionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Adds the specified value as a new version of the specified secret resource. + * Creates a new value of the specified secret resource. The name of the value is typically the version identifier. Once created the value cannot be changed. + * + * @param secretResourceName The name of the secret resource. + * @param secretValueResourceName The name of the secret resource value which is typically the version identifier for the value. + * @param secretValueResourceDescription Description for creating a value of a secret resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SecretValueResourceDescriptionInner object + */ + public Observable> addValueWithServiceResponseAsync(String secretResourceName, String secretValueResourceName, SecretValueResourceDescriptionInner secretValueResourceDescription) { + if (secretResourceName == null) { + throw new IllegalArgumentException("Parameter secretResourceName is required and cannot be null."); + } + if (secretValueResourceName == null) { + throw new IllegalArgumentException("Parameter secretValueResourceName is required and cannot be null."); + } + if (secretValueResourceDescription == null) { + throw new IllegalArgumentException("Parameter secretValueResourceDescription is required and cannot be null."); + } + Validator.validate(secretValueResourceDescription); + final String apiVersion = "6.4-preview"; + return service.addValue(secretResourceName, secretValueResourceName, apiVersion, secretValueResourceDescription, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addValueDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse addValueDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + + /** + * Gets the specified secret value resource. + * Get the information about the specified named secret value resources. The information does not include the actual value of the secret. + * + * @param secretResourceName The name of the secret resource. + * @param secretValueResourceName The name of the secret resource value which is typically the version identifier for the value. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SecretValueResourceDescriptionInner object if successful. + */ + public SecretValueResourceDescriptionInner get(String secretResourceName, String secretValueResourceName) { + return getWithServiceResponseAsync(secretResourceName, secretValueResourceName).toBlocking().single().body(); + } + + /** + * Gets the specified secret value resource. + * Get the information about the specified named secret value resources. The information does not include the actual value of the secret. + * + * @param secretResourceName The name of the secret resource. + * @param secretValueResourceName The name of the secret resource value which is typically the version identifier for the value. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String secretResourceName, String secretValueResourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(secretResourceName, secretValueResourceName), serviceCallback); + } + + /** + * Gets the specified secret value resource. + * Get the information about the specified named secret value resources. The information does not include the actual value of the secret. + * + * @param secretResourceName The name of the secret resource. + * @param secretValueResourceName The name of the secret resource value which is typically the version identifier for the value. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SecretValueResourceDescriptionInner object + */ + public Observable getAsync(String secretResourceName, String secretValueResourceName) { + return getWithServiceResponseAsync(secretResourceName, secretValueResourceName).map(new Func1, SecretValueResourceDescriptionInner>() { + @Override + public SecretValueResourceDescriptionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified secret value resource. + * Get the information about the specified named secret value resources. The information does not include the actual value of the secret. + * + * @param secretResourceName The name of the secret resource. + * @param secretValueResourceName The name of the secret resource value which is typically the version identifier for the value. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SecretValueResourceDescriptionInner object + */ + public Observable> getWithServiceResponseAsync(String secretResourceName, String secretValueResourceName) { + if (secretResourceName == null) { + throw new IllegalArgumentException("Parameter secretResourceName is required and cannot be null."); + } + if (secretValueResourceName == null) { + throw new IllegalArgumentException("Parameter secretValueResourceName is required and cannot be null."); + } + final String apiVersion = "6.4-preview"; + return service.get(secretResourceName, secretValueResourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + + /** + * Deletes the specified value of the named secret resource. + * Deletes the secret value resource identified by the name. The name of the resource is typically the version associated with that value. Deletion will fail if the specified value is in use. + * + * @param secretResourceName The name of the secret resource. + * @param secretValueResourceName The name of the secret resource value which is typically the version identifier for the value. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String secretResourceName, String secretValueResourceName) { + deleteWithServiceResponseAsync(secretResourceName, secretValueResourceName).toBlocking().single().body(); + } + + /** + * Deletes the specified value of the named secret resource. + * Deletes the secret value resource identified by the name. The name of the resource is typically the version associated with that value. Deletion will fail if the specified value is in use. + * + * @param secretResourceName The name of the secret resource. + * @param secretValueResourceName The name of the secret resource value which is typically the version identifier for the value. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String secretResourceName, String secretValueResourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(secretResourceName, secretValueResourceName), serviceCallback); + } + + /** + * Deletes the specified value of the named secret resource. + * Deletes the secret value resource identified by the name. The name of the resource is typically the version associated with that value. Deletion will fail if the specified value is in use. + * + * @param secretResourceName The name of the secret resource. + * @param secretValueResourceName The name of the secret resource value which is typically the version identifier for the value. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String secretResourceName, String secretValueResourceName) { + return deleteWithServiceResponseAsync(secretResourceName, secretValueResourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified value of the named secret resource. + * Deletes the secret value resource identified by the name. The name of the resource is typically the version associated with that value. Deletion will fail if the specified value is in use. + * + * @param secretResourceName The name of the secret resource. + * @param secretValueResourceName The name of the secret resource value which is typically the version identifier for the value. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String secretResourceName, String secretValueResourceName) { + if (secretResourceName == null) { + throw new IllegalArgumentException("Parameter secretResourceName is required and cannot be null."); + } + if (secretValueResourceName == null) { + throw new IllegalArgumentException("Parameter secretValueResourceName is required and cannot be null."); + } + final String apiVersion = "6.4-preview"; + return service.delete(secretResourceName, secretValueResourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + + /** + * List names of all values of the the specified secret resource. + * Gets information about all secret value resources of the specified secret resource. The information includes the names of the secret value resources, but not the actual values. + * + * @param secretResourceName The name of the secret resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedSecretValueResourceDescriptionListInner object if successful. + */ + public PagedSecretValueResourceDescriptionListInner list(String secretResourceName) { + return listWithServiceResponseAsync(secretResourceName).toBlocking().single().body(); + } + + /** + * List names of all values of the the specified secret resource. + * Gets information about all secret value resources of the specified secret resource. The information includes the names of the secret value resources, but not the actual values. + * + * @param secretResourceName The name of the secret resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listAsync(String secretResourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(secretResourceName), serviceCallback); + } + + /** + * List names of all values of the the specified secret resource. + * Gets information about all secret value resources of the specified secret resource. The information includes the names of the secret value resources, but not the actual values. + * + * @param secretResourceName The name of the secret resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedSecretValueResourceDescriptionListInner object + */ + public Observable listAsync(String secretResourceName) { + return listWithServiceResponseAsync(secretResourceName).map(new Func1, PagedSecretValueResourceDescriptionListInner>() { + @Override + public PagedSecretValueResourceDescriptionListInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List names of all values of the the specified secret resource. + * Gets information about all secret value resources of the specified secret resource. The information includes the names of the secret value resources, but not the actual values. + * + * @param secretResourceName The name of the secret resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedSecretValueResourceDescriptionListInner object + */ + public Observable> listWithServiceResponseAsync(String secretResourceName) { + if (secretResourceName == null) { + throw new IllegalArgumentException("Parameter secretResourceName is required and cannot be null."); + } + final String apiVersion = "6.4-preview"; + return service.list(secretResourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + + /** + * Lists the specified value of the secret resource. + * Lists the decrypted value of the specified named value of the secret resource. This is a privileged operation. + * + * @param secretResourceName The name of the secret resource. + * @param secretValueResourceName The name of the secret resource value which is typically the version identifier for the value. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SecretValueInner object if successful. + */ + public SecretValueInner show(String secretResourceName, String secretValueResourceName) { + return showWithServiceResponseAsync(secretResourceName, secretValueResourceName).toBlocking().single().body(); + } + + /** + * Lists the specified value of the secret resource. + * Lists the decrypted value of the specified named value of the secret resource. This is a privileged operation. + * + * @param secretResourceName The name of the secret resource. + * @param secretValueResourceName The name of the secret resource value which is typically the version identifier for the value. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture showAsync(String secretResourceName, String secretValueResourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(showWithServiceResponseAsync(secretResourceName, secretValueResourceName), serviceCallback); + } + + /** + * Lists the specified value of the secret resource. + * Lists the decrypted value of the specified named value of the secret resource. This is a privileged operation. + * + * @param secretResourceName The name of the secret resource. + * @param secretValueResourceName The name of the secret resource value which is typically the version identifier for the value. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SecretValueInner object + */ + public Observable showAsync(String secretResourceName, String secretValueResourceName) { + return showWithServiceResponseAsync(secretResourceName, secretValueResourceName).map(new Func1, SecretValueInner>() { + @Override + public SecretValueInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists the specified value of the secret resource. + * Lists the decrypted value of the specified named value of the secret resource. This is a privileged operation. + * + * @param secretResourceName The name of the secret resource. + * @param secretValueResourceName The name of the secret resource value which is typically the version identifier for the value. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SecretValueInner object + */ + public Observable> showWithServiceResponseAsync(String secretResourceName, String secretValueResourceName) { + if (secretResourceName == null) { + throw new IllegalArgumentException("Parameter secretResourceName is required and cannot be null."); + } + if (secretValueResourceName == null) { + throw new IllegalArgumentException("Parameter secretValueResourceName is required and cannot be null."); + } + final String apiVersion = "6.4-preview"; + return service.show(secretResourceName, secretValueResourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = showDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse showDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshSecretsInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshSecretsInner.java new file mode 100644 index 0000000000000..bd67171382e46 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshSecretsInner.java @@ -0,0 +1,392 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.servicefabric.FabricErrorException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in MeshSecrets. + */ +public class MeshSecretsInner { + /** The Retrofit service to perform REST calls. */ + private MeshSecretsService service; + /** The service client containing this operation class. */ + private ServiceFabricClientAPIsImpl client; + + /** + * Initializes an instance of MeshSecretsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public MeshSecretsInner(Retrofit retrofit, ServiceFabricClientAPIsImpl client) { + this.service = retrofit.create(MeshSecretsService.class); + this.client = client; + } + + /** + * The interface defining all the services for MeshSecrets to be + * used by Retrofit to perform actually REST calls. + */ + interface MeshSecretsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshSecrets createOrUpdate" }) + @PUT("Resources/Secrets/{secretResourceName}") + Observable> createOrUpdate(@Path(value = "secretResourceName", encoded = true) String secretResourceName, @Query("api-version") String apiVersion, @Body SecretResourceDescriptionInner secretResourceDescription, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshSecrets get" }) + @GET("Resources/Secrets/{secretResourceName}") + Observable> get(@Path(value = "secretResourceName", encoded = true) String secretResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshSecrets delete" }) + @HTTP(path = "Resources/Secrets/{secretResourceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path(value = "secretResourceName", encoded = true) String secretResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshSecrets list" }) + @GET("Resources/Secrets") + Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Creates or updates a Secret resource. + * Creates a Secret resource with the specified name, description and properties. If Secret resource with the same name exists, then it is updated with the specified description and properties. Once created, the kind and contentType of a secret resource cannot be updated. + * + * @param secretResourceName The name of the secret resource. + * @param secretResourceDescription Description for creating a secret resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SecretResourceDescriptionInner object if successful. + */ + public SecretResourceDescriptionInner createOrUpdate(String secretResourceName, SecretResourceDescriptionInner secretResourceDescription) { + return createOrUpdateWithServiceResponseAsync(secretResourceName, secretResourceDescription).toBlocking().single().body(); + } + + /** + * Creates or updates a Secret resource. + * Creates a Secret resource with the specified name, description and properties. If Secret resource with the same name exists, then it is updated with the specified description and properties. Once created, the kind and contentType of a secret resource cannot be updated. + * + * @param secretResourceName The name of the secret resource. + * @param secretResourceDescription Description for creating a secret resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String secretResourceName, SecretResourceDescriptionInner secretResourceDescription, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(secretResourceName, secretResourceDescription), serviceCallback); + } + + /** + * Creates or updates a Secret resource. + * Creates a Secret resource with the specified name, description and properties. If Secret resource with the same name exists, then it is updated with the specified description and properties. Once created, the kind and contentType of a secret resource cannot be updated. + * + * @param secretResourceName The name of the secret resource. + * @param secretResourceDescription Description for creating a secret resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SecretResourceDescriptionInner object + */ + public Observable createOrUpdateAsync(String secretResourceName, SecretResourceDescriptionInner secretResourceDescription) { + return createOrUpdateWithServiceResponseAsync(secretResourceName, secretResourceDescription).map(new Func1, SecretResourceDescriptionInner>() { + @Override + public SecretResourceDescriptionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a Secret resource. + * Creates a Secret resource with the specified name, description and properties. If Secret resource with the same name exists, then it is updated with the specified description and properties. Once created, the kind and contentType of a secret resource cannot be updated. + * + * @param secretResourceName The name of the secret resource. + * @param secretResourceDescription Description for creating a secret resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SecretResourceDescriptionInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String secretResourceName, SecretResourceDescriptionInner secretResourceDescription) { + if (secretResourceName == null) { + throw new IllegalArgumentException("Parameter secretResourceName is required and cannot be null."); + } + if (secretResourceDescription == null) { + throw new IllegalArgumentException("Parameter secretResourceDescription is required and cannot be null."); + } + Validator.validate(secretResourceDescription); + final String apiVersion = "6.4-preview"; + return service.createOrUpdate(secretResourceName, apiVersion, secretResourceDescription, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + + /** + * Gets the Secret resource with the given name. + * Gets the information about the Secret resource with the given name. The information include the description and other properties of the Secret. + * + * @param secretResourceName The name of the secret resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SecretResourceDescriptionInner object if successful. + */ + public SecretResourceDescriptionInner get(String secretResourceName) { + return getWithServiceResponseAsync(secretResourceName).toBlocking().single().body(); + } + + /** + * Gets the Secret resource with the given name. + * Gets the information about the Secret resource with the given name. The information include the description and other properties of the Secret. + * + * @param secretResourceName The name of the secret resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String secretResourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(secretResourceName), serviceCallback); + } + + /** + * Gets the Secret resource with the given name. + * Gets the information about the Secret resource with the given name. The information include the description and other properties of the Secret. + * + * @param secretResourceName The name of the secret resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SecretResourceDescriptionInner object + */ + public Observable getAsync(String secretResourceName) { + return getWithServiceResponseAsync(secretResourceName).map(new Func1, SecretResourceDescriptionInner>() { + @Override + public SecretResourceDescriptionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the Secret resource with the given name. + * Gets the information about the Secret resource with the given name. The information include the description and other properties of the Secret. + * + * @param secretResourceName The name of the secret resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SecretResourceDescriptionInner object + */ + public Observable> getWithServiceResponseAsync(String secretResourceName) { + if (secretResourceName == null) { + throw new IllegalArgumentException("Parameter secretResourceName is required and cannot be null."); + } + final String apiVersion = "6.4-preview"; + return service.get(secretResourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + + /** + * Deletes the Secret resource. + * Deletes the specified Secret resource and all of its named values. + * + * @param secretResourceName The name of the secret resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String secretResourceName) { + deleteWithServiceResponseAsync(secretResourceName).toBlocking().single().body(); + } + + /** + * Deletes the Secret resource. + * Deletes the specified Secret resource and all of its named values. + * + * @param secretResourceName The name of the secret resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String secretResourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(secretResourceName), serviceCallback); + } + + /** + * Deletes the Secret resource. + * Deletes the specified Secret resource and all of its named values. + * + * @param secretResourceName The name of the secret resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String secretResourceName) { + return deleteWithServiceResponseAsync(secretResourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the Secret resource. + * Deletes the specified Secret resource and all of its named values. + * + * @param secretResourceName The name of the secret resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String secretResourceName) { + if (secretResourceName == null) { + throw new IllegalArgumentException("Parameter secretResourceName is required and cannot be null."); + } + final String apiVersion = "6.4-preview"; + return service.delete(secretResourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + + /** + * Lists all the secret resources. + * Gets the information about all secret resources in a given resource group. The information include the description and other properties of the Secret. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedSecretResourceDescriptionListInner object if successful. + */ + public PagedSecretResourceDescriptionListInner list() { + return listWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Lists all the secret resources. + * Gets the information about all secret resources in a given resource group. The information include the description and other properties of the Secret. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); + } + + /** + * Lists all the secret resources. + * Gets the information about all secret resources in a given resource group. The information include the description and other properties of the Secret. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedSecretResourceDescriptionListInner object + */ + public Observable listAsync() { + return listWithServiceResponseAsync().map(new Func1, PagedSecretResourceDescriptionListInner>() { + @Override + public PagedSecretResourceDescriptionListInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists all the secret resources. + * Gets the information about all secret resources in a given resource group. The information include the description and other properties of the Secret. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedSecretResourceDescriptionListInner object + */ + public Observable> listWithServiceResponseAsync() { + final String apiVersion = "6.4-preview"; + return service.list(apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listDelegate(Response response) throws FabricErrorException, IOException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshServiceReplicasInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshServiceReplicasInner.java new file mode 100644 index 0000000000000..7ab4301030a5b --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshServiceReplicasInner.java @@ -0,0 +1,241 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.servicefabric.FabricErrorException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in MeshServiceReplicas. + */ +public class MeshServiceReplicasInner { + /** The Retrofit service to perform REST calls. */ + private MeshServiceReplicasService service; + /** The service client containing this operation class. */ + private ServiceFabricClientAPIsImpl client; + + /** + * Initializes an instance of MeshServiceReplicasInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public MeshServiceReplicasInner(Retrofit retrofit, ServiceFabricClientAPIsImpl client) { + this.service = retrofit.create(MeshServiceReplicasService.class); + this.client = client; + } + + /** + * The interface defining all the services for MeshServiceReplicas to be + * used by Retrofit to perform actually REST calls. + */ + interface MeshServiceReplicasService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshServiceReplicas get" }) + @GET("Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}") + Observable> get(@Path(value = "applicationResourceName", encoded = true) String applicationResourceName, @Path(value = "serviceResourceName", encoded = true) String serviceResourceName, @Path(value = "replicaName", encoded = true) String replicaName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshServiceReplicas list" }) + @GET("Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas") + Observable> list(@Path(value = "applicationResourceName", encoded = true) String applicationResourceName, @Path(value = "serviceResourceName", encoded = true) String serviceResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the given replica of the service of an application. + * Gets the information about the service replica with the given name. The information include the description and other properties of the service replica. + * + * @param applicationResourceName The identity of the application. + * @param serviceResourceName The identity of the service. + * @param replicaName Service Fabric replica name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ServiceReplicaDescriptionInner object if successful. + */ + public ServiceReplicaDescriptionInner get(String applicationResourceName, String serviceResourceName, String replicaName) { + return getWithServiceResponseAsync(applicationResourceName, serviceResourceName, replicaName).toBlocking().single().body(); + } + + /** + * Gets the given replica of the service of an application. + * Gets the information about the service replica with the given name. The information include the description and other properties of the service replica. + * + * @param applicationResourceName The identity of the application. + * @param serviceResourceName The identity of the service. + * @param replicaName Service Fabric replica name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String applicationResourceName, String serviceResourceName, String replicaName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(applicationResourceName, serviceResourceName, replicaName), serviceCallback); + } + + /** + * Gets the given replica of the service of an application. + * Gets the information about the service replica with the given name. The information include the description and other properties of the service replica. + * + * @param applicationResourceName The identity of the application. + * @param serviceResourceName The identity of the service. + * @param replicaName Service Fabric replica name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceReplicaDescriptionInner object + */ + public Observable getAsync(String applicationResourceName, String serviceResourceName, String replicaName) { + return getWithServiceResponseAsync(applicationResourceName, serviceResourceName, replicaName).map(new Func1, ServiceReplicaDescriptionInner>() { + @Override + public ServiceReplicaDescriptionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the given replica of the service of an application. + * Gets the information about the service replica with the given name. The information include the description and other properties of the service replica. + * + * @param applicationResourceName The identity of the application. + * @param serviceResourceName The identity of the service. + * @param replicaName Service Fabric replica name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceReplicaDescriptionInner object + */ + public Observable> getWithServiceResponseAsync(String applicationResourceName, String serviceResourceName, String replicaName) { + if (applicationResourceName == null) { + throw new IllegalArgumentException("Parameter applicationResourceName is required and cannot be null."); + } + if (serviceResourceName == null) { + throw new IllegalArgumentException("Parameter serviceResourceName is required and cannot be null."); + } + if (replicaName == null) { + throw new IllegalArgumentException("Parameter replicaName is required and cannot be null."); + } + final String apiVersion = "6.4-preview"; + return service.get(applicationResourceName, serviceResourceName, replicaName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + + /** + * Lists all the replicas of a service. + * Gets the information about all replicas of a service. The information include the description and other properties of the service replica. + * + * @param applicationResourceName The identity of the application. + * @param serviceResourceName The identity of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedServiceReplicaDescriptionListInner object if successful. + */ + public PagedServiceReplicaDescriptionListInner list(String applicationResourceName, String serviceResourceName) { + return listWithServiceResponseAsync(applicationResourceName, serviceResourceName).toBlocking().single().body(); + } + + /** + * Lists all the replicas of a service. + * Gets the information about all replicas of a service. The information include the description and other properties of the service replica. + * + * @param applicationResourceName The identity of the application. + * @param serviceResourceName The identity of the service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listAsync(String applicationResourceName, String serviceResourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(applicationResourceName, serviceResourceName), serviceCallback); + } + + /** + * Lists all the replicas of a service. + * Gets the information about all replicas of a service. The information include the description and other properties of the service replica. + * + * @param applicationResourceName The identity of the application. + * @param serviceResourceName The identity of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedServiceReplicaDescriptionListInner object + */ + public Observable listAsync(String applicationResourceName, String serviceResourceName) { + return listWithServiceResponseAsync(applicationResourceName, serviceResourceName).map(new Func1, PagedServiceReplicaDescriptionListInner>() { + @Override + public PagedServiceReplicaDescriptionListInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists all the replicas of a service. + * Gets the information about all replicas of a service. The information include the description and other properties of the service replica. + * + * @param applicationResourceName The identity of the application. + * @param serviceResourceName The identity of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedServiceReplicaDescriptionListInner object + */ + public Observable> listWithServiceResponseAsync(String applicationResourceName, String serviceResourceName) { + if (applicationResourceName == null) { + throw new IllegalArgumentException("Parameter applicationResourceName is required and cannot be null."); + } + if (serviceResourceName == null) { + throw new IllegalArgumentException("Parameter serviceResourceName is required and cannot be null."); + } + final String apiVersion = "6.4-preview"; + return service.list(applicationResourceName, serviceResourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshServicesInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshServicesInner.java new file mode 100644 index 0000000000000..dd664e5c669ab --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshServicesInner.java @@ -0,0 +1,227 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.servicefabric.FabricErrorException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in MeshServices. + */ +public class MeshServicesInner { + /** The Retrofit service to perform REST calls. */ + private MeshServicesService service; + /** The service client containing this operation class. */ + private ServiceFabricClientAPIsImpl client; + + /** + * Initializes an instance of MeshServicesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public MeshServicesInner(Retrofit retrofit, ServiceFabricClientAPIsImpl client) { + this.service = retrofit.create(MeshServicesService.class); + this.client = client; + } + + /** + * The interface defining all the services for MeshServices to be + * used by Retrofit to perform actually REST calls. + */ + interface MeshServicesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshServices get" }) + @GET("Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}") + Observable> get(@Path(value = "applicationResourceName", encoded = true) String applicationResourceName, @Path(value = "serviceResourceName", encoded = true) String serviceResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshServices list" }) + @GET("Resources/Applications/{applicationResourceName}/Services") + Observable> list(@Path(value = "applicationResourceName", encoded = true) String applicationResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the Service resource with the given name. + * Gets the information about the Service resource with the given name. The information include the description and other properties of the Service. + * + * @param applicationResourceName The identity of the application. + * @param serviceResourceName The identity of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ServiceResourceDescriptionInner object if successful. + */ + public ServiceResourceDescriptionInner get(String applicationResourceName, String serviceResourceName) { + return getWithServiceResponseAsync(applicationResourceName, serviceResourceName).toBlocking().single().body(); + } + + /** + * Gets the Service resource with the given name. + * Gets the information about the Service resource with the given name. The information include the description and other properties of the Service. + * + * @param applicationResourceName The identity of the application. + * @param serviceResourceName The identity of the service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String applicationResourceName, String serviceResourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(applicationResourceName, serviceResourceName), serviceCallback); + } + + /** + * Gets the Service resource with the given name. + * Gets the information about the Service resource with the given name. The information include the description and other properties of the Service. + * + * @param applicationResourceName The identity of the application. + * @param serviceResourceName The identity of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceResourceDescriptionInner object + */ + public Observable getAsync(String applicationResourceName, String serviceResourceName) { + return getWithServiceResponseAsync(applicationResourceName, serviceResourceName).map(new Func1, ServiceResourceDescriptionInner>() { + @Override + public ServiceResourceDescriptionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the Service resource with the given name. + * Gets the information about the Service resource with the given name. The information include the description and other properties of the Service. + * + * @param applicationResourceName The identity of the application. + * @param serviceResourceName The identity of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceResourceDescriptionInner object + */ + public Observable> getWithServiceResponseAsync(String applicationResourceName, String serviceResourceName) { + if (applicationResourceName == null) { + throw new IllegalArgumentException("Parameter applicationResourceName is required and cannot be null."); + } + if (serviceResourceName == null) { + throw new IllegalArgumentException("Parameter serviceResourceName is required and cannot be null."); + } + final String apiVersion = "6.4-preview"; + return service.get(applicationResourceName, serviceResourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + + /** + * Lists all the service resources. + * Gets the information about all services of an application resource. The information include the description and other properties of the Service. + * + * @param applicationResourceName The identity of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedServiceResourceDescriptionListInner object if successful. + */ + public PagedServiceResourceDescriptionListInner list(String applicationResourceName) { + return listWithServiceResponseAsync(applicationResourceName).toBlocking().single().body(); + } + + /** + * Lists all the service resources. + * Gets the information about all services of an application resource. The information include the description and other properties of the Service. + * + * @param applicationResourceName The identity of the application. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listAsync(String applicationResourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(applicationResourceName), serviceCallback); + } + + /** + * Lists all the service resources. + * Gets the information about all services of an application resource. The information include the description and other properties of the Service. + * + * @param applicationResourceName The identity of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedServiceResourceDescriptionListInner object + */ + public Observable listAsync(String applicationResourceName) { + return listWithServiceResponseAsync(applicationResourceName).map(new Func1, PagedServiceResourceDescriptionListInner>() { + @Override + public PagedServiceResourceDescriptionListInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists all the service resources. + * Gets the information about all services of an application resource. The information include the description and other properties of the Service. + * + * @param applicationResourceName The identity of the application. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedServiceResourceDescriptionListInner object + */ + public Observable> listWithServiceResponseAsync(String applicationResourceName) { + if (applicationResourceName == null) { + throw new IllegalArgumentException("Parameter applicationResourceName is required and cannot be null."); + } + final String apiVersion = "6.4-preview"; + return service.list(applicationResourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshVolumesInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshVolumesInner.java new file mode 100644 index 0000000000000..de8d35d7e2545 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/MeshVolumesInner.java @@ -0,0 +1,392 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.servicefabric.FabricErrorException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in MeshVolumes. + */ +public class MeshVolumesInner { + /** The Retrofit service to perform REST calls. */ + private MeshVolumesService service; + /** The service client containing this operation class. */ + private ServiceFabricClientAPIsImpl client; + + /** + * Initializes an instance of MeshVolumesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public MeshVolumesInner(Retrofit retrofit, ServiceFabricClientAPIsImpl client) { + this.service = retrofit.create(MeshVolumesService.class); + this.client = client; + } + + /** + * The interface defining all the services for MeshVolumes to be + * used by Retrofit to perform actually REST calls. + */ + interface MeshVolumesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshVolumes createOrUpdate" }) + @PUT("Resources/Volumes/{volumeResourceName}") + Observable> createOrUpdate(@Path(value = "volumeResourceName", encoded = true) String volumeResourceName, @Query("api-version") String apiVersion, @Body VolumeResourceDescriptionInner volumeResourceDescription, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshVolumes get" }) + @GET("Resources/Volumes/{volumeResourceName}") + Observable> get(@Path(value = "volumeResourceName", encoded = true) String volumeResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshVolumes delete" }) + @HTTP(path = "Resources/Volumes/{volumeResourceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path(value = "volumeResourceName", encoded = true) String volumeResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.MeshVolumes list" }) + @GET("Resources/Volumes") + Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Creates or updates a Volume resource. + * Creates a Volume resource with the specified name, description and properties. If Volume resource with the same name exists, then it is updated with the specified description and properties. + * + * @param volumeResourceName The identity of the volume. + * @param volumeResourceDescription Description for creating a Volume resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VolumeResourceDescriptionInner object if successful. + */ + public VolumeResourceDescriptionInner createOrUpdate(String volumeResourceName, VolumeResourceDescriptionInner volumeResourceDescription) { + return createOrUpdateWithServiceResponseAsync(volumeResourceName, volumeResourceDescription).toBlocking().single().body(); + } + + /** + * Creates or updates a Volume resource. + * Creates a Volume resource with the specified name, description and properties. If Volume resource with the same name exists, then it is updated with the specified description and properties. + * + * @param volumeResourceName The identity of the volume. + * @param volumeResourceDescription Description for creating a Volume resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String volumeResourceName, VolumeResourceDescriptionInner volumeResourceDescription, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(volumeResourceName, volumeResourceDescription), serviceCallback); + } + + /** + * Creates or updates a Volume resource. + * Creates a Volume resource with the specified name, description and properties. If Volume resource with the same name exists, then it is updated with the specified description and properties. + * + * @param volumeResourceName The identity of the volume. + * @param volumeResourceDescription Description for creating a Volume resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VolumeResourceDescriptionInner object + */ + public Observable createOrUpdateAsync(String volumeResourceName, VolumeResourceDescriptionInner volumeResourceDescription) { + return createOrUpdateWithServiceResponseAsync(volumeResourceName, volumeResourceDescription).map(new Func1, VolumeResourceDescriptionInner>() { + @Override + public VolumeResourceDescriptionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a Volume resource. + * Creates a Volume resource with the specified name, description and properties. If Volume resource with the same name exists, then it is updated with the specified description and properties. + * + * @param volumeResourceName The identity of the volume. + * @param volumeResourceDescription Description for creating a Volume resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VolumeResourceDescriptionInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String volumeResourceName, VolumeResourceDescriptionInner volumeResourceDescription) { + if (volumeResourceName == null) { + throw new IllegalArgumentException("Parameter volumeResourceName is required and cannot be null."); + } + if (volumeResourceDescription == null) { + throw new IllegalArgumentException("Parameter volumeResourceDescription is required and cannot be null."); + } + Validator.validate(volumeResourceDescription); + final String apiVersion = "6.4-preview"; + return service.createOrUpdate(volumeResourceName, apiVersion, volumeResourceDescription, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + + /** + * Gets the Volume resource with the given name. + * Gets the information about the Volume resource with the given name. The information include the description and other properties of the Volume. + * + * @param volumeResourceName The identity of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VolumeResourceDescriptionInner object if successful. + */ + public VolumeResourceDescriptionInner get(String volumeResourceName) { + return getWithServiceResponseAsync(volumeResourceName).toBlocking().single().body(); + } + + /** + * Gets the Volume resource with the given name. + * Gets the information about the Volume resource with the given name. The information include the description and other properties of the Volume. + * + * @param volumeResourceName The identity of the volume. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String volumeResourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(volumeResourceName), serviceCallback); + } + + /** + * Gets the Volume resource with the given name. + * Gets the information about the Volume resource with the given name. The information include the description and other properties of the Volume. + * + * @param volumeResourceName The identity of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VolumeResourceDescriptionInner object + */ + public Observable getAsync(String volumeResourceName) { + return getWithServiceResponseAsync(volumeResourceName).map(new Func1, VolumeResourceDescriptionInner>() { + @Override + public VolumeResourceDescriptionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the Volume resource with the given name. + * Gets the information about the Volume resource with the given name. The information include the description and other properties of the Volume. + * + * @param volumeResourceName The identity of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VolumeResourceDescriptionInner object + */ + public Observable> getWithServiceResponseAsync(String volumeResourceName) { + if (volumeResourceName == null) { + throw new IllegalArgumentException("Parameter volumeResourceName is required and cannot be null."); + } + final String apiVersion = "6.4-preview"; + return service.get(volumeResourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + + /** + * Deletes the Volume resource. + * Deletes the Volume resource identified by the name. + * + * @param volumeResourceName The identity of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String volumeResourceName) { + deleteWithServiceResponseAsync(volumeResourceName).toBlocking().single().body(); + } + + /** + * Deletes the Volume resource. + * Deletes the Volume resource identified by the name. + * + * @param volumeResourceName The identity of the volume. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String volumeResourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(volumeResourceName), serviceCallback); + } + + /** + * Deletes the Volume resource. + * Deletes the Volume resource identified by the name. + * + * @param volumeResourceName The identity of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String volumeResourceName) { + return deleteWithServiceResponseAsync(volumeResourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the Volume resource. + * Deletes the Volume resource identified by the name. + * + * @param volumeResourceName The identity of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String volumeResourceName) { + if (volumeResourceName == null) { + throw new IllegalArgumentException("Parameter volumeResourceName is required and cannot be null."); + } + final String apiVersion = "6.4-preview"; + return service.delete(volumeResourceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + + /** + * Lists all the volume resources. + * Gets the information about all volume resources in a given resource group. The information include the description and other properties of the Volume. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedVolumeResourceDescriptionListInner object if successful. + */ + public PagedVolumeResourceDescriptionListInner list() { + return listWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Lists all the volume resources. + * Gets the information about all volume resources in a given resource group. The information include the description and other properties of the Volume. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); + } + + /** + * Lists all the volume resources. + * Gets the information about all volume resources in a given resource group. The information include the description and other properties of the Volume. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedVolumeResourceDescriptionListInner object + */ + public Observable listAsync() { + return listWithServiceResponseAsync().map(new Func1, PagedVolumeResourceDescriptionListInner>() { + @Override + public PagedVolumeResourceDescriptionListInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists all the volume resources. + * Gets the information about all volume resources in a given resource group. The information include the description and other properties of the Volume. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedVolumeResourceDescriptionListInner object + */ + public Observable> listWithServiceResponseAsync() { + final String apiVersion = "6.4-preview"; + return service.list(apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listDelegate(Response response) throws FabricErrorException, IOException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/NetworkResourceDescriptionInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/NetworkResourceDescriptionInner.java new file mode 100644 index 0000000000000..19357891e684e --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/NetworkResourceDescriptionInner.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import com.microsoft.azure.servicefabric.NetworkResourceProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * This type describes a network resource. + */ +public class NetworkResourceDescriptionInner { + /** + * Name of the Network resource. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Describes properties of a network resource. + */ + @JsonProperty(value = "properties", required = true) + private NetworkResourceProperties properties; + + /** + * Get name of the Network resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the Network resource. + * + * @param name the name value to set + * @return the NetworkResourceDescriptionInner object itself. + */ + public NetworkResourceDescriptionInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get describes properties of a network resource. + * + * @return the properties value + */ + public NetworkResourceProperties properties() { + return this.properties; + } + + /** + * Set describes properties of a network resource. + * + * @param properties the properties value to set + * @return the NetworkResourceDescriptionInner object itself. + */ + public NetworkResourceDescriptionInner withProperties(NetworkResourceProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/NodeEventInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/NodeEventInner.java index 44775c9c44ed1..f9c3f105022a4 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/NodeEventInner.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/NodeEventInner.java @@ -20,22 +20,18 @@ @JsonTypeName("NodeEvent") @JsonSubTypes({ @JsonSubTypes.Type(name = "NodeAborted", value = NodeAbortedEvent.class), - @JsonSubTypes.Type(name = "NodeAborting", value = NodeAbortingEvent.class), - @JsonSubTypes.Type(name = "NodeAdded", value = NodeAddedEvent.class), - @JsonSubTypes.Type(name = "NodeClose", value = NodeCloseEvent.class), - @JsonSubTypes.Type(name = "NodeClosing", value = NodeClosingEvent.class), - @JsonSubTypes.Type(name = "NodeDeactivateComplete", value = NodeDeactivateCompleteEvent.class), - @JsonSubTypes.Type(name = "NodeDeactivateStart", value = NodeDeactivateStartEvent.class), + @JsonSubTypes.Type(name = "NodeAddedToCluster", value = NodeAddedToClusterEvent.class), + @JsonSubTypes.Type(name = "NodeClosed", value = NodeClosedEvent.class), + @JsonSubTypes.Type(name = "NodeDeactivateCompleted", value = NodeDeactivateCompletedEvent.class), + @JsonSubTypes.Type(name = "NodeDeactivateStarted", value = NodeDeactivateStartedEvent.class), @JsonSubTypes.Type(name = "NodeDown", value = NodeDownEvent.class), - @JsonSubTypes.Type(name = "NodeHealthReportCreated", value = NodeHealthReportCreatedEvent.class), + @JsonSubTypes.Type(name = "NodeNewHealthReport", value = NodeNewHealthReportEvent.class), @JsonSubTypes.Type(name = "NodeHealthReportExpired", value = NodeHealthReportExpiredEvent.class), - @JsonSubTypes.Type(name = "NodeOpenedSuccess", value = NodeOpenedSuccessEvent.class), + @JsonSubTypes.Type(name = "NodeOpenSucceeded", value = NodeOpenSucceededEvent.class), @JsonSubTypes.Type(name = "NodeOpenFailed", value = NodeOpenFailedEvent.class), - @JsonSubTypes.Type(name = "NodeOpening", value = NodeOpeningEvent.class), - @JsonSubTypes.Type(name = "NodeRemoved", value = NodeRemovedEvent.class), + @JsonSubTypes.Type(name = "NodeRemovedFromCluster", value = NodeRemovedFromClusterEvent.class), @JsonSubTypes.Type(name = "NodeUp", value = NodeUpEvent.class), - @JsonSubTypes.Type(name = "ChaosRestartNodeFaultCompleted", value = ChaosRestartNodeFaultCompletedEvent.class), - @JsonSubTypes.Type(name = "ChaosRestartNodeFaultScheduled", value = ChaosRestartNodeFaultScheduledEvent.class) + @JsonSubTypes.Type(name = "ChaosNodeRestartScheduled", value = ChaosNodeRestartScheduledEvent.class) }) public class NodeEventInner extends FabricEventInner { /** diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedApplicationResourceDescriptionListInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedApplicationResourceDescriptionListInner.java new file mode 100644 index 0000000000000..35b6f9169c3ae --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedApplicationResourceDescriptionListInner.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of application resources. The list is paged when all of the results + * cannot fit in a single message. The next set of results can be obtained by + * executing the same query with the continuation token provided in this list. + */ +public class PagedApplicationResourceDescriptionListInner { + /** + * The continuation token parameter is used to obtain next set of results. + * The continuation token is included in the response of the API when the + * results from the system do not fit in a single response. When this value + * is passed to the next API call, the API returns next set of results. If + * there are no further results, then the continuation token is not + * included in the response. + */ + @JsonProperty(value = "ContinuationToken") + private String continuationToken; + + /** + * One page of the list. + */ + @JsonProperty(value = "Items") + private List items; + + /** + * Get the continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + * + * @return the continuationToken value + */ + public String continuationToken() { + return this.continuationToken; + } + + /** + * Set the continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + * + * @param continuationToken the continuationToken value to set + * @return the PagedApplicationResourceDescriptionListInner object itself. + */ + public PagedApplicationResourceDescriptionListInner withContinuationToken(String continuationToken) { + this.continuationToken = continuationToken; + return this; + } + + /** + * Get one page of the list. + * + * @return the items value + */ + public List items() { + return this.items; + } + + /** + * Set one page of the list. + * + * @param items the items value to set + * @return the PagedApplicationResourceDescriptionListInner object itself. + */ + public PagedApplicationResourceDescriptionListInner withItems(List items) { + this.items = items; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedGatewayResourceDescriptionListInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedGatewayResourceDescriptionListInner.java new file mode 100644 index 0000000000000..4dfdf3f6e1a64 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedGatewayResourceDescriptionListInner.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of gateway resources. The list is paged when all of the results + * cannot fit in a single message. The next set of results can be obtained by + * executing the same query with the continuation token provided in this list. + */ +public class PagedGatewayResourceDescriptionListInner { + /** + * The continuation token parameter is used to obtain next set of results. + * The continuation token is included in the response of the API when the + * results from the system do not fit in a single response. When this value + * is passed to the next API call, the API returns next set of results. If + * there are no further results, then the continuation token is not + * included in the response. + */ + @JsonProperty(value = "ContinuationToken") + private String continuationToken; + + /** + * One page of the list. + */ + @JsonProperty(value = "Items") + private List items; + + /** + * Get the continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + * + * @return the continuationToken value + */ + public String continuationToken() { + return this.continuationToken; + } + + /** + * Set the continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + * + * @param continuationToken the continuationToken value to set + * @return the PagedGatewayResourceDescriptionListInner object itself. + */ + public PagedGatewayResourceDescriptionListInner withContinuationToken(String continuationToken) { + this.continuationToken = continuationToken; + return this; + } + + /** + * Get one page of the list. + * + * @return the items value + */ + public List items() { + return this.items; + } + + /** + * Set one page of the list. + * + * @param items the items value to set + * @return the PagedGatewayResourceDescriptionListInner object itself. + */ + public PagedGatewayResourceDescriptionListInner withItems(List items) { + this.items = items; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedNetworkResourceDescriptionListInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedNetworkResourceDescriptionListInner.java new file mode 100644 index 0000000000000..b90b9daf9d210 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedNetworkResourceDescriptionListInner.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of network resources. The list is paged when all of the results + * cannot fit in a single message. The next set of results can be obtained by + * executing the same query with the continuation token provided in this list. + */ +public class PagedNetworkResourceDescriptionListInner { + /** + * The continuation token parameter is used to obtain next set of results. + * The continuation token is included in the response of the API when the + * results from the system do not fit in a single response. When this value + * is passed to the next API call, the API returns next set of results. If + * there are no further results, then the continuation token is not + * included in the response. + */ + @JsonProperty(value = "ContinuationToken") + private String continuationToken; + + /** + * One page of the list. + */ + @JsonProperty(value = "Items") + private List items; + + /** + * Get the continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + * + * @return the continuationToken value + */ + public String continuationToken() { + return this.continuationToken; + } + + /** + * Set the continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + * + * @param continuationToken the continuationToken value to set + * @return the PagedNetworkResourceDescriptionListInner object itself. + */ + public PagedNetworkResourceDescriptionListInner withContinuationToken(String continuationToken) { + this.continuationToken = continuationToken; + return this; + } + + /** + * Get one page of the list. + * + * @return the items value + */ + public List items() { + return this.items; + } + + /** + * Set one page of the list. + * + * @param items the items value to set + * @return the PagedNetworkResourceDescriptionListInner object itself. + */ + public PagedNetworkResourceDescriptionListInner withItems(List items) { + this.items = items; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedSecretResourceDescriptionListInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedSecretResourceDescriptionListInner.java new file mode 100644 index 0000000000000..1ab498de791ac --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedSecretResourceDescriptionListInner.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of secret resources. The list is paged when all of the results + * cannot fit in a single message. The next set of results can be obtained by + * executing the same query with the continuation token provided in this list. + */ +public class PagedSecretResourceDescriptionListInner { + /** + * The continuation token parameter is used to obtain next set of results. + * The continuation token is included in the response of the API when the + * results from the system do not fit in a single response. When this value + * is passed to the next API call, the API returns next set of results. If + * there are no further results, then the continuation token is not + * included in the response. + */ + @JsonProperty(value = "ContinuationToken") + private String continuationToken; + + /** + * One page of the list. + */ + @JsonProperty(value = "Items") + private List items; + + /** + * Get the continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + * + * @return the continuationToken value + */ + public String continuationToken() { + return this.continuationToken; + } + + /** + * Set the continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + * + * @param continuationToken the continuationToken value to set + * @return the PagedSecretResourceDescriptionListInner object itself. + */ + public PagedSecretResourceDescriptionListInner withContinuationToken(String continuationToken) { + this.continuationToken = continuationToken; + return this; + } + + /** + * Get one page of the list. + * + * @return the items value + */ + public List items() { + return this.items; + } + + /** + * Set one page of the list. + * + * @param items the items value to set + * @return the PagedSecretResourceDescriptionListInner object itself. + */ + public PagedSecretResourceDescriptionListInner withItems(List items) { + this.items = items; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedSecretValueResourceDescriptionListInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedSecretValueResourceDescriptionListInner.java new file mode 100644 index 0000000000000..5ea44e1927ec9 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedSecretValueResourceDescriptionListInner.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of values of a secret resource, paged if the number of results + * exceeds the limits of a single message. The next set of results can be + * obtained by executing the same query with the continuation token provided in + * the previous page. + */ +public class PagedSecretValueResourceDescriptionListInner { + /** + * The continuation token parameter is used to obtain next set of results. + * The continuation token is included in the response of the API when the + * results from the system do not fit in a single response. When this value + * is passed to the next API call, the API returns next set of results. If + * there are no further results, then the continuation token is not + * included in the response. + */ + @JsonProperty(value = "ContinuationToken") + private String continuationToken; + + /** + * One page of the list. + */ + @JsonProperty(value = "Items") + private List items; + + /** + * Get the continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + * + * @return the continuationToken value + */ + public String continuationToken() { + return this.continuationToken; + } + + /** + * Set the continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + * + * @param continuationToken the continuationToken value to set + * @return the PagedSecretValueResourceDescriptionListInner object itself. + */ + public PagedSecretValueResourceDescriptionListInner withContinuationToken(String continuationToken) { + this.continuationToken = continuationToken; + return this; + } + + /** + * Get one page of the list. + * + * @return the items value + */ + public List items() { + return this.items; + } + + /** + * Set one page of the list. + * + * @param items the items value to set + * @return the PagedSecretValueResourceDescriptionListInner object itself. + */ + public PagedSecretValueResourceDescriptionListInner withItems(List items) { + this.items = items; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedServiceReplicaDescriptionListInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedServiceReplicaDescriptionListInner.java new file mode 100644 index 0000000000000..034b3faa06d59 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedServiceReplicaDescriptionListInner.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of service resource replicas in the cluster. The list is paged when + * all of the results cannot fit in a single message. The next set of results + * can be obtained by executing the same query with the continuation token + * provided in this list. + */ +public class PagedServiceReplicaDescriptionListInner { + /** + * The continuation token parameter is used to obtain next set of results. + * The continuation token is included in the response of the API when the + * results from the system do not fit in a single response. When this value + * is passed to the next API call, the API returns next set of results. If + * there are no further results, then the continuation token is not + * included in the response. + */ + @JsonProperty(value = "ContinuationToken") + private String continuationToken; + + /** + * List of service resource replica description. + */ + @JsonProperty(value = "Items") + private List items; + + /** + * Get the continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + * + * @return the continuationToken value + */ + public String continuationToken() { + return this.continuationToken; + } + + /** + * Set the continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + * + * @param continuationToken the continuationToken value to set + * @return the PagedServiceReplicaDescriptionListInner object itself. + */ + public PagedServiceReplicaDescriptionListInner withContinuationToken(String continuationToken) { + this.continuationToken = continuationToken; + return this; + } + + /** + * Get list of service resource replica description. + * + * @return the items value + */ + public List items() { + return this.items; + } + + /** + * Set list of service resource replica description. + * + * @param items the items value to set + * @return the PagedServiceReplicaDescriptionListInner object itself. + */ + public PagedServiceReplicaDescriptionListInner withItems(List items) { + this.items = items; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedServiceResourceDescriptionListInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedServiceResourceDescriptionListInner.java index 4946d4c248353..1a3c60d1988ce 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedServiceResourceDescriptionListInner.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedServiceResourceDescriptionListInner.java @@ -12,10 +12,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * The list of service resources in the cluster. The list is paged when all of - * the results cannot fit in a single message. The next set of results can be - * obtained by executing the same query with the continuation token provided in - * this list. + * The list of service resources. The list is paged when all of the results + * cannot fit in a single message. The next set of results can be obtained by + * executing the same query with the continuation token provided in this list. */ public class PagedServiceResourceDescriptionListInner { /** @@ -30,7 +29,7 @@ public class PagedServiceResourceDescriptionListInner { private String continuationToken; /** - * List of service resource description. + * One page of the list. */ @JsonProperty(value = "Items") private List items; @@ -56,7 +55,7 @@ public PagedServiceResourceDescriptionListInner withContinuationToken(String con } /** - * Get list of service resource description. + * Get one page of the list. * * @return the items value */ @@ -65,7 +64,7 @@ public List items() { } /** - * Set list of service resource description. + * Set one page of the list. * * @param items the items value to set * @return the PagedServiceResourceDescriptionListInner object itself. diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedVolumeResourceDescriptionListInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedVolumeResourceDescriptionListInner.java new file mode 100644 index 0000000000000..3f395b85a86ad --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PagedVolumeResourceDescriptionListInner.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of volume resources. The list is paged when all of the results + * cannot fit in a single message. The next set of results can be obtained by + * executing the same query with the continuation token provided in this list. + */ +public class PagedVolumeResourceDescriptionListInner { + /** + * The continuation token parameter is used to obtain next set of results. + * The continuation token is included in the response of the API when the + * results from the system do not fit in a single response. When this value + * is passed to the next API call, the API returns next set of results. If + * there are no further results, then the continuation token is not + * included in the response. + */ + @JsonProperty(value = "ContinuationToken") + private String continuationToken; + + /** + * One page of the list. + */ + @JsonProperty(value = "Items") + private List items; + + /** + * Get the continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + * + * @return the continuationToken value + */ + public String continuationToken() { + return this.continuationToken; + } + + /** + * Set the continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + * + * @param continuationToken the continuationToken value to set + * @return the PagedVolumeResourceDescriptionListInner object itself. + */ + public PagedVolumeResourceDescriptionListInner withContinuationToken(String continuationToken) { + this.continuationToken = continuationToken; + return this; + } + + /** + * Get one page of the list. + * + * @return the items value + */ + public List items() { + return this.items; + } + + /** + * Set one page of the list. + * + * @param items the items value to set + * @return the PagedVolumeResourceDescriptionListInner object itself. + */ + public PagedVolumeResourceDescriptionListInner withItems(List items) { + this.items = items; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PartitionBackupConfigurationInfoInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PartitionBackupConfigurationInfoInner.java index 3a012a54aaa91..dfcb28a6af001 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PartitionBackupConfigurationInfoInner.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PartitionBackupConfigurationInfoInner.java @@ -28,11 +28,7 @@ public class PartitionBackupConfigurationInfoInner extends BackupConfigurationIn private String serviceName; /** - * An internal ID used by Service Fabric to uniquely identify a partition. - * This is a randomly generated GUID when the service was created. The - * partition ID is unique and does not change for the lifetime of the - * service. If the same service was deleted and recreated the IDs of its - * partitions would be different. + * The partition ID indentifying the partition. */ @JsonProperty(value = "PartitionId") private UUID partitionId; @@ -58,7 +54,7 @@ public PartitionBackupConfigurationInfoInner withServiceName(String serviceName) } /** - * Get an internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + * Get the partition ID indentifying the partition. * * @return the partitionId value */ @@ -67,7 +63,7 @@ public UUID partitionId() { } /** - * Set an internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + * Set the partition ID indentifying the partition. * * @param partitionId the partitionId value to set * @return the PartitionBackupConfigurationInfoInner object itself. diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PartitionEventInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PartitionEventInner.java index 13f44eb30ce1b..5a5612f09b08f 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PartitionEventInner.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/PartitionEventInner.java @@ -21,11 +21,11 @@ @JsonTypeName("PartitionEvent") @JsonSubTypes({ @JsonSubTypes.Type(name = "PartitionAnalysisEvent", value = PartitionAnalysisEvent.class), - @JsonSubTypes.Type(name = "PartitionHealthReportCreated", value = PartitionHealthReportCreatedEvent.class), + @JsonSubTypes.Type(name = "PartitionNewHealthReport", value = PartitionNewHealthReportEvent.class), @JsonSubTypes.Type(name = "PartitionHealthReportExpired", value = PartitionHealthReportExpiredEvent.class), - @JsonSubTypes.Type(name = "PartitionReconfigurationCompleted", value = PartitionReconfigurationCompletedEvent.class), - @JsonSubTypes.Type(name = "ChaosMoveSecondaryFaultScheduled", value = ChaosMoveSecondaryFaultScheduledEvent.class), - @JsonSubTypes.Type(name = "ChaosMovePrimaryFaultScheduled", value = ChaosMovePrimaryFaultScheduledEvent.class) + @JsonSubTypes.Type(name = "PartitionReconfigured", value = PartitionReconfiguredEvent.class), + @JsonSubTypes.Type(name = "ChaosPartitionSecondaryMoveScheduled", value = ChaosPartitionSecondaryMoveScheduledEvent.class), + @JsonSubTypes.Type(name = "ChaosPartitionPrimaryMoveScheduled", value = ChaosPartitionPrimaryMoveScheduledEvent.class) }) public class PartitionEventInner extends FabricEventInner { /** diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ReplicaEventInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ReplicaEventInner.java index 5cddf06d6e2a6..a49976e5fb7c0 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ReplicaEventInner.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ReplicaEventInner.java @@ -20,13 +20,12 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Kind") @JsonTypeName("ReplicaEvent") @JsonSubTypes({ - @JsonSubTypes.Type(name = "StatefulReplicaHealthReportCreated", value = StatefulReplicaHealthReportCreatedEvent.class), + @JsonSubTypes.Type(name = "StatefulReplicaNewHealthReport", value = StatefulReplicaNewHealthReportEvent.class), @JsonSubTypes.Type(name = "StatefulReplicaHealthReportExpired", value = StatefulReplicaHealthReportExpiredEvent.class), - @JsonSubTypes.Type(name = "StatelessReplicaHealthReportCreated", value = StatelessReplicaHealthReportCreatedEvent.class), + @JsonSubTypes.Type(name = "StatelessReplicaNewHealthReport", value = StatelessReplicaNewHealthReportEvent.class), @JsonSubTypes.Type(name = "StatelessReplicaHealthReportExpired", value = StatelessReplicaHealthReportExpiredEvent.class), - @JsonSubTypes.Type(name = "ChaosRemoveReplicaFaultScheduled", value = ChaosRemoveReplicaFaultScheduledEvent.class), - @JsonSubTypes.Type(name = "ChaosRemoveReplicaFaultCompleted", value = ChaosRemoveReplicaFaultCompletedEvent.class), - @JsonSubTypes.Type(name = "ChaosRestartReplicaFaultScheduled", value = ChaosRestartReplicaFaultScheduledEvent.class) + @JsonSubTypes.Type(name = "ChaosReplicaRemovalScheduled", value = ChaosReplicaRemovalScheduledEvent.class), + @JsonSubTypes.Type(name = "ChaosReplicaRestartScheduled", value = ChaosReplicaRestartScheduledEvent.class) }) public class ReplicaEventInner extends FabricEventInner { /** diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/RestoreProgressInfoInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/RestoreProgressInfoInner.java index b04e3d8f1ae3f..4cd5213ef6338 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/RestoreProgressInfoInner.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/RestoreProgressInfoInner.java @@ -10,7 +10,7 @@ import com.microsoft.azure.servicefabric.RestoreState; import org.joda.time.DateTime; -import com.microsoft.azure.servicefabric.BackupEpoch; +import com.microsoft.azure.servicefabric.Epoch; import com.microsoft.azure.servicefabric.FabricErrorError; import com.fasterxml.jackson.annotation.JsonProperty; @@ -36,7 +36,7 @@ public class RestoreProgressInfoInner { * Describes the epoch at which the partition is restored. */ @JsonProperty(value = "RestoredEpoch") - private BackupEpoch restoredEpoch; + private Epoch restoredEpoch; /** * Restored LSN. @@ -95,7 +95,7 @@ public RestoreProgressInfoInner withTimeStampUtc(DateTime timeStampUtc) { * * @return the restoredEpoch value */ - public BackupEpoch restoredEpoch() { + public Epoch restoredEpoch() { return this.restoredEpoch; } @@ -105,7 +105,7 @@ public BackupEpoch restoredEpoch() { * @param restoredEpoch the restoredEpoch value to set * @return the RestoreProgressInfoInner object itself. */ - public RestoreProgressInfoInner withRestoredEpoch(BackupEpoch restoredEpoch) { + public RestoreProgressInfoInner withRestoredEpoch(Epoch restoredEpoch) { this.restoredEpoch = restoredEpoch; return this; } diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/SecretResourceDescriptionInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/SecretResourceDescriptionInner.java new file mode 100644 index 0000000000000..d4aa7c6274179 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/SecretResourceDescriptionInner.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import com.microsoft.azure.servicefabric.SecretResourceProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * This type describes a secret resource. + */ +public class SecretResourceDescriptionInner { + /** + * Describes the properties of a secret resource. + */ + @JsonProperty(value = "properties", required = true) + private SecretResourceProperties properties; + + /** + * Name of the Secret resource. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Get describes the properties of a secret resource. + * + * @return the properties value + */ + public SecretResourceProperties properties() { + return this.properties; + } + + /** + * Set describes the properties of a secret resource. + * + * @param properties the properties value to set + * @return the SecretResourceDescriptionInner object itself. + */ + public SecretResourceDescriptionInner withProperties(SecretResourceProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get name of the Secret resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the Secret resource. + * + * @param name the name value to set + * @return the SecretResourceDescriptionInner object itself. + */ + public SecretResourceDescriptionInner withName(String name) { + this.name = name; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/SecretValueInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/SecretValueInner.java new file mode 100644 index 0000000000000..2e8db82a47d2b --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/SecretValueInner.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * This type represents the unencrypted value of the secret. + */ +public class SecretValueInner { + /** + * The actual value of the secret. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get the actual value of the secret. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set the actual value of the secret. + * + * @param value the value value to set + * @return the SecretValueInner object itself. + */ + public SecretValueInner withValue(String value) { + this.value = value; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/SecretValueResourceDescriptionInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/SecretValueResourceDescriptionInner.java new file mode 100644 index 0000000000000..4962423ea8ed1 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/SecretValueResourceDescriptionInner.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * This type describes a value of a secret resource. The name of this resource + * is the version identifier corresponding to this secret value. + */ +@JsonFlatten +public class SecretValueResourceDescriptionInner { + /** + * Version identifier of the secret value. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The actual value of the secret. + */ + @JsonProperty(value = "properties.value") + private String value; + + /** + * Get version identifier of the secret value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set version identifier of the secret value. + * + * @param name the name value to set + * @return the SecretValueResourceDescriptionInner object itself. + */ + public SecretValueResourceDescriptionInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the actual value of the secret. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set the actual value of the secret. + * + * @param value the value value to set + * @return the SecretValueResourceDescriptionInner object itself. + */ + public SecretValueResourceDescriptionInner withValue(String value) { + this.value = value; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ServiceEventInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ServiceEventInner.java index 2bbf020ba99a3..0eb05a774230e 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ServiceEventInner.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ServiceEventInner.java @@ -21,7 +21,7 @@ @JsonSubTypes({ @JsonSubTypes.Type(name = "ServiceCreated", value = ServiceCreatedEvent.class), @JsonSubTypes.Type(name = "ServiceDeleted", value = ServiceDeletedEvent.class), - @JsonSubTypes.Type(name = "ServiceHealthReportCreated", value = ServiceHealthReportCreatedEvent.class), + @JsonSubTypes.Type(name = "ServiceNewHealthReport", value = ServiceNewHealthReportEvent.class), @JsonSubTypes.Type(name = "ServiceHealthReportExpired", value = ServiceHealthReportExpiredEvent.class) }) public class ServiceEventInner extends FabricEventInner { diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ServiceFabricClientAPIsImpl.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ServiceFabricClientAPIsImpl.java index f603de19d55c6..3b02462726624 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ServiceFabricClientAPIsImpl.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ServiceFabricClientAPIsImpl.java @@ -11,7 +11,6 @@ import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureClient; import com.microsoft.azure.AzureServiceClient; -import com.microsoft.azure.CloudException; import com.microsoft.azure.servicefabric.ApplicationDescription; import com.microsoft.azure.servicefabric.ApplicationHealthPolicy; import com.microsoft.azure.servicefabric.ApplicationUpgradeDescription; @@ -30,6 +29,7 @@ import com.microsoft.azure.servicefabric.DeactivationIntent; import com.microsoft.azure.servicefabric.DeactivationIntentDescription; import com.microsoft.azure.servicefabric.DeployServicePackageToNodeDescription; +import com.microsoft.azure.servicefabric.DisableBackupDescription; import com.microsoft.azure.servicefabric.EnableBackupDescription; import com.microsoft.azure.servicefabric.FabricErrorException; import com.microsoft.azure.servicefabric.GetBackupByStorageQueryDescription; @@ -172,6 +172,123 @@ public ServiceFabricClientAPIsImpl withGenerateClientRequestId(boolean generateC return this; } + /** + * The MeshSecretsInner object to access its operations. + */ + private MeshSecretsInner meshSecrets; + + /** + * Gets the MeshSecretsInner object to access its operations. + * @return the MeshSecretsInner object. + */ + public MeshSecretsInner meshSecrets() { + return this.meshSecrets; + } + + /** + * The MeshSecretValuesInner object to access its operations. + */ + private MeshSecretValuesInner meshSecretValues; + + /** + * Gets the MeshSecretValuesInner object to access its operations. + * @return the MeshSecretValuesInner object. + */ + public MeshSecretValuesInner meshSecretValues() { + return this.meshSecretValues; + } + + /** + * The MeshVolumesInner object to access its operations. + */ + private MeshVolumesInner meshVolumes; + + /** + * Gets the MeshVolumesInner object to access its operations. + * @return the MeshVolumesInner object. + */ + public MeshVolumesInner meshVolumes() { + return this.meshVolumes; + } + + /** + * The MeshNetworksInner object to access its operations. + */ + private MeshNetworksInner meshNetworks; + + /** + * Gets the MeshNetworksInner object to access its operations. + * @return the MeshNetworksInner object. + */ + public MeshNetworksInner meshNetworks() { + return this.meshNetworks; + } + + /** + * The MeshApplicationsInner object to access its operations. + */ + private MeshApplicationsInner meshApplications; + + /** + * Gets the MeshApplicationsInner object to access its operations. + * @return the MeshApplicationsInner object. + */ + public MeshApplicationsInner meshApplications() { + return this.meshApplications; + } + + /** + * The MeshServicesInner object to access its operations. + */ + private MeshServicesInner meshServices; + + /** + * Gets the MeshServicesInner object to access its operations. + * @return the MeshServicesInner object. + */ + public MeshServicesInner meshServices() { + return this.meshServices; + } + + /** + * The MeshCodePackagesInner object to access its operations. + */ + private MeshCodePackagesInner meshCodePackages; + + /** + * Gets the MeshCodePackagesInner object to access its operations. + * @return the MeshCodePackagesInner object. + */ + public MeshCodePackagesInner meshCodePackages() { + return this.meshCodePackages; + } + + /** + * The MeshServiceReplicasInner object to access its operations. + */ + private MeshServiceReplicasInner meshServiceReplicas; + + /** + * Gets the MeshServiceReplicasInner object to access its operations. + * @return the MeshServiceReplicasInner object. + */ + public MeshServiceReplicasInner meshServiceReplicas() { + return this.meshServiceReplicas; + } + + /** + * The MeshGatewaysInner object to access its operations. + */ + private MeshGatewaysInner meshGateways; + + /** + * Gets the MeshGatewaysInner object to access its operations. + * @return the MeshGatewaysInner object. + */ + public MeshGatewaysInner meshGateways() { + return this.meshGateways; + } + /** * Initializes an instance of ServiceFabricClientAPIs client. * @@ -206,6 +323,15 @@ protected void initialize() { this.acceptLanguage = "en-US"; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; + this.meshSecrets = new MeshSecretsInner(restClient().retrofit(), this); + this.meshSecretValues = new MeshSecretValuesInner(restClient().retrofit(), this); + this.meshVolumes = new MeshVolumesInner(restClient().retrofit(), this); + this.meshNetworks = new MeshNetworksInner(restClient().retrofit(), this); + this.meshApplications = new MeshApplicationsInner(restClient().retrofit(), this); + this.meshServices = new MeshServicesInner(restClient().retrofit(), this); + this.meshCodePackages = new MeshCodePackagesInner(restClient().retrofit(), this); + this.meshServiceReplicas = new MeshServiceReplicasInner(restClient().retrofit(), this); + this.meshGateways = new MeshGatewaysInner(restClient().retrofit(), this); this.azureClient = new AzureClient(this); initializeService(); } @@ -217,7 +343,7 @@ protected void initialize() { */ @Override public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "ServiceFabricClientAPIs", "6.3.0.9"); + return String.format("%s (%s, %s)", super.userAgent(), "ServiceFabricClientAPIs", "6.4.0.36"); } private void initializeService() { @@ -313,6 +439,10 @@ interface ServiceFabricClientAPIsService { @GET("$/GetAadMetadata") Observable> getAadMetadata(@Query("api-version") String apiVersion, @Query("timeout") Long timeout, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs getClusterVersion" }) + @GET("$/GetClusterVersion") + Observable> getClusterVersion(@Query("api-version") String apiVersion, @Query("timeout") Long timeout, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs getNodeInfoList" }) @GET("Nodes") Observable> getNodeInfoList(@Query("api-version") String apiVersion, @Query(value = "ContinuationToken", encoded = true) String continuationToken, @Query("NodeStatusFilter") NodeStatusFilter nodeStatusFilter1, @Query("MaxResults") Long maxResults, @Query("timeout") Long timeout, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -655,7 +785,7 @@ interface ServiceFabricClientAPIsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs getDeployedCodePackageInfoList" }) @GET("Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages") - Observable> getDeployedCodePackageInfoList(@Path("nodeName") String nodeName, @Path(value = "applicationId", encoded = true) String applicationId, @Query("api-version") String apiVersion, @Query("ServiceManifestName") String serviceManifestName, @Query("CodePackageName") String codePackageName, @Query("timeout") Long timeout, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getDeployedCodePackageInfoList(@Path("nodeName") String nodeName, @Path(value = "applicationId", encoded = true) String applicationId, @Query("api-version") String apiVersion, @Query("ServiceManifestName") String serviceManifestName, @Query("CodePackageName") String codePackageName1, @Query("timeout") Long timeout, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs restartDeployedCodePackage" }) @POST("Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/Restart") @@ -663,11 +793,11 @@ interface ServiceFabricClientAPIsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs getContainerLogsDeployedOnNode" }) @GET("Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerLogs") - Observable> getContainerLogsDeployedOnNode(@Path("nodeName") String nodeName, @Path(value = "applicationId", encoded = true) String applicationId, @Query("api-version") String apiVersion, @Query("ServiceManifestName") String serviceManifestName, @Query("CodePackageName") String codePackageName, @Query("Tail") String tail, @Query("Previous") Boolean previous, @Query("timeout") Long timeout, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getContainerLogsDeployedOnNode(@Path("nodeName") String nodeName, @Path(value = "applicationId", encoded = true) String applicationId, @Query("api-version") String apiVersion, @Query("ServiceManifestName") String serviceManifestName, @Query("CodePackageName") String codePackageName1, @Query("Tail") String tail, @Query("Previous") Boolean previous, @Query("timeout") Long timeout, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs invokeContainerApi" }) @POST("Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerApi") - Observable> invokeContainerApi(@Path("nodeName") String nodeName, @Path(value = "applicationId", encoded = true) String applicationId, @Query("api-version") String apiVersion, @Query("ServiceManifestName") String serviceManifestName, @Query("CodePackageName") String codePackageName, @Query("CodePackageInstanceId") String codePackageInstanceId, @Query("timeout") Long timeout, @Body ContainerApiRequestBody containerApiRequestBody, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> invokeContainerApi(@Path("nodeName") String nodeName, @Path(value = "applicationId", encoded = true) String applicationId, @Query("api-version") String apiVersion, @Query("ServiceManifestName") String serviceManifestName, @Query("CodePackageName") String codePackageName1, @Query("CodePackageInstanceId") String codePackageInstanceId, @Query("timeout") Long timeout, @Body ContainerApiRequestBody containerApiRequestBody, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs createComposeDeployment" }) @PUT("ComposeDeployments/$/Create") @@ -693,6 +823,10 @@ interface ServiceFabricClientAPIsService { @POST("ComposeDeployments/{deploymentName}/$/Upgrade") Observable> startComposeDeploymentUpgrade(@Path(value = "deploymentName", encoded = true) String deploymentName, @Query("api-version") String apiVersion, @Body ComposeDeploymentUpgradeDescription composeDeploymentUpgradeDescription, @Query("timeout") Long timeout, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs startRollbackComposeDeploymentUpgrade" }) + @POST("ComposeDeployments/{deploymentName}/$/RollbackUpgrade") + Observable> startRollbackComposeDeploymentUpgrade(@Path(value = "deploymentName", encoded = true) String deploymentName, @Query("api-version") String apiVersion, @Query("timeout") Long timeout, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs getChaos" }) @GET("Tools/Chaos") Observable> getChaos(@Query("api-version") String apiVersion, @Query("timeout") Long timeout, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -835,7 +969,7 @@ interface ServiceFabricClientAPIsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs disableApplicationBackup" }) @POST("Applications/{applicationId}/$/DisableBackup") - Observable> disableApplicationBackup(@Path(value = "applicationId", encoded = true) String applicationId, @Query("api-version") String apiVersion, @Query("timeout") Long timeout, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> disableApplicationBackup(@Path(value = "applicationId", encoded = true) String applicationId, @Query("api-version") String apiVersion, @Query("timeout") Long timeout, @Header("accept-language") String acceptLanguage, @Body DisableBackupDescription disableBackupDescription, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs getApplicationBackupConfigurationInfo" }) @GET("Applications/{applicationId}/$/GetBackupConfigurationInfo") @@ -859,7 +993,7 @@ interface ServiceFabricClientAPIsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs disableServiceBackup" }) @POST("Services/{serviceId}/$/DisableBackup") - Observable> disableServiceBackup(@Path(value = "serviceId", encoded = true) String serviceId, @Query("api-version") String apiVersion, @Query("timeout") Long timeout, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> disableServiceBackup(@Path(value = "serviceId", encoded = true) String serviceId, @Query("api-version") String apiVersion, @Query("timeout") Long timeout, @Header("accept-language") String acceptLanguage, @Body DisableBackupDescription disableBackupDescription, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs getServiceBackupConfigurationInfo" }) @GET("Services/{serviceId}/$/GetBackupConfigurationInfo") @@ -883,7 +1017,7 @@ interface ServiceFabricClientAPIsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs disablePartitionBackup" }) @POST("Partitions/{partitionId}/$/DisableBackup") - Observable> disablePartitionBackup(@Path(value = "partitionId", encoded = true) UUID partitionId1, @Query("api-version") String apiVersion, @Query("timeout") Long timeout, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> disablePartitionBackup(@Path(value = "partitionId", encoded = true) UUID partitionId1, @Query("api-version") String apiVersion, @Query("timeout") Long timeout, @Header("accept-language") String acceptLanguage, @Body DisableBackupDescription disableBackupDescription, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs getPartitionBackupConfigurationInfo" }) @GET("Partitions/{partitionId}/$/GetBackupConfigurationInfo") @@ -1009,46 +1143,6 @@ interface ServiceFabricClientAPIsService { @GET("EventsStore/CorrelatedEvents/{eventInstanceId}/$/Events") Observable> getCorrelatedEventList(@Path("eventInstanceId") String eventInstanceId, @Query("api-version") String apiVersion, @Query("timeout") Long timeout, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs createApplicationResource" }) - @PUT("Resources/Applications/{applicationResourceName}") - Observable> createApplicationResource(@Path(value = "applicationResourceName", encoded = true) String applicationResourceName, @Query("api-version") String apiVersion, @Body ApplicationResourceDescriptionInner applicationResourceDescription, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs getApplicationResource" }) - @GET("Resources/Applications/{applicationResourceName}") - Observable> getApplicationResource(@Path(value = "applicationResourceName", encoded = true) String applicationResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs deleteApplicationResource" }) - @HTTP(path = "Resources/Applications/{applicationResourceName}", method = "DELETE", hasBody = true) - Observable> deleteApplicationResource(@Path(value = "applicationResourceName", encoded = true) String applicationResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs getServices" }) - @GET("Resources/Applications/{applicationResourceName}/Services") - Observable> getServices(@Path(value = "applicationResourceName", encoded = true) String applicationResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs getService" }) - @GET("Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}") - Observable> getService(@Path(value = "applicationResourceName", encoded = true) String applicationResourceName, @Path(value = "serviceResourceName", encoded = true) String serviceResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs getReplicas" }) - @GET("Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/replicas") - Observable> getReplicas(@Path(value = "applicationResourceName", encoded = true) String applicationResourceName, @Path(value = "serviceResourceName", encoded = true) String serviceResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs getReplica" }) - @GET("Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}") - Observable> getReplica(@Path(value = "applicationResourceName", encoded = true) String applicationResourceName, @Path(value = "serviceResourceName", encoded = true) String serviceResourceName, @Path(value = "replicaName", encoded = true) String replicaName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs createVolumeResource" }) - @PUT("Resources/Volumes/{volumeResourceName}") - Observable> createVolumeResource(@Path(value = "volumeResourceName", encoded = true) String volumeResourceName, @Query("api-version") String apiVersion, @Body VolumeResourceDescriptionInner volumeResourceDescription, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs getVolumeResource" }) - @GET("Resources/Volumes/{volumeResourceName}") - Observable> getVolumeResource(@Path(value = "volumeResourceName", encoded = true) String volumeResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.servicefabric.ServiceFabricClientAPIs deleteVolumeResource" }) - @HTTP(path = "Resources/Volumes/{volumeResourceName}", method = "DELETE", hasBody = true) - Observable> deleteVolumeResource(@Path(value = "volumeResourceName", encoded = true) String volumeResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - } /** @@ -3790,8 +3884,8 @@ private ServiceResponse unprovisionClusterDelegate(Response } /** - * Rollback the upgrade of a Service Fabric cluster. - * Rollback the code or configuration upgrade of a Service Fabric cluster. + * Roll back the upgrade of a Service Fabric cluster. + * Roll back the code or configuration upgrade of a Service Fabric cluster. * * @throws IllegalArgumentException thrown if parameters fail the validation * @throws FabricErrorException thrown if the request is rejected by server @@ -3802,8 +3896,8 @@ public void rollbackClusterUpgrade() { } /** - * Rollback the upgrade of a Service Fabric cluster. - * Rollback the code or configuration upgrade of a Service Fabric cluster. + * Roll back the upgrade of a Service Fabric cluster. + * Roll back the code or configuration upgrade of a Service Fabric cluster. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -3814,8 +3908,8 @@ public ServiceFuture rollbackClusterUpgradeAsync(final ServiceCallback response) { } /** - * Rollback the upgrade of a Service Fabric cluster. - * Rollback the code or configuration upgrade of a Service Fabric cluster. + * Roll back the upgrade of a Service Fabric cluster. + * Roll back the code or configuration upgrade of a Service Fabric cluster. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. @@ -3854,8 +3948,8 @@ public Observable> call(Response response) { } /** - * Rollback the upgrade of a Service Fabric cluster. - * Rollback the code or configuration upgrade of a Service Fabric cluster. + * Roll back the upgrade of a Service Fabric cluster. + * Roll back the code or configuration upgrade of a Service Fabric cluster. * * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -3867,8 +3961,8 @@ public void rollbackClusterUpgrade(Long timeout) { } /** - * Rollback the upgrade of a Service Fabric cluster. - * Rollback the code or configuration upgrade of a Service Fabric cluster. + * Roll back the upgrade of a Service Fabric cluster. + * Roll back the code or configuration upgrade of a Service Fabric cluster. * * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -3880,8 +3974,8 @@ public ServiceFuture rollbackClusterUpgradeAsync(Long timeout, final Servi } /** - * Rollback the upgrade of a Service Fabric cluster. - * Rollback the code or configuration upgrade of a Service Fabric cluster. + * Roll back the upgrade of a Service Fabric cluster. + * Roll back the code or configuration upgrade of a Service Fabric cluster. * * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -3897,8 +3991,8 @@ public Void call(ServiceResponse response) { } /** - * Rollback the upgrade of a Service Fabric cluster. - * Rollback the code or configuration upgrade of a Service Fabric cluster. + * Roll back the upgrade of a Service Fabric cluster. + * Roll back the code or configuration upgrade of a Service Fabric cluster. * * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -4693,6 +4787,146 @@ private ServiceResponse getAadMetadataDelegate(Response< .build(response); } + /** + * Get the current Service Fabric cluster version. + * If a cluster upgrade is happening, then this API will return the lowest (older) version of the current and target cluster runtime versions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ClusterVersionInner object if successful. + */ + public ClusterVersionInner getClusterVersion() { + return getClusterVersionWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Get the current Service Fabric cluster version. + * If a cluster upgrade is happening, then this API will return the lowest (older) version of the current and target cluster runtime versions. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getClusterVersionAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getClusterVersionWithServiceResponseAsync(), serviceCallback); + } + + /** + * Get the current Service Fabric cluster version. + * If a cluster upgrade is happening, then this API will return the lowest (older) version of the current and target cluster runtime versions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ClusterVersionInner object + */ + public Observable getClusterVersionAsync() { + return getClusterVersionWithServiceResponseAsync().map(new Func1, ClusterVersionInner>() { + @Override + public ClusterVersionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the current Service Fabric cluster version. + * If a cluster upgrade is happening, then this API will return the lowest (older) version of the current and target cluster runtime versions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ClusterVersionInner object + */ + public Observable> getClusterVersionWithServiceResponseAsync() { + final String apiVersion = "6.4"; + final Long timeout = null; + return service.getClusterVersion(apiVersion, timeout, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getClusterVersionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get the current Service Fabric cluster version. + * If a cluster upgrade is happening, then this API will return the lowest (older) version of the current and target cluster runtime versions. + * + * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ClusterVersionInner object if successful. + */ + public ClusterVersionInner getClusterVersion(Long timeout) { + return getClusterVersionWithServiceResponseAsync(timeout).toBlocking().single().body(); + } + + /** + * Get the current Service Fabric cluster version. + * If a cluster upgrade is happening, then this API will return the lowest (older) version of the current and target cluster runtime versions. + * + * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getClusterVersionAsync(Long timeout, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getClusterVersionWithServiceResponseAsync(timeout), serviceCallback); + } + + /** + * Get the current Service Fabric cluster version. + * If a cluster upgrade is happening, then this API will return the lowest (older) version of the current and target cluster runtime versions. + * + * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ClusterVersionInner object + */ + public Observable getClusterVersionAsync(Long timeout) { + return getClusterVersionWithServiceResponseAsync(timeout).map(new Func1, ClusterVersionInner>() { + @Override + public ClusterVersionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the current Service Fabric cluster version. + * If a cluster upgrade is happening, then this API will return the lowest (older) version of the current and target cluster runtime versions. + * + * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ClusterVersionInner object + */ + public Observable> getClusterVersionWithServiceResponseAsync(Long timeout) { + final String apiVersion = "6.4"; + return service.getClusterVersion(apiVersion, timeout, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getClusterVersionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getClusterVersionDelegate(Response response) throws FabricErrorException, IOException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + /** * Gets the list of nodes in the Service Fabric cluster. * The response includes the name, status, ID, health, uptime, and other details about the nodes. @@ -7271,7 +7505,7 @@ private ServiceResponse> getServiceTypeInfoListDelega /** * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. - * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specified service type is not found in the cluster. + * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specificed service type is not found in the cluster. * * @param applicationTypeName The name of the application type. * @param serviceTypeName Specifies the name of a Service Fabric service type. @@ -7287,7 +7521,7 @@ public ServiceTypeInfoInner getServiceTypeInfoByName(String applicationTypeName, /** * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. - * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specified service type is not found in the cluster. + * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specificed service type is not found in the cluster. * * @param applicationTypeName The name of the application type. * @param serviceTypeName Specifies the name of a Service Fabric service type. @@ -7302,7 +7536,7 @@ public ServiceFuture getServiceTypeInfoByNameAsync(String /** * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. - * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specified service type is not found in the cluster. + * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specificed service type is not found in the cluster. * * @param applicationTypeName The name of the application type. * @param serviceTypeName Specifies the name of a Service Fabric service type. @@ -7321,7 +7555,7 @@ public ServiceTypeInfoInner call(ServiceResponse response) /** * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. - * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specified service type is not found in the cluster. + * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specificed service type is not found in the cluster. * * @param applicationTypeName The name of the application type. * @param serviceTypeName Specifies the name of a Service Fabric service type. @@ -7357,7 +7591,7 @@ public Observable> call(Response getServiceTypeInfoByNameAsync(String /** * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. - * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specified service type is not found in the cluster. + * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specificed service type is not found in the cluster. * * @param applicationTypeName The name of the application type. * @param serviceTypeName Specifies the name of a Service Fabric service type. @@ -7410,7 +7644,7 @@ public ServiceTypeInfoInner call(ServiceResponse response) /** * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. - * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specified service type is not found in the cluster. + * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specificed service type is not found in the cluster. * * @param applicationTypeName The name of the application type. * @param serviceTypeName Specifies the name of a Service Fabric service type. @@ -14437,6 +14671,9 @@ public Observable> call(Response< - Int64Range (2) - Indicates that the PartitionKeyValue parameter is an int64 partition key. This is valid for the partitions with partitioning scheme as Int64Range. The value is 2. - Named (3) - Indicates that the PartitionKeyValue parameter is a name of the partition. This is valid for the partitions with partitioning scheme as Named. The value is 3. * @param partitionKeyValue Partition key. This is required if the partition scheme for the service is Int64Range or Named. + This is not the partition ID, but rather, either the integer key value, or the name of the partition ID. + For example, if your service is using ranged partitions from 0 to 10, then they PartitionKeyValue would be an + integer in that range. Query service description to see the range or name. * @param previousRspVersion The value in the Version field of the response that was received previously. This is required if the user knows that the result that was gotten previously is stale. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -14460,6 +14697,9 @@ public ResolvedServicePartitionInner resolveService(String serviceId, Integer pa - Int64Range (2) - Indicates that the PartitionKeyValue parameter is an int64 partition key. This is valid for the partitions with partitioning scheme as Int64Range. The value is 2. - Named (3) - Indicates that the PartitionKeyValue parameter is a name of the partition. This is valid for the partitions with partitioning scheme as Named. The value is 3. * @param partitionKeyValue Partition key. This is required if the partition scheme for the service is Int64Range or Named. + This is not the partition ID, but rather, either the integer key value, or the name of the partition ID. + For example, if your service is using ranged partitions from 0 to 10, then they PartitionKeyValue would be an + integer in that range. Query service description to see the range or name. * @param previousRspVersion The value in the Version field of the response that was received previously. This is required if the user knows that the result that was gotten previously is stale. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -14482,6 +14722,9 @@ public ServiceFuture resolveServiceAsync(String s - Int64Range (2) - Indicates that the PartitionKeyValue parameter is an int64 partition key. This is valid for the partitions with partitioning scheme as Int64Range. The value is 2. - Named (3) - Indicates that the PartitionKeyValue parameter is a name of the partition. This is valid for the partitions with partitioning scheme as Named. The value is 3. * @param partitionKeyValue Partition key. This is required if the partition scheme for the service is Int64Range or Named. + This is not the partition ID, but rather, either the integer key value, or the name of the partition ID. + For example, if your service is using ranged partitions from 0 to 10, then they PartitionKeyValue would be an + integer in that range. Query service description to see the range or name. * @param previousRspVersion The value in the Version field of the response that was received previously. This is required if the user knows that the result that was gotten previously is stale. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -14508,6 +14751,9 @@ public ResolvedServicePartitionInner call(ServiceResponse> getPartit if (serviceId == null) { throw new IllegalArgumentException("Parameter serviceId is required and cannot be null."); } - final String apiVersion = "6.0"; + final String apiVersion = "6.4"; final String continuationToken = null; final Long timeout = null; return service.getPartitionInfoList(serviceId, apiVersion, continuationToken, timeout, this.acceptLanguage(), this.userAgent()) @@ -14692,7 +14938,7 @@ public Observable> getPartit if (serviceId == null) { throw new IllegalArgumentException("Parameter serviceId is required and cannot be null."); } - final String apiVersion = "6.0"; + final String apiVersion = "6.4"; return service.getPartitionInfoList(serviceId, apiVersion, continuationToken, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -22444,6 +22690,158 @@ private ServiceResponse startComposeDeploymentUpgradeDelegate(Response startRollbackComposeDeploymentUpgradeAsync(String deploymentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startRollbackComposeDeploymentUpgradeWithServiceResponseAsync(deploymentName), serviceCallback); + } + + /** + * Starts rolling back a compose deployment upgrade in the Service Fabric cluster. + * Rollback a service fabric compose deployment upgrade. + * + * @param deploymentName The identity of the deployment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable startRollbackComposeDeploymentUpgradeAsync(String deploymentName) { + return startRollbackComposeDeploymentUpgradeWithServiceResponseAsync(deploymentName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts rolling back a compose deployment upgrade in the Service Fabric cluster. + * Rollback a service fabric compose deployment upgrade. + * + * @param deploymentName The identity of the deployment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> startRollbackComposeDeploymentUpgradeWithServiceResponseAsync(String deploymentName) { + if (deploymentName == null) { + throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null."); + } + final String apiVersion = "6.4-preview"; + final Long timeout = null; + return service.startRollbackComposeDeploymentUpgrade(deploymentName, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = startRollbackComposeDeploymentUpgradeDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Starts rolling back a compose deployment upgrade in the Service Fabric cluster. + * Rollback a service fabric compose deployment upgrade. + * + * @param deploymentName The identity of the deployment. + * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws FabricErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void startRollbackComposeDeploymentUpgrade(String deploymentName, Long timeout) { + startRollbackComposeDeploymentUpgradeWithServiceResponseAsync(deploymentName, timeout).toBlocking().single().body(); + } + + /** + * Starts rolling back a compose deployment upgrade in the Service Fabric cluster. + * Rollback a service fabric compose deployment upgrade. + * + * @param deploymentName The identity of the deployment. + * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture startRollbackComposeDeploymentUpgradeAsync(String deploymentName, Long timeout, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startRollbackComposeDeploymentUpgradeWithServiceResponseAsync(deploymentName, timeout), serviceCallback); + } + + /** + * Starts rolling back a compose deployment upgrade in the Service Fabric cluster. + * Rollback a service fabric compose deployment upgrade. + * + * @param deploymentName The identity of the deployment. + * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable startRollbackComposeDeploymentUpgradeAsync(String deploymentName, Long timeout) { + return startRollbackComposeDeploymentUpgradeWithServiceResponseAsync(deploymentName, timeout).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts rolling back a compose deployment upgrade in the Service Fabric cluster. + * Rollback a service fabric compose deployment upgrade. + * + * @param deploymentName The identity of the deployment. + * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> startRollbackComposeDeploymentUpgradeWithServiceResponseAsync(String deploymentName, Long timeout) { + if (deploymentName == null) { + throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null."); + } + final String apiVersion = "6.4-preview"; + return service.startRollbackComposeDeploymentUpgrade(deploymentName, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = startRollbackComposeDeploymentUpgradeDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse startRollbackComposeDeploymentUpgradeDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(FabricErrorException.class) + .build(response); + } + /** * Get the status of Chaos. * Get the status of Chaos indicating whether or not Chaos is running, the Chaos parameters used for running Chaos and the status of the Chaos Schedule. @@ -23710,7 +24108,7 @@ private ServiceResponse getImageStoreContentDelegate(Res /** * Deletes existing image store content. - * Deletes existing image store content being found within the given image store relative path. This can be used to delete uploaded application packages once they are provisioned. + * Deletes existing image store content being found within the given image store relative path. This command can be used to delete uploaded application packages once they are provisioned. * * @param contentPath Relative path to file or folder in the image store from its root. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -23723,7 +24121,7 @@ public void deleteImageStoreContent(String contentPath) { /** * Deletes existing image store content. - * Deletes existing image store content being found within the given image store relative path. This can be used to delete uploaded application packages once they are provisioned. + * Deletes existing image store content being found within the given image store relative path. This command can be used to delete uploaded application packages once they are provisioned. * * @param contentPath Relative path to file or folder in the image store from its root. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -23736,7 +24134,7 @@ public ServiceFuture deleteImageStoreContentAsync(String contentPath, fina /** * Deletes existing image store content. - * Deletes existing image store content being found within the given image store relative path. This can be used to delete uploaded application packages once they are provisioned. + * Deletes existing image store content being found within the given image store relative path. This command can be used to delete uploaded application packages once they are provisioned. * * @param contentPath Relative path to file or folder in the image store from its root. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -23753,7 +24151,7 @@ public Void call(ServiceResponse response) { /** * Deletes existing image store content. - * Deletes existing image store content being found within the given image store relative path. This can be used to delete uploaded application packages once they are provisioned. + * Deletes existing image store content being found within the given image store relative path. This command can be used to delete uploaded application packages once they are provisioned. * * @param contentPath Relative path to file or folder in the image store from its root. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -23781,7 +24179,7 @@ public Observable> call(Response response) { /** * Deletes existing image store content. - * Deletes existing image store content being found within the given image store relative path. This can be used to delete uploaded application packages once they are provisioned. + * Deletes existing image store content being found within the given image store relative path. This command can be used to delete uploaded application packages once they are provisioned. * * @param contentPath Relative path to file or folder in the image store from its root. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @@ -23795,7 +24193,7 @@ public void deleteImageStoreContent(String contentPath, Long timeout) { /** * Deletes existing image store content. - * Deletes existing image store content being found within the given image store relative path. This can be used to delete uploaded application packages once they are provisioned. + * Deletes existing image store content being found within the given image store relative path. This command can be used to delete uploaded application packages once they are provisioned. * * @param contentPath Relative path to file or folder in the image store from its root. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @@ -23809,7 +24207,7 @@ public ServiceFuture deleteImageStoreContentAsync(String contentPath, Long /** * Deletes existing image store content. - * Deletes existing image store content being found within the given image store relative path. This can be used to delete uploaded application packages once they are provisioned. + * Deletes existing image store content being found within the given image store relative path. This command can be used to delete uploaded application packages once they are provisioned. * * @param contentPath Relative path to file or folder in the image store from its root. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @@ -23827,7 +24225,7 @@ public Void call(ServiceResponse response) { /** * Deletes existing image store content. - * Deletes existing image store content being found within the given image store relative path. This can be used to delete uploaded application packages once they are provisioned. + * Deletes existing image store content being found within the given image store relative path. This command can be used to delete uploaded application packages once they are provisioned. * * @param contentPath Relative path to file or folder in the image store from its root. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @@ -27068,7 +27466,7 @@ private ServiceResponse getNodeTransitionProgressDe /** * Gets a list of user-induced fault operations filtered by provided input. - * Gets the a list of user-induced fault operations filtered by provided input. + * Gets the list of user-induced fault operations filtered by provided input. * * @param typeFilter Used to filter on OperationType for user-induced operations. - 65535 - select all @@ -27095,7 +27493,7 @@ public List getFaultOperationList(int typeFilter, int stat /** * Gets a list of user-induced fault operations filtered by provided input. - * Gets the a list of user-induced fault operations filtered by provided input. + * Gets the list of user-induced fault operations filtered by provided input. * * @param typeFilter Used to filter on OperationType for user-induced operations. - 65535 - select all @@ -27121,7 +27519,7 @@ public ServiceFuture> getFaultOperationListAsync(int /** * Gets a list of user-induced fault operations filtered by provided input. - * Gets the a list of user-induced fault operations filtered by provided input. + * Gets the list of user-induced fault operations filtered by provided input. * * @param typeFilter Used to filter on OperationType for user-induced operations. - 65535 - select all @@ -27151,7 +27549,7 @@ public List call(ServiceResponse>> call(Response getFaultOperationList(int typeFilter, int stat /** * Gets a list of user-induced fault operations filtered by provided input. - * Gets the a list of user-induced fault operations filtered by provided input. + * Gets the list of user-induced fault operations filtered by provided input. * * @param typeFilter Used to filter on OperationType for user-induced operations. - 65535 - select all @@ -27244,7 +27642,7 @@ public ServiceFuture> getFaultOperationListAsync(int /** * Gets a list of user-induced fault operations filtered by provided input. - * Gets the a list of user-induced fault operations filtered by provided input. + * Gets the list of user-induced fault operations filtered by provided input. * * @param typeFilter Used to filter on OperationType for user-induced operations. - 65535 - select all @@ -27275,7 +27673,7 @@ public List call(ServiceResponse> getFaultOperationListDelegat Important note: if this API is invoked with force==true, internal state may be left behind. * * @param operationId A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API - * @param force Indicates whether to gracefully rollback and clean up internal system state modified by executing the user-induced operation. + * @param force Indicates whether to gracefully roll back and clean up internal system state modified by executing the user-induced operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws FabricErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -27351,7 +27749,7 @@ public void cancelOperation(UUID operationId, boolean force) { Important note: if this API is invoked with force==true, internal state may be left behind. * * @param operationId A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API - * @param force Indicates whether to gracefully rollback and clean up internal system state modified by executing the user-induced operation. + * @param force Indicates whether to gracefully roll back and clean up internal system state modified by executing the user-induced operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -27372,7 +27770,7 @@ public ServiceFuture cancelOperationAsync(UUID operationId, boolean force, Important note: if this API is invoked with force==true, internal state may be left behind. * * @param operationId A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API - * @param force Indicates whether to gracefully rollback and clean up internal system state modified by executing the user-induced operation. + * @param force Indicates whether to gracefully roll back and clean up internal system state modified by executing the user-induced operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ @@ -27397,7 +27795,7 @@ public Void call(ServiceResponse response) { Important note: if this API is invoked with force==true, internal state may be left behind. * * @param operationId A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API - * @param force Indicates whether to gracefully rollback and clean up internal system state modified by executing the user-induced operation. + * @param force Indicates whether to gracefully roll back and clean up internal system state modified by executing the user-induced operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ @@ -27433,7 +27831,7 @@ public Observable> call(Response response) { Important note: if this API is invoked with force==true, internal state may be left behind. * * @param operationId A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API - * @param force Indicates whether to gracefully rollback and clean up internal system state modified by executing the user-induced operation. + * @param force Indicates whether to gracefully roll back and clean up internal system state modified by executing the user-induced operation. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws FabricErrorException thrown if the request is rejected by server @@ -27455,7 +27853,7 @@ public void cancelOperation(UUID operationId, boolean force, Long timeout) { Important note: if this API is invoked with force==true, internal state may be left behind. * * @param operationId A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API - * @param force Indicates whether to gracefully rollback and clean up internal system state modified by executing the user-induced operation. + * @param force Indicates whether to gracefully roll back and clean up internal system state modified by executing the user-induced operation. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -27477,7 +27875,7 @@ public ServiceFuture cancelOperationAsync(UUID operationId, boolean force, Important note: if this API is invoked with force==true, internal state may be left behind. * * @param operationId A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API - * @param force Indicates whether to gracefully rollback and clean up internal system state modified by executing the user-induced operation. + * @param force Indicates whether to gracefully roll back and clean up internal system state modified by executing the user-induced operation. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. @@ -27503,7 +27901,7 @@ public Void call(ServiceResponse response) { Important note: if this API is invoked with force==true, internal state may be left behind. * * @param operationId A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API - * @param force Indicates whether to gracefully rollback and clean up internal system state modified by executing the user-induced operation. + * @param force Indicates whether to gracefully roll back and clean up internal system state modified by executing the user-induced operation. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. @@ -27590,7 +27988,7 @@ public Observable> createBackupPolicyWithServiceResponseAs throw new IllegalArgumentException("Parameter backupPolicyDescription is required and cannot be null."); } Validator.validate(backupPolicyDescription); - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; return service.createBackupPolicy(backupPolicyDescription, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @@ -27666,7 +28064,7 @@ public Observable> createBackupPolicyWithServiceResponseAs throw new IllegalArgumentException("Parameter backupPolicyDescription is required and cannot be null."); } Validator.validate(backupPolicyDescription); - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.createBackupPolicy(backupPolicyDescription, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -27743,7 +28141,7 @@ public Observable> deleteBackupPolicyWithServiceResponseAs if (backupPolicyName == null) { throw new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; return service.deleteBackupPolicy(backupPolicyName, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @@ -27818,7 +28216,7 @@ public Observable> deleteBackupPolicyWithServiceResponseAs if (backupPolicyName == null) { throw new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.deleteBackupPolicy(backupPolicyName, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -27889,7 +28287,7 @@ public PagedBackupPolicyDescriptionListInner call(ServiceResponse> getBackupPolicyListWithServiceResponseAsync() { - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final String continuationToken = null; final Long maxResults = null; final Long timeout = null; @@ -27968,7 +28366,7 @@ public PagedBackupPolicyDescriptionListInner call(ServiceResponse> getBackupPolicyListWithServiceResponseAsync(String continuationToken, Long maxResults, Long timeout) { - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getBackupPolicyList(apiVersion, continuationToken, maxResults, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -28046,7 +28444,7 @@ public Observable> getBackupPolicy if (backupPolicyName == null) { throw new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; return service.getBackupPolicyByName(backupPolicyName, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @@ -28122,7 +28520,7 @@ public Observable> getBackupPolicy if (backupPolicyName == null) { throw new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getBackupPolicyByName(backupPolicyName, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -28200,7 +28598,7 @@ public Observable> getAllEntitiesBac if (backupPolicyName == null) { throw new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final String continuationToken = null; final Long maxResults = null; final Long timeout = null; @@ -28286,7 +28684,7 @@ public Observable> getAllEntitiesBac if (backupPolicyName == null) { throw new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getAllEntitiesBackedUpByPolicy(backupPolicyName, apiVersion, continuationToken, maxResults, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -28371,7 +28769,7 @@ public Observable> updateBackupPolicyWithServiceResponseAs throw new IllegalArgumentException("Parameter backupPolicyDescription is required and cannot be null."); } Validator.validate(backupPolicyDescription); - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; return service.updateBackupPolicy(backupPolicyName, backupPolicyDescription, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @@ -28454,7 +28852,7 @@ public Observable> updateBackupPolicyWithServiceResponseAs throw new IllegalArgumentException("Parameter backupPolicyDescription is required and cannot be null."); } Validator.validate(backupPolicyDescription); - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.updateBackupPolicy(backupPolicyName, backupPolicyDescription, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -28550,7 +28948,7 @@ public Observable> enableApplicationBackupWithServiceRespo if (backupPolicyName == null) { throw new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; EnableBackupDescription enableBackupDescription = new EnableBackupDescription(); enableBackupDescription.withBackupPolicyName(backupPolicyName); @@ -28646,7 +29044,7 @@ public Observable> enableApplicationBackupWithServiceRespo if (backupPolicyName == null) { throw new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; EnableBackupDescription enableBackupDescription = new EnableBackupDescription(); enableBackupDescription.withBackupPolicyName(backupPolicyName); return service.enableApplicationBackup(applicationId, apiVersion, timeout, this.acceptLanguage(), enableBackupDescription, this.userAgent()) @@ -28677,12 +29075,13 @@ private ServiceResponse enableApplicationBackupDelegate(Response disableApplicationBackupAsync(String applicationId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(disableApplicationBackupWithServiceResponseAsync(applicationId), serviceCallback); + public ServiceFuture disableApplicationBackupAsync(String applicationId, boolean cleanBackup, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(disableApplicationBackupWithServiceResponseAsync(applicationId, cleanBackup), serviceCallback); } /** @@ -28707,11 +29107,12 @@ public ServiceFuture disableApplicationBackupAsync(String applicationId, f * @param applicationId The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + * @param cleanBackup Boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ - public Observable disableApplicationBackupAsync(String applicationId) { - return disableApplicationBackupWithServiceResponseAsync(applicationId).map(new Func1, Void>() { + public Observable disableApplicationBackupAsync(String applicationId, boolean cleanBackup) { + return disableApplicationBackupWithServiceResponseAsync(applicationId, cleanBackup).map(new Func1, Void>() { @Override public Void call(ServiceResponse response) { return response.body(); @@ -28726,16 +29127,19 @@ public Void call(ServiceResponse response) { * @param applicationId The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + * @param cleanBackup Boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ - public Observable> disableApplicationBackupWithServiceResponseAsync(String applicationId) { + public Observable> disableApplicationBackupWithServiceResponseAsync(String applicationId, boolean cleanBackup) { if (applicationId == null) { throw new IllegalArgumentException("Parameter applicationId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; - return service.disableApplicationBackup(applicationId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) + DisableBackupDescription disableBackupDescription = new DisableBackupDescription(); + disableBackupDescription.withCleanBackup(cleanBackup); + return service.disableApplicationBackup(applicationId, apiVersion, timeout, this.acceptLanguage(), disableBackupDescription, this.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -28756,13 +29160,14 @@ public Observable> call(Response response) { * @param applicationId The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + * @param cleanBackup Boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws FabricErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ - public void disableApplicationBackup(String applicationId, Long timeout) { - disableApplicationBackupWithServiceResponseAsync(applicationId, timeout).toBlocking().single().body(); + public void disableApplicationBackup(String applicationId, boolean cleanBackup, Long timeout) { + disableApplicationBackupWithServiceResponseAsync(applicationId, cleanBackup, timeout).toBlocking().single().body(); } /** @@ -28772,13 +29177,14 @@ public void disableApplicationBackup(String applicationId, Long timeout) { * @param applicationId The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + * @param cleanBackup Boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture disableApplicationBackupAsync(String applicationId, Long timeout, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(disableApplicationBackupWithServiceResponseAsync(applicationId, timeout), serviceCallback); + public ServiceFuture disableApplicationBackupAsync(String applicationId, boolean cleanBackup, Long timeout, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(disableApplicationBackupWithServiceResponseAsync(applicationId, cleanBackup, timeout), serviceCallback); } /** @@ -28788,12 +29194,13 @@ public ServiceFuture disableApplicationBackupAsync(String applicationId, L * @param applicationId The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + * @param cleanBackup Boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ - public Observable disableApplicationBackupAsync(String applicationId, Long timeout) { - return disableApplicationBackupWithServiceResponseAsync(applicationId, timeout).map(new Func1, Void>() { + public Observable disableApplicationBackupAsync(String applicationId, boolean cleanBackup, Long timeout) { + return disableApplicationBackupWithServiceResponseAsync(applicationId, cleanBackup, timeout).map(new Func1, Void>() { @Override public Void call(ServiceResponse response) { return response.body(); @@ -28808,16 +29215,19 @@ public Void call(ServiceResponse response) { * @param applicationId The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + * @param cleanBackup Boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ - public Observable> disableApplicationBackupWithServiceResponseAsync(String applicationId, Long timeout) { + public Observable> disableApplicationBackupWithServiceResponseAsync(String applicationId, boolean cleanBackup, Long timeout) { if (applicationId == null) { throw new IllegalArgumentException("Parameter applicationId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; - return service.disableApplicationBackup(applicationId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) + final String apiVersion = "6.4"; + DisableBackupDescription disableBackupDescription = new DisableBackupDescription(); + disableBackupDescription.withCleanBackup(cleanBackup); + return service.disableApplicationBackup(applicationId, apiVersion, timeout, this.acceptLanguage(), disableBackupDescription, this.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -28902,7 +29312,7 @@ public Observable> getApp if (applicationId == null) { throw new IllegalArgumentException("Parameter applicationId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final String continuationToken = null; final Long maxResults = null; final Long timeout = null; @@ -28996,7 +29406,7 @@ public Observable> getApp if (applicationId == null) { throw new IllegalArgumentException("Parameter applicationId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getApplicationBackupConfigurationInfo(applicationId, apiVersion, continuationToken, maxResults, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -29082,7 +29492,7 @@ public Observable> getApplicationBacku if (applicationId == null) { throw new IllegalArgumentException("Parameter applicationId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; final Boolean latest = null; final DateTime startDateTimeFilter = null; @@ -29191,7 +29601,7 @@ public Observable> getApplicationBacku if (applicationId == null) { throw new IllegalArgumentException("Parameter applicationId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getApplicationBackupList(applicationId, apiVersion, timeout, latest, startDateTimeFilter, endDateTimeFilter, continuationToken, maxResults, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -29276,7 +29686,7 @@ public Observable> suspendApplicationBackupWithServiceResp if (applicationId == null) { throw new IllegalArgumentException("Parameter applicationId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; return service.suspendApplicationBackup(applicationId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @@ -29359,7 +29769,7 @@ public Observable> suspendApplicationBackupWithServiceResp if (applicationId == null) { throw new IllegalArgumentException("Parameter applicationId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.suspendApplicationBackup(applicationId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -29444,7 +29854,7 @@ public Observable> resumeApplicationBackupWithServiceRespo if (applicationId == null) { throw new IllegalArgumentException("Parameter applicationId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; return service.resumeApplicationBackup(applicationId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @@ -29527,7 +29937,7 @@ public Observable> resumeApplicationBackupWithServiceRespo if (applicationId == null) { throw new IllegalArgumentException("Parameter applicationId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.resumeApplicationBackup(applicationId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -29623,7 +30033,7 @@ public Observable> enableServiceBackupWithServiceResponseA if (backupPolicyName == null) { throw new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; EnableBackupDescription enableBackupDescription = new EnableBackupDescription(); enableBackupDescription.withBackupPolicyName(backupPolicyName); @@ -29719,7 +30129,7 @@ public Observable> enableServiceBackupWithServiceResponseA if (backupPolicyName == null) { throw new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; EnableBackupDescription enableBackupDescription = new EnableBackupDescription(); enableBackupDescription.withBackupPolicyName(backupPolicyName); return service.enableServiceBackup(serviceId, apiVersion, timeout, this.acceptLanguage(), enableBackupDescription, this.userAgent()) @@ -29751,12 +30161,13 @@ private ServiceResponse enableServiceBackupDelegate(Response * @param serviceId The identity of the service. This ID is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + * @param cleanBackup Boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws FabricErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ - public void disableServiceBackup(String serviceId) { - disableServiceBackupWithServiceResponseAsync(serviceId).toBlocking().single().body(); + public void disableServiceBackup(String serviceId, boolean cleanBackup) { + disableServiceBackupWithServiceResponseAsync(serviceId, cleanBackup).toBlocking().single().body(); } /** @@ -29767,12 +30178,13 @@ public void disableServiceBackup(String serviceId) { * @param serviceId The identity of the service. This ID is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + * @param cleanBackup Boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture disableServiceBackupAsync(String serviceId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(disableServiceBackupWithServiceResponseAsync(serviceId), serviceCallback); + public ServiceFuture disableServiceBackupAsync(String serviceId, boolean cleanBackup, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(disableServiceBackupWithServiceResponseAsync(serviceId, cleanBackup), serviceCallback); } /** @@ -29783,11 +30195,12 @@ public ServiceFuture disableServiceBackupAsync(String serviceId, final Ser * @param serviceId The identity of the service. This ID is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + * @param cleanBackup Boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ - public Observable disableServiceBackupAsync(String serviceId) { - return disableServiceBackupWithServiceResponseAsync(serviceId).map(new Func1, Void>() { + public Observable disableServiceBackupAsync(String serviceId, boolean cleanBackup) { + return disableServiceBackupWithServiceResponseAsync(serviceId, cleanBackup).map(new Func1, Void>() { @Override public Void call(ServiceResponse response) { return response.body(); @@ -29803,16 +30216,19 @@ public Void call(ServiceResponse response) { * @param serviceId The identity of the service. This ID is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + * @param cleanBackup Boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ - public Observable> disableServiceBackupWithServiceResponseAsync(String serviceId) { + public Observable> disableServiceBackupWithServiceResponseAsync(String serviceId, boolean cleanBackup) { if (serviceId == null) { throw new IllegalArgumentException("Parameter serviceId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; - return service.disableServiceBackup(serviceId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) + DisableBackupDescription disableBackupDescription = new DisableBackupDescription(); + disableBackupDescription.withCleanBackup(cleanBackup); + return service.disableServiceBackup(serviceId, apiVersion, timeout, this.acceptLanguage(), disableBackupDescription, this.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -29834,13 +30250,14 @@ public Observable> call(Response response) { * @param serviceId The identity of the service. This ID is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + * @param cleanBackup Boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws FabricErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ - public void disableServiceBackup(String serviceId, Long timeout) { - disableServiceBackupWithServiceResponseAsync(serviceId, timeout).toBlocking().single().body(); + public void disableServiceBackup(String serviceId, boolean cleanBackup, Long timeout) { + disableServiceBackupWithServiceResponseAsync(serviceId, cleanBackup, timeout).toBlocking().single().body(); } /** @@ -29851,13 +30268,14 @@ public void disableServiceBackup(String serviceId, Long timeout) { * @param serviceId The identity of the service. This ID is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + * @param cleanBackup Boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture disableServiceBackupAsync(String serviceId, Long timeout, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(disableServiceBackupWithServiceResponseAsync(serviceId, timeout), serviceCallback); + public ServiceFuture disableServiceBackupAsync(String serviceId, boolean cleanBackup, Long timeout, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(disableServiceBackupWithServiceResponseAsync(serviceId, cleanBackup, timeout), serviceCallback); } /** @@ -29868,12 +30286,13 @@ public ServiceFuture disableServiceBackupAsync(String serviceId, Long time * @param serviceId The identity of the service. This ID is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + * @param cleanBackup Boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ - public Observable disableServiceBackupAsync(String serviceId, Long timeout) { - return disableServiceBackupWithServiceResponseAsync(serviceId, timeout).map(new Func1, Void>() { + public Observable disableServiceBackupAsync(String serviceId, boolean cleanBackup, Long timeout) { + return disableServiceBackupWithServiceResponseAsync(serviceId, cleanBackup, timeout).map(new Func1, Void>() { @Override public Void call(ServiceResponse response) { return response.body(); @@ -29889,16 +30308,19 @@ public Void call(ServiceResponse response) { * @param serviceId The identity of the service. This ID is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + * @param cleanBackup Boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ - public Observable> disableServiceBackupWithServiceResponseAsync(String serviceId, Long timeout) { + public Observable> disableServiceBackupWithServiceResponseAsync(String serviceId, boolean cleanBackup, Long timeout) { if (serviceId == null) { throw new IllegalArgumentException("Parameter serviceId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; - return service.disableServiceBackup(serviceId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) + final String apiVersion = "6.4"; + DisableBackupDescription disableBackupDescription = new DisableBackupDescription(); + disableBackupDescription.withCleanBackup(cleanBackup); + return service.disableServiceBackup(serviceId, apiVersion, timeout, this.acceptLanguage(), disableBackupDescription, this.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -29983,7 +30405,7 @@ public Observable> getSer if (serviceId == null) { throw new IllegalArgumentException("Parameter serviceId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final String continuationToken = null; final Long maxResults = null; final Long timeout = null; @@ -30077,7 +30499,7 @@ public Observable> getSer if (serviceId == null) { throw new IllegalArgumentException("Parameter serviceId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getServiceBackupConfigurationInfo(serviceId, apiVersion, continuationToken, maxResults, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -30163,7 +30585,7 @@ public Observable> getServiceBackupLis if (serviceId == null) { throw new IllegalArgumentException("Parameter serviceId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; final Boolean latest = null; final DateTime startDateTimeFilter = null; @@ -30272,7 +30694,7 @@ public Observable> getServiceBackupLis if (serviceId == null) { throw new IllegalArgumentException("Parameter serviceId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getServiceBackupList(serviceId, apiVersion, timeout, latest, startDateTimeFilter, endDateTimeFilter, continuationToken, maxResults, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -30357,7 +30779,7 @@ public Observable> suspendServiceBackupWithServiceResponse if (serviceId == null) { throw new IllegalArgumentException("Parameter serviceId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; return service.suspendServiceBackup(serviceId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @@ -30440,7 +30862,7 @@ public Observable> suspendServiceBackupWithServiceResponse if (serviceId == null) { throw new IllegalArgumentException("Parameter serviceId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.suspendServiceBackup(serviceId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -30525,7 +30947,7 @@ public Observable> resumeServiceBackupWithServiceResponseA if (serviceId == null) { throw new IllegalArgumentException("Parameter serviceId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; return service.resumeServiceBackup(serviceId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @@ -30608,7 +31030,7 @@ public Observable> resumeServiceBackupWithServiceResponseA if (serviceId == null) { throw new IllegalArgumentException("Parameter serviceId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.resumeServiceBackup(serviceId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -30696,7 +31118,7 @@ public Observable> enablePartitionBackupWithServiceRespons if (backupPolicyName == null) { throw new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; EnableBackupDescription enableBackupDescription = new EnableBackupDescription(); enableBackupDescription.withBackupPolicyName(backupPolicyName); @@ -30784,7 +31206,7 @@ public Observable> enablePartitionBackupWithServiceRespons if (backupPolicyName == null) { throw new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; EnableBackupDescription enableBackupDescription = new EnableBackupDescription(); enableBackupDescription.withBackupPolicyName(backupPolicyName); return service.enablePartitionBackup(partitionId, apiVersion, timeout, this.acceptLanguage(), enableBackupDescription, this.userAgent()) @@ -30814,12 +31236,13 @@ private ServiceResponse enablePartitionBackupDelegate(Response disablePartitionBackupAsync(UUID partitionId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(disablePartitionBackupWithServiceResponseAsync(partitionId), serviceCallback); + public ServiceFuture disablePartitionBackupAsync(UUID partitionId, boolean cleanBackup, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(disablePartitionBackupWithServiceResponseAsync(partitionId, cleanBackup), serviceCallback); } /** @@ -30842,11 +31266,12 @@ public ServiceFuture disablePartitionBackupAsync(UUID partitionId, final S In case the backup is enabled for the Service Fabric application or service, which this partition is part of, this partition would continue to be periodically backed up as per the policy mapped at the higher level entity. * * @param partitionId The identity of the partition. + * @param cleanBackup Boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ - public Observable disablePartitionBackupAsync(UUID partitionId) { - return disablePartitionBackupWithServiceResponseAsync(partitionId).map(new Func1, Void>() { + public Observable disablePartitionBackupAsync(UUID partitionId, boolean cleanBackup) { + return disablePartitionBackupWithServiceResponseAsync(partitionId, cleanBackup).map(new Func1, Void>() { @Override public Void call(ServiceResponse response) { return response.body(); @@ -30860,16 +31285,19 @@ public Void call(ServiceResponse response) { In case the backup is enabled for the Service Fabric application or service, which this partition is part of, this partition would continue to be periodically backed up as per the policy mapped at the higher level entity. * * @param partitionId The identity of the partition. + * @param cleanBackup Boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ - public Observable> disablePartitionBackupWithServiceResponseAsync(UUID partitionId) { + public Observable> disablePartitionBackupWithServiceResponseAsync(UUID partitionId, boolean cleanBackup) { if (partitionId == null) { throw new IllegalArgumentException("Parameter partitionId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; - return service.disablePartitionBackup(partitionId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) + DisableBackupDescription disableBackupDescription = new DisableBackupDescription(); + disableBackupDescription.withCleanBackup(cleanBackup); + return service.disablePartitionBackup(partitionId, apiVersion, timeout, this.acceptLanguage(), disableBackupDescription, this.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -30889,13 +31317,14 @@ public Observable> call(Response response) { In case the backup is enabled for the Service Fabric application or service, which this partition is part of, this partition would continue to be periodically backed up as per the policy mapped at the higher level entity. * * @param partitionId The identity of the partition. + * @param cleanBackup Boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws FabricErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ - public void disablePartitionBackup(UUID partitionId, Long timeout) { - disablePartitionBackupWithServiceResponseAsync(partitionId, timeout).toBlocking().single().body(); + public void disablePartitionBackup(UUID partitionId, boolean cleanBackup, Long timeout) { + disablePartitionBackupWithServiceResponseAsync(partitionId, cleanBackup, timeout).toBlocking().single().body(); } /** @@ -30904,13 +31333,14 @@ public void disablePartitionBackup(UUID partitionId, Long timeout) { In case the backup is enabled for the Service Fabric application or service, which this partition is part of, this partition would continue to be periodically backed up as per the policy mapped at the higher level entity. * * @param partitionId The identity of the partition. + * @param cleanBackup Boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture disablePartitionBackupAsync(UUID partitionId, Long timeout, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(disablePartitionBackupWithServiceResponseAsync(partitionId, timeout), serviceCallback); + public ServiceFuture disablePartitionBackupAsync(UUID partitionId, boolean cleanBackup, Long timeout, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(disablePartitionBackupWithServiceResponseAsync(partitionId, cleanBackup, timeout), serviceCallback); } /** @@ -30919,12 +31349,13 @@ public ServiceFuture disablePartitionBackupAsync(UUID partitionId, Long ti In case the backup is enabled for the Service Fabric application or service, which this partition is part of, this partition would continue to be periodically backed up as per the policy mapped at the higher level entity. * * @param partitionId The identity of the partition. + * @param cleanBackup Boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ - public Observable disablePartitionBackupAsync(UUID partitionId, Long timeout) { - return disablePartitionBackupWithServiceResponseAsync(partitionId, timeout).map(new Func1, Void>() { + public Observable disablePartitionBackupAsync(UUID partitionId, boolean cleanBackup, Long timeout) { + return disablePartitionBackupWithServiceResponseAsync(partitionId, cleanBackup, timeout).map(new Func1, Void>() { @Override public Void call(ServiceResponse response) { return response.body(); @@ -30938,16 +31369,19 @@ public Void call(ServiceResponse response) { In case the backup is enabled for the Service Fabric application or service, which this partition is part of, this partition would continue to be periodically backed up as per the policy mapped at the higher level entity. * * @param partitionId The identity of the partition. + * @param cleanBackup Boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. * @param timeout The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ - public Observable> disablePartitionBackupWithServiceResponseAsync(UUID partitionId, Long timeout) { + public Observable> disablePartitionBackupWithServiceResponseAsync(UUID partitionId, boolean cleanBackup, Long timeout) { if (partitionId == null) { throw new IllegalArgumentException("Parameter partitionId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; - return service.disablePartitionBackup(partitionId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) + final String apiVersion = "6.4"; + DisableBackupDescription disableBackupDescription = new DisableBackupDescription(); + disableBackupDescription.withCleanBackup(cleanBackup); + return service.disablePartitionBackup(partitionId, apiVersion, timeout, this.acceptLanguage(), disableBackupDescription, this.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -31024,7 +31458,7 @@ public Observable> getPar if (partitionId == null) { throw new IllegalArgumentException("Parameter partitionId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; return service.getPartitionBackupConfigurationInfo(partitionId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @@ -31100,7 +31534,7 @@ public Observable> getPar if (partitionId == null) { throw new IllegalArgumentException("Parameter partitionId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getPartitionBackupConfigurationInfo(partitionId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -31178,7 +31612,7 @@ public Observable> getPartitionBackupL if (partitionId == null) { throw new IllegalArgumentException("Parameter partitionId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; final Boolean latest = null; final DateTime startDateTimeFilter = null; @@ -31269,7 +31703,7 @@ public Observable> getPartitionBackupL if (partitionId == null) { throw new IllegalArgumentException("Parameter partitionId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getPartitionBackupList(partitionId, apiVersion, timeout, latest, startDateTimeFilter, endDateTimeFilter, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -31346,7 +31780,7 @@ public Observable> suspendPartitionBackupWithServiceRespon if (partitionId == null) { throw new IllegalArgumentException("Parameter partitionId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; return service.suspendPartitionBackup(partitionId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @@ -31421,7 +31855,7 @@ public Observable> suspendPartitionBackupWithServiceRespon if (partitionId == null) { throw new IllegalArgumentException("Parameter partitionId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.suspendPartitionBackup(partitionId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -31498,7 +31932,7 @@ public Observable> resumePartitionBackupWithServiceRespons if (partitionId == null) { throw new IllegalArgumentException("Parameter partitionId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; return service.resumePartitionBackup(partitionId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @@ -31573,7 +32007,7 @@ public Observable> resumePartitionBackupWithServiceRespons if (partitionId == null) { throw new IllegalArgumentException("Parameter partitionId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.resumePartitionBackup(partitionId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -31654,7 +32088,7 @@ public Observable> backupPartitionWithServiceResponseAsync if (partitionId == null) { throw new IllegalArgumentException("Parameter partitionId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Integer backupTimeout = null; final Long timeout = null; final BackupStorageDescription backupStorage = null; @@ -31746,7 +32180,7 @@ public Observable> backupPartitionWithServiceResponseAsync throw new IllegalArgumentException("Parameter partitionId is required and cannot be null."); } Validator.validate(backupStorage); - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; BackupPartitionDescription backupPartitionDescription = null; if (backupStorage != null) { backupPartitionDescription = new BackupPartitionDescription(); @@ -31829,7 +32263,7 @@ public Observable> getPartitionBackupPr if (partitionId == null) { throw new IllegalArgumentException("Parameter partitionId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; return service.getPartitionBackupProgress(partitionId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @@ -31905,7 +32339,7 @@ public Observable> getPartitionBackupPr if (partitionId == null) { throw new IllegalArgumentException("Parameter partitionId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getPartitionBackupProgress(partitionId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -31994,7 +32428,7 @@ public Observable> restorePartitionWithServiceResponseAsyn throw new IllegalArgumentException("Parameter restorePartitionDescription is required and cannot be null."); } Validator.validate(restorePartitionDescription); - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Integer restoreTimeout = null; final Long timeout = null; return service.restorePartition(partitionId, restorePartitionDescription, restoreTimeout, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) @@ -32086,7 +32520,7 @@ public Observable> restorePartitionWithServiceResponseAsyn throw new IllegalArgumentException("Parameter restorePartitionDescription is required and cannot be null."); } Validator.validate(restorePartitionDescription); - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.restorePartition(partitionId, restorePartitionDescription, restoreTimeout, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -32164,7 +32598,7 @@ public Observable> getPartitionRestore if (partitionId == null) { throw new IllegalArgumentException("Parameter partitionId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; return service.getPartitionRestoreProgress(partitionId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @@ -32240,7 +32674,7 @@ public Observable> getPartitionRestore if (partitionId == null) { throw new IllegalArgumentException("Parameter partitionId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getPartitionRestoreProgress(partitionId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -32319,7 +32753,7 @@ public Observable> getBackupsFromBacku throw new IllegalArgumentException("Parameter getBackupByStorageQueryDescription is required and cannot be null."); } Validator.validate(getBackupByStorageQueryDescription); - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; final String continuationToken = null; final Long maxResults = null; @@ -32406,7 +32840,7 @@ public Observable> getBackupsFromBacku throw new IllegalArgumentException("Parameter getBackupByStorageQueryDescription is required and cannot be null."); } Validator.validate(getBackupByStorageQueryDescription); - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getBackupsFromBackupLocation(apiVersion, timeout, continuationToken, maxResults, getBackupByStorageQueryDescription, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -33946,7 +34380,7 @@ public Observable>> getClusterEventListW if (endTimeUtc == null) { throw new IllegalArgumentException("Parameter endTimeUtc is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; final String eventsTypesFilter = null; final Boolean excludeAnalysisEvents = null; @@ -34044,7 +34478,7 @@ public Observable>> getClusterEventListW if (endTimeUtc == null) { throw new IllegalArgumentException("Parameter endTimeUtc is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getClusterEventList(apiVersion, timeout, startTimeUtc, endTimeUtc, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -34319,7 +34753,7 @@ public Observable>> getNodeEventListWithSer if (endTimeUtc == null) { throw new IllegalArgumentException("Parameter endTimeUtc is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; final String eventsTypesFilter = null; final Boolean excludeAnalysisEvents = null; @@ -34424,7 +34858,7 @@ public Observable>> getNodeEventListWithSer if (endTimeUtc == null) { throw new IllegalArgumentException("Parameter endTimeUtc is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getNodeEventList(nodeName, apiVersion, timeout, startTimeUtc, endTimeUtc, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -34509,7 +34943,7 @@ public Observable>> getNodesEventListWithSe if (endTimeUtc == null) { throw new IllegalArgumentException("Parameter endTimeUtc is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; final String eventsTypesFilter = null; final Boolean excludeAnalysisEvents = null; @@ -34607,7 +35041,7 @@ public Observable>> getNodesEventListWithSe if (endTimeUtc == null) { throw new IllegalArgumentException("Parameter endTimeUtc is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getNodesEventList(apiVersion, timeout, startTimeUtc, endTimeUtc, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -34707,7 +35141,7 @@ public Observable>> getApplicationEv if (endTimeUtc == null) { throw new IllegalArgumentException("Parameter endTimeUtc is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; final String eventsTypesFilter = null; final Boolean excludeAnalysisEvents = null; @@ -34820,7 +35254,7 @@ public Observable>> getApplicationEv if (endTimeUtc == null) { throw new IllegalArgumentException("Parameter endTimeUtc is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getApplicationEventList(applicationId, apiVersion, timeout, startTimeUtc, endTimeUtc, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -34905,7 +35339,7 @@ public Observable>> getApplicationsE if (endTimeUtc == null) { throw new IllegalArgumentException("Parameter endTimeUtc is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; final String eventsTypesFilter = null; final Boolean excludeAnalysisEvents = null; @@ -35003,7 +35437,7 @@ public Observable>> getApplicationsE if (endTimeUtc == null) { throw new IllegalArgumentException("Parameter endTimeUtc is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getApplicationsEventList(apiVersion, timeout, startTimeUtc, endTimeUtc, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -35103,7 +35537,7 @@ public Observable>> getServiceEventListW if (endTimeUtc == null) { throw new IllegalArgumentException("Parameter endTimeUtc is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; final String eventsTypesFilter = null; final Boolean excludeAnalysisEvents = null; @@ -35216,7 +35650,7 @@ public Observable>> getServiceEventListW if (endTimeUtc == null) { throw new IllegalArgumentException("Parameter endTimeUtc is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getServiceEventList(serviceId, apiVersion, timeout, startTimeUtc, endTimeUtc, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -35301,7 +35735,7 @@ public Observable>> getServicesEventList if (endTimeUtc == null) { throw new IllegalArgumentException("Parameter endTimeUtc is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; final String eventsTypesFilter = null; final Boolean excludeAnalysisEvents = null; @@ -35399,7 +35833,7 @@ public Observable>> getServicesEventList if (endTimeUtc == null) { throw new IllegalArgumentException("Parameter endTimeUtc is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getServicesEventList(apiVersion, timeout, startTimeUtc, endTimeUtc, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -35491,7 +35925,7 @@ public Observable>> getPartitionEventL if (endTimeUtc == null) { throw new IllegalArgumentException("Parameter endTimeUtc is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; final String eventsTypesFilter = null; final Boolean excludeAnalysisEvents = null; @@ -35596,7 +36030,7 @@ public Observable>> getPartitionEventL if (endTimeUtc == null) { throw new IllegalArgumentException("Parameter endTimeUtc is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getPartitionEventList(partitionId, apiVersion, timeout, startTimeUtc, endTimeUtc, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -35681,7 +36115,7 @@ public Observable>> getPartitionsEvent if (endTimeUtc == null) { throw new IllegalArgumentException("Parameter endTimeUtc is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; final String eventsTypesFilter = null; final Boolean excludeAnalysisEvents = null; @@ -35779,7 +36213,7 @@ public Observable>> getPartitionsEvent if (endTimeUtc == null) { throw new IllegalArgumentException("Parameter endTimeUtc is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getPartitionsEventList(apiVersion, timeout, startTimeUtc, endTimeUtc, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -35878,7 +36312,7 @@ public Observable>> getPartitionReplicaE if (endTimeUtc == null) { throw new IllegalArgumentException("Parameter endTimeUtc is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; final String eventsTypesFilter = null; final Boolean excludeAnalysisEvents = null; @@ -35990,7 +36424,7 @@ public Observable>> getPartitionReplicaE if (endTimeUtc == null) { throw new IllegalArgumentException("Parameter endTimeUtc is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getPartitionReplicaEventList(partitionId, replicaId, apiVersion, timeout, startTimeUtc, endTimeUtc, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -36082,7 +36516,7 @@ public Observable>> getPartitionReplicas if (endTimeUtc == null) { throw new IllegalArgumentException("Parameter endTimeUtc is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; final String eventsTypesFilter = null; final Boolean excludeAnalysisEvents = null; @@ -36187,7 +36621,7 @@ public Observable>> getPartitionReplicas if (endTimeUtc == null) { throw new IllegalArgumentException("Parameter endTimeUtc is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getPartitionReplicasEventList(partitionId, apiVersion, timeout, startTimeUtc, endTimeUtc, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -36265,7 +36699,7 @@ public Observable>> getCorrelatedEventLis if (eventInstanceId == null) { throw new IllegalArgumentException("Parameter eventInstanceId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; final Long timeout = null; return service.getCorrelatedEventList(eventInstanceId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>>() { @@ -36341,7 +36775,7 @@ public Observable>> getCorrelatedEventLis if (eventInstanceId == null) { throw new IllegalArgumentException("Parameter eventInstanceId is required and cannot be null."); } - final String apiVersion = "6.2-preview"; + final String apiVersion = "6.4"; return service.getCorrelatedEventList(eventInstanceId, apiVersion, timeout, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -36363,830 +36797,4 @@ private ServiceResponse> getCorrelatedEventListDelegate(R .build(response); } - /** - * Creates or updates an application resource. - * Creates an application with the specified name and description. If an application with the same name already exists, then its description are updated to the one indicated in this request. - * - * @param applicationResourceName Service Fabric application resource name. - * @param applicationResourceDescription Description for creating an application resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws FabricErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void createApplicationResource(String applicationResourceName, ApplicationResourceDescriptionInner applicationResourceDescription) { - createApplicationResourceWithServiceResponseAsync(applicationResourceName, applicationResourceDescription).toBlocking().single().body(); - } - - /** - * Creates or updates an application resource. - * Creates an application with the specified name and description. If an application with the same name already exists, then its description are updated to the one indicated in this request. - * - * @param applicationResourceName Service Fabric application resource name. - * @param applicationResourceDescription Description for creating an application resource. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createApplicationResourceAsync(String applicationResourceName, ApplicationResourceDescriptionInner applicationResourceDescription, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createApplicationResourceWithServiceResponseAsync(applicationResourceName, applicationResourceDescription), serviceCallback); - } - - /** - * Creates or updates an application resource. - * Creates an application with the specified name and description. If an application with the same name already exists, then its description are updated to the one indicated in this request. - * - * @param applicationResourceName Service Fabric application resource name. - * @param applicationResourceDescription Description for creating an application resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable createApplicationResourceAsync(String applicationResourceName, ApplicationResourceDescriptionInner applicationResourceDescription) { - return createApplicationResourceWithServiceResponseAsync(applicationResourceName, applicationResourceDescription).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates an application resource. - * Creates an application with the specified name and description. If an application with the same name already exists, then its description are updated to the one indicated in this request. - * - * @param applicationResourceName Service Fabric application resource name. - * @param applicationResourceDescription Description for creating an application resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> createApplicationResourceWithServiceResponseAsync(String applicationResourceName, ApplicationResourceDescriptionInner applicationResourceDescription) { - if (applicationResourceName == null) { - throw new IllegalArgumentException("Parameter applicationResourceName is required and cannot be null."); - } - if (applicationResourceDescription == null) { - throw new IllegalArgumentException("Parameter applicationResourceDescription is required and cannot be null."); - } - Validator.validate(applicationResourceDescription); - final String apiVersion = "6.3-preview"; - return service.createApplicationResource(applicationResourceName, apiVersion, applicationResourceDescription, this.acceptLanguage(), this.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createApplicationResourceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createApplicationResourceDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { - return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) - .register(201, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(FabricErrorException.class) - .build(response); - } - - /** - * Gets the application with the given name. - * Gets the application with the given name. This includes the information about the application's services and other runtime information. - * - * @param applicationResourceName Service Fabric application resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws FabricErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ApplicationResourceDescriptionInner object if successful. - */ - public ApplicationResourceDescriptionInner getApplicationResource(String applicationResourceName) { - return getApplicationResourceWithServiceResponseAsync(applicationResourceName).toBlocking().single().body(); - } - - /** - * Gets the application with the given name. - * Gets the application with the given name. This includes the information about the application's services and other runtime information. - * - * @param applicationResourceName Service Fabric application resource name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getApplicationResourceAsync(String applicationResourceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getApplicationResourceWithServiceResponseAsync(applicationResourceName), serviceCallback); - } - - /** - * Gets the application with the given name. - * Gets the application with the given name. This includes the information about the application's services and other runtime information. - * - * @param applicationResourceName Service Fabric application resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApplicationResourceDescriptionInner object - */ - public Observable getApplicationResourceAsync(String applicationResourceName) { - return getApplicationResourceWithServiceResponseAsync(applicationResourceName).map(new Func1, ApplicationResourceDescriptionInner>() { - @Override - public ApplicationResourceDescriptionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the application with the given name. - * Gets the application with the given name. This includes the information about the application's services and other runtime information. - * - * @param applicationResourceName Service Fabric application resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApplicationResourceDescriptionInner object - */ - public Observable> getApplicationResourceWithServiceResponseAsync(String applicationResourceName) { - if (applicationResourceName == null) { - throw new IllegalArgumentException("Parameter applicationResourceName is required and cannot be null."); - } - final String apiVersion = "6.3-preview"; - return service.getApplicationResource(applicationResourceName, apiVersion, this.acceptLanguage(), this.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getApplicationResourceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getApplicationResourceDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { - return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(FabricErrorException.class) - .build(response); - } - - /** - * Deletes the specified application. - * Deletes the application identified by the name. - * - * @param applicationResourceName Service Fabric application resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws FabricErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void deleteApplicationResource(String applicationResourceName) { - deleteApplicationResourceWithServiceResponseAsync(applicationResourceName).toBlocking().single().body(); - } - - /** - * Deletes the specified application. - * Deletes the application identified by the name. - * - * @param applicationResourceName Service Fabric application resource name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteApplicationResourceAsync(String applicationResourceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteApplicationResourceWithServiceResponseAsync(applicationResourceName), serviceCallback); - } - - /** - * Deletes the specified application. - * Deletes the application identified by the name. - * - * @param applicationResourceName Service Fabric application resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteApplicationResourceAsync(String applicationResourceName) { - return deleteApplicationResourceWithServiceResponseAsync(applicationResourceName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified application. - * Deletes the application identified by the name. - * - * @param applicationResourceName Service Fabric application resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteApplicationResourceWithServiceResponseAsync(String applicationResourceName) { - if (applicationResourceName == null) { - throw new IllegalArgumentException("Parameter applicationResourceName is required and cannot be null."); - } - final String apiVersion = "6.3-preview"; - return service.deleteApplicationResource(applicationResourceName, apiVersion, this.acceptLanguage(), this.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteApplicationResourceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteApplicationResourceDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { - return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(FabricErrorException.class) - .build(response); - } - - /** - * Gets all the services in the application resource. - * The operation returns the service descriptions of all the services in the application resource. - * - * @param applicationResourceName Service Fabric application resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedServiceResourceDescriptionListInner object if successful. - */ - public PagedServiceResourceDescriptionListInner getServices(String applicationResourceName) { - return getServicesWithServiceResponseAsync(applicationResourceName).toBlocking().single().body(); - } - - /** - * Gets all the services in the application resource. - * The operation returns the service descriptions of all the services in the application resource. - * - * @param applicationResourceName Service Fabric application resource name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getServicesAsync(String applicationResourceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getServicesWithServiceResponseAsync(applicationResourceName), serviceCallback); - } - - /** - * Gets all the services in the application resource. - * The operation returns the service descriptions of all the services in the application resource. - * - * @param applicationResourceName Service Fabric application resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedServiceResourceDescriptionListInner object - */ - public Observable getServicesAsync(String applicationResourceName) { - return getServicesWithServiceResponseAsync(applicationResourceName).map(new Func1, PagedServiceResourceDescriptionListInner>() { - @Override - public PagedServiceResourceDescriptionListInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets all the services in the application resource. - * The operation returns the service descriptions of all the services in the application resource. - * - * @param applicationResourceName Service Fabric application resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedServiceResourceDescriptionListInner object - */ - public Observable> getServicesWithServiceResponseAsync(String applicationResourceName) { - if (applicationResourceName == null) { - throw new IllegalArgumentException("Parameter applicationResourceName is required and cannot be null."); - } - final String apiVersion = "6.3-preview"; - return service.getServices(applicationResourceName, apiVersion, this.acceptLanguage(), this.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getServicesDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getServicesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the description of the specified service in an application resource. - * Gets the description of the service resource. - * - * @param applicationResourceName Service Fabric application resource name. - * @param serviceResourceName Service Fabric service resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ServiceResourceDescriptionInner object if successful. - */ - public ServiceResourceDescriptionInner getService(String applicationResourceName, String serviceResourceName) { - return getServiceWithServiceResponseAsync(applicationResourceName, serviceResourceName).toBlocking().single().body(); - } - - /** - * Gets the description of the specified service in an application resource. - * Gets the description of the service resource. - * - * @param applicationResourceName Service Fabric application resource name. - * @param serviceResourceName Service Fabric service resource name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getServiceAsync(String applicationResourceName, String serviceResourceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getServiceWithServiceResponseAsync(applicationResourceName, serviceResourceName), serviceCallback); - } - - /** - * Gets the description of the specified service in an application resource. - * Gets the description of the service resource. - * - * @param applicationResourceName Service Fabric application resource name. - * @param serviceResourceName Service Fabric service resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ServiceResourceDescriptionInner object - */ - public Observable getServiceAsync(String applicationResourceName, String serviceResourceName) { - return getServiceWithServiceResponseAsync(applicationResourceName, serviceResourceName).map(new Func1, ServiceResourceDescriptionInner>() { - @Override - public ServiceResourceDescriptionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the description of the specified service in an application resource. - * Gets the description of the service resource. - * - * @param applicationResourceName Service Fabric application resource name. - * @param serviceResourceName Service Fabric service resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ServiceResourceDescriptionInner object - */ - public Observable> getServiceWithServiceResponseAsync(String applicationResourceName, String serviceResourceName) { - if (applicationResourceName == null) { - throw new IllegalArgumentException("Parameter applicationResourceName is required and cannot be null."); - } - if (serviceResourceName == null) { - throw new IllegalArgumentException("Parameter serviceResourceName is required and cannot be null."); - } - final String apiVersion = "6.3-preview"; - return service.getService(applicationResourceName, serviceResourceName, apiVersion, this.acceptLanguage(), this.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getServiceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getServiceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets replicas of a given service in an application resource. - * Gets the information about all replicas of a given service of an application. The information includes the runtime properties of the replica instance. - * - * @param applicationResourceName Service Fabric application resource name. - * @param serviceResourceName Service Fabric service resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedServiceResourceReplicaDescriptionListInner object if successful. - */ - public PagedServiceResourceReplicaDescriptionListInner getReplicas(String applicationResourceName, String serviceResourceName) { - return getReplicasWithServiceResponseAsync(applicationResourceName, serviceResourceName).toBlocking().single().body(); - } - - /** - * Gets replicas of a given service in an application resource. - * Gets the information about all replicas of a given service of an application. The information includes the runtime properties of the replica instance. - * - * @param applicationResourceName Service Fabric application resource name. - * @param serviceResourceName Service Fabric service resource name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getReplicasAsync(String applicationResourceName, String serviceResourceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getReplicasWithServiceResponseAsync(applicationResourceName, serviceResourceName), serviceCallback); - } - - /** - * Gets replicas of a given service in an application resource. - * Gets the information about all replicas of a given service of an application. The information includes the runtime properties of the replica instance. - * - * @param applicationResourceName Service Fabric application resource name. - * @param serviceResourceName Service Fabric service resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedServiceResourceReplicaDescriptionListInner object - */ - public Observable getReplicasAsync(String applicationResourceName, String serviceResourceName) { - return getReplicasWithServiceResponseAsync(applicationResourceName, serviceResourceName).map(new Func1, PagedServiceResourceReplicaDescriptionListInner>() { - @Override - public PagedServiceResourceReplicaDescriptionListInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets replicas of a given service in an application resource. - * Gets the information about all replicas of a given service of an application. The information includes the runtime properties of the replica instance. - * - * @param applicationResourceName Service Fabric application resource name. - * @param serviceResourceName Service Fabric service resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedServiceResourceReplicaDescriptionListInner object - */ - public Observable> getReplicasWithServiceResponseAsync(String applicationResourceName, String serviceResourceName) { - if (applicationResourceName == null) { - throw new IllegalArgumentException("Parameter applicationResourceName is required and cannot be null."); - } - if (serviceResourceName == null) { - throw new IllegalArgumentException("Parameter serviceResourceName is required and cannot be null."); - } - final String apiVersion = "6.3-preview"; - return service.getReplicas(applicationResourceName, serviceResourceName, apiVersion, this.acceptLanguage(), this.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getReplicasDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getReplicasDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a specific replica of a given service in an application resource. - * Gets the information about the specified replica of a given service of an application. The information includes the runtime properties of the replica instance. - * - * @param applicationResourceName Service Fabric application resource name. - * @param serviceResourceName Service Fabric service resource name. - * @param replicaName Service Fabric replica name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ServiceResourceReplicaDescriptionInner object if successful. - */ - public ServiceResourceReplicaDescriptionInner getReplica(String applicationResourceName, String serviceResourceName, String replicaName) { - return getReplicaWithServiceResponseAsync(applicationResourceName, serviceResourceName, replicaName).toBlocking().single().body(); - } - - /** - * Gets a specific replica of a given service in an application resource. - * Gets the information about the specified replica of a given service of an application. The information includes the runtime properties of the replica instance. - * - * @param applicationResourceName Service Fabric application resource name. - * @param serviceResourceName Service Fabric service resource name. - * @param replicaName Service Fabric replica name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getReplicaAsync(String applicationResourceName, String serviceResourceName, String replicaName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getReplicaWithServiceResponseAsync(applicationResourceName, serviceResourceName, replicaName), serviceCallback); - } - - /** - * Gets a specific replica of a given service in an application resource. - * Gets the information about the specified replica of a given service of an application. The information includes the runtime properties of the replica instance. - * - * @param applicationResourceName Service Fabric application resource name. - * @param serviceResourceName Service Fabric service resource name. - * @param replicaName Service Fabric replica name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ServiceResourceReplicaDescriptionInner object - */ - public Observable getReplicaAsync(String applicationResourceName, String serviceResourceName, String replicaName) { - return getReplicaWithServiceResponseAsync(applicationResourceName, serviceResourceName, replicaName).map(new Func1, ServiceResourceReplicaDescriptionInner>() { - @Override - public ServiceResourceReplicaDescriptionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets a specific replica of a given service in an application resource. - * Gets the information about the specified replica of a given service of an application. The information includes the runtime properties of the replica instance. - * - * @param applicationResourceName Service Fabric application resource name. - * @param serviceResourceName Service Fabric service resource name. - * @param replicaName Service Fabric replica name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ServiceResourceReplicaDescriptionInner object - */ - public Observable> getReplicaWithServiceResponseAsync(String applicationResourceName, String serviceResourceName, String replicaName) { - if (applicationResourceName == null) { - throw new IllegalArgumentException("Parameter applicationResourceName is required and cannot be null."); - } - if (serviceResourceName == null) { - throw new IllegalArgumentException("Parameter serviceResourceName is required and cannot be null."); - } - if (replicaName == null) { - throw new IllegalArgumentException("Parameter replicaName is required and cannot be null."); - } - final String apiVersion = "6.3-preview"; - return service.getReplica(applicationResourceName, serviceResourceName, replicaName, apiVersion, this.acceptLanguage(), this.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getReplicaDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getReplicaDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates or updates a volume resource. - * Creates a volume resource with the specified name and description. If a volume with the same name already exists, then its description is updated to the one indicated in this request. - * - * @param volumeResourceName Service Fabric volume resource name. - * @param volumeResourceDescription Description for creating a volume resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws FabricErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void createVolumeResource(String volumeResourceName, VolumeResourceDescriptionInner volumeResourceDescription) { - createVolumeResourceWithServiceResponseAsync(volumeResourceName, volumeResourceDescription).toBlocking().single().body(); - } - - /** - * Creates or updates a volume resource. - * Creates a volume resource with the specified name and description. If a volume with the same name already exists, then its description is updated to the one indicated in this request. - * - * @param volumeResourceName Service Fabric volume resource name. - * @param volumeResourceDescription Description for creating a volume resource. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createVolumeResourceAsync(String volumeResourceName, VolumeResourceDescriptionInner volumeResourceDescription, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createVolumeResourceWithServiceResponseAsync(volumeResourceName, volumeResourceDescription), serviceCallback); - } - - /** - * Creates or updates a volume resource. - * Creates a volume resource with the specified name and description. If a volume with the same name already exists, then its description is updated to the one indicated in this request. - * - * @param volumeResourceName Service Fabric volume resource name. - * @param volumeResourceDescription Description for creating a volume resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable createVolumeResourceAsync(String volumeResourceName, VolumeResourceDescriptionInner volumeResourceDescription) { - return createVolumeResourceWithServiceResponseAsync(volumeResourceName, volumeResourceDescription).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates a volume resource. - * Creates a volume resource with the specified name and description. If a volume with the same name already exists, then its description is updated to the one indicated in this request. - * - * @param volumeResourceName Service Fabric volume resource name. - * @param volumeResourceDescription Description for creating a volume resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> createVolumeResourceWithServiceResponseAsync(String volumeResourceName, VolumeResourceDescriptionInner volumeResourceDescription) { - if (volumeResourceName == null) { - throw new IllegalArgumentException("Parameter volumeResourceName is required and cannot be null."); - } - if (volumeResourceDescription == null) { - throw new IllegalArgumentException("Parameter volumeResourceDescription is required and cannot be null."); - } - Validator.validate(volumeResourceDescription); - final String apiVersion = "6.3-preview"; - return service.createVolumeResource(volumeResourceName, apiVersion, volumeResourceDescription, this.acceptLanguage(), this.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createVolumeResourceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createVolumeResourceDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { - return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) - .register(201, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(FabricErrorException.class) - .build(response); - } - - /** - * Gets the volume resource. - * Gets the information about the volume resource with a given name. This information includes the volume description and other runtime information. - * - * @param volumeResourceName Service Fabric volume resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws FabricErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VolumeResourceDescriptionInner object if successful. - */ - public VolumeResourceDescriptionInner getVolumeResource(String volumeResourceName) { - return getVolumeResourceWithServiceResponseAsync(volumeResourceName).toBlocking().single().body(); - } - - /** - * Gets the volume resource. - * Gets the information about the volume resource with a given name. This information includes the volume description and other runtime information. - * - * @param volumeResourceName Service Fabric volume resource name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getVolumeResourceAsync(String volumeResourceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getVolumeResourceWithServiceResponseAsync(volumeResourceName), serviceCallback); - } - - /** - * Gets the volume resource. - * Gets the information about the volume resource with a given name. This information includes the volume description and other runtime information. - * - * @param volumeResourceName Service Fabric volume resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VolumeResourceDescriptionInner object - */ - public Observable getVolumeResourceAsync(String volumeResourceName) { - return getVolumeResourceWithServiceResponseAsync(volumeResourceName).map(new Func1, VolumeResourceDescriptionInner>() { - @Override - public VolumeResourceDescriptionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the volume resource. - * Gets the information about the volume resource with a given name. This information includes the volume description and other runtime information. - * - * @param volumeResourceName Service Fabric volume resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VolumeResourceDescriptionInner object - */ - public Observable> getVolumeResourceWithServiceResponseAsync(String volumeResourceName) { - if (volumeResourceName == null) { - throw new IllegalArgumentException("Parameter volumeResourceName is required and cannot be null."); - } - final String apiVersion = "6.3-preview"; - return service.getVolumeResource(volumeResourceName, apiVersion, this.acceptLanguage(), this.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getVolumeResourceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getVolumeResourceDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { - return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(FabricErrorException.class) - .build(response); - } - - /** - * Deletes the volume resource. - * Deletes the volume identified by the name. - * - * @param volumeResourceName Service Fabric volume resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws FabricErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void deleteVolumeResource(String volumeResourceName) { - deleteVolumeResourceWithServiceResponseAsync(volumeResourceName).toBlocking().single().body(); - } - - /** - * Deletes the volume resource. - * Deletes the volume identified by the name. - * - * @param volumeResourceName Service Fabric volume resource name. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteVolumeResourceAsync(String volumeResourceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteVolumeResourceWithServiceResponseAsync(volumeResourceName), serviceCallback); - } - - /** - * Deletes the volume resource. - * Deletes the volume identified by the name. - * - * @param volumeResourceName Service Fabric volume resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteVolumeResourceAsync(String volumeResourceName) { - return deleteVolumeResourceWithServiceResponseAsync(volumeResourceName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the volume resource. - * Deletes the volume identified by the name. - * - * @param volumeResourceName Service Fabric volume resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteVolumeResourceWithServiceResponseAsync(String volumeResourceName) { - if (volumeResourceName == null) { - throw new IllegalArgumentException("Parameter volumeResourceName is required and cannot be null."); - } - final String apiVersion = "6.3-preview"; - return service.deleteVolumeResource(volumeResourceName, apiVersion, this.acceptLanguage(), this.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteVolumeResourceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteVolumeResourceDelegate(Response response) throws FabricErrorException, IOException, IllegalArgumentException { - return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(FabricErrorException.class) - .build(response); - } - } diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ServiceReplicaDescriptionInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ServiceReplicaDescriptionInner.java new file mode 100644 index 0000000000000..489c807b17c75 --- /dev/null +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ServiceReplicaDescriptionInner.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.servicefabric.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.servicefabric.ServiceReplicaProperties; + +/** + * Describes a replica of a service resource. + */ +public class ServiceReplicaDescriptionInner extends ServiceReplicaProperties { + /** + * Name of the replica. + */ + @JsonProperty(value = "replicaName", required = true) + private String replicaName; + + /** + * Get name of the replica. + * + * @return the replicaName value + */ + public String replicaName() { + return this.replicaName; + } + + /** + * Set name of the replica. + * + * @param replicaName the replicaName value to set + * @return the ServiceReplicaDescriptionInner object itself. + */ + public ServiceReplicaDescriptionInner withReplicaName(String replicaName) { + this.replicaName = replicaName; + return this; + } + +} diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ServiceResourceDescriptionInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ServiceResourceDescriptionInner.java index 69e009423ea0e..a2f72ccf704fe 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ServiceResourceDescriptionInner.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ServiceResourceDescriptionInner.java @@ -8,27 +8,34 @@ package com.microsoft.azure.servicefabric.implementation; -import com.microsoft.azure.servicefabric.OperatingSystemTypes; +import com.microsoft.azure.servicefabric.OperatingSystemType; import java.util.List; import com.microsoft.azure.servicefabric.ContainerCodePackageProperties; import com.microsoft.azure.servicefabric.NetworkRef; import com.microsoft.azure.servicefabric.DiagnosticsRef; +import com.microsoft.azure.servicefabric.AutoScalingPolicy; +import com.microsoft.azure.servicefabric.ResourceStatus; import com.microsoft.azure.servicefabric.HealthState; -import com.microsoft.azure.servicefabric.ServiceResourceStatus; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; /** - * Describes a service fabric service resource. + * This type describes a service resource. */ @JsonFlatten public class ServiceResourceDescriptionInner { /** - * The Operating system type required by the code in service. Possible - * values include: 'Linux', 'Windows'. + * Name of the Service resource. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The operation system required by the code in service. Possible values + * include: 'Linux', 'Windows'. */ @JsonProperty(value = "properties.osType", required = true) - private OperatingSystemTypes osType; + private OperatingSystemType osType; /** * Describes the set of code packages that forms the service. A code @@ -65,42 +72,75 @@ public class ServiceResourceDescriptionInner { private Integer replicaCount; /** - * The health state of a Service Fabric entity such as Cluster, Node, - * Application, Service, Partition, Replica etc. Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'. + * Auto scaling policies. */ - @JsonProperty(value = "properties.healthState") - private HealthState healthState; + @JsonProperty(value = "properties.autoScalingPolicies") + private List autoScalingPolicies; /** - * Represents the status of the service. Possible values include: - * 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', 'Failed'. + * Status of the service. Possible values include: 'Unknown', 'Ready', + * 'Upgrading', 'Creating', 'Deleting', 'Failed'. */ @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) - private ServiceResourceStatus status; + private ResourceStatus status; /** - * Service resource name. + * Gives additional information about the current status of the service. */ - @JsonProperty(value = "name", required = true) - private String name; + @JsonProperty(value = "properties.statusDetails", access = JsonProperty.Access.WRITE_ONLY) + private String statusDetails; + + /** + * Describes the health state of an application resource. Possible values + * include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'. + */ + @JsonProperty(value = "properties.healthState", access = JsonProperty.Access.WRITE_ONLY) + private HealthState healthState; + + /** + * When the service's health state is not 'Ok', this additional details + * from service fabric Health Manager for the user to know why the service + * is marked unhealthy. + */ + @JsonProperty(value = "properties.unhealthyEvaluation", access = JsonProperty.Access.WRITE_ONLY) + private String unhealthyEvaluation; + + /** + * Get name of the Service resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the Service resource. + * + * @param name the name value to set + * @return the ServiceResourceDescriptionInner object itself. + */ + public ServiceResourceDescriptionInner withName(String name) { + this.name = name; + return this; + } /** - * Get the Operating system type required by the code in service. Possible values include: 'Linux', 'Windows'. + * Get the operation system required by the code in service. Possible values include: 'Linux', 'Windows'. * * @return the osType value */ - public OperatingSystemTypes osType() { + public OperatingSystemType osType() { return this.osType; } /** - * Set the Operating system type required by the code in service. Possible values include: 'Linux', 'Windows'. + * Set the operation system required by the code in service. Possible values include: 'Linux', 'Windows'. * * @param osType the osType value to set * @return the ServiceResourceDescriptionInner object itself. */ - public ServiceResourceDescriptionInner withOsType(OperatingSystemTypes osType) { + public ServiceResourceDescriptionInner withOsType(OperatingSystemType osType) { this.osType = osType; return this; } @@ -206,52 +246,59 @@ public ServiceResourceDescriptionInner withReplicaCount(Integer replicaCount) { } /** - * Get the health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'. + * Get auto scaling policies. * - * @return the healthState value + * @return the autoScalingPolicies value */ - public HealthState healthState() { - return this.healthState; + public List autoScalingPolicies() { + return this.autoScalingPolicies; } /** - * Set the health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'. + * Set auto scaling policies. * - * @param healthState the healthState value to set + * @param autoScalingPolicies the autoScalingPolicies value to set * @return the ServiceResourceDescriptionInner object itself. */ - public ServiceResourceDescriptionInner withHealthState(HealthState healthState) { - this.healthState = healthState; + public ServiceResourceDescriptionInner withAutoScalingPolicies(List autoScalingPolicies) { + this.autoScalingPolicies = autoScalingPolicies; return this; } /** - * Get represents the status of the service. Possible values include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', 'Failed'. + * Get status of the service. Possible values include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed'. * * @return the status value */ - public ServiceResourceStatus status() { + public ResourceStatus status() { return this.status; } /** - * Get service resource name. + * Get gives additional information about the current status of the service. * - * @return the name value + * @return the statusDetails value */ - public String name() { - return this.name; + public String statusDetails() { + return this.statusDetails; } /** - * Set service resource name. + * Get describes the health state of an application resource. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'. * - * @param name the name value to set - * @return the ServiceResourceDescriptionInner object itself. + * @return the healthState value */ - public ServiceResourceDescriptionInner withName(String name) { - this.name = name; - return this; + public HealthState healthState() { + return this.healthState; + } + + /** + * Get when the service's health state is not 'Ok', this additional details from service fabric Health Manager for the user to know why the service is marked unhealthy. + * + * @return the unhealthyEvaluation value + */ + public String unhealthyEvaluation() { + return this.unhealthyEvaluation; } } diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/VolumeResourceDescriptionInner.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/VolumeResourceDescriptionInner.java index 8e893700930be..d95eae370eeda 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/VolumeResourceDescriptionInner.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/VolumeResourceDescriptionInner.java @@ -8,21 +8,41 @@ package com.microsoft.azure.servicefabric.implementation; +import com.microsoft.azure.servicefabric.ResourceStatus; import com.microsoft.azure.servicefabric.VolumeProviderParametersAzureFile; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; /** - * Describes a service fabric volume resource. + * This type describes a volume resource. */ @JsonFlatten public class VolumeResourceDescriptionInner { + /** + * Name of the Volume resource. + */ + @JsonProperty(value = "name", required = true) + private String name; + /** * User readable description of the volume. */ @JsonProperty(value = "properties.description") private String description; + /** + * Status of the volume. Possible values include: 'Unknown', 'Ready', + * 'Upgrading', 'Creating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) + private ResourceStatus status; + + /** + * Gives additional information about the current status of the volume. + */ + @JsonProperty(value = "properties.statusDetails", access = JsonProperty.Access.WRITE_ONLY) + private String statusDetails; + /** * Provider of the volume. */ @@ -35,20 +55,34 @@ public class VolumeResourceDescriptionInner { @JsonProperty(value = "properties.azureFileParameters") private VolumeProviderParametersAzureFile azureFileParameters; - /** - * Volume resource name. - */ - @JsonProperty(value = "name", required = true) - private String name; - /** * Creates an instance of VolumeResourceDescriptionInner class. - * @param name volume resource name. + * @param name name of the Volume resource. */ public VolumeResourceDescriptionInner() { provider = "SFAzureFile"; } + /** + * Get name of the Volume resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the Volume resource. + * + * @param name the name value to set + * @return the VolumeResourceDescriptionInner object itself. + */ + public VolumeResourceDescriptionInner withName(String name) { + this.name = name; + return this; + } + /** * Get user readable description of the volume. * @@ -69,6 +103,24 @@ public VolumeResourceDescriptionInner withDescription(String description) { return this; } + /** + * Get status of the volume. Possible values include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed'. + * + * @return the status value + */ + public ResourceStatus status() { + return this.status; + } + + /** + * Get gives additional information about the current status of the volume. + * + * @return the statusDetails value + */ + public String statusDetails() { + return this.statusDetails; + } + /** * Get provider of the volume. * @@ -109,24 +161,4 @@ public VolumeResourceDescriptionInner withAzureFileParameters(VolumeProviderPara return this; } - /** - * Get volume resource name. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set volume resource name. - * - * @param name the name value to set - * @return the VolumeResourceDescriptionInner object itself. - */ - public VolumeResourceDescriptionInner withName(String name) { - this.name = name; - return this; - } - } From d038173e544c79bcf8908ce79964e3baee059229 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 4 Dec 2018 05:05:04 +0000 Subject: [PATCH 2/3] Generated from c69b3d22ae7f74ae4932d3fdce146ff567441664 fix typos specificed -> specified, sucessful -> successful, resturns -> returns, commited -> committed, Double word "maximum", Double word "with" --- .../servicefabric/ServiceTypeHealthPolicy.java | 8 ++++---- .../ServiceFabricClientAPIsImpl.java | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServiceTypeHealthPolicy.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServiceTypeHealthPolicy.java index c8c0f1978d254..f7acdc7ed897f 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServiceTypeHealthPolicy.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServiceTypeHealthPolicy.java @@ -48,8 +48,8 @@ public class ServiceTypeHealthPolicy { private Integer maxPercentUnhealthyReplicasPerPartition; /** - * The maximum maximum allowed percentage of unhealthy services. Allowed - * values are Byte values from zero to 100. + * The maximum allowed percentage of unhealthy services. Allowed values are + * Byte values from zero to 100. * * The percentage represents the maximum tolerated percentage of services * that can be unhealthy before the application is considered in error. @@ -121,7 +121,7 @@ public ServiceTypeHealthPolicy withMaxPercentUnhealthyReplicasPerPartition(Integ } /** - * Get the maximum maximum allowed percentage of unhealthy services. Allowed values are Byte values from zero to 100. + * Get the maximum allowed percentage of unhealthy services. Allowed values are Byte values from zero to 100. The percentage represents the maximum tolerated percentage of services that can be unhealthy before the application is considered in error. If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. This is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type. @@ -134,7 +134,7 @@ public Integer maxPercentUnhealthyServices() { } /** - * Set the maximum maximum allowed percentage of unhealthy services. Allowed values are Byte values from zero to 100. + * Set the maximum allowed percentage of unhealthy services. Allowed values are Byte values from zero to 100. The percentage represents the maximum tolerated percentage of services that can be unhealthy before the application is considered in error. If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. This is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type. diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ServiceFabricClientAPIsImpl.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ServiceFabricClientAPIsImpl.java index 3b02462726624..908ce3386df88 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ServiceFabricClientAPIsImpl.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/implementation/ServiceFabricClientAPIsImpl.java @@ -7505,7 +7505,7 @@ private ServiceResponse> getServiceTypeInfoListDelega /** * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. - * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specificed service type is not found in the cluster. + * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specified service type is not found in the cluster. * * @param applicationTypeName The name of the application type. * @param serviceTypeName Specifies the name of a Service Fabric service type. @@ -7521,7 +7521,7 @@ public ServiceTypeInfoInner getServiceTypeInfoByName(String applicationTypeName, /** * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. - * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specificed service type is not found in the cluster. + * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specified service type is not found in the cluster. * * @param applicationTypeName The name of the application type. * @param serviceTypeName Specifies the name of a Service Fabric service type. @@ -7536,7 +7536,7 @@ public ServiceFuture getServiceTypeInfoByNameAsync(String /** * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. - * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specificed service type is not found in the cluster. + * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specified service type is not found in the cluster. * * @param applicationTypeName The name of the application type. * @param serviceTypeName Specifies the name of a Service Fabric service type. @@ -7555,7 +7555,7 @@ public ServiceTypeInfoInner call(ServiceResponse response) /** * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. - * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specificed service type is not found in the cluster. + * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specified service type is not found in the cluster. * * @param applicationTypeName The name of the application type. * @param serviceTypeName Specifies the name of a Service Fabric service type. @@ -7591,7 +7591,7 @@ public Observable> call(Response getServiceTypeInfoByNameAsync(String /** * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. - * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specificed service type is not found in the cluster. + * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specified service type is not found in the cluster. * * @param applicationTypeName The name of the application type. * @param serviceTypeName Specifies the name of a Service Fabric service type. @@ -7644,7 +7644,7 @@ public ServiceTypeInfoInner call(ServiceResponse response) /** * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. - * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specificed service type is not found in the cluster. + * Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is returned. A 204 response is returned if the specified service type is not found in the cluster. * * @param applicationTypeName The name of the application type. * @param serviceTypeName Specifies the name of a Service Fabric service type. From 1d7432a43e386c5085ac4bb8566e5ad1d008981c Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 4 Dec 2018 05:13:26 +0000 Subject: [PATCH 3/3] Generated from 494e01db96f17beb1d349ab74358274971b26d08 remove invalid character --- .../ServicePlacementPreferPrimaryDomainPolicyDescription.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServicePlacementPreferPrimaryDomainPolicyDescription.java b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServicePlacementPreferPrimaryDomainPolicyDescription.java index 013c41b30d4c2..2619ee30dd962 100644 --- a/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServicePlacementPreferPrimaryDomainPolicyDescription.java +++ b/azure-servicefabric/src/main/java/com/microsoft/azure/servicefabric/ServicePlacementPreferPrimaryDomainPolicyDescription.java @@ -19,7 +19,7 @@ * * This placement policy is usually used with fault domains in scenarios where * the Service Fabric cluster is geographically distributed in order to - * indicate that a service�s primary replica should be located in a particular + * indicate that a service's primary replica should be located in a particular * fault domain, which in geo-distributed scenarios usually aligns with * regional or datacenter boundaries. Note that since this is an optimization * it is possible that the Primary replica may not end up located in this