Skip to content

Commit

Permalink
[Automation] Generate Fluent Lite from Swagger servicefabricmanagedcl…
Browse files Browse the repository at this point in the history
…usters#package-2024-09-preview (Azure#43412)
  • Loading branch information
azure-sdk authored Dec 16, 2024
1 parent 31b9768 commit ca19e11
Show file tree
Hide file tree
Showing 67 changed files with 406 additions and 264 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,36 @@
# Release History

## 1.0.0-beta.3 (Unreleased)
## 1.0.0-beta.3 (2024-12-16)

### Features Added
- Azure Resource Manager Service Fabric Managed Clusters client library for Java. This package contains Microsoft Azure SDK for Service Fabric Managed Clusters Management SDK. Service Fabric Managed Clusters Management Client. Package tag package-2024-09-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Breaking Changes

### Bugs Fixed
#### `models.ManagedCluster$Definition` was modified

* `withCustomFqdn(java.lang.String)` was removed

#### `models.StatefulServiceProperties` was modified

* `provisioningState()` was removed

#### `models.StatelessServiceProperties` was modified

* `provisioningState()` was removed

#### `models.ManagedCluster` was modified

* `customFqdn()` was removed

### Features Added

#### `models.ManagedCluster$Definition` was modified

* `withAllocatedOutboundPorts(java.lang.Integer)` was added

#### `models.ManagedCluster` was modified

### Other Changes
* `allocatedOutboundPorts()` was added

## 1.0.0-beta.2 (2024-10-18)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager Service Fabric Managed Clusters client library for Java.

This package contains Microsoft Azure SDK for Service Fabric Managed Clusters Management SDK. Service Fabric Managed Clusters Management Client. Package tag package-2024-06-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
This package contains Microsoft Azure SDK for Service Fabric Managed Clusters Management SDK. Service Fabric Managed Clusters Management Client. Package tag package-2024-09-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## We'd love to hear your feedback

Expand Down Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-servicefabricmanagedclusters</artifactId>
<version>1.0.0-beta.2</version>
<version>1.0.0-beta.3</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down Expand Up @@ -71,8 +71,7 @@ See [API design][design] for general introduction on design and key concepts on
## Examples

```java
managedCluster = serviceFabricManagedClustersManager
.managedClusters()
managedCluster = serviceFabricManagedClustersManager.managedClusters()
.define(clusterName)
.withRegion(REGION)
.withExistingResourceGroup(resourceGroupName)
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for Service Fabric Managed Clusters Management</name>
<description>This package contains Microsoft Azure SDK for Service Fabric Managed Clusters Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Service Fabric Managed Clusters Management Client. Package tag package-2024-06-preview.</description>
<description>This package contains Microsoft Azure SDK for Service Fabric Managed Clusters Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Service Fabric Managed Clusters Management Client. Package tag package-2024-09-preview.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down Expand Up @@ -46,6 +46,7 @@
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
<revapi.skip>true</revapi.skip>
<spotless.skip>false</spotless.skip>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
Expand All @@ -19,7 +20,6 @@
import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
Expand Down Expand Up @@ -263,7 +263,7 @@ public ServiceFabricManagedClustersManager authenticate(TokenCredential credenti
.append("-")
.append("com.azure.resourcemanager.servicefabricmanagedclusters")
.append("/")
.append("1.0.0-beta.2");
.append("1.0.0-beta.3");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
Expand Down Expand Up @@ -296,7 +296,7 @@ public ServiceFabricManagedClustersManager authenticate(TokenCredential credenti
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.addAll(this.policies.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.collect(Collectors.toList()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,25 @@ NodeTypeInner createOrUpdate(String resourceGroupName, String clusterName, Strin
NodeTypeInner createOrUpdate(String resourceGroupName, String clusterName, String nodeTypeName,
NodeTypeInner parameters, Context context);

/**
* Update the tags of a node type resource of a given managed cluster.
*
* Update the configuration of a node type of a given managed cluster, only updating tags.
*
* @param resourceGroupName The name of the resource group.
* @param clusterName The name of the cluster resource.
* @param nodeTypeName The name of the node type.
* @param parameters The parameters to update the node type configuration.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link SyncPoller} for polling of describes a node type in the cluster, each node type represents sub
* set of nodes in the cluster.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<NodeTypeInner>, NodeTypeInner> beginUpdate(String resourceGroupName, String clusterName,
String nodeTypeName, NodeTypeUpdateParameters parameters);

/**
* Update the tags of a node type resource of a given managed cluster.
*
Expand All @@ -401,12 +420,12 @@ NodeTypeInner createOrUpdate(String resourceGroupName, String clusterName, Strin
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return describes a node type in the cluster, each node type represents sub set of nodes in the cluster along
* with {@link Response}.
* @return the {@link SyncPoller} for polling of describes a node type in the cluster, each node type represents sub
* set of nodes in the cluster.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<NodeTypeInner> updateWithResponse(String resourceGroupName, String clusterName, String nodeTypeName,
NodeTypeUpdateParameters parameters, Context context);
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<NodeTypeInner>, NodeTypeInner> beginUpdate(String resourceGroupName, String clusterName,
String nodeTypeName, NodeTypeUpdateParameters parameters, Context context);

/**
* Update the tags of a node type resource of a given managed cluster.
Expand All @@ -426,6 +445,25 @@ Response<NodeTypeInner> updateWithResponse(String resourceGroupName, String clus
NodeTypeInner update(String resourceGroupName, String clusterName, String nodeTypeName,
NodeTypeUpdateParameters parameters);

/**
* Update the tags of a node type resource of a given managed cluster.
*
* Update the configuration of a node type of a given managed cluster, only updating tags.
*
* @param resourceGroupName The name of the resource group.
* @param clusterName The name of the cluster resource.
* @param nodeTypeName The name of the node type.
* @param parameters The parameters to update the node type configuration.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return describes a node type in the cluster, each node type represents sub set of nodes in the cluster.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
NodeTypeInner update(String resourceGroupName, String clusterName, String nodeTypeName,
NodeTypeUpdateParameters parameters, Context context);

/**
* Deletes a Service Fabric node type.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,8 @@ public ManagedClusterInner withAddonFeatures(List<ManagedClusterAddOnFeature> ad
}

/**
* Get the enableAutoOSUpgrade property: Setting this to true enables automatic OS upgrade for the node types that
* are created using any platform OS image with version 'latest'. The default value for this setting is false.
* Get the enableAutoOSUpgrade property: Enables automatic OS upgrade for node types created using OS images with
* version 'latest'. The default value for this setting is false.
*
* @return the enableAutoOSUpgrade value.
*/
Expand All @@ -602,8 +602,8 @@ public Boolean enableAutoOSUpgrade() {
}

/**
* Set the enableAutoOSUpgrade property: Setting this to true enables automatic OS upgrade for the node types that
* are created using any platform OS image with version 'latest'. The default value for this setting is false.
* Set the enableAutoOSUpgrade property: Enables automatic OS upgrade for node types created using OS images with
* version 'latest'. The default value for this setting is false.
*
* @param enableAutoOSUpgrade the enableAutoOSUpgrade value to set.
* @return the ManagedClusterInner object itself.
Expand Down Expand Up @@ -1047,27 +1047,29 @@ public AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope() {
}

/**
* Get the customFqdn property: If using autoGeneratedDomainNameLabelScope, this is the fully qualified domain name
* using SFMC's domain, pointing to the public load balancer of the cluster.
* Get the allocatedOutboundPorts property: The number of outbound ports allocated for SNAT for each node in the
* backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation based on
* pool size.
*
* @return the customFqdn value.
* @return the allocatedOutboundPorts value.
*/
public String customFqdn() {
return this.innerProperties() == null ? null : this.innerProperties().customFqdn();
public Integer allocatedOutboundPorts() {
return this.innerProperties() == null ? null : this.innerProperties().allocatedOutboundPorts();
}

/**
* Set the customFqdn property: If using autoGeneratedDomainNameLabelScope, this is the fully qualified domain name
* using SFMC's domain, pointing to the public load balancer of the cluster.
* Set the allocatedOutboundPorts property: The number of outbound ports allocated for SNAT for each node in the
* backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation based on
* pool size.
*
* @param customFqdn the customFqdn value to set.
* @param allocatedOutboundPorts the allocatedOutboundPorts value to set.
* @return the ManagedClusterInner object itself.
*/
public ManagedClusterInner withCustomFqdn(String customFqdn) {
public ManagedClusterInner withAllocatedOutboundPorts(Integer allocatedOutboundPorts) {
if (this.innerProperties() == null) {
this.innerProperties = new ManagedClusterProperties();
}
this.innerProperties().withCustomFqdn(customFqdn);
this.innerProperties().withAllocatedOutboundPorts(allocatedOutboundPorts);
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ public final class ManagedClusterProperties implements JsonSerializable<ManagedC
private List<ManagedClusterAddOnFeature> addonFeatures;

/*
* Setting this to true enables automatic OS upgrade for the node types that are created using any platform OS image
* with version 'latest'. The default value for this setting is false.
* Enables automatic OS upgrade for node types created using OS images with version 'latest'. The default value for
* this setting is false.
*/
private Boolean enableAutoOSUpgrade;

Expand Down Expand Up @@ -254,10 +254,10 @@ public final class ManagedClusterProperties implements JsonSerializable<ManagedC
private AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope;

/*
* If using autoGeneratedDomainNameLabelScope, this is the fully qualified domain name using SFMC's domain, pointing
* to the public load balancer of the cluster.
* The number of outbound ports allocated for SNAT for each node in the backend pool of the default load balancer.
* The default value is 0 which provides dynamic port allocation based on pool size.
*/
private String customFqdn;
private Integer allocatedOutboundPorts;

/**
* Creates an instance of ManagedClusterProperties class.
Expand Down Expand Up @@ -638,8 +638,8 @@ public ManagedClusterProperties withAddonFeatures(List<ManagedClusterAddOnFeatur
}

/**
* Get the enableAutoOSUpgrade property: Setting this to true enables automatic OS upgrade for the node types that
* are created using any platform OS image with version 'latest'. The default value for this setting is false.
* Get the enableAutoOSUpgrade property: Enables automatic OS upgrade for node types created using OS images with
* version 'latest'. The default value for this setting is false.
*
* @return the enableAutoOSUpgrade value.
*/
Expand All @@ -648,8 +648,8 @@ public Boolean enableAutoOSUpgrade() {
}

/**
* Set the enableAutoOSUpgrade property: Setting this to true enables automatic OS upgrade for the node types that
* are created using any platform OS image with version 'latest'. The default value for this setting is false.
* Set the enableAutoOSUpgrade property: Enables automatic OS upgrade for node types created using OS images with
* version 'latest'. The default value for this setting is false.
*
* @param enableAutoOSUpgrade the enableAutoOSUpgrade value to set.
* @return the ManagedClusterProperties object itself.
Expand Down Expand Up @@ -1039,24 +1039,26 @@ public AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope() {
}

/**
* Get the customFqdn property: If using autoGeneratedDomainNameLabelScope, this is the fully qualified domain name
* using SFMC's domain, pointing to the public load balancer of the cluster.
* Get the allocatedOutboundPorts property: The number of outbound ports allocated for SNAT for each node in the
* backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation based on
* pool size.
*
* @return the customFqdn value.
* @return the allocatedOutboundPorts value.
*/
public String customFqdn() {
return this.customFqdn;
public Integer allocatedOutboundPorts() {
return this.allocatedOutboundPorts;
}

/**
* Set the customFqdn property: If using autoGeneratedDomainNameLabelScope, this is the fully qualified domain name
* using SFMC's domain, pointing to the public load balancer of the cluster.
* Set the allocatedOutboundPorts property: The number of outbound ports allocated for SNAT for each node in the
* backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation based on
* pool size.
*
* @param customFqdn the customFqdn value to set.
* @param allocatedOutboundPorts the allocatedOutboundPorts value to set.
* @return the ManagedClusterProperties object itself.
*/
public ManagedClusterProperties withCustomFqdn(String customFqdn) {
this.customFqdn = customFqdn;
public ManagedClusterProperties withAllocatedOutboundPorts(Integer allocatedOutboundPorts) {
this.allocatedOutboundPorts = allocatedOutboundPorts;
return this;
}

Expand Down Expand Up @@ -1159,7 +1161,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeBooleanField("enableHttpGatewayExclusiveAuthMode", this.enableHttpGatewayExclusiveAuthMode);
jsonWriter.writeStringField("autoGeneratedDomainNameLabelScope",
this.autoGeneratedDomainNameLabelScope == null ? null : this.autoGeneratedDomainNameLabelScope.toString());
jsonWriter.writeStringField("customFqdn", this.customFqdn);
jsonWriter.writeNumberField("allocatedOutboundPorts", this.allocatedOutboundPorts);
return jsonWriter.writeEndObject();
}

Expand Down Expand Up @@ -1284,8 +1286,9 @@ public static ManagedClusterProperties fromJson(JsonReader jsonReader) throws IO
} else if ("autoGeneratedDomainNameLabelScope".equals(fieldName)) {
deserializedManagedClusterProperties.autoGeneratedDomainNameLabelScope
= AutoGeneratedDomainNameLabelScope.fromString(reader.getString());
} else if ("customFqdn".equals(fieldName)) {
deserializedManagedClusterProperties.customFqdn = reader.getString();
} else if ("allocatedOutboundPorts".equals(fieldName)) {
deserializedManagedClusterProperties.allocatedOutboundPorts
= reader.getNullable(JsonReader::getInt);
} else {
reader.skipChildren();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ public AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope() {
return this.innerModel().autoGeneratedDomainNameLabelScope();
}

public String customFqdn() {
return this.innerModel().customFqdn();
public Integer allocatedOutboundPorts() {
return this.innerModel().allocatedOutboundPorts();
}

public Region region() {
Expand Down Expand Up @@ -572,8 +572,8 @@ public ManagedClusterImpl withEnableHttpGatewayExclusiveAuthMode(Boolean enableH
return this;
}

public ManagedClusterImpl withCustomFqdn(String customFqdn) {
this.innerModel().withCustomFqdn(customFqdn);
public ManagedClusterImpl withAllocatedOutboundPorts(Integer allocatedOutboundPorts) {
this.innerModel().withAllocatedOutboundPorts(allocatedOutboundPorts);
return this;
}

Expand Down
Loading

0 comments on commit ca19e11

Please sign in to comment.