Skip to content
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Azure Resource Manager Managed Network Fabric client library for Java
# Azure Resource Manager fileshares client library for Java

Azure Resource Manager Managed Network Fabric client library for Java.
Azure Resource Manager fileshares client library for Java.

This package contains Microsoft Azure SDK for Managed Network Fabric Management SDK. Self service experience for Azure Network Fabric API. Package tag package-2023-06-15. 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 fileshares Management SDK. Self service experience for Azure Network Fabric API. Package api-version 2024-06-15-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 @@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:

```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
TokenCredential credential = new DefaultAzureCredentialBuilder()
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
.build();
ManagedNetworkFabricManager manager = ManagedNetworkFabricManager
FilesharesManager manager = FilesharesManager
.authenticate(credential, profile);
```

The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.

See [Authentication][authenticate] for more options.

Expand Down Expand Up @@ -142,5 +142,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/


3,912 changes: 2,189 additions & 1,723 deletions sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/SAMPLE.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--
~ Copyright (c) Microsoft Corporation. All rights reserved.
~ Licensed under the MIT License.
~ Code generated by Microsoft (R) AutoRest Code Generator.
~ Code generated by Microsoft (R) TypeSpec Code Generator.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
Expand All @@ -17,8 +17,8 @@
<version>1.2.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-managednetworkfabric;current} -->
<packaging>jar</packaging>

<name>Microsoft Azure SDK for Managed Network Fabric Management</name>
<description>This package contains Microsoft Azure SDK for Managed Network Fabric Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Self service experience for Azure Network Fabric API. Package tag package-2023-06-15.</description>
<name>Microsoft Azure SDK for fileshares Management</name>
<description>This package contains Microsoft Azure SDK for fileshares Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Self service experience for Azure Network Fabric API. Package api-version 2024-06-15-preview.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand All @@ -45,7 +45,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
<spotless.skip>false</spotless.skip>
<revapi.skip>true</revapi.skip>
</properties>
<dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.resourcemanager.managednetworkfabric;

Expand All @@ -22,11 +22,12 @@
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.managednetworkfabric.fluent.AzureNetworkFabricManagementServiceApi;
import com.azure.resourcemanager.managednetworkfabric.fluent.FilesharesManagementClient;
import com.azure.resourcemanager.managednetworkfabric.implementation.AccessControlListsImpl;
import com.azure.resourcemanager.managednetworkfabric.implementation.AzureNetworkFabricManagementServiceApiBuilder;
import com.azure.resourcemanager.managednetworkfabric.implementation.ExternalNetworksImpl;
import com.azure.resourcemanager.managednetworkfabric.implementation.FilesharesManagementClientBuilder;
import com.azure.resourcemanager.managednetworkfabric.implementation.InternalNetworksImpl;
import com.azure.resourcemanager.managednetworkfabric.implementation.InternetGatewayRulesImpl;
import com.azure.resourcemanager.managednetworkfabric.implementation.InternetGatewaysImpl;
Expand All @@ -42,6 +43,7 @@
import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkFabricSkusImpl;
import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkFabricsImpl;
import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkInterfacesImpl;
import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkMonitorsImpl;
import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkPacketBrokersImpl;
import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkRacksImpl;
import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkTapRulesImpl;
Expand All @@ -66,6 +68,7 @@
import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricSkus;
import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabrics;
import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfaces;
import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitors;
import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokers;
import com.azure.resourcemanager.managednetworkfabric.models.NetworkRacks;
import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRules;
Expand All @@ -77,20 +80,23 @@
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;

/**
* Entry point to ManagedNetworkFabricManager.
* Entry point to FilesharesManager.
* Self service experience for Azure Network Fabric API.
*/
public final class ManagedNetworkFabricManager {
private AccessControlLists accessControlLists;
public final class FilesharesManager {
private Operations operations;

private InternetGateways internetGateways;
private AccessControlLists accessControlLists;

private InternetGatewayRules internetGatewayRules;

private InternetGateways internetGateways;

private IpCommunities ipCommunities;

private IpExtendedCommunities ipExtendedCommunities;
Expand Down Expand Up @@ -129,62 +135,65 @@ public final class ManagedNetworkFabricManager {

private NetworkTaps networkTaps;

private Operations operations;

private RoutePolicies routePolicies;

private final AzureNetworkFabricManagementServiceApi clientObject;
private NetworkMonitors networkMonitors;

private ManagedNetworkFabricManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
private final FilesharesManagementClient clientObject;

private FilesharesManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
this.clientObject = new AzureNetworkFabricManagementServiceApiBuilder().pipeline(httpPipeline)
this.clientObject = new FilesharesManagementClientBuilder().pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.subscriptionId(profile.getSubscriptionId())
.defaultPollInterval(defaultPollInterval)
.buildClient();
}

/**
* Creates an instance of Managed Network Fabric service API entry point.
* Creates an instance of fileshares service API entry point.
*
* @param credential the credential to use.
* @param profile the Azure profile for client.
* @return the Managed Network Fabric service API instance.
* @return the fileshares service API instance.
*/
public static ManagedNetworkFabricManager authenticate(TokenCredential credential, AzureProfile profile) {
public static FilesharesManager authenticate(TokenCredential credential, AzureProfile profile) {
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
return configure().authenticate(credential, profile);
}

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

/**
* Gets a Configurable instance that can be used to create ManagedNetworkFabricManager with optional configuration.
* Gets a Configurable instance that can be used to create FilesharesManager with optional configuration.
*
* @return the Configurable instance allowing configurations.
*/
public static Configurable configure() {
return new ManagedNetworkFabricManager.Configurable();
return new FilesharesManager.Configurable();
}

/**
* The Configurable allowing configurations to be set.
*/
public static final class Configurable {
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
private static final String SDK_VERSION = "version";
private static final Map<String, String> PROPERTIES
= CoreUtils.getProperties("azure-resourcemanager-managednetworkfabric.properties");

private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
Expand Down Expand Up @@ -282,22 +291,24 @@ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
}

/**
* Creates an instance of Managed Network Fabric service API entry point.
* Creates an instance of fileshares service API entry point.
*
* @param credential the credential to use.
* @param profile the Azure profile for client.
* @return the Managed Network Fabric service API instance.
* @return the fileshares service API instance.
*/
public ManagedNetworkFabricManager authenticate(TokenCredential credential, AzureProfile profile) {
public FilesharesManager authenticate(TokenCredential credential, AzureProfile profile) {
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");

String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");

StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder.append("azsdk-java")
.append("-")
.append("com.azure.resourcemanager.managednetworkfabric")
.append("/")
.append("1.1.0");
.append(clientVersion);
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
Expand Down Expand Up @@ -339,32 +350,32 @@ public ManagedNetworkFabricManager authenticate(TokenCredential credential, Azur
HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient)
.policies(policies.toArray(new HttpPipelinePolicy[0]))
.build();
return new ManagedNetworkFabricManager(httpPipeline, profile, defaultPollInterval);
return new FilesharesManager(httpPipeline, profile, defaultPollInterval);
}
}

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

/**
* Gets the resource collection API of InternetGateways. It manages InternetGateway.
* Gets the resource collection API of AccessControlLists. It manages AccessControlList.
*
* @return Resource collection API of InternetGateways.
* @return Resource collection API of AccessControlLists.
*/
public InternetGateways internetGateways() {
if (this.internetGateways == null) {
this.internetGateways = new InternetGatewaysImpl(clientObject.getInternetGateways(), this);
public AccessControlLists accessControlLists() {
if (this.accessControlLists == null) {
this.accessControlLists = new AccessControlListsImpl(clientObject.getAccessControlLists(), this);
}
return internetGateways;
return accessControlLists;
}

/**
Expand All @@ -379,6 +390,18 @@ public InternetGatewayRules internetGatewayRules() {
return internetGatewayRules;
}

/**
* Gets the resource collection API of InternetGateways. It manages InternetGateway.
*
* @return Resource collection API of InternetGateways.
*/
public InternetGateways internetGateways() {
if (this.internetGateways == null) {
this.internetGateways = new InternetGatewaysImpl(clientObject.getInternetGateways(), this);
}
return internetGateways;
}

/**
* Gets the resource collection API of IpCommunities. It manages IpCommunity.
*
Expand Down Expand Up @@ -609,18 +632,6 @@ public NetworkTaps networkTaps() {
return networkTaps;
}

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

/**
* Gets the resource collection API of RoutePolicies. It manages RoutePolicy.
*
Expand All @@ -634,12 +645,24 @@ public RoutePolicies routePolicies() {
}

/**
* Gets wrapped service client AzureNetworkFabricManagementServiceApi providing direct access to the underlying
* auto-generated API implementation, based on Azure REST API.
* Gets the resource collection API of NetworkMonitors. It manages NetworkMonitor.
*
* @return Resource collection API of NetworkMonitors.
*/
public NetworkMonitors networkMonitors() {
if (this.networkMonitors == null) {
this.networkMonitors = new NetworkMonitorsImpl(clientObject.getNetworkMonitors(), this);
}
return networkMonitors;
}

/**
* Gets wrapped service client FilesharesManagementClient providing direct access to the underlying auto-generated
* API implementation, based on Azure REST API.
*
* @return Wrapped service client AzureNetworkFabricManagementServiceApi.
* @return Wrapped service client FilesharesManagementClient.
*/
public AzureNetworkFabricManagementServiceApi serviceClient() {
public FilesharesManagementClient serviceClient() {
return this.clientObject;
}
}
Loading
Loading