Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.3 (Unreleased)
## 1.0.0-beta.1 (2022-06-14)

- Azure Resource Manager MobileNetwork client library for Java. This package contains Microsoft Azure SDK for MobileNetwork Management SDK. The resources in this swagger specification will be used to manage attached data network resources in mobile network attached to a particular packet core instance. Package tag package-2022-03-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-mobilenetwork</artifactId>
<version>1.0.0-beta.2</version>
<version>1.0.0-beta.3</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
Expand Down Expand Up @@ -106,6 +108,19 @@ public static MobileNetworkManager authenticate(TokenCredential credential, Azur
return configure().authenticate(credential, profile);
}

/**
* Creates an instance of MobileNetwork service API entry point.
*
* @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
* @param profile the Azure profile for client.
* @return the MobileNetwork service API instance.
*/
public static MobileNetworkManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
return new MobileNetworkManager(httpPipeline, profile, null);
}

/**
* Gets a Configurable instance that can be used to create MobileNetworkManager with optional configuration.
*
Expand All @@ -124,6 +139,7 @@ public static final class Configurable {
private final List<HttpPipelinePolicy> policies = new ArrayList<>();
private final List<String> scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
private RetryOptions retryOptions;
private Duration defaultPollInterval;

private Configurable() {
Expand Down Expand Up @@ -184,6 +200,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}

/**
* Sets the retry options for the HTTP pipeline retry policy.
*
* <p>This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
*
* @param retryOptions the retry options for the HTTP pipeline retry policy.
* @return the configurable object itself.
*/
public Configurable withRetryOptions(RetryOptions retryOptions) {
this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
return this;
}

/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
Expand Down Expand Up @@ -217,7 +246,7 @@ public MobileNetworkManager authenticate(TokenCredential credential, AzureProfil
.append("-")
.append("com.azure.resourcemanager.mobilenetwork")
.append("/")
.append("1.0.0-beta.2");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand All @@ -235,10 +264,15 @@ public MobileNetworkManager authenticate(TokenCredential credential, AzureProfil
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
}
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
if (retryOptions != null) {
retryPolicy = new RetryPolicy(retryOptions);
} else {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
}
List<HttpPipelinePolicy> policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
policies
.addAll(
Expand Down Expand Up @@ -269,55 +303,83 @@ public MobileNetworkManager authenticate(TokenCredential credential, AzureProfil
}
}

/** @return Resource collection API of AttachedDataNetworks. */
/**
* Gets the resource collection API of AttachedDataNetworks. It manages AttachedDataNetwork.
*
* @return Resource collection API of AttachedDataNetworks.
*/
public AttachedDataNetworks attachedDataNetworks() {
if (this.attachedDataNetworks == null) {
this.attachedDataNetworks = new AttachedDataNetworksImpl(clientObject.getAttachedDataNetworks(), this);
}
return attachedDataNetworks;
}

/** @return Resource collection API of DataNetworks. */
/**
* Gets the resource collection API of DataNetworks. It manages DataNetwork.
*
* @return Resource collection API of DataNetworks.
*/
public DataNetworks dataNetworks() {
if (this.dataNetworks == null) {
this.dataNetworks = new DataNetworksImpl(clientObject.getDataNetworks(), this);
}
return dataNetworks;
}

/** @return Resource collection API of MobileNetworks. */
/**
* Gets the resource collection API of MobileNetworks. It manages MobileNetwork.
*
* @return Resource collection API of MobileNetworks.
*/
public MobileNetworks mobileNetworks() {
if (this.mobileNetworks == null) {
this.mobileNetworks = new MobileNetworksImpl(clientObject.getMobileNetworks(), this);
}
return mobileNetworks;
}

/** @return Resource collection API of Sites. */
/**
* Gets the resource collection API of Sites. It manages Site.
*
* @return Resource collection API of Sites.
*/
public Sites sites() {
if (this.sites == null) {
this.sites = new SitesImpl(clientObject.getSites(), this);
}
return sites;
}

/** @return Resource collection API of Sims. */
/**
* Gets the resource collection API of Sims. It manages Sim.
*
* @return Resource collection API of Sims.
*/
public Sims sims() {
if (this.sims == null) {
this.sims = new SimsImpl(clientObject.getSims(), this);
}
return sims;
}

/** @return Resource collection API of Operations. */
/**
* Gets the resource collection API of Operations.
*
* @return Resource collection API of Operations.
*/
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
}
return operations;
}

/** @return Resource collection API of PacketCoreControlPlanes. */
/**
* Gets the resource collection API of PacketCoreControlPlanes. It manages PacketCoreControlPlane.
*
* @return Resource collection API of PacketCoreControlPlanes.
*/
public PacketCoreControlPlanes packetCoreControlPlanes() {
if (this.packetCoreControlPlanes == null) {
this.packetCoreControlPlanes =
Expand All @@ -326,31 +388,47 @@ public PacketCoreControlPlanes packetCoreControlPlanes() {
return packetCoreControlPlanes;
}

/** @return Resource collection API of PacketCoreDataPlanes. */
/**
* Gets the resource collection API of PacketCoreDataPlanes. It manages PacketCoreDataPlane.
*
* @return Resource collection API of PacketCoreDataPlanes.
*/
public PacketCoreDataPlanes packetCoreDataPlanes() {
if (this.packetCoreDataPlanes == null) {
this.packetCoreDataPlanes = new PacketCoreDataPlanesImpl(clientObject.getPacketCoreDataPlanes(), this);
}
return packetCoreDataPlanes;
}

/** @return Resource collection API of Services. */
/**
* Gets the resource collection API of Services. It manages Service.
*
* @return Resource collection API of Services.
*/
public Services services() {
if (this.services == null) {
this.services = new ServicesImpl(clientObject.getServices(), this);
}
return services;
}

/** @return Resource collection API of SimPolicies. */
/**
* Gets the resource collection API of SimPolicies. It manages SimPolicy.
*
* @return Resource collection API of SimPolicies.
*/
public SimPolicies simPolicies() {
if (this.simPolicies == null) {
this.simPolicies = new SimPoliciesImpl(clientObject.getSimPolicies(), this);
}
return simPolicies;
}

/** @return Resource collection API of Slices. */
/**
* Gets the resource collection API of Slices. It manages Slice.
*
* @return Resource collection API of Slices.
*/
public Slices slices() {
if (this.slices == null) {
this.slices = new SlicesImpl(clientObject.getSlices(), this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ public String regionName() {
return this.location();
}

public String resourceGroupName() {
return resourceGroupName;
}

public AttachedDataNetworkInner innerModel() {
return this.innerObject;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -676,14 +676,7 @@ private Mono<AttachedDataNetworkInner> getAsync(
String attachedDataNetworkName) {
return getWithResponseAsync(
resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName)
.flatMap(
(Response<AttachedDataNetworkInner> res) -> {
if (res.getValue() != null) {
return Mono.just(res.getValue());
} else {
return Mono.empty();
}
});
.flatMap(res -> Mono.justOrEmpty(res.getValue()));
}

/**
Expand Down Expand Up @@ -1328,14 +1321,7 @@ private Mono<AttachedDataNetworkInner> updateTagsAsync(
packetCoreDataPlaneName,
attachedDataNetworkName,
parameters)
.flatMap(
(Response<AttachedDataNetworkInner> res) -> {
if (res.getValue() != null) {
return Mono.just(res.getValue());
} else {
return Mono.empty();
}
});
.flatMap(res -> Mono.justOrEmpty(res.getValue()));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ public String regionName() {
return this.location();
}

public String resourceGroupName() {
return resourceGroupName;
}

public DataNetworkInner innerModel() {
return this.innerObject;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,14 +540,7 @@ private Mono<Response<DataNetworkInner>> getWithResponseAsync(
private Mono<DataNetworkInner> getAsync(
String resourceGroupName, String mobileNetworkName, String dataNetworkName) {
return getWithResponseAsync(resourceGroupName, mobileNetworkName, dataNetworkName)
.flatMap(
(Response<DataNetworkInner> res) -> {
if (res.getValue() != null) {
return Mono.just(res.getValue());
} else {
return Mono.empty();
}
});
.flatMap(res -> Mono.justOrEmpty(res.getValue()));
}

/**
Expand Down Expand Up @@ -1037,14 +1030,7 @@ private Mono<Response<DataNetworkInner>> updateTagsWithResponseAsync(
private Mono<DataNetworkInner> updateTagsAsync(
String resourceGroupName, String mobileNetworkName, String dataNetworkName, TagsObject parameters) {
return updateTagsWithResponseAsync(resourceGroupName, mobileNetworkName, dataNetworkName, parameters)
.flatMap(
(Response<DataNetworkInner> res) -> {
if (res.getValue() != null) {
return Mono.just(res.getValue());
} else {
return Mono.empty();
}
});
.flatMap(res -> Mono.justOrEmpty(res.getValue()));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ public String regionName() {
return this.location();
}

public String resourceGroupName() {
return resourceGroupName;
}

public MobileNetworkInner innerModel() {
return this.innerObject;
}
Expand Down
Loading