scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -172,6 +199,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
return this;
}
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
/**
* Sets the retry policy to the HTTP pipeline.
*
@@ -183,6 +221,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ * 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.
*
@@ -190,9 +241,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -228,20 +281,38 @@ public PeeringManager authenticate(TokenCredential credential, AzureProfile prof
userAgentBuilder.append(" (auto-generated)");
}
+ if (scopes.isEmpty()) {
+ 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 policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
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, profile.getEnvironment().getManagementEndpoint() + "/.default"));
- policies.addAll(this.policies);
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
@@ -253,7 +324,11 @@ public PeeringManager authenticate(TokenCredential credential, AzureProfile prof
}
}
- /** @return Resource collection API of CdnPeeringPrefixes. */
+ /**
+ * Gets the resource collection API of CdnPeeringPrefixes.
+ *
+ * @return Resource collection API of CdnPeeringPrefixes.
+ */
public CdnPeeringPrefixes cdnPeeringPrefixes() {
if (this.cdnPeeringPrefixes == null) {
this.cdnPeeringPrefixes = new CdnPeeringPrefixesImpl(clientObject.getCdnPeeringPrefixes(), this);
@@ -261,7 +336,11 @@ public CdnPeeringPrefixes cdnPeeringPrefixes() {
return cdnPeeringPrefixes;
}
- /** @return Resource collection API of ResourceProviders. */
+ /**
+ * Gets the resource collection API of ResourceProviders.
+ *
+ * @return Resource collection API of ResourceProviders.
+ */
public ResourceProviders resourceProviders() {
if (this.resourceProviders == null) {
this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this);
@@ -269,7 +348,11 @@ public ResourceProviders resourceProviders() {
return resourceProviders;
}
- /** @return Resource collection API of LegacyPeerings. */
+ /**
+ * Gets the resource collection API of LegacyPeerings.
+ *
+ * @return Resource collection API of LegacyPeerings.
+ */
public LegacyPeerings legacyPeerings() {
if (this.legacyPeerings == null) {
this.legacyPeerings = new LegacyPeeringsImpl(clientObject.getLegacyPeerings(), this);
@@ -277,7 +360,23 @@ public LegacyPeerings legacyPeerings() {
return legacyPeerings;
}
- /** @return Resource collection API of Operations. */
+ /**
+ * Gets the resource collection API of LookingGlass.
+ *
+ * @return Resource collection API of LookingGlass.
+ */
+ public LookingGlass lookingGlass() {
+ if (this.lookingGlass == null) {
+ this.lookingGlass = new LookingGlassImpl(clientObject.getLookingGlass(), this);
+ }
+ return lookingGlass;
+ }
+
+ /**
+ * 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);
@@ -285,7 +384,11 @@ public Operations operations() {
return operations;
}
- /** @return Resource collection API of PeerAsns. */
+ /**
+ * Gets the resource collection API of PeerAsns. It manages PeerAsn.
+ *
+ * @return Resource collection API of PeerAsns.
+ */
public PeerAsns peerAsns() {
if (this.peerAsns == null) {
this.peerAsns = new PeerAsnsImpl(clientObject.getPeerAsns(), this);
@@ -293,7 +396,11 @@ public PeerAsns peerAsns() {
return peerAsns;
}
- /** @return Resource collection API of PeeringLocations. */
+ /**
+ * Gets the resource collection API of PeeringLocations.
+ *
+ * @return Resource collection API of PeeringLocations.
+ */
public PeeringLocations peeringLocations() {
if (this.peeringLocations == null) {
this.peeringLocations = new PeeringLocationsImpl(clientObject.getPeeringLocations(), this);
@@ -301,7 +408,11 @@ public PeeringLocations peeringLocations() {
return peeringLocations;
}
- /** @return Resource collection API of RegisteredAsns. */
+ /**
+ * Gets the resource collection API of RegisteredAsns. It manages PeeringRegisteredAsn.
+ *
+ * @return Resource collection API of RegisteredAsns.
+ */
public RegisteredAsns registeredAsns() {
if (this.registeredAsns == null) {
this.registeredAsns = new RegisteredAsnsImpl(clientObject.getRegisteredAsns(), this);
@@ -309,7 +420,11 @@ public RegisteredAsns registeredAsns() {
return registeredAsns;
}
- /** @return Resource collection API of RegisteredPrefixes. */
+ /**
+ * Gets the resource collection API of RegisteredPrefixes. It manages PeeringRegisteredPrefix.
+ *
+ * @return Resource collection API of RegisteredPrefixes.
+ */
public RegisteredPrefixes registeredPrefixes() {
if (this.registeredPrefixes == null) {
this.registeredPrefixes = new RegisteredPrefixesImpl(clientObject.getRegisteredPrefixes(), this);
@@ -317,7 +432,11 @@ public RegisteredPrefixes registeredPrefixes() {
return registeredPrefixes;
}
- /** @return Resource collection API of Peerings. */
+ /**
+ * Gets the resource collection API of Peerings. It manages Peering.
+ *
+ * @return Resource collection API of Peerings.
+ */
public Peerings peerings() {
if (this.peerings == null) {
this.peerings = new PeeringsImpl(clientObject.getPeerings(), this);
@@ -325,7 +444,11 @@ public Peerings peerings() {
return peerings;
}
- /** @return Resource collection API of ReceivedRoutes. */
+ /**
+ * Gets the resource collection API of ReceivedRoutes.
+ *
+ * @return Resource collection API of ReceivedRoutes.
+ */
public ReceivedRoutes receivedRoutes() {
if (this.receivedRoutes == null) {
this.receivedRoutes = new ReceivedRoutesImpl(clientObject.getReceivedRoutes(), this);
@@ -333,7 +456,24 @@ public ReceivedRoutes receivedRoutes() {
return receivedRoutes;
}
- /** @return Resource collection API of PeeringServiceCountries. */
+ /**
+ * Gets the resource collection API of ConnectionMonitorTests. It manages ConnectionMonitorTest.
+ *
+ * @return Resource collection API of ConnectionMonitorTests.
+ */
+ public ConnectionMonitorTests connectionMonitorTests() {
+ if (this.connectionMonitorTests == null) {
+ this.connectionMonitorTests =
+ new ConnectionMonitorTestsImpl(clientObject.getConnectionMonitorTests(), this);
+ }
+ return connectionMonitorTests;
+ }
+
+ /**
+ * Gets the resource collection API of PeeringServiceCountries.
+ *
+ * @return Resource collection API of PeeringServiceCountries.
+ */
public PeeringServiceCountries peeringServiceCountries() {
if (this.peeringServiceCountries == null) {
this.peeringServiceCountries =
@@ -342,7 +482,11 @@ public PeeringServiceCountries peeringServiceCountries() {
return peeringServiceCountries;
}
- /** @return Resource collection API of PeeringServiceLocations. */
+ /**
+ * Gets the resource collection API of PeeringServiceLocations.
+ *
+ * @return Resource collection API of PeeringServiceLocations.
+ */
public PeeringServiceLocations peeringServiceLocations() {
if (this.peeringServiceLocations == null) {
this.peeringServiceLocations =
@@ -351,7 +495,11 @@ public PeeringServiceLocations peeringServiceLocations() {
return peeringServiceLocations;
}
- /** @return Resource collection API of Prefixes. */
+ /**
+ * Gets the resource collection API of Prefixes. It manages PeeringServicePrefix.
+ *
+ * @return Resource collection API of Prefixes.
+ */
public Prefixes prefixes() {
if (this.prefixes == null) {
this.prefixes = new PrefixesImpl(clientObject.getPrefixes(), this);
@@ -359,7 +507,11 @@ public Prefixes prefixes() {
return prefixes;
}
- /** @return Resource collection API of PeeringServiceProviders. */
+ /**
+ * Gets the resource collection API of PeeringServiceProviders.
+ *
+ * @return Resource collection API of PeeringServiceProviders.
+ */
public PeeringServiceProviders peeringServiceProviders() {
if (this.peeringServiceProviders == null) {
this.peeringServiceProviders =
@@ -368,7 +520,11 @@ public PeeringServiceProviders peeringServiceProviders() {
return peeringServiceProviders;
}
- /** @return Resource collection API of PeeringServices. */
+ /**
+ * Gets the resource collection API of PeeringServices. It manages PeeringService.
+ *
+ * @return Resource collection API of PeeringServices.
+ */
public PeeringServices peeringServices() {
if (this.peeringServices == null) {
this.peeringServices = new PeeringServicesImpl(clientObject.getPeeringServices(), this);
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/CdnPeeringPrefixesClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/CdnPeeringPrefixesClient.java
index 50ed5b9c39aa..045f0b147eac 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/CdnPeeringPrefixesClient.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/CdnPeeringPrefixesClient.java
@@ -19,7 +19,7 @@ public interface CdnPeeringPrefixesClient {
* @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 paginated list of CDN peering prefixes.
+ * @return the paginated list of CDN peering prefixes as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String peeringLocation);
@@ -32,7 +32,7 @@ public interface CdnPeeringPrefixesClient {
* @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 paginated list of CDN peering prefixes.
+ * @return the paginated list of CDN peering prefixes as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String peeringLocation, Context context);
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/ConnectionMonitorTestsClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/ConnectionMonitorTestsClient.java
new file mode 100644
index 000000000000..81a2a6da4ed2
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/ConnectionMonitorTestsClient.java
@@ -0,0 +1,151 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.peering.fluent.models.ConnectionMonitorTestInner;
+
+/** An instance of this class provides access to all the operations defined in ConnectionMonitorTestsClient. */
+public interface ConnectionMonitorTestsClient {
+ /**
+ * Gets an existing connection monitor test with the specified name under the given subscription, resource group and
+ * peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param connectionMonitorTestName The name of the connection monitor test.
+ * @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 an existing connection monitor test with the specified name under the given subscription, resource group
+ * and peering service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConnectionMonitorTestInner get(
+ String resourceGroupName, String peeringServiceName, String connectionMonitorTestName);
+
+ /**
+ * Gets an existing connection monitor test with the specified name under the given subscription, resource group and
+ * peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param connectionMonitorTestName The name of the connection monitor test.
+ * @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 an existing connection monitor test with the specified name under the given subscription, resource group
+ * and peering service along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String peeringServiceName, String connectionMonitorTestName, Context context);
+
+ /**
+ * Creates or updates a connection monitor test with the specified name under the given subscription, resource group
+ * and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param connectionMonitorTestName The name of the connection monitor test.
+ * @param connectionMonitorTest The properties needed to create a connection monitor test.
+ * @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 Connection Monitor Test class.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConnectionMonitorTestInner createOrUpdate(
+ String resourceGroupName,
+ String peeringServiceName,
+ String connectionMonitorTestName,
+ ConnectionMonitorTestInner connectionMonitorTest);
+
+ /**
+ * Creates or updates a connection monitor test with the specified name under the given subscription, resource group
+ * and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param connectionMonitorTestName The name of the connection monitor test.
+ * @param connectionMonitorTest The properties needed to create a connection monitor test.
+ * @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 the Connection Monitor Test class along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String peeringServiceName,
+ String connectionMonitorTestName,
+ ConnectionMonitorTestInner connectionMonitorTest,
+ Context context);
+
+ /**
+ * Deletes an existing connection monitor test with the specified name under the given subscription, resource group
+ * and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param connectionMonitorTestName The name of the connection monitor test.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String peeringServiceName, String connectionMonitorTestName);
+
+ /**
+ * Deletes an existing connection monitor test with the specified name under the given subscription, resource group
+ * and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param connectionMonitorTestName The name of the connection monitor test.
+ * @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 the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(
+ String resourceGroupName, String peeringServiceName, String connectionMonitorTestName, Context context);
+
+ /**
+ * Lists all connection monitor tests under the given subscription, resource group and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @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 paginated list of [T] as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByPeeringService(String resourceGroupName, String peeringServiceName);
+
+ /**
+ * Lists all connection monitor tests under the given subscription, resource group and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @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 the paginated list of [T] as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByPeeringService(
+ String resourceGroupName, String peeringServiceName, Context context);
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/LegacyPeeringsClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/LegacyPeeringsClient.java
index c8cba0bec65e..ae695d637097 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/LegacyPeeringsClient.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/LegacyPeeringsClient.java
@@ -9,6 +9,7 @@
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
import com.azure.resourcemanager.peering.fluent.models.PeeringInner;
+import com.azure.resourcemanager.peering.models.DirectPeeringType;
import com.azure.resourcemanager.peering.models.LegacyPeeringsKind;
/** An instance of this class provides access to all the operations defined in LegacyPeeringsClient. */
@@ -21,7 +22,7 @@ public interface LegacyPeeringsClient {
* @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 paginated list of peerings.
+ * @return the paginated list of peerings as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String peeringLocation, LegacyPeeringsKind kind);
@@ -32,12 +33,18 @@ public interface LegacyPeeringsClient {
* @param peeringLocation The location of the peering.
* @param kind The kind of the peering.
* @param asn The ASN number associated with a legacy peering.
+ * @param directPeeringType The direct peering type.
* @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 the paginated list of peerings.
+ * @return the paginated list of peerings as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String peeringLocation, LegacyPeeringsKind kind, Integer asn, Context context);
+ PagedIterable list(
+ String peeringLocation,
+ LegacyPeeringsKind kind,
+ Integer asn,
+ DirectPeeringType directPeeringType,
+ Context context);
}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/LookingGlassClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/LookingGlassClient.java
new file mode 100644
index 000000000000..b7c5817b6f8d
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/LookingGlassClient.java
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.peering.fluent.models.LookingGlassOutputInner;
+import com.azure.resourcemanager.peering.models.LookingGlassCommand;
+import com.azure.resourcemanager.peering.models.LookingGlassSourceType;
+
+/** An instance of this class provides access to all the operations defined in LookingGlassClient. */
+public interface LookingGlassClient {
+ /**
+ * Run looking glass functionality.
+ *
+ * @param command The command to be executed: ping, traceroute, bgpRoute.
+ * @param sourceType The type of the source: Edge site or Azure Region.
+ * @param sourceLocation The location of the source.
+ * @param destinationIp The IP address of the destination.
+ * @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 looking glass output model.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ LookingGlassOutputInner invoke(
+ LookingGlassCommand command, LookingGlassSourceType sourceType, String sourceLocation, String destinationIp);
+
+ /**
+ * Run looking glass functionality.
+ *
+ * @param command The command to be executed: ping, traceroute, bgpRoute.
+ * @param sourceType The type of the source: Edge site or Azure Region.
+ * @param sourceLocation The location of the source.
+ * @param destinationIp The IP address of the destination.
+ * @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 looking glass output model along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response invokeWithResponse(
+ LookingGlassCommand command,
+ LookingGlassSourceType sourceType,
+ String sourceLocation,
+ String destinationIp,
+ Context context);
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/OperationsClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/OperationsClient.java
index acbe3f579e2a..e69cae9260cd 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/OperationsClient.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/OperationsClient.java
@@ -17,7 +17,7 @@ public interface OperationsClient {
*
* @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 paginated list of peering API operations.
+ * @return the paginated list of peering API operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,7 +29,7 @@ public interface OperationsClient {
* @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 paginated list of peering API operations.
+ * @return the paginated list of peering API operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeerAsnsClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeerAsnsClient.java
index 6f3505ddf197..10f169febaa0 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeerAsnsClient.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeerAsnsClient.java
@@ -33,7 +33,7 @@ public interface PeerAsnsClient {
* @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 peer ASN with the specified name under the given subscription.
+ * @return the peer ASN with the specified name under the given subscription along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(String peerAsnName, Context context);
@@ -60,7 +60,7 @@ public interface PeerAsnsClient {
* @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 essential information related to the peer's ASN.
+ * @return the essential information related to the peer's ASN along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(String peerAsnName, PeerAsnInner peerAsn, Context context);
@@ -84,7 +84,7 @@ public interface PeerAsnsClient {
* @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 response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(String peerAsnName, Context context);
@@ -94,7 +94,7 @@ public interface PeerAsnsClient {
*
* @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 paginated list of peer ASNs.
+ * @return the paginated list of peer ASNs as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -106,7 +106,7 @@ public interface PeerAsnsClient {
* @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 paginated list of peer ASNs.
+ * @return the paginated list of peer ASNs as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringLocationsClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringLocationsClient.java
index 0b3945229967..1074168096f9 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringLocationsClient.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringLocationsClient.java
@@ -21,7 +21,7 @@ public interface PeeringLocationsClient {
* @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 paginated list of peering locations.
+ * @return the paginated list of peering locations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(PeeringLocationsKind kind);
@@ -35,7 +35,7 @@ public interface PeeringLocationsClient {
* @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 paginated list of peering locations.
+ * @return the paginated list of peering locations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringManagementClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringManagementClient.java
index 70c527cbb0ea..9ca7ac56eb58 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringManagementClient.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringManagementClient.java
@@ -65,6 +65,13 @@ public interface PeeringManagementClient {
*/
LegacyPeeringsClient getLegacyPeerings();
+ /**
+ * Gets the LookingGlassClient object to access its operations.
+ *
+ * @return the LookingGlassClient object.
+ */
+ LookingGlassClient getLookingGlass();
+
/**
* Gets the OperationsClient object to access its operations.
*
@@ -114,6 +121,13 @@ public interface PeeringManagementClient {
*/
ReceivedRoutesClient getReceivedRoutes();
+ /**
+ * Gets the ConnectionMonitorTestsClient object to access its operations.
+ *
+ * @return the ConnectionMonitorTestsClient object.
+ */
+ ConnectionMonitorTestsClient getConnectionMonitorTests();
+
/**
* Gets the PeeringServiceCountriesClient object to access its operations.
*
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServiceCountriesClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServiceCountriesClient.java
index 83b9d54e207f..d9cecf1bf1a4 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServiceCountriesClient.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServiceCountriesClient.java
@@ -17,7 +17,7 @@ public interface PeeringServiceCountriesClient {
*
* @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 paginated list of peering service countries.
+ * @return the paginated list of peering service countries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,7 +29,7 @@ public interface PeeringServiceCountriesClient {
* @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 paginated list of peering service countries.
+ * @return the paginated list of peering service countries as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServiceLocationsClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServiceLocationsClient.java
index 69f837fdd14c..6844fec70db8 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServiceLocationsClient.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServiceLocationsClient.java
@@ -17,7 +17,7 @@ public interface PeeringServiceLocationsClient {
*
* @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 paginated list of peering service locations.
+ * @return the paginated list of peering service locations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -30,7 +30,7 @@ public interface PeeringServiceLocationsClient {
* @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 paginated list of peering service locations.
+ * @return the paginated list of peering service locations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String country, Context context);
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServiceProvidersClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServiceProvidersClient.java
index f09e1f33e5c6..4da6a9dfa200 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServiceProvidersClient.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServiceProvidersClient.java
@@ -17,7 +17,7 @@ public interface PeeringServiceProvidersClient {
*
* @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 paginated list of peering service providers.
+ * @return the paginated list of peering service providers as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,7 +29,7 @@ public interface PeeringServiceProvidersClient {
* @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 paginated list of peering service providers.
+ * @return the paginated list of peering service providers as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServicesClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServicesClient.java
index cbbd7b3280ef..17517207adf6 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServicesClient.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringServicesClient.java
@@ -36,7 +36,8 @@ public interface PeeringServicesClient {
* @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 an existing peering service with the specified name under the given subscription and resource group.
+ * @return an existing peering service with the specified name under the given subscription and resource group along
+ * with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -69,7 +70,7 @@ PeeringServiceInner createOrUpdate(
* @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 peering Service.
+ * @return peering Service along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
@@ -96,7 +97,7 @@ Response createOrUpdateWithResponse(
* @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 response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(String resourceGroupName, String peeringServiceName, Context context);
@@ -125,7 +126,7 @@ Response createOrUpdateWithResponse(
* @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 peering Service.
+ * @return peering Service along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response updateWithResponse(
@@ -138,7 +139,7 @@ Response updateWithResponse(
* @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 paginated list of peering services.
+ * @return the paginated list of peering services as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -151,7 +152,7 @@ Response updateWithResponse(
* @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 paginated list of peering services.
+ * @return the paginated list of peering services as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -161,7 +162,7 @@ Response updateWithResponse(
*
* @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 paginated list of peering services.
+ * @return the paginated list of peering services as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -173,8 +174,29 @@ Response updateWithResponse(
* @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 paginated list of peering services.
+ * @return the paginated list of peering services as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
+
+ /**
+ * Initialize Peering Service for Connection Monitor functionality.
+ *
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void initializeConnectionMonitor();
+
+ /**
+ * Initialize Peering Service for Connection Monitor functionality.
+ *
+ * @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 the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response initializeConnectionMonitorWithResponse(Context context);
}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringsClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringsClient.java
index 4813e219c504..a1ffa656c9c3 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringsClient.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PeeringsClient.java
@@ -36,7 +36,8 @@ public interface PeeringsClient {
* @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 an existing peering with the specified name under the given subscription and resource group.
+ * @return an existing peering with the specified name under the given subscription and resource group along with
+ * {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -68,7 +69,8 @@ Response getByResourceGroupWithResponse(
* @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 peering is a logical representation of a set of connections to the Microsoft Cloud Edge at a location.
+ * @return peering is a logical representation of a set of connections to the Microsoft Cloud Edge at a location
+ * along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
@@ -95,7 +97,7 @@ Response createOrUpdateWithResponse(
* @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 response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(String resourceGroupName, String peeringName, Context context);
@@ -124,7 +126,8 @@ Response createOrUpdateWithResponse(
* @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 peering is a logical representation of a set of connections to the Microsoft Cloud Edge at a location.
+ * @return peering is a logical representation of a set of connections to the Microsoft Cloud Edge at a location
+ * along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response updateWithResponse(
@@ -137,7 +140,7 @@ Response updateWithResponse(
* @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 paginated list of peerings.
+ * @return the paginated list of peerings as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -150,7 +153,7 @@ Response updateWithResponse(
* @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 paginated list of peerings.
+ * @return the paginated list of peerings as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -160,7 +163,7 @@ Response updateWithResponse(
*
* @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 paginated list of peerings.
+ * @return the paginated list of peerings as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -172,7 +175,7 @@ Response updateWithResponse(
* @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 paginated list of peerings.
+ * @return the paginated list of peerings as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PrefixesClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PrefixesClient.java
index ab6755d21576..749ec302d1ed 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PrefixesClient.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/PrefixesClient.java
@@ -40,7 +40,7 @@ public interface PrefixesClient {
* @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 an existing prefix with the specified name under the given subscription, resource group and peering
- * service.
+ * service along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
@@ -76,7 +76,7 @@ PeeringServicePrefixInner createOrUpdate(
* @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 peering service prefix class.
+ * @return the peering service prefix class along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
@@ -111,7 +111,7 @@ Response createOrUpdateWithResponse(
* @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 response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(
@@ -125,7 +125,7 @@ Response deleteWithResponse(
* @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 paginated list of peering service prefixes.
+ * @return the paginated list of peering service prefixes as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByPeeringService(String resourceGroupName, String peeringServiceName);
@@ -140,7 +140,7 @@ Response deleteWithResponse(
* @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 paginated list of peering service prefixes.
+ * @return the paginated list of peering service prefixes as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByPeeringService(
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/ReceivedRoutesClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/ReceivedRoutesClient.java
index 028c632042c3..f507c47c70bd 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/ReceivedRoutesClient.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/ReceivedRoutesClient.java
@@ -20,7 +20,7 @@ public interface ReceivedRoutesClient {
* @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 paginated list of received routes for the peering.
+ * @return the paginated list of received routes for the peering as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByPeering(String resourceGroupName, String peeringName);
@@ -39,7 +39,7 @@ public interface ReceivedRoutesClient {
* @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 paginated list of received routes for the peering.
+ * @return the paginated list of received routes for the peering as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByPeering(
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/RegisteredAsnsClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/RegisteredAsnsClient.java
index 36c7448d7392..2d56aeaa2bad 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/RegisteredAsnsClient.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/RegisteredAsnsClient.java
@@ -39,7 +39,7 @@ public interface RegisteredAsnsClient {
* @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 an existing registered ASN with the specified name under the given subscription, resource group and
- * peering.
+ * peering along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
@@ -75,7 +75,7 @@ PeeringRegisteredAsnInner createOrUpdate(
* @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 customer's ASN that is registered by the peering service provider.
+ * @return the customer's ASN that is registered by the peering service provider along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
@@ -110,7 +110,7 @@ Response createOrUpdateWithResponse(
* @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 response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(
@@ -124,7 +124,7 @@ Response deleteWithResponse(
* @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 paginated list of peering registered ASNs.
+ * @return the paginated list of peering registered ASNs as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByPeering(String resourceGroupName, String peeringName);
@@ -138,7 +138,7 @@ Response deleteWithResponse(
* @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 paginated list of peering registered ASNs.
+ * @return the paginated list of peering registered ASNs as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByPeering(
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/RegisteredPrefixesClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/RegisteredPrefixesClient.java
index fb587e31173e..943576dfb376 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/RegisteredPrefixesClient.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/RegisteredPrefixesClient.java
@@ -41,7 +41,7 @@ public interface RegisteredPrefixesClient {
* @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 an existing registered prefix with the specified name under the given subscription, resource group and
- * peering.
+ * peering along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
@@ -77,7 +77,7 @@ PeeringRegisteredPrefixInner createOrUpdate(
* @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 customer's prefix that is registered by the peering service provider.
+ * @return the customer's prefix that is registered by the peering service provider along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
@@ -112,7 +112,7 @@ Response createOrUpdateWithResponse(
* @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 response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(
@@ -126,7 +126,7 @@ Response deleteWithResponse(
* @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 paginated list of peering registered prefixes.
+ * @return the paginated list of peering registered prefixes as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByPeering(String resourceGroupName, String peeringName);
@@ -140,9 +140,41 @@ Response deleteWithResponse(
* @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 paginated list of peering registered prefixes.
+ * @return the paginated list of peering registered prefixes as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByPeering(
String resourceGroupName, String peeringName, Context context);
+
+ /**
+ * Validates an existing registered prefix with the specified name under the given subscription, resource group and
+ * peering.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @param registeredPrefixName The name of the registered prefix.
+ * @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 customer's prefix that is registered by the peering service provider.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PeeringRegisteredPrefixInner validate(String resourceGroupName, String peeringName, String registeredPrefixName);
+
+ /**
+ * Validates an existing registered prefix with the specified name under the given subscription, resource group and
+ * peering.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringName The name of the peering.
+ * @param registeredPrefixName The name of the registered prefix.
+ * @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 the customer's prefix that is registered by the peering service provider along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response validateWithResponse(
+ String resourceGroupName, String peeringName, String registeredPrefixName, Context context);
}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/ResourceProvidersClient.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/ResourceProvidersClient.java
index 1cc121969cb8..fc02ab941667 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/ResourceProvidersClient.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/ResourceProvidersClient.java
@@ -35,7 +35,7 @@ public interface ResourceProvidersClient {
* @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 response.
+ * @return the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response checkServiceProviderAvailabilityWithResponse(
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/CdnPeeringPrefixInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/CdnPeeringPrefixInner.java
index aae2b0bb7dc9..ee0a6f2902d9 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/CdnPeeringPrefixInner.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/CdnPeeringPrefixInner.java
@@ -4,48 +4,27 @@
package com.azure.resourcemanager.peering.fluent.models;
-import com.azure.core.annotation.Immutable;
-import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The CDN peering prefix. */
-@JsonFlatten
-@Immutable
-public class CdnPeeringPrefixInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CdnPeeringPrefixInner.class);
-
- /*
- * The prefix.
- */
- @JsonProperty(value = "properties.prefix", access = JsonProperty.Access.WRITE_ONLY)
- private String prefix;
-
- /*
- * The Azure region.
- */
- @JsonProperty(value = "properties.azureRegion", access = JsonProperty.Access.WRITE_ONLY)
- private String azureRegion;
-
+@Fluent
+public final class CdnPeeringPrefixInner extends ProxyResource {
/*
- * The Azure service.
+ * The properties that define a cdn peering prefix.
*/
- @JsonProperty(value = "properties.azureService", access = JsonProperty.Access.WRITE_ONLY)
- private String azureService;
+ @JsonProperty(value = "properties")
+ private CdnPeeringPrefixProperties innerProperties;
- /*
- * The flag that indicates whether or not this is the primary region.
- */
- @JsonProperty(value = "properties.isPrimaryRegion", access = JsonProperty.Access.WRITE_ONLY)
- private Boolean isPrimaryRegion;
-
- /*
- * The BGP Community
+ /**
+ * Get the innerProperties property: The properties that define a cdn peering prefix.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.bgpCommunity", access = JsonProperty.Access.WRITE_ONLY)
- private String bgpCommunity;
+ private CdnPeeringPrefixProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the prefix property: The prefix.
@@ -53,7 +32,7 @@ public class CdnPeeringPrefixInner extends ProxyResource {
* @return the prefix value.
*/
public String prefix() {
- return this.prefix;
+ return this.innerProperties() == null ? null : this.innerProperties().prefix();
}
/**
@@ -62,7 +41,7 @@ public String prefix() {
* @return the azureRegion value.
*/
public String azureRegion() {
- return this.azureRegion;
+ return this.innerProperties() == null ? null : this.innerProperties().azureRegion();
}
/**
@@ -71,7 +50,7 @@ public String azureRegion() {
* @return the azureService value.
*/
public String azureService() {
- return this.azureService;
+ return this.innerProperties() == null ? null : this.innerProperties().azureService();
}
/**
@@ -80,7 +59,7 @@ public String azureService() {
* @return the isPrimaryRegion value.
*/
public Boolean isPrimaryRegion() {
- return this.isPrimaryRegion;
+ return this.innerProperties() == null ? null : this.innerProperties().isPrimaryRegion();
}
/**
@@ -89,7 +68,7 @@ public Boolean isPrimaryRegion() {
* @return the bgpCommunity value.
*/
public String bgpCommunity() {
- return this.bgpCommunity;
+ return this.innerProperties() == null ? null : this.innerProperties().bgpCommunity();
}
/**
@@ -98,5 +77,8 @@ public String bgpCommunity() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/CdnPeeringPrefixProperties.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/CdnPeeringPrefixProperties.java
new file mode 100644
index 000000000000..c01d05654bcd
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/CdnPeeringPrefixProperties.java
@@ -0,0 +1,95 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties that define a CDN peering prefix. */
+@Immutable
+public final class CdnPeeringPrefixProperties {
+ /*
+ * The prefix.
+ */
+ @JsonProperty(value = "prefix", access = JsonProperty.Access.WRITE_ONLY)
+ private String prefix;
+
+ /*
+ * The Azure region.
+ */
+ @JsonProperty(value = "azureRegion", access = JsonProperty.Access.WRITE_ONLY)
+ private String azureRegion;
+
+ /*
+ * The Azure service.
+ */
+ @JsonProperty(value = "azureService", access = JsonProperty.Access.WRITE_ONLY)
+ private String azureService;
+
+ /*
+ * The flag that indicates whether or not this is the primary region.
+ */
+ @JsonProperty(value = "isPrimaryRegion", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isPrimaryRegion;
+
+ /*
+ * The BGP Community
+ */
+ @JsonProperty(value = "bgpCommunity", access = JsonProperty.Access.WRITE_ONLY)
+ private String bgpCommunity;
+
+ /**
+ * Get the prefix property: The prefix.
+ *
+ * @return the prefix value.
+ */
+ public String prefix() {
+ return this.prefix;
+ }
+
+ /**
+ * Get the azureRegion property: The Azure region.
+ *
+ * @return the azureRegion value.
+ */
+ public String azureRegion() {
+ return this.azureRegion;
+ }
+
+ /**
+ * Get the azureService property: The Azure service.
+ *
+ * @return the azureService value.
+ */
+ public String azureService() {
+ return this.azureService;
+ }
+
+ /**
+ * Get the isPrimaryRegion property: The flag that indicates whether or not this is the primary region.
+ *
+ * @return the isPrimaryRegion value.
+ */
+ public Boolean isPrimaryRegion() {
+ return this.isPrimaryRegion;
+ }
+
+ /**
+ * Get the bgpCommunity property: The BGP Community.
+ *
+ * @return the bgpCommunity value.
+ */
+ public String bgpCommunity() {
+ return this.bgpCommunity;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/ConnectionMonitorTestInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/ConnectionMonitorTestInner.java
new file mode 100644
index 000000000000..c4e2dd18158c
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/ConnectionMonitorTestInner.java
@@ -0,0 +1,160 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.resourcemanager.peering.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The Connection Monitor Test class. */
+@Fluent
+public final class ConnectionMonitorTestInner extends ProxyResource {
+ /*
+ * The properties that define a Connection Monitor Test.
+ */
+ @JsonProperty(value = "properties")
+ private ConnectionMonitorTestProperties innerProperties;
+
+ /**
+ * Get the innerProperties property: The properties that define a Connection Monitor Test.
+ *
+ * @return the innerProperties value.
+ */
+ private ConnectionMonitorTestProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the sourceAgent property: The Connection Monitor test source agent.
+ *
+ * @return the sourceAgent value.
+ */
+ public String sourceAgent() {
+ return this.innerProperties() == null ? null : this.innerProperties().sourceAgent();
+ }
+
+ /**
+ * Set the sourceAgent property: The Connection Monitor test source agent.
+ *
+ * @param sourceAgent the sourceAgent value to set.
+ * @return the ConnectionMonitorTestInner object itself.
+ */
+ public ConnectionMonitorTestInner withSourceAgent(String sourceAgent) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ConnectionMonitorTestProperties();
+ }
+ this.innerProperties().withSourceAgent(sourceAgent);
+ return this;
+ }
+
+ /**
+ * Get the destination property: The Connection Monitor test destination.
+ *
+ * @return the destination value.
+ */
+ public String destination() {
+ return this.innerProperties() == null ? null : this.innerProperties().destination();
+ }
+
+ /**
+ * Set the destination property: The Connection Monitor test destination.
+ *
+ * @param destination the destination value to set.
+ * @return the ConnectionMonitorTestInner object itself.
+ */
+ public ConnectionMonitorTestInner withDestination(String destination) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ConnectionMonitorTestProperties();
+ }
+ this.innerProperties().withDestination(destination);
+ return this;
+ }
+
+ /**
+ * Get the destinationPort property: The Connection Monitor test destination port.
+ *
+ * @return the destinationPort value.
+ */
+ public Integer destinationPort() {
+ return this.innerProperties() == null ? null : this.innerProperties().destinationPort();
+ }
+
+ /**
+ * Set the destinationPort property: The Connection Monitor test destination port.
+ *
+ * @param destinationPort the destinationPort value to set.
+ * @return the ConnectionMonitorTestInner object itself.
+ */
+ public ConnectionMonitorTestInner withDestinationPort(Integer destinationPort) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ConnectionMonitorTestProperties();
+ }
+ this.innerProperties().withDestinationPort(destinationPort);
+ return this;
+ }
+
+ /**
+ * Get the testFrequencyInSec property: The Connection Monitor test frequency in seconds.
+ *
+ * @return the testFrequencyInSec value.
+ */
+ public Integer testFrequencyInSec() {
+ return this.innerProperties() == null ? null : this.innerProperties().testFrequencyInSec();
+ }
+
+ /**
+ * Set the testFrequencyInSec property: The Connection Monitor test frequency in seconds.
+ *
+ * @param testFrequencyInSec the testFrequencyInSec value to set.
+ * @return the ConnectionMonitorTestInner object itself.
+ */
+ public ConnectionMonitorTestInner withTestFrequencyInSec(Integer testFrequencyInSec) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ConnectionMonitorTestProperties();
+ }
+ this.innerProperties().withTestFrequencyInSec(testFrequencyInSec);
+ return this;
+ }
+
+ /**
+ * Get the isTestSuccessful property: The flag that indicates if the Connection Monitor test is successful or not.
+ *
+ * @return the isTestSuccessful value.
+ */
+ public Boolean isTestSuccessful() {
+ return this.innerProperties() == null ? null : this.innerProperties().isTestSuccessful();
+ }
+
+ /**
+ * Get the path property: The path representing the Connection Monitor test.
+ *
+ * @return the path value.
+ */
+ public List path() {
+ return this.innerProperties() == null ? null : this.innerProperties().path();
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/ConnectionMonitorTestProperties.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/ConnectionMonitorTestProperties.java
new file mode 100644
index 000000000000..dda082583ded
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/ConnectionMonitorTestProperties.java
@@ -0,0 +1,171 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.peering.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The properties that define a Connection Monitor Test. */
+@Fluent
+public final class ConnectionMonitorTestProperties {
+ /*
+ * The Connection Monitor test source agent
+ */
+ @JsonProperty(value = "sourceAgent")
+ private String sourceAgent;
+
+ /*
+ * The Connection Monitor test destination
+ */
+ @JsonProperty(value = "destination")
+ private String destination;
+
+ /*
+ * The Connection Monitor test destination port
+ */
+ @JsonProperty(value = "destinationPort")
+ private Integer destinationPort;
+
+ /*
+ * The Connection Monitor test frequency in seconds
+ */
+ @JsonProperty(value = "testFrequencyInSec")
+ private Integer testFrequencyInSec;
+
+ /*
+ * The flag that indicates if the Connection Monitor test is successful or not.
+ */
+ @JsonProperty(value = "isTestSuccessful", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isTestSuccessful;
+
+ /*
+ * The path representing the Connection Monitor test.
+ */
+ @JsonProperty(value = "path", access = JsonProperty.Access.WRITE_ONLY)
+ private List path;
+
+ /*
+ * The provisioning state of the resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /**
+ * Get the sourceAgent property: The Connection Monitor test source agent.
+ *
+ * @return the sourceAgent value.
+ */
+ public String sourceAgent() {
+ return this.sourceAgent;
+ }
+
+ /**
+ * Set the sourceAgent property: The Connection Monitor test source agent.
+ *
+ * @param sourceAgent the sourceAgent value to set.
+ * @return the ConnectionMonitorTestProperties object itself.
+ */
+ public ConnectionMonitorTestProperties withSourceAgent(String sourceAgent) {
+ this.sourceAgent = sourceAgent;
+ return this;
+ }
+
+ /**
+ * Get the destination property: The Connection Monitor test destination.
+ *
+ * @return the destination value.
+ */
+ public String destination() {
+ return this.destination;
+ }
+
+ /**
+ * Set the destination property: The Connection Monitor test destination.
+ *
+ * @param destination the destination value to set.
+ * @return the ConnectionMonitorTestProperties object itself.
+ */
+ public ConnectionMonitorTestProperties withDestination(String destination) {
+ this.destination = destination;
+ return this;
+ }
+
+ /**
+ * Get the destinationPort property: The Connection Monitor test destination port.
+ *
+ * @return the destinationPort value.
+ */
+ public Integer destinationPort() {
+ return this.destinationPort;
+ }
+
+ /**
+ * Set the destinationPort property: The Connection Monitor test destination port.
+ *
+ * @param destinationPort the destinationPort value to set.
+ * @return the ConnectionMonitorTestProperties object itself.
+ */
+ public ConnectionMonitorTestProperties withDestinationPort(Integer destinationPort) {
+ this.destinationPort = destinationPort;
+ return this;
+ }
+
+ /**
+ * Get the testFrequencyInSec property: The Connection Monitor test frequency in seconds.
+ *
+ * @return the testFrequencyInSec value.
+ */
+ public Integer testFrequencyInSec() {
+ return this.testFrequencyInSec;
+ }
+
+ /**
+ * Set the testFrequencyInSec property: The Connection Monitor test frequency in seconds.
+ *
+ * @param testFrequencyInSec the testFrequencyInSec value to set.
+ * @return the ConnectionMonitorTestProperties object itself.
+ */
+ public ConnectionMonitorTestProperties withTestFrequencyInSec(Integer testFrequencyInSec) {
+ this.testFrequencyInSec = testFrequencyInSec;
+ return this;
+ }
+
+ /**
+ * Get the isTestSuccessful property: The flag that indicates if the Connection Monitor test is successful or not.
+ *
+ * @return the isTestSuccessful value.
+ */
+ public Boolean isTestSuccessful() {
+ return this.isTestSuccessful;
+ }
+
+ /**
+ * Get the path property: The path representing the Connection Monitor test.
+ *
+ * @return the path value.
+ */
+ public List path() {
+ return this.path;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/LookingGlassOutputInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/LookingGlassOutputInner.java
new file mode 100644
index 000000000000..0cac3e8680a6
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/LookingGlassOutputInner.java
@@ -0,0 +1,73 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.peering.models.Command;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Looking glass output model. */
+@Fluent
+public final class LookingGlassOutputInner {
+ /*
+ * Invoked command
+ */
+ @JsonProperty(value = "command")
+ private Command command;
+
+ /*
+ * Output of the command
+ */
+ @JsonProperty(value = "output")
+ private String output;
+
+ /**
+ * Get the command property: Invoked command.
+ *
+ * @return the command value.
+ */
+ public Command command() {
+ return this.command;
+ }
+
+ /**
+ * Set the command property: Invoked command.
+ *
+ * @param command the command value to set.
+ * @return the LookingGlassOutputInner object itself.
+ */
+ public LookingGlassOutputInner withCommand(Command command) {
+ this.command = command;
+ return this;
+ }
+
+ /**
+ * Get the output property: Output of the command.
+ *
+ * @return the output value.
+ */
+ public String output() {
+ return this.output;
+ }
+
+ /**
+ * Set the output property: Output of the command.
+ *
+ * @param output the output value to set.
+ * @return the LookingGlassOutputInner object itself.
+ */
+ public LookingGlassOutputInner withOutput(String output) {
+ this.output = output;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/OperationInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/OperationInner.java
index 5fad8f5a39bb..89805509caff 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/OperationInner.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/OperationInner.java
@@ -5,16 +5,13 @@
package com.azure.resourcemanager.peering.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.peering.models.OperationDisplayInfo;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.resourcemanager.peering.models.ServiceSpecification;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The peering API operation. */
@Immutable
public final class OperationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
-
/*
* The name of the operation.
*/
@@ -33,6 +30,12 @@ public final class OperationInner {
@JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY)
private Boolean isDataAction;
+ /*
+ * The properties of the operation.
+ */
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ private OperationProperties innerProperties;
+
/**
* Get the name property: The name of the operation.
*
@@ -60,6 +63,24 @@ public Boolean isDataAction() {
return this.isDataAction;
}
+ /**
+ * Get the innerProperties property: The properties of the operation.
+ *
+ * @return the innerProperties value.
+ */
+ private OperationProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the serviceSpecification property: Service specification payload.
+ *
+ * @return the serviceSpecification value.
+ */
+ public ServiceSpecification serviceSpecification() {
+ return this.innerProperties() == null ? null : this.innerProperties().serviceSpecification();
+ }
+
/**
* Validates the instance.
*
@@ -69,5 +90,8 @@ public void validate() {
if (display() != null) {
display().validate();
}
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/OperationProperties.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/OperationProperties.java
new file mode 100644
index 000000000000..2139b1d5cf84
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/OperationProperties.java
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.peering.models.ServiceSpecification;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties of the operation. */
+@Immutable
+public final class OperationProperties {
+ /*
+ * Service specification payload.
+ */
+ @JsonProperty(value = "serviceSpecification", access = JsonProperty.Access.WRITE_ONLY)
+ private ServiceSpecification serviceSpecification;
+
+ /**
+ * Get the serviceSpecification property: Service specification payload.
+ *
+ * @return the serviceSpecification value.
+ */
+ public ServiceSpecification serviceSpecification() {
+ return this.serviceSpecification;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (serviceSpecification() != null) {
+ serviceSpecification().validate();
+ }
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeerAsnInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeerAsnInner.java
index 562bcd708fd0..c93d7ecd46f3 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeerAsnInner.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeerAsnInner.java
@@ -5,50 +5,29 @@
package com.azure.resourcemanager.peering.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.peering.models.ContactDetail;
import com.azure.resourcemanager.peering.models.ValidationState;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** The essential information related to the peer's ASN. */
-@JsonFlatten
@Fluent
-public class PeerAsnInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PeerAsnInner.class);
-
- /*
- * The Autonomous System Number (ASN) of the peer.
- */
- @JsonProperty(value = "properties.peerAsn")
- private Integer peerAsn;
-
- /*
- * The contact details of the peer.
- */
- @JsonProperty(value = "properties.peerContactDetail")
- private List peerContactDetail;
-
- /*
- * The name of the peer.
- */
- @JsonProperty(value = "properties.peerName")
- private String peerName;
-
+public final class PeerAsnInner extends ProxyResource {
/*
- * The validation state of the ASN associated with the peer.
+ * The properties that define a peer's ASN.
*/
- @JsonProperty(value = "properties.validationState")
- private ValidationState validationState;
+ @JsonProperty(value = "properties")
+ private PeerAsnProperties innerProperties;
- /*
- * The error message for the validation state
+ /**
+ * Get the innerProperties property: The properties that define a peer's ASN.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.errorMessage", access = JsonProperty.Access.WRITE_ONLY)
- private String errorMessage;
+ private PeerAsnProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the peerAsn property: The Autonomous System Number (ASN) of the peer.
@@ -56,7 +35,7 @@ public class PeerAsnInner extends ProxyResource {
* @return the peerAsn value.
*/
public Integer peerAsn() {
- return this.peerAsn;
+ return this.innerProperties() == null ? null : this.innerProperties().peerAsn();
}
/**
@@ -66,7 +45,10 @@ public Integer peerAsn() {
* @return the PeerAsnInner object itself.
*/
public PeerAsnInner withPeerAsn(Integer peerAsn) {
- this.peerAsn = peerAsn;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeerAsnProperties();
+ }
+ this.innerProperties().withPeerAsn(peerAsn);
return this;
}
@@ -76,7 +58,7 @@ public PeerAsnInner withPeerAsn(Integer peerAsn) {
* @return the peerContactDetail value.
*/
public List peerContactDetail() {
- return this.peerContactDetail;
+ return this.innerProperties() == null ? null : this.innerProperties().peerContactDetail();
}
/**
@@ -86,7 +68,10 @@ public List peerContactDetail() {
* @return the PeerAsnInner object itself.
*/
public PeerAsnInner withPeerContactDetail(List peerContactDetail) {
- this.peerContactDetail = peerContactDetail;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeerAsnProperties();
+ }
+ this.innerProperties().withPeerContactDetail(peerContactDetail);
return this;
}
@@ -96,7 +81,7 @@ public PeerAsnInner withPeerContactDetail(List peerContactDetail)
* @return the peerName value.
*/
public String peerName() {
- return this.peerName;
+ return this.innerProperties() == null ? null : this.innerProperties().peerName();
}
/**
@@ -106,7 +91,10 @@ public String peerName() {
* @return the PeerAsnInner object itself.
*/
public PeerAsnInner withPeerName(String peerName) {
- this.peerName = peerName;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeerAsnProperties();
+ }
+ this.innerProperties().withPeerName(peerName);
return this;
}
@@ -116,18 +104,7 @@ public PeerAsnInner withPeerName(String peerName) {
* @return the validationState value.
*/
public ValidationState validationState() {
- return this.validationState;
- }
-
- /**
- * Set the validationState property: The validation state of the ASN associated with the peer.
- *
- * @param validationState the validationState value to set.
- * @return the PeerAsnInner object itself.
- */
- public PeerAsnInner withValidationState(ValidationState validationState) {
- this.validationState = validationState;
- return this;
+ return this.innerProperties() == null ? null : this.innerProperties().validationState();
}
/**
@@ -136,7 +113,7 @@ public PeerAsnInner withValidationState(ValidationState validationState) {
* @return the errorMessage value.
*/
public String errorMessage() {
- return this.errorMessage;
+ return this.innerProperties() == null ? null : this.innerProperties().errorMessage();
}
/**
@@ -145,8 +122,8 @@ public String errorMessage() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (peerContactDetail() != null) {
- peerContactDetail().forEach(e -> e.validate());
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeerAsnProperties.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeerAsnProperties.java
new file mode 100644
index 000000000000..be1788b57331
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeerAsnProperties.java
@@ -0,0 +1,134 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.peering.models.ContactDetail;
+import com.azure.resourcemanager.peering.models.ValidationState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The properties that define a peer's ASN. */
+@Fluent
+public final class PeerAsnProperties {
+ /*
+ * The Autonomous System Number (ASN) of the peer.
+ */
+ @JsonProperty(value = "peerAsn")
+ private Integer peerAsn;
+
+ /*
+ * The contact details of the peer.
+ */
+ @JsonProperty(value = "peerContactDetail")
+ private List peerContactDetail;
+
+ /*
+ * The name of the peer.
+ */
+ @JsonProperty(value = "peerName")
+ private String peerName;
+
+ /*
+ * The validation state of the ASN associated with the peer.
+ */
+ @JsonProperty(value = "validationState", access = JsonProperty.Access.WRITE_ONLY)
+ private ValidationState validationState;
+
+ /*
+ * The error message for the validation state
+ */
+ @JsonProperty(value = "errorMessage", access = JsonProperty.Access.WRITE_ONLY)
+ private String errorMessage;
+
+ /**
+ * Get the peerAsn property: The Autonomous System Number (ASN) of the peer.
+ *
+ * @return the peerAsn value.
+ */
+ public Integer peerAsn() {
+ return this.peerAsn;
+ }
+
+ /**
+ * Set the peerAsn property: The Autonomous System Number (ASN) of the peer.
+ *
+ * @param peerAsn the peerAsn value to set.
+ * @return the PeerAsnProperties object itself.
+ */
+ public PeerAsnProperties withPeerAsn(Integer peerAsn) {
+ this.peerAsn = peerAsn;
+ return this;
+ }
+
+ /**
+ * Get the peerContactDetail property: The contact details of the peer.
+ *
+ * @return the peerContactDetail value.
+ */
+ public List peerContactDetail() {
+ return this.peerContactDetail;
+ }
+
+ /**
+ * Set the peerContactDetail property: The contact details of the peer.
+ *
+ * @param peerContactDetail the peerContactDetail value to set.
+ * @return the PeerAsnProperties object itself.
+ */
+ public PeerAsnProperties withPeerContactDetail(List peerContactDetail) {
+ this.peerContactDetail = peerContactDetail;
+ return this;
+ }
+
+ /**
+ * Get the peerName property: The name of the peer.
+ *
+ * @return the peerName value.
+ */
+ public String peerName() {
+ return this.peerName;
+ }
+
+ /**
+ * Set the peerName property: The name of the peer.
+ *
+ * @param peerName the peerName value to set.
+ * @return the PeerAsnProperties object itself.
+ */
+ public PeerAsnProperties withPeerName(String peerName) {
+ this.peerName = peerName;
+ return this;
+ }
+
+ /**
+ * Get the validationState property: The validation state of the ASN associated with the peer.
+ *
+ * @return the validationState value.
+ */
+ public ValidationState validationState() {
+ return this.validationState;
+ }
+
+ /**
+ * Get the errorMessage property: The error message for the validation state.
+ *
+ * @return the errorMessage value.
+ */
+ public String errorMessage() {
+ return this.errorMessage;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (peerContactDetail() != null) {
+ peerContactDetail().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringInner.java
index 0298b3c574ec..9a29e956c025 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringInner.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringInner.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.peering.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.peering.models.Kind;
@@ -13,16 +12,13 @@
import com.azure.resourcemanager.peering.models.PeeringPropertiesExchange;
import com.azure.resourcemanager.peering.models.PeeringSku;
import com.azure.resourcemanager.peering.models.ProvisioningState;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** Peering is a logical representation of a set of connections to the Microsoft Cloud Edge at a location. */
-@JsonFlatten
@Fluent
-public class PeeringInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PeeringInner.class);
-
+public final class PeeringInner extends ProxyResource {
/*
* The SKU that defines the tier and kind of the peering.
*/
@@ -35,6 +31,12 @@ public class PeeringInner extends ProxyResource {
@JsonProperty(value = "kind", required = true)
private Kind kind;
+ /*
+ * The properties that define a peering.
+ */
+ @JsonProperty(value = "properties")
+ private PeeringProperties innerProperties;
+
/*
* The location of the resource.
*/
@@ -45,32 +47,9 @@ public class PeeringInner extends ProxyResource {
* The resource tags.
*/
@JsonProperty(value = "tags")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
- /*
- * The properties that define a direct peering.
- */
- @JsonProperty(value = "properties.direct")
- private PeeringPropertiesDirect direct;
-
- /*
- * The properties that define an exchange peering.
- */
- @JsonProperty(value = "properties.exchange")
- private PeeringPropertiesExchange exchange;
-
- /*
- * The location of the peering.
- */
- @JsonProperty(value = "properties.peeringLocation")
- private String peeringLocation;
-
- /*
- * The provisioning state of the resource.
- */
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private ProvisioningState provisioningState;
-
/**
* Get the sku property: The SKU that defines the tier and kind of the peering.
*
@@ -111,6 +90,15 @@ public PeeringInner withKind(Kind kind) {
return this;
}
+ /**
+ * Get the innerProperties property: The properties that define a peering.
+ *
+ * @return the innerProperties value.
+ */
+ private PeeringProperties innerProperties() {
+ return this.innerProperties;
+ }
+
/**
* Get the location property: The location of the resource.
*
@@ -157,7 +145,7 @@ public PeeringInner withTags(Map tags) {
* @return the direct value.
*/
public PeeringPropertiesDirect direct() {
- return this.direct;
+ return this.innerProperties() == null ? null : this.innerProperties().direct();
}
/**
@@ -167,7 +155,10 @@ public PeeringPropertiesDirect direct() {
* @return the PeeringInner object itself.
*/
public PeeringInner withDirect(PeeringPropertiesDirect direct) {
- this.direct = direct;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeeringProperties();
+ }
+ this.innerProperties().withDirect(direct);
return this;
}
@@ -177,7 +168,7 @@ public PeeringInner withDirect(PeeringPropertiesDirect direct) {
* @return the exchange value.
*/
public PeeringPropertiesExchange exchange() {
- return this.exchange;
+ return this.innerProperties() == null ? null : this.innerProperties().exchange();
}
/**
@@ -187,7 +178,10 @@ public PeeringPropertiesExchange exchange() {
* @return the PeeringInner object itself.
*/
public PeeringInner withExchange(PeeringPropertiesExchange exchange) {
- this.exchange = exchange;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeeringProperties();
+ }
+ this.innerProperties().withExchange(exchange);
return this;
}
@@ -197,7 +191,7 @@ public PeeringInner withExchange(PeeringPropertiesExchange exchange) {
* @return the peeringLocation value.
*/
public String peeringLocation() {
- return this.peeringLocation;
+ return this.innerProperties() == null ? null : this.innerProperties().peeringLocation();
}
/**
@@ -207,7 +201,10 @@ public String peeringLocation() {
* @return the PeeringInner object itself.
*/
public PeeringInner withPeeringLocation(String peeringLocation) {
- this.peeringLocation = peeringLocation;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeeringProperties();
+ }
+ this.innerProperties().withPeeringLocation(peeringLocation);
return this;
}
@@ -217,7 +214,7 @@ public PeeringInner withPeeringLocation(String peeringLocation) {
* @return the provisioningState value.
*/
public ProvisioningState provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -227,27 +224,26 @@ public ProvisioningState provisioningState() {
*/
public void validate() {
if (sku() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property sku in model PeeringInner"));
} else {
sku().validate();
}
if (kind() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property kind in model PeeringInner"));
}
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
if (location() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property location in model PeeringInner"));
}
- if (direct() != null) {
- direct().validate();
- }
- if (exchange() != null) {
- exchange().validate();
- }
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(PeeringInner.class);
}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringLocationInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringLocationInner.java
index 66d1113e700a..bbffe96cb5e1 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringLocationInner.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringLocationInner.java
@@ -5,21 +5,15 @@
package com.azure.resourcemanager.peering.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.peering.models.Kind;
import com.azure.resourcemanager.peering.models.PeeringLocationPropertiesDirect;
import com.azure.resourcemanager.peering.models.PeeringLocationPropertiesExchange;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Peering location is where connectivity could be established to the Microsoft Cloud Edge. */
-@JsonFlatten
@Fluent
-public class PeeringLocationInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PeeringLocationInner.class);
-
+public final class PeeringLocationInner extends ProxyResource {
/*
* The kind of peering that the peering location supports.
*/
@@ -27,34 +21,10 @@ public class PeeringLocationInner extends ProxyResource {
private Kind kind;
/*
- * The properties that define a direct peering location.
- */
- @JsonProperty(value = "properties.direct")
- private PeeringLocationPropertiesDirect direct;
-
- /*
- * The properties that define an exchange peering location.
- */
- @JsonProperty(value = "properties.exchange")
- private PeeringLocationPropertiesExchange exchange;
-
- /*
- * The name of the peering location.
- */
- @JsonProperty(value = "properties.peeringLocation")
- private String peeringLocation;
-
- /*
- * The country in which the peering location exists.
- */
- @JsonProperty(value = "properties.country")
- private String country;
-
- /*
- * The Azure region associated with the peering location.
+ * The properties that define a peering location.
*/
- @JsonProperty(value = "properties.azureRegion")
- private String azureRegion;
+ @JsonProperty(value = "properties")
+ private PeeringLocationProperties innerProperties;
/**
* Get the kind property: The kind of peering that the peering location supports.
@@ -76,13 +46,22 @@ public PeeringLocationInner withKind(Kind kind) {
return this;
}
+ /**
+ * Get the innerProperties property: The properties that define a peering location.
+ *
+ * @return the innerProperties value.
+ */
+ private PeeringLocationProperties innerProperties() {
+ return this.innerProperties;
+ }
+
/**
* Get the direct property: The properties that define a direct peering location.
*
* @return the direct value.
*/
public PeeringLocationPropertiesDirect direct() {
- return this.direct;
+ return this.innerProperties() == null ? null : this.innerProperties().direct();
}
/**
@@ -92,7 +71,10 @@ public PeeringLocationPropertiesDirect direct() {
* @return the PeeringLocationInner object itself.
*/
public PeeringLocationInner withDirect(PeeringLocationPropertiesDirect direct) {
- this.direct = direct;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeeringLocationProperties();
+ }
+ this.innerProperties().withDirect(direct);
return this;
}
@@ -102,7 +84,7 @@ public PeeringLocationInner withDirect(PeeringLocationPropertiesDirect direct) {
* @return the exchange value.
*/
public PeeringLocationPropertiesExchange exchange() {
- return this.exchange;
+ return this.innerProperties() == null ? null : this.innerProperties().exchange();
}
/**
@@ -112,7 +94,10 @@ public PeeringLocationPropertiesExchange exchange() {
* @return the PeeringLocationInner object itself.
*/
public PeeringLocationInner withExchange(PeeringLocationPropertiesExchange exchange) {
- this.exchange = exchange;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeeringLocationProperties();
+ }
+ this.innerProperties().withExchange(exchange);
return this;
}
@@ -122,7 +107,7 @@ public PeeringLocationInner withExchange(PeeringLocationPropertiesExchange excha
* @return the peeringLocation value.
*/
public String peeringLocation() {
- return this.peeringLocation;
+ return this.innerProperties() == null ? null : this.innerProperties().peeringLocation();
}
/**
@@ -132,7 +117,10 @@ public String peeringLocation() {
* @return the PeeringLocationInner object itself.
*/
public PeeringLocationInner withPeeringLocation(String peeringLocation) {
- this.peeringLocation = peeringLocation;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeeringLocationProperties();
+ }
+ this.innerProperties().withPeeringLocation(peeringLocation);
return this;
}
@@ -142,7 +130,7 @@ public PeeringLocationInner withPeeringLocation(String peeringLocation) {
* @return the country value.
*/
public String country() {
- return this.country;
+ return this.innerProperties() == null ? null : this.innerProperties().country();
}
/**
@@ -152,7 +140,10 @@ public String country() {
* @return the PeeringLocationInner object itself.
*/
public PeeringLocationInner withCountry(String country) {
- this.country = country;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeeringLocationProperties();
+ }
+ this.innerProperties().withCountry(country);
return this;
}
@@ -162,7 +153,7 @@ public PeeringLocationInner withCountry(String country) {
* @return the azureRegion value.
*/
public String azureRegion() {
- return this.azureRegion;
+ return this.innerProperties() == null ? null : this.innerProperties().azureRegion();
}
/**
@@ -172,7 +163,10 @@ public String azureRegion() {
* @return the PeeringLocationInner object itself.
*/
public PeeringLocationInner withAzureRegion(String azureRegion) {
- this.azureRegion = azureRegion;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeeringLocationProperties();
+ }
+ this.innerProperties().withAzureRegion(azureRegion);
return this;
}
@@ -182,11 +176,8 @@ public PeeringLocationInner withAzureRegion(String azureRegion) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (direct() != null) {
- direct().validate();
- }
- if (exchange() != null) {
- exchange().validate();
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringLocationProperties.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringLocationProperties.java
new file mode 100644
index 000000000000..359b93af9148
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringLocationProperties.java
@@ -0,0 +1,158 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.peering.models.PeeringLocationPropertiesDirect;
+import com.azure.resourcemanager.peering.models.PeeringLocationPropertiesExchange;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties that define a peering location. */
+@Fluent
+public final class PeeringLocationProperties {
+ /*
+ * The properties that define a direct peering location.
+ */
+ @JsonProperty(value = "direct")
+ private PeeringLocationPropertiesDirect direct;
+
+ /*
+ * The properties that define an exchange peering location.
+ */
+ @JsonProperty(value = "exchange")
+ private PeeringLocationPropertiesExchange exchange;
+
+ /*
+ * The name of the peering location.
+ */
+ @JsonProperty(value = "peeringLocation")
+ private String peeringLocation;
+
+ /*
+ * The country in which the peering location exists.
+ */
+ @JsonProperty(value = "country")
+ private String country;
+
+ /*
+ * The Azure region associated with the peering location.
+ */
+ @JsonProperty(value = "azureRegion")
+ private String azureRegion;
+
+ /**
+ * Get the direct property: The properties that define a direct peering location.
+ *
+ * @return the direct value.
+ */
+ public PeeringLocationPropertiesDirect direct() {
+ return this.direct;
+ }
+
+ /**
+ * Set the direct property: The properties that define a direct peering location.
+ *
+ * @param direct the direct value to set.
+ * @return the PeeringLocationProperties object itself.
+ */
+ public PeeringLocationProperties withDirect(PeeringLocationPropertiesDirect direct) {
+ this.direct = direct;
+ return this;
+ }
+
+ /**
+ * Get the exchange property: The properties that define an exchange peering location.
+ *
+ * @return the exchange value.
+ */
+ public PeeringLocationPropertiesExchange exchange() {
+ return this.exchange;
+ }
+
+ /**
+ * Set the exchange property: The properties that define an exchange peering location.
+ *
+ * @param exchange the exchange value to set.
+ * @return the PeeringLocationProperties object itself.
+ */
+ public PeeringLocationProperties withExchange(PeeringLocationPropertiesExchange exchange) {
+ this.exchange = exchange;
+ return this;
+ }
+
+ /**
+ * Get the peeringLocation property: The name of the peering location.
+ *
+ * @return the peeringLocation value.
+ */
+ public String peeringLocation() {
+ return this.peeringLocation;
+ }
+
+ /**
+ * Set the peeringLocation property: The name of the peering location.
+ *
+ * @param peeringLocation the peeringLocation value to set.
+ * @return the PeeringLocationProperties object itself.
+ */
+ public PeeringLocationProperties withPeeringLocation(String peeringLocation) {
+ this.peeringLocation = peeringLocation;
+ return this;
+ }
+
+ /**
+ * Get the country property: The country in which the peering location exists.
+ *
+ * @return the country value.
+ */
+ public String country() {
+ return this.country;
+ }
+
+ /**
+ * Set the country property: The country in which the peering location exists.
+ *
+ * @param country the country value to set.
+ * @return the PeeringLocationProperties object itself.
+ */
+ public PeeringLocationProperties withCountry(String country) {
+ this.country = country;
+ return this;
+ }
+
+ /**
+ * Get the azureRegion property: The Azure region associated with the peering location.
+ *
+ * @return the azureRegion value.
+ */
+ public String azureRegion() {
+ return this.azureRegion;
+ }
+
+ /**
+ * Set the azureRegion property: The Azure region associated with the peering location.
+ *
+ * @param azureRegion the azureRegion value to set.
+ * @return the PeeringLocationProperties object itself.
+ */
+ public PeeringLocationProperties withAzureRegion(String azureRegion) {
+ this.azureRegion = azureRegion;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (direct() != null) {
+ direct().validate();
+ }
+ if (exchange() != null) {
+ exchange().validate();
+ }
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringProperties.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringProperties.java
new file mode 100644
index 000000000000..e361eaaf51f9
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringProperties.java
@@ -0,0 +1,122 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.peering.models.PeeringPropertiesDirect;
+import com.azure.resourcemanager.peering.models.PeeringPropertiesExchange;
+import com.azure.resourcemanager.peering.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties that define connectivity to the Microsoft Cloud Edge. */
+@Fluent
+public final class PeeringProperties {
+ /*
+ * The properties that define a direct peering.
+ */
+ @JsonProperty(value = "direct")
+ private PeeringPropertiesDirect direct;
+
+ /*
+ * The properties that define an exchange peering.
+ */
+ @JsonProperty(value = "exchange")
+ private PeeringPropertiesExchange exchange;
+
+ /*
+ * The location of the peering.
+ */
+ @JsonProperty(value = "peeringLocation")
+ private String peeringLocation;
+
+ /*
+ * The provisioning state of the resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /**
+ * Get the direct property: The properties that define a direct peering.
+ *
+ * @return the direct value.
+ */
+ public PeeringPropertiesDirect direct() {
+ return this.direct;
+ }
+
+ /**
+ * Set the direct property: The properties that define a direct peering.
+ *
+ * @param direct the direct value to set.
+ * @return the PeeringProperties object itself.
+ */
+ public PeeringProperties withDirect(PeeringPropertiesDirect direct) {
+ this.direct = direct;
+ return this;
+ }
+
+ /**
+ * Get the exchange property: The properties that define an exchange peering.
+ *
+ * @return the exchange value.
+ */
+ public PeeringPropertiesExchange exchange() {
+ return this.exchange;
+ }
+
+ /**
+ * Set the exchange property: The properties that define an exchange peering.
+ *
+ * @param exchange the exchange value to set.
+ * @return the PeeringProperties object itself.
+ */
+ public PeeringProperties withExchange(PeeringPropertiesExchange exchange) {
+ this.exchange = exchange;
+ return this;
+ }
+
+ /**
+ * Get the peeringLocation property: The location of the peering.
+ *
+ * @return the peeringLocation value.
+ */
+ public String peeringLocation() {
+ return this.peeringLocation;
+ }
+
+ /**
+ * Set the peeringLocation property: The location of the peering.
+ *
+ * @param peeringLocation the peeringLocation value to set.
+ * @return the PeeringProperties object itself.
+ */
+ public PeeringProperties withPeeringLocation(String peeringLocation) {
+ this.peeringLocation = peeringLocation;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (direct() != null) {
+ direct().validate();
+ }
+ if (exchange() != null) {
+ exchange().validate();
+ }
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringReceivedRouteInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringReceivedRouteInner.java
index ce5d8d729f52..dcd0200288c7 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringReceivedRouteInner.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringReceivedRouteInner.java
@@ -5,15 +5,11 @@
package com.azure.resourcemanager.peering.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The properties that define a received route. */
@Immutable
public final class PeeringReceivedRouteInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PeeringReceivedRouteInner.class);
-
/*
* The prefix.
*/
@@ -39,15 +35,13 @@ public final class PeeringReceivedRouteInner {
private String originAsValidationState;
/*
- * The RPKI validation state for the prefix and origin AS that's listed in
- * the AS path.
+ * The RPKI validation state for the prefix and origin AS that's listed in the AS path.
*/
@JsonProperty(value = "rpkiValidationState", access = JsonProperty.Access.WRITE_ONLY)
private String rpkiValidationState;
/*
- * The authority which holds the Route Origin Authorization record for the
- * prefix, if any.
+ * The authority which holds the Route Origin Authorization record for the prefix, if any.
*/
@JsonProperty(value = "trustAnchor", access = JsonProperty.Access.WRITE_ONLY)
private String trustAnchor;
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringRegisteredAsnInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringRegisteredAsnInner.java
index 5c842bd1c148..239c47b97e8e 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringRegisteredAsnInner.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringRegisteredAsnInner.java
@@ -5,36 +5,27 @@
package com.azure.resourcemanager.peering.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.peering.models.ProvisioningState;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The customer's ASN that is registered by the peering service provider. */
-@JsonFlatten
@Fluent
-public class PeeringRegisteredAsnInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PeeringRegisteredAsnInner.class);
-
- /*
- * The customer's ASN from which traffic originates.
- */
- @JsonProperty(value = "properties.asn")
- private Integer asn;
-
+public final class PeeringRegisteredAsnInner extends ProxyResource {
/*
- * The peering service prefix key that is to be shared with the customer.
+ * The properties that define a registered ASN.
*/
- @JsonProperty(value = "properties.peeringServicePrefixKey", access = JsonProperty.Access.WRITE_ONLY)
- private String peeringServicePrefixKey;
+ @JsonProperty(value = "properties")
+ private PeeringRegisteredAsnProperties innerProperties;
- /*
- * The provisioning state of the resource.
+ /**
+ * Get the innerProperties property: The properties that define a registered ASN.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private ProvisioningState provisioningState;
+ private PeeringRegisteredAsnProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the asn property: The customer's ASN from which traffic originates.
@@ -42,7 +33,7 @@ public class PeeringRegisteredAsnInner extends ProxyResource {
* @return the asn value.
*/
public Integer asn() {
- return this.asn;
+ return this.innerProperties() == null ? null : this.innerProperties().asn();
}
/**
@@ -52,7 +43,10 @@ public Integer asn() {
* @return the PeeringRegisteredAsnInner object itself.
*/
public PeeringRegisteredAsnInner withAsn(Integer asn) {
- this.asn = asn;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeeringRegisteredAsnProperties();
+ }
+ this.innerProperties().withAsn(asn);
return this;
}
@@ -62,7 +56,7 @@ public PeeringRegisteredAsnInner withAsn(Integer asn) {
* @return the peeringServicePrefixKey value.
*/
public String peeringServicePrefixKey() {
- return this.peeringServicePrefixKey;
+ return this.innerProperties() == null ? null : this.innerProperties().peeringServicePrefixKey();
}
/**
@@ -71,7 +65,7 @@ public String peeringServicePrefixKey() {
* @return the provisioningState value.
*/
public ProvisioningState provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -80,5 +74,8 @@ public ProvisioningState provisioningState() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringRegisteredAsnProperties.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringRegisteredAsnProperties.java
new file mode 100644
index 000000000000..5d1d9aff30c2
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringRegisteredAsnProperties.java
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.peering.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties that define a registered ASN. */
+@Fluent
+public final class PeeringRegisteredAsnProperties {
+ /*
+ * The customer's ASN from which traffic originates.
+ */
+ @JsonProperty(value = "asn")
+ private Integer asn;
+
+ /*
+ * The peering service prefix key that is to be shared with the customer.
+ */
+ @JsonProperty(value = "peeringServicePrefixKey", access = JsonProperty.Access.WRITE_ONLY)
+ private String peeringServicePrefixKey;
+
+ /*
+ * The provisioning state of the resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /**
+ * Get the asn property: The customer's ASN from which traffic originates.
+ *
+ * @return the asn value.
+ */
+ public Integer asn() {
+ return this.asn;
+ }
+
+ /**
+ * Set the asn property: The customer's ASN from which traffic originates.
+ *
+ * @param asn the asn value to set.
+ * @return the PeeringRegisteredAsnProperties object itself.
+ */
+ public PeeringRegisteredAsnProperties withAsn(Integer asn) {
+ this.asn = asn;
+ return this;
+ }
+
+ /**
+ * Get the peeringServicePrefixKey property: The peering service prefix key that is to be shared with the customer.
+ *
+ * @return the peeringServicePrefixKey value.
+ */
+ public String peeringServicePrefixKey() {
+ return this.peeringServicePrefixKey;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringRegisteredPrefixInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringRegisteredPrefixInner.java
index 0be2d0ffa58c..3813491b1316 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringRegisteredPrefixInner.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringRegisteredPrefixInner.java
@@ -5,49 +5,28 @@
package com.azure.resourcemanager.peering.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.peering.models.PrefixValidationState;
import com.azure.resourcemanager.peering.models.ProvisioningState;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The customer's prefix that is registered by the peering service provider. */
-@JsonFlatten
@Fluent
-public class PeeringRegisteredPrefixInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PeeringRegisteredPrefixInner.class);
-
- /*
- * The customer's prefix from which traffic originates.
- */
- @JsonProperty(value = "properties.prefix")
- private String prefix;
-
- /*
- * The prefix validation state.
- */
- @JsonProperty(value = "properties.prefixValidationState", access = JsonProperty.Access.WRITE_ONLY)
- private PrefixValidationState prefixValidationState;
-
+public final class PeeringRegisteredPrefixInner extends ProxyResource {
/*
- * The peering service prefix key that is to be shared with the customer.
+ * The properties that define a registered prefix.
*/
- @JsonProperty(value = "properties.peeringServicePrefixKey", access = JsonProperty.Access.WRITE_ONLY)
- private String peeringServicePrefixKey;
+ @JsonProperty(value = "properties")
+ private PeeringRegisteredPrefixProperties innerProperties;
- /*
- * The error message associated with the validation state, if any.
- */
- @JsonProperty(value = "properties.errorMessage", access = JsonProperty.Access.WRITE_ONLY)
- private String errorMessage;
-
- /*
- * The provisioning state of the resource.
+ /**
+ * Get the innerProperties property: The properties that define a registered prefix.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private ProvisioningState provisioningState;
+ private PeeringRegisteredPrefixProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the prefix property: The customer's prefix from which traffic originates.
@@ -55,7 +34,7 @@ public class PeeringRegisteredPrefixInner extends ProxyResource {
* @return the prefix value.
*/
public String prefix() {
- return this.prefix;
+ return this.innerProperties() == null ? null : this.innerProperties().prefix();
}
/**
@@ -65,7 +44,10 @@ public String prefix() {
* @return the PeeringRegisteredPrefixInner object itself.
*/
public PeeringRegisteredPrefixInner withPrefix(String prefix) {
- this.prefix = prefix;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeeringRegisteredPrefixProperties();
+ }
+ this.innerProperties().withPrefix(prefix);
return this;
}
@@ -75,7 +57,7 @@ public PeeringRegisteredPrefixInner withPrefix(String prefix) {
* @return the prefixValidationState value.
*/
public PrefixValidationState prefixValidationState() {
- return this.prefixValidationState;
+ return this.innerProperties() == null ? null : this.innerProperties().prefixValidationState();
}
/**
@@ -84,7 +66,7 @@ public PrefixValidationState prefixValidationState() {
* @return the peeringServicePrefixKey value.
*/
public String peeringServicePrefixKey() {
- return this.peeringServicePrefixKey;
+ return this.innerProperties() == null ? null : this.innerProperties().peeringServicePrefixKey();
}
/**
@@ -93,7 +75,7 @@ public String peeringServicePrefixKey() {
* @return the errorMessage value.
*/
public String errorMessage() {
- return this.errorMessage;
+ return this.innerProperties() == null ? null : this.innerProperties().errorMessage();
}
/**
@@ -102,7 +84,7 @@ public String errorMessage() {
* @return the provisioningState value.
*/
public ProvisioningState provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -111,5 +93,8 @@ public ProvisioningState provisioningState() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringRegisteredPrefixProperties.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringRegisteredPrefixProperties.java
new file mode 100644
index 000000000000..b7da1f59d2d6
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringRegisteredPrefixProperties.java
@@ -0,0 +1,108 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.peering.models.PrefixValidationState;
+import com.azure.resourcemanager.peering.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties that define a registered prefix. */
+@Fluent
+public final class PeeringRegisteredPrefixProperties {
+ /*
+ * The customer's prefix from which traffic originates.
+ */
+ @JsonProperty(value = "prefix")
+ private String prefix;
+
+ /*
+ * The prefix validation state.
+ */
+ @JsonProperty(value = "prefixValidationState", access = JsonProperty.Access.WRITE_ONLY)
+ private PrefixValidationState prefixValidationState;
+
+ /*
+ * The peering service prefix key that is to be shared with the customer.
+ */
+ @JsonProperty(value = "peeringServicePrefixKey", access = JsonProperty.Access.WRITE_ONLY)
+ private String peeringServicePrefixKey;
+
+ /*
+ * The error message associated with the validation state, if any.
+ */
+ @JsonProperty(value = "errorMessage", access = JsonProperty.Access.WRITE_ONLY)
+ private String errorMessage;
+
+ /*
+ * The provisioning state of the resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /**
+ * Get the prefix property: The customer's prefix from which traffic originates.
+ *
+ * @return the prefix value.
+ */
+ public String prefix() {
+ return this.prefix;
+ }
+
+ /**
+ * Set the prefix property: The customer's prefix from which traffic originates.
+ *
+ * @param prefix the prefix value to set.
+ * @return the PeeringRegisteredPrefixProperties object itself.
+ */
+ public PeeringRegisteredPrefixProperties withPrefix(String prefix) {
+ this.prefix = prefix;
+ return this;
+ }
+
+ /**
+ * Get the prefixValidationState property: The prefix validation state.
+ *
+ * @return the prefixValidationState value.
+ */
+ public PrefixValidationState prefixValidationState() {
+ return this.prefixValidationState;
+ }
+
+ /**
+ * Get the peeringServicePrefixKey property: The peering service prefix key that is to be shared with the customer.
+ *
+ * @return the peeringServicePrefixKey value.
+ */
+ public String peeringServicePrefixKey() {
+ return this.peeringServicePrefixKey;
+ }
+
+ /**
+ * Get the errorMessage property: The error message associated with the validation state, if any.
+ *
+ * @return the errorMessage value.
+ */
+ public String errorMessage() {
+ return this.errorMessage;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceCountryInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceCountryInner.java
index 8770e2db5098..6874f6eff85e 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceCountryInner.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceCountryInner.java
@@ -6,14 +6,10 @@
import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
/** The peering service country. */
@Immutable
public final class PeeringServiceCountryInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PeeringServiceCountryInner.class);
-
/**
* Validates the instance.
*
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceInner.java
index 749f22d16f86..8bee22031155 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceInner.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceInner.java
@@ -5,27 +5,30 @@
package com.azure.resourcemanager.peering.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.peering.models.LogAnalyticsWorkspaceProperties;
import com.azure.resourcemanager.peering.models.PeeringServiceSku;
import com.azure.resourcemanager.peering.models.ProvisioningState;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** Peering Service. */
-@JsonFlatten
@Fluent
-public class PeeringServiceInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PeeringServiceInner.class);
-
+public final class PeeringServiceInner extends ProxyResource {
/*
* The SKU that defines the type of the peering service.
*/
@JsonProperty(value = "sku")
private PeeringServiceSku sku;
+ /*
+ * The properties that define a peering service.
+ */
+ @JsonProperty(value = "properties")
+ private PeeringServiceProperties innerProperties;
+
/*
* The location of the resource.
*/
@@ -36,40 +39,9 @@ public class PeeringServiceInner extends ProxyResource {
* The resource tags.
*/
@JsonProperty(value = "tags")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
- /*
- * The location (state/province) of the customer.
- */
- @JsonProperty(value = "properties.peeringServiceLocation")
- private String peeringServiceLocation;
-
- /*
- * The name of the service provider.
- */
- @JsonProperty(value = "properties.peeringServiceProvider")
- private String peeringServiceProvider;
-
- /*
- * The provisioning state of the resource.
- */
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private ProvisioningState provisioningState;
-
- /*
- * The primary peering (Microsoft/service provider) location to be used for
- * customer traffic.
- */
- @JsonProperty(value = "properties.providerPrimaryPeeringLocation")
- private String providerPrimaryPeeringLocation;
-
- /*
- * The backup peering (Microsoft/service provider) location to be used for
- * customer traffic.
- */
- @JsonProperty(value = "properties.providerBackupPeeringLocation")
- private String providerBackupPeeringLocation;
-
/**
* Get the sku property: The SKU that defines the type of the peering service.
*
@@ -90,6 +62,15 @@ public PeeringServiceInner withSku(PeeringServiceSku sku) {
return this;
}
+ /**
+ * Get the innerProperties property: The properties that define a peering service.
+ *
+ * @return the innerProperties value.
+ */
+ private PeeringServiceProperties innerProperties() {
+ return this.innerProperties;
+ }
+
/**
* Get the location property: The location of the resource.
*
@@ -136,7 +117,7 @@ public PeeringServiceInner withTags(Map tags) {
* @return the peeringServiceLocation value.
*/
public String peeringServiceLocation() {
- return this.peeringServiceLocation;
+ return this.innerProperties() == null ? null : this.innerProperties().peeringServiceLocation();
}
/**
@@ -146,7 +127,10 @@ public String peeringServiceLocation() {
* @return the PeeringServiceInner object itself.
*/
public PeeringServiceInner withPeeringServiceLocation(String peeringServiceLocation) {
- this.peeringServiceLocation = peeringServiceLocation;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeeringServiceProperties();
+ }
+ this.innerProperties().withPeeringServiceLocation(peeringServiceLocation);
return this;
}
@@ -156,7 +140,7 @@ public PeeringServiceInner withPeeringServiceLocation(String peeringServiceLocat
* @return the peeringServiceProvider value.
*/
public String peeringServiceProvider() {
- return this.peeringServiceProvider;
+ return this.innerProperties() == null ? null : this.innerProperties().peeringServiceProvider();
}
/**
@@ -166,7 +150,10 @@ public String peeringServiceProvider() {
* @return the PeeringServiceInner object itself.
*/
public PeeringServiceInner withPeeringServiceProvider(String peeringServiceProvider) {
- this.peeringServiceProvider = peeringServiceProvider;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeeringServiceProperties();
+ }
+ this.innerProperties().withPeeringServiceProvider(peeringServiceProvider);
return this;
}
@@ -176,7 +163,7 @@ public PeeringServiceInner withPeeringServiceProvider(String peeringServiceProvi
* @return the provisioningState value.
*/
public ProvisioningState provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -186,7 +173,7 @@ public ProvisioningState provisioningState() {
* @return the providerPrimaryPeeringLocation value.
*/
public String providerPrimaryPeeringLocation() {
- return this.providerPrimaryPeeringLocation;
+ return this.innerProperties() == null ? null : this.innerProperties().providerPrimaryPeeringLocation();
}
/**
@@ -197,7 +184,10 @@ public String providerPrimaryPeeringLocation() {
* @return the PeeringServiceInner object itself.
*/
public PeeringServiceInner withProviderPrimaryPeeringLocation(String providerPrimaryPeeringLocation) {
- this.providerPrimaryPeeringLocation = providerPrimaryPeeringLocation;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeeringServiceProperties();
+ }
+ this.innerProperties().withProviderPrimaryPeeringLocation(providerPrimaryPeeringLocation);
return this;
}
@@ -208,7 +198,7 @@ public PeeringServiceInner withProviderPrimaryPeeringLocation(String providerPri
* @return the providerBackupPeeringLocation value.
*/
public String providerBackupPeeringLocation() {
- return this.providerBackupPeeringLocation;
+ return this.innerProperties() == null ? null : this.innerProperties().providerBackupPeeringLocation();
}
/**
@@ -219,7 +209,34 @@ public String providerBackupPeeringLocation() {
* @return the PeeringServiceInner object itself.
*/
public PeeringServiceInner withProviderBackupPeeringLocation(String providerBackupPeeringLocation) {
- this.providerBackupPeeringLocation = providerBackupPeeringLocation;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeeringServiceProperties();
+ }
+ this.innerProperties().withProviderBackupPeeringLocation(providerBackupPeeringLocation);
+ return this;
+ }
+
+ /**
+ * Get the logAnalyticsWorkspaceProperties property: The Log Analytics Workspace Properties.
+ *
+ * @return the logAnalyticsWorkspaceProperties value.
+ */
+ public LogAnalyticsWorkspaceProperties logAnalyticsWorkspaceProperties() {
+ return this.innerProperties() == null ? null : this.innerProperties().logAnalyticsWorkspaceProperties();
+ }
+
+ /**
+ * Set the logAnalyticsWorkspaceProperties property: The Log Analytics Workspace Properties.
+ *
+ * @param logAnalyticsWorkspaceProperties the logAnalyticsWorkspaceProperties value to set.
+ * @return the PeeringServiceInner object itself.
+ */
+ public PeeringServiceInner withLogAnalyticsWorkspaceProperties(
+ LogAnalyticsWorkspaceProperties logAnalyticsWorkspaceProperties) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeeringServiceProperties();
+ }
+ this.innerProperties().withLogAnalyticsWorkspaceProperties(logAnalyticsWorkspaceProperties);
return this;
}
@@ -232,10 +249,15 @@ public void validate() {
if (sku() != null) {
sku().validate();
}
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
if (location() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property location in model PeeringServiceInner"));
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(PeeringServiceInner.class);
}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceLocationInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceLocationInner.java
index f8a70650d7e3..f08f8c6d6cc4 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceLocationInner.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceLocationInner.java
@@ -5,35 +5,26 @@
package com.azure.resourcemanager.peering.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The peering service location. */
-@JsonFlatten
@Fluent
-public class PeeringServiceLocationInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PeeringServiceLocationInner.class);
-
- /*
- * Country of the customer
- */
- @JsonProperty(value = "properties.country")
- private String country;
-
+public final class PeeringServiceLocationInner extends ProxyResource {
/*
- * State of the customer
+ * The properties that define a peering service location.
*/
- @JsonProperty(value = "properties.state")
- private String state;
+ @JsonProperty(value = "properties")
+ private PeeringServiceLocationProperties innerProperties;
- /*
- * Azure region for the location
+ /**
+ * Get the innerProperties property: The properties that define a peering service location.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.azureRegion")
- private String azureRegion;
+ private PeeringServiceLocationProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the country property: Country of the customer.
@@ -41,7 +32,7 @@ public class PeeringServiceLocationInner extends ProxyResource {
* @return the country value.
*/
public String country() {
- return this.country;
+ return this.innerProperties() == null ? null : this.innerProperties().country();
}
/**
@@ -51,7 +42,10 @@ public String country() {
* @return the PeeringServiceLocationInner object itself.
*/
public PeeringServiceLocationInner withCountry(String country) {
- this.country = country;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeeringServiceLocationProperties();
+ }
+ this.innerProperties().withCountry(country);
return this;
}
@@ -61,7 +55,7 @@ public PeeringServiceLocationInner withCountry(String country) {
* @return the state value.
*/
public String state() {
- return this.state;
+ return this.innerProperties() == null ? null : this.innerProperties().state();
}
/**
@@ -71,7 +65,10 @@ public String state() {
* @return the PeeringServiceLocationInner object itself.
*/
public PeeringServiceLocationInner withState(String state) {
- this.state = state;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeeringServiceLocationProperties();
+ }
+ this.innerProperties().withState(state);
return this;
}
@@ -81,7 +78,7 @@ public PeeringServiceLocationInner withState(String state) {
* @return the azureRegion value.
*/
public String azureRegion() {
- return this.azureRegion;
+ return this.innerProperties() == null ? null : this.innerProperties().azureRegion();
}
/**
@@ -91,7 +88,10 @@ public String azureRegion() {
* @return the PeeringServiceLocationInner object itself.
*/
public PeeringServiceLocationInner withAzureRegion(String azureRegion) {
- this.azureRegion = azureRegion;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeeringServiceLocationProperties();
+ }
+ this.innerProperties().withAzureRegion(azureRegion);
return this;
}
@@ -101,5 +101,8 @@ public PeeringServiceLocationInner withAzureRegion(String azureRegion) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceLocationProperties.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceLocationProperties.java
new file mode 100644
index 000000000000..73b809941b77
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceLocationProperties.java
@@ -0,0 +1,98 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties that define connectivity to the Peering Service Location. */
+@Fluent
+public final class PeeringServiceLocationProperties {
+ /*
+ * Country of the customer
+ */
+ @JsonProperty(value = "country")
+ private String country;
+
+ /*
+ * State of the customer
+ */
+ @JsonProperty(value = "state")
+ private String state;
+
+ /*
+ * Azure region for the location
+ */
+ @JsonProperty(value = "azureRegion")
+ private String azureRegion;
+
+ /**
+ * Get the country property: Country of the customer.
+ *
+ * @return the country value.
+ */
+ public String country() {
+ return this.country;
+ }
+
+ /**
+ * Set the country property: Country of the customer.
+ *
+ * @param country the country value to set.
+ * @return the PeeringServiceLocationProperties object itself.
+ */
+ public PeeringServiceLocationProperties withCountry(String country) {
+ this.country = country;
+ return this;
+ }
+
+ /**
+ * Get the state property: State of the customer.
+ *
+ * @return the state value.
+ */
+ public String state() {
+ return this.state;
+ }
+
+ /**
+ * Set the state property: State of the customer.
+ *
+ * @param state the state value to set.
+ * @return the PeeringServiceLocationProperties object itself.
+ */
+ public PeeringServiceLocationProperties withState(String state) {
+ this.state = state;
+ return this;
+ }
+
+ /**
+ * Get the azureRegion property: Azure region for the location.
+ *
+ * @return the azureRegion value.
+ */
+ public String azureRegion() {
+ return this.azureRegion;
+ }
+
+ /**
+ * Set the azureRegion property: Azure region for the location.
+ *
+ * @param azureRegion the azureRegion value to set.
+ * @return the PeeringServiceLocationProperties object itself.
+ */
+ public PeeringServiceLocationProperties withAzureRegion(String azureRegion) {
+ this.azureRegion = azureRegion;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServicePrefixInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServicePrefixInner.java
index 841e9636f4db..f4eb388df2b0 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServicePrefixInner.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServicePrefixInner.java
@@ -5,64 +5,31 @@
package com.azure.resourcemanager.peering.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.peering.models.LearnedType;
import com.azure.resourcemanager.peering.models.PeeringServicePrefixEvent;
import com.azure.resourcemanager.peering.models.PrefixValidationState;
import com.azure.resourcemanager.peering.models.ProvisioningState;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** The peering service prefix class. */
-@JsonFlatten
@Fluent
-public class PeeringServicePrefixInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PeeringServicePrefixInner.class);
-
- /*
- * The prefix from which your traffic originates.
- */
- @JsonProperty(value = "properties.prefix")
- private String prefix;
-
- /*
- * The prefix validation state
- */
- @JsonProperty(value = "properties.prefixValidationState", access = JsonProperty.Access.WRITE_ONLY)
- private PrefixValidationState prefixValidationState;
-
- /*
- * The prefix learned type
- */
- @JsonProperty(value = "properties.learnedType", access = JsonProperty.Access.WRITE_ONLY)
- private LearnedType learnedType;
-
- /*
- * The error message for validation state
- */
- @JsonProperty(value = "properties.errorMessage", access = JsonProperty.Access.WRITE_ONLY)
- private String errorMessage;
-
- /*
- * The list of events for peering service prefix
- */
- @JsonProperty(value = "properties.events", access = JsonProperty.Access.WRITE_ONLY)
- private List events;
-
+public final class PeeringServicePrefixInner extends ProxyResource {
/*
- * The peering service prefix key
+ * Gets or sets the peering prefix properties.
*/
- @JsonProperty(value = "properties.peeringServicePrefixKey")
- private String peeringServicePrefixKey;
+ @JsonProperty(value = "properties")
+ private PeeringServicePrefixProperties innerProperties;
- /*
- * The provisioning state of the resource.
+ /**
+ * Get the innerProperties property: Gets or sets the peering prefix properties.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private ProvisioningState provisioningState;
+ private PeeringServicePrefixProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the prefix property: The prefix from which your traffic originates.
@@ -70,7 +37,7 @@ public class PeeringServicePrefixInner extends ProxyResource {
* @return the prefix value.
*/
public String prefix() {
- return this.prefix;
+ return this.innerProperties() == null ? null : this.innerProperties().prefix();
}
/**
@@ -80,7 +47,10 @@ public String prefix() {
* @return the PeeringServicePrefixInner object itself.
*/
public PeeringServicePrefixInner withPrefix(String prefix) {
- this.prefix = prefix;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeeringServicePrefixProperties();
+ }
+ this.innerProperties().withPrefix(prefix);
return this;
}
@@ -90,7 +60,7 @@ public PeeringServicePrefixInner withPrefix(String prefix) {
* @return the prefixValidationState value.
*/
public PrefixValidationState prefixValidationState() {
- return this.prefixValidationState;
+ return this.innerProperties() == null ? null : this.innerProperties().prefixValidationState();
}
/**
@@ -99,7 +69,7 @@ public PrefixValidationState prefixValidationState() {
* @return the learnedType value.
*/
public LearnedType learnedType() {
- return this.learnedType;
+ return this.innerProperties() == null ? null : this.innerProperties().learnedType();
}
/**
@@ -108,7 +78,7 @@ public LearnedType learnedType() {
* @return the errorMessage value.
*/
public String errorMessage() {
- return this.errorMessage;
+ return this.innerProperties() == null ? null : this.innerProperties().errorMessage();
}
/**
@@ -117,7 +87,7 @@ public String errorMessage() {
* @return the events value.
*/
public List events() {
- return this.events;
+ return this.innerProperties() == null ? null : this.innerProperties().events();
}
/**
@@ -126,7 +96,7 @@ public List events() {
* @return the peeringServicePrefixKey value.
*/
public String peeringServicePrefixKey() {
- return this.peeringServicePrefixKey;
+ return this.innerProperties() == null ? null : this.innerProperties().peeringServicePrefixKey();
}
/**
@@ -136,7 +106,10 @@ public String peeringServicePrefixKey() {
* @return the PeeringServicePrefixInner object itself.
*/
public PeeringServicePrefixInner withPeeringServicePrefixKey(String peeringServicePrefixKey) {
- this.peeringServicePrefixKey = peeringServicePrefixKey;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeeringServicePrefixProperties();
+ }
+ this.innerProperties().withPeeringServicePrefixKey(peeringServicePrefixKey);
return this;
}
@@ -146,7 +119,7 @@ public PeeringServicePrefixInner withPeeringServicePrefixKey(String peeringServi
* @return the provisioningState value.
*/
public ProvisioningState provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -155,8 +128,8 @@ public ProvisioningState provisioningState() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (events() != null) {
- events().forEach(e -> e.validate());
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServicePrefixProperties.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServicePrefixProperties.java
new file mode 100644
index 000000000000..9bc3a325e790
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServicePrefixProperties.java
@@ -0,0 +1,155 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.peering.models.LearnedType;
+import com.azure.resourcemanager.peering.models.PeeringServicePrefixEvent;
+import com.azure.resourcemanager.peering.models.PrefixValidationState;
+import com.azure.resourcemanager.peering.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The peering service prefix properties class. */
+@Fluent
+public final class PeeringServicePrefixProperties {
+ /*
+ * The prefix from which your traffic originates.
+ */
+ @JsonProperty(value = "prefix")
+ private String prefix;
+
+ /*
+ * The prefix validation state
+ */
+ @JsonProperty(value = "prefixValidationState", access = JsonProperty.Access.WRITE_ONLY)
+ private PrefixValidationState prefixValidationState;
+
+ /*
+ * The prefix learned type
+ */
+ @JsonProperty(value = "learnedType", access = JsonProperty.Access.WRITE_ONLY)
+ private LearnedType learnedType;
+
+ /*
+ * The error message for validation state
+ */
+ @JsonProperty(value = "errorMessage", access = JsonProperty.Access.WRITE_ONLY)
+ private String errorMessage;
+
+ /*
+ * The list of events for peering service prefix
+ */
+ @JsonProperty(value = "events", access = JsonProperty.Access.WRITE_ONLY)
+ private List events;
+
+ /*
+ * The peering service prefix key
+ */
+ @JsonProperty(value = "peeringServicePrefixKey")
+ private String peeringServicePrefixKey;
+
+ /*
+ * The provisioning state of the resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /**
+ * Get the prefix property: The prefix from which your traffic originates.
+ *
+ * @return the prefix value.
+ */
+ public String prefix() {
+ return this.prefix;
+ }
+
+ /**
+ * Set the prefix property: The prefix from which your traffic originates.
+ *
+ * @param prefix the prefix value to set.
+ * @return the PeeringServicePrefixProperties object itself.
+ */
+ public PeeringServicePrefixProperties withPrefix(String prefix) {
+ this.prefix = prefix;
+ return this;
+ }
+
+ /**
+ * Get the prefixValidationState property: The prefix validation state.
+ *
+ * @return the prefixValidationState value.
+ */
+ public PrefixValidationState prefixValidationState() {
+ return this.prefixValidationState;
+ }
+
+ /**
+ * Get the learnedType property: The prefix learned type.
+ *
+ * @return the learnedType value.
+ */
+ public LearnedType learnedType() {
+ return this.learnedType;
+ }
+
+ /**
+ * Get the errorMessage property: The error message for validation state.
+ *
+ * @return the errorMessage value.
+ */
+ public String errorMessage() {
+ return this.errorMessage;
+ }
+
+ /**
+ * Get the events property: The list of events for peering service prefix.
+ *
+ * @return the events value.
+ */
+ public List events() {
+ return this.events;
+ }
+
+ /**
+ * Get the peeringServicePrefixKey property: The peering service prefix key.
+ *
+ * @return the peeringServicePrefixKey value.
+ */
+ public String peeringServicePrefixKey() {
+ return this.peeringServicePrefixKey;
+ }
+
+ /**
+ * Set the peeringServicePrefixKey property: The peering service prefix key.
+ *
+ * @param peeringServicePrefixKey the peeringServicePrefixKey value to set.
+ * @return the PeeringServicePrefixProperties object itself.
+ */
+ public PeeringServicePrefixProperties withPeeringServicePrefixKey(String peeringServicePrefixKey) {
+ this.peeringServicePrefixKey = peeringServicePrefixKey;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (events() != null) {
+ events().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceProperties.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceProperties.java
new file mode 100644
index 000000000000..402b69dc026a
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceProperties.java
@@ -0,0 +1,175 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.peering.models.LogAnalyticsWorkspaceProperties;
+import com.azure.resourcemanager.peering.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties that define connectivity to the Peering Service. */
+@Fluent
+public final class PeeringServiceProperties {
+ /*
+ * The location (state/province) of the customer.
+ */
+ @JsonProperty(value = "peeringServiceLocation")
+ private String peeringServiceLocation;
+
+ /*
+ * The name of the service provider.
+ */
+ @JsonProperty(value = "peeringServiceProvider")
+ private String peeringServiceProvider;
+
+ /*
+ * The provisioning state of the resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * The primary peering (Microsoft/service provider) location to be used for customer traffic.
+ */
+ @JsonProperty(value = "providerPrimaryPeeringLocation")
+ private String providerPrimaryPeeringLocation;
+
+ /*
+ * The backup peering (Microsoft/service provider) location to be used for customer traffic.
+ */
+ @JsonProperty(value = "providerBackupPeeringLocation")
+ private String providerBackupPeeringLocation;
+
+ /*
+ * The Log Analytics Workspace Properties
+ */
+ @JsonProperty(value = "logAnalyticsWorkspaceProperties")
+ private LogAnalyticsWorkspaceProperties logAnalyticsWorkspaceProperties;
+
+ /**
+ * Get the peeringServiceLocation property: The location (state/province) of the customer.
+ *
+ * @return the peeringServiceLocation value.
+ */
+ public String peeringServiceLocation() {
+ return this.peeringServiceLocation;
+ }
+
+ /**
+ * Set the peeringServiceLocation property: The location (state/province) of the customer.
+ *
+ * @param peeringServiceLocation the peeringServiceLocation value to set.
+ * @return the PeeringServiceProperties object itself.
+ */
+ public PeeringServiceProperties withPeeringServiceLocation(String peeringServiceLocation) {
+ this.peeringServiceLocation = peeringServiceLocation;
+ return this;
+ }
+
+ /**
+ * Get the peeringServiceProvider property: The name of the service provider.
+ *
+ * @return the peeringServiceProvider value.
+ */
+ public String peeringServiceProvider() {
+ return this.peeringServiceProvider;
+ }
+
+ /**
+ * Set the peeringServiceProvider property: The name of the service provider.
+ *
+ * @param peeringServiceProvider the peeringServiceProvider value to set.
+ * @return the PeeringServiceProperties object itself.
+ */
+ public PeeringServiceProperties withPeeringServiceProvider(String peeringServiceProvider) {
+ this.peeringServiceProvider = peeringServiceProvider;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the providerPrimaryPeeringLocation property: The primary peering (Microsoft/service provider) location to be
+ * used for customer traffic.
+ *
+ * @return the providerPrimaryPeeringLocation value.
+ */
+ public String providerPrimaryPeeringLocation() {
+ return this.providerPrimaryPeeringLocation;
+ }
+
+ /**
+ * Set the providerPrimaryPeeringLocation property: The primary peering (Microsoft/service provider) location to be
+ * used for customer traffic.
+ *
+ * @param providerPrimaryPeeringLocation the providerPrimaryPeeringLocation value to set.
+ * @return the PeeringServiceProperties object itself.
+ */
+ public PeeringServiceProperties withProviderPrimaryPeeringLocation(String providerPrimaryPeeringLocation) {
+ this.providerPrimaryPeeringLocation = providerPrimaryPeeringLocation;
+ return this;
+ }
+
+ /**
+ * Get the providerBackupPeeringLocation property: The backup peering (Microsoft/service provider) location to be
+ * used for customer traffic.
+ *
+ * @return the providerBackupPeeringLocation value.
+ */
+ public String providerBackupPeeringLocation() {
+ return this.providerBackupPeeringLocation;
+ }
+
+ /**
+ * Set the providerBackupPeeringLocation property: The backup peering (Microsoft/service provider) location to be
+ * used for customer traffic.
+ *
+ * @param providerBackupPeeringLocation the providerBackupPeeringLocation value to set.
+ * @return the PeeringServiceProperties object itself.
+ */
+ public PeeringServiceProperties withProviderBackupPeeringLocation(String providerBackupPeeringLocation) {
+ this.providerBackupPeeringLocation = providerBackupPeeringLocation;
+ return this;
+ }
+
+ /**
+ * Get the logAnalyticsWorkspaceProperties property: The Log Analytics Workspace Properties.
+ *
+ * @return the logAnalyticsWorkspaceProperties value.
+ */
+ public LogAnalyticsWorkspaceProperties logAnalyticsWorkspaceProperties() {
+ return this.logAnalyticsWorkspaceProperties;
+ }
+
+ /**
+ * Set the logAnalyticsWorkspaceProperties property: The Log Analytics Workspace Properties.
+ *
+ * @param logAnalyticsWorkspaceProperties the logAnalyticsWorkspaceProperties value to set.
+ * @return the PeeringServiceProperties object itself.
+ */
+ public PeeringServiceProperties withLogAnalyticsWorkspaceProperties(
+ LogAnalyticsWorkspaceProperties logAnalyticsWorkspaceProperties) {
+ this.logAnalyticsWorkspaceProperties = logAnalyticsWorkspaceProperties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (logAnalyticsWorkspaceProperties() != null) {
+ logAnalyticsWorkspaceProperties().validate();
+ }
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceProviderInner.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceProviderInner.java
index da060a5aa1da..da7e679422c8 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceProviderInner.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceProviderInner.java
@@ -5,31 +5,27 @@
package com.azure.resourcemanager.peering.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** PeeringService provider. */
-@JsonFlatten
@Fluent
-public class PeeringServiceProviderInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PeeringServiceProviderInner.class);
-
+public final class PeeringServiceProviderInner extends ProxyResource {
/*
- * The name of the service provider.
+ * The properties that define a peering service provider.
*/
- @JsonProperty(value = "properties.serviceProviderName")
- private String serviceProviderName;
+ @JsonProperty(value = "properties")
+ private PeeringServiceProviderProperties innerProperties;
- /*
- * The list of locations at which the service provider peers with
- * Microsoft.
+ /**
+ * Get the innerProperties property: The properties that define a peering service provider.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.peeringLocations")
- private List peeringLocations;
+ private PeeringServiceProviderProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the serviceProviderName property: The name of the service provider.
@@ -37,7 +33,7 @@ public class PeeringServiceProviderInner extends ProxyResource {
* @return the serviceProviderName value.
*/
public String serviceProviderName() {
- return this.serviceProviderName;
+ return this.innerProperties() == null ? null : this.innerProperties().serviceProviderName();
}
/**
@@ -47,7 +43,10 @@ public String serviceProviderName() {
* @return the PeeringServiceProviderInner object itself.
*/
public PeeringServiceProviderInner withServiceProviderName(String serviceProviderName) {
- this.serviceProviderName = serviceProviderName;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeeringServiceProviderProperties();
+ }
+ this.innerProperties().withServiceProviderName(serviceProviderName);
return this;
}
@@ -57,7 +56,7 @@ public PeeringServiceProviderInner withServiceProviderName(String serviceProvide
* @return the peeringLocations value.
*/
public List peeringLocations() {
- return this.peeringLocations;
+ return this.innerProperties() == null ? null : this.innerProperties().peeringLocations();
}
/**
@@ -67,7 +66,10 @@ public List peeringLocations() {
* @return the PeeringServiceProviderInner object itself.
*/
public PeeringServiceProviderInner withPeeringLocations(List peeringLocations) {
- this.peeringLocations = peeringLocations;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PeeringServiceProviderProperties();
+ }
+ this.innerProperties().withPeeringLocations(peeringLocations);
return this;
}
@@ -77,5 +79,8 @@ public PeeringServiceProviderInner withPeeringLocations(List peeringLoca
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceProviderProperties.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceProviderProperties.java
new file mode 100644
index 000000000000..d441f9e53f0b
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/fluent/models/PeeringServiceProviderProperties.java
@@ -0,0 +1,73 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The properties that define connectivity to the Peering Service Provider. */
+@Fluent
+public final class PeeringServiceProviderProperties {
+ /*
+ * The name of the service provider.
+ */
+ @JsonProperty(value = "serviceProviderName")
+ private String serviceProviderName;
+
+ /*
+ * The list of locations at which the service provider peers with Microsoft.
+ */
+ @JsonProperty(value = "peeringLocations")
+ private List peeringLocations;
+
+ /**
+ * Get the serviceProviderName property: The name of the service provider.
+ *
+ * @return the serviceProviderName value.
+ */
+ public String serviceProviderName() {
+ return this.serviceProviderName;
+ }
+
+ /**
+ * Set the serviceProviderName property: The name of the service provider.
+ *
+ * @param serviceProviderName the serviceProviderName value to set.
+ * @return the PeeringServiceProviderProperties object itself.
+ */
+ public PeeringServiceProviderProperties withServiceProviderName(String serviceProviderName) {
+ this.serviceProviderName = serviceProviderName;
+ return this;
+ }
+
+ /**
+ * Get the peeringLocations property: The list of locations at which the service provider peers with Microsoft.
+ *
+ * @return the peeringLocations value.
+ */
+ public List peeringLocations() {
+ return this.peeringLocations;
+ }
+
+ /**
+ * Set the peeringLocations property: The list of locations at which the service provider peers with Microsoft.
+ *
+ * @param peeringLocations the peeringLocations value to set.
+ * @return the PeeringServiceProviderProperties object itself.
+ */
+ public PeeringServiceProviderProperties withPeeringLocations(List peeringLocations) {
+ this.peeringLocations = peeringLocations;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/CdnPeeringPrefixesClientImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/CdnPeeringPrefixesClientImpl.java
index d8e93e1c95e6..a9b26f3b3cf4 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/CdnPeeringPrefixesClientImpl.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/CdnPeeringPrefixesClientImpl.java
@@ -25,7 +25,6 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.peering.fluent.CdnPeeringPrefixesClient;
import com.azure.resourcemanager.peering.fluent.models.CdnPeeringPrefixInner;
import com.azure.resourcemanager.peering.models.CdnPeeringPrefixListResult;
@@ -33,8 +32,6 @@
/** An instance of this class provides access to all the operations defined in CdnPeeringPrefixesClient. */
public final class CdnPeeringPrefixesClientImpl implements CdnPeeringPrefixesClient {
- private final ClientLogger logger = new ClientLogger(CdnPeeringPrefixesClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final CdnPeeringPrefixesService service;
@@ -89,7 +86,8 @@ Mono> listNext(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of CDN peering prefixes.
+ * @return the paginated list of CDN peering prefixes along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(String peeringLocation) {
@@ -141,7 +139,8 @@ private Mono> listSinglePageAsync(String pe
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of CDN peering prefixes.
+ * @return the paginated list of CDN peering prefixes along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(String peeringLocation, Context context) {
@@ -189,7 +188,7 @@ private Mono> listSinglePageAsync(String pe
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of CDN peering prefixes.
+ * @return the paginated list of CDN peering prefixes as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String peeringLocation) {
@@ -205,7 +204,7 @@ private PagedFlux listAsync(String peeringLocation) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of CDN peering prefixes.
+ * @return the paginated list of CDN peering prefixes as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String peeringLocation, Context context) {
@@ -221,7 +220,7 @@ private PagedFlux listAsync(String peeringLocation, Conte
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of CDN peering prefixes.
+ * @return the paginated list of CDN peering prefixes as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String peeringLocation) {
@@ -236,7 +235,7 @@ public PagedIterable list(String peeringLocation) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of CDN peering prefixes.
+ * @return the paginated list of CDN peering prefixes as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String peeringLocation, Context context) {
@@ -250,7 +249,8 @@ public PagedIterable list(String peeringLocation, Context
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of CDN peering prefixes.
+ * @return the paginated list of CDN peering prefixes along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink) {
@@ -286,7 +286,8 @@ private Mono> listNextSinglePageAsync(Strin
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of CDN peering prefixes.
+ * @return the paginated list of CDN peering prefixes along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink, Context context) {
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/CdnPeeringPrefixesImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/CdnPeeringPrefixesImpl.java
index 4594b349f43b..f40b28eda2b7 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/CdnPeeringPrefixesImpl.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/CdnPeeringPrefixesImpl.java
@@ -11,10 +11,9 @@
import com.azure.resourcemanager.peering.fluent.models.CdnPeeringPrefixInner;
import com.azure.resourcemanager.peering.models.CdnPeeringPrefix;
import com.azure.resourcemanager.peering.models.CdnPeeringPrefixes;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class CdnPeeringPrefixesImpl implements CdnPeeringPrefixes {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CdnPeeringPrefixesImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(CdnPeeringPrefixesImpl.class);
private final CdnPeeringPrefixesClient innerClient;
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/ConnectionMonitorTestImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/ConnectionMonitorTestImpl.java
new file mode 100644
index 000000000000..70091b70aee7
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/ConnectionMonitorTestImpl.java
@@ -0,0 +1,191 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.peering.fluent.models.ConnectionMonitorTestInner;
+import com.azure.resourcemanager.peering.models.ConnectionMonitorTest;
+import com.azure.resourcemanager.peering.models.ProvisioningState;
+import java.util.Collections;
+import java.util.List;
+
+public final class ConnectionMonitorTestImpl
+ implements ConnectionMonitorTest, ConnectionMonitorTest.Definition, ConnectionMonitorTest.Update {
+ private ConnectionMonitorTestInner innerObject;
+
+ private final com.azure.resourcemanager.peering.PeeringManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String sourceAgent() {
+ return this.innerModel().sourceAgent();
+ }
+
+ public String destination() {
+ return this.innerModel().destination();
+ }
+
+ public Integer destinationPort() {
+ return this.innerModel().destinationPort();
+ }
+
+ public Integer testFrequencyInSec() {
+ return this.innerModel().testFrequencyInSec();
+ }
+
+ public Boolean isTestSuccessful() {
+ return this.innerModel().isTestSuccessful();
+ }
+
+ public List path() {
+ List inner = this.innerModel().path();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public ConnectionMonitorTestInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.peering.PeeringManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String peeringServiceName;
+
+ private String connectionMonitorTestName;
+
+ public ConnectionMonitorTestImpl withExistingPeeringService(String resourceGroupName, String peeringServiceName) {
+ this.resourceGroupName = resourceGroupName;
+ this.peeringServiceName = peeringServiceName;
+ return this;
+ }
+
+ public ConnectionMonitorTest create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConnectionMonitorTests()
+ .createOrUpdateWithResponse(
+ resourceGroupName, peeringServiceName, connectionMonitorTestName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ConnectionMonitorTest create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConnectionMonitorTests()
+ .createOrUpdateWithResponse(
+ resourceGroupName, peeringServiceName, connectionMonitorTestName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ ConnectionMonitorTestImpl(String name, com.azure.resourcemanager.peering.PeeringManager serviceManager) {
+ this.innerObject = new ConnectionMonitorTestInner();
+ this.serviceManager = serviceManager;
+ this.connectionMonitorTestName = name;
+ }
+
+ public ConnectionMonitorTestImpl update() {
+ return this;
+ }
+
+ public ConnectionMonitorTest apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConnectionMonitorTests()
+ .createOrUpdateWithResponse(
+ resourceGroupName, peeringServiceName, connectionMonitorTestName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ConnectionMonitorTest apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConnectionMonitorTests()
+ .createOrUpdateWithResponse(
+ resourceGroupName, peeringServiceName, connectionMonitorTestName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ ConnectionMonitorTestImpl(
+ ConnectionMonitorTestInner innerObject, com.azure.resourcemanager.peering.PeeringManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.peeringServiceName = Utils.getValueFromIdByName(innerObject.id(), "peeringServices");
+ this.connectionMonitorTestName = Utils.getValueFromIdByName(innerObject.id(), "connectionMonitorTests");
+ }
+
+ public ConnectionMonitorTest refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConnectionMonitorTests()
+ .getWithResponse(resourceGroupName, peeringServiceName, connectionMonitorTestName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ConnectionMonitorTest refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConnectionMonitorTests()
+ .getWithResponse(resourceGroupName, peeringServiceName, connectionMonitorTestName, context)
+ .getValue();
+ return this;
+ }
+
+ public ConnectionMonitorTestImpl withSourceAgent(String sourceAgent) {
+ this.innerModel().withSourceAgent(sourceAgent);
+ return this;
+ }
+
+ public ConnectionMonitorTestImpl withDestination(String destination) {
+ this.innerModel().withDestination(destination);
+ return this;
+ }
+
+ public ConnectionMonitorTestImpl withDestinationPort(Integer destinationPort) {
+ this.innerModel().withDestinationPort(destinationPort);
+ return this;
+ }
+
+ public ConnectionMonitorTestImpl withTestFrequencyInSec(Integer testFrequencyInSec) {
+ this.innerModel().withTestFrequencyInSec(testFrequencyInSec);
+ return this;
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/ConnectionMonitorTestsClientImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/ConnectionMonitorTestsClientImpl.java
new file mode 100644
index 000000000000..776222d184f7
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/ConnectionMonitorTestsClientImpl.java
@@ -0,0 +1,949 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.peering.fluent.ConnectionMonitorTestsClient;
+import com.azure.resourcemanager.peering.fluent.models.ConnectionMonitorTestInner;
+import com.azure.resourcemanager.peering.models.ConnectionMonitorTestListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ConnectionMonitorTestsClient. */
+public final class ConnectionMonitorTestsClientImpl implements ConnectionMonitorTestsClient {
+ /** The proxy service used to perform REST calls. */
+ private final ConnectionMonitorTestsService service;
+
+ /** The service client containing this operation class. */
+ private final PeeringManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ConnectionMonitorTestsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ConnectionMonitorTestsClientImpl(PeeringManagementClientImpl client) {
+ this.service =
+ RestProxy
+ .create(ConnectionMonitorTestsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PeeringManagementClientConnectionMonitorTests to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "PeeringManagementCli")
+ private interface ConnectionMonitorTestsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering"
+ + "/peeringServices/{peeringServiceName}/connectionMonitorTests/{connectionMonitorTestName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("peeringServiceName") String peeringServiceName,
+ @PathParam("connectionMonitorTestName") String connectionMonitorTestName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering"
+ + "/peeringServices/{peeringServiceName}/connectionMonitorTests/{connectionMonitorTestName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("peeringServiceName") String peeringServiceName,
+ @PathParam("connectionMonitorTestName") String connectionMonitorTestName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") ConnectionMonitorTestInner connectionMonitorTest,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering"
+ + "/peeringServices/{peeringServiceName}/connectionMonitorTests/{connectionMonitorTestName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("peeringServiceName") String peeringServiceName,
+ @PathParam("connectionMonitorTestName") String connectionMonitorTestName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering"
+ + "/peeringServices/{peeringServiceName}/connectionMonitorTests")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByPeeringService(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("peeringServiceName") String peeringServiceName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByPeeringServiceNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets an existing connection monitor test with the specified name under the given subscription, resource group and
+ * peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param connectionMonitorTestName The name of the connection monitor test.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an existing connection monitor test with the specified name under the given subscription, resource group
+ * and peering service along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String peeringServiceName, String connectionMonitorTestName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (peeringServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter peeringServiceName is required and cannot be null."));
+ }
+ if (connectionMonitorTestName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter connectionMonitorTestName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ peeringServiceName,
+ connectionMonitorTestName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets an existing connection monitor test with the specified name under the given subscription, resource group and
+ * peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param connectionMonitorTestName The name of the connection monitor test.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an existing connection monitor test with the specified name under the given subscription, resource group
+ * and peering service along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String peeringServiceName, String connectionMonitorTestName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (peeringServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter peeringServiceName is required and cannot be null."));
+ }
+ if (connectionMonitorTestName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter connectionMonitorTestName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ peeringServiceName,
+ connectionMonitorTestName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets an existing connection monitor test with the specified name under the given subscription, resource group and
+ * peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param connectionMonitorTestName The name of the connection monitor test.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an existing connection monitor test with the specified name under the given subscription, resource group
+ * and peering service on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String peeringServiceName, String connectionMonitorTestName) {
+ return getWithResponseAsync(resourceGroupName, peeringServiceName, connectionMonitorTestName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets an existing connection monitor test with the specified name under the given subscription, resource group and
+ * peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param connectionMonitorTestName The name of the connection monitor test.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an existing connection monitor test with the specified name under the given subscription, resource group
+ * and peering service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ConnectionMonitorTestInner get(
+ String resourceGroupName, String peeringServiceName, String connectionMonitorTestName) {
+ return getAsync(resourceGroupName, peeringServiceName, connectionMonitorTestName).block();
+ }
+
+ /**
+ * Gets an existing connection monitor test with the specified name under the given subscription, resource group and
+ * peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param connectionMonitorTestName The name of the connection monitor test.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an existing connection monitor test with the specified name under the given subscription, resource group
+ * and peering service along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String peeringServiceName, String connectionMonitorTestName, Context context) {
+ return getWithResponseAsync(resourceGroupName, peeringServiceName, connectionMonitorTestName, context).block();
+ }
+
+ /**
+ * Creates or updates a connection monitor test with the specified name under the given subscription, resource group
+ * and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param connectionMonitorTestName The name of the connection monitor test.
+ * @param connectionMonitorTest The properties needed to create a connection monitor test.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Connection Monitor Test class along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String peeringServiceName,
+ String connectionMonitorTestName,
+ ConnectionMonitorTestInner connectionMonitorTest) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (peeringServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter peeringServiceName is required and cannot be null."));
+ }
+ if (connectionMonitorTestName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter connectionMonitorTestName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (connectionMonitorTest == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter connectionMonitorTest is required and cannot be null."));
+ } else {
+ connectionMonitorTest.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ peeringServiceName,
+ connectionMonitorTestName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ connectionMonitorTest,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates or updates a connection monitor test with the specified name under the given subscription, resource group
+ * and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param connectionMonitorTestName The name of the connection monitor test.
+ * @param connectionMonitorTest The properties needed to create a connection monitor test.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Connection Monitor Test class along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String peeringServiceName,
+ String connectionMonitorTestName,
+ ConnectionMonitorTestInner connectionMonitorTest,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (peeringServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter peeringServiceName is required and cannot be null."));
+ }
+ if (connectionMonitorTestName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter connectionMonitorTestName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (connectionMonitorTest == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter connectionMonitorTest is required and cannot be null."));
+ } else {
+ connectionMonitorTest.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ peeringServiceName,
+ connectionMonitorTestName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ connectionMonitorTest,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates or updates a connection monitor test with the specified name under the given subscription, resource group
+ * and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param connectionMonitorTestName The name of the connection monitor test.
+ * @param connectionMonitorTest The properties needed to create a connection monitor test.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Connection Monitor Test class on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String peeringServiceName,
+ String connectionMonitorTestName,
+ ConnectionMonitorTestInner connectionMonitorTest) {
+ return createOrUpdateWithResponseAsync(
+ resourceGroupName, peeringServiceName, connectionMonitorTestName, connectionMonitorTest)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Creates or updates a connection monitor test with the specified name under the given subscription, resource group
+ * and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param connectionMonitorTestName The name of the connection monitor test.
+ * @param connectionMonitorTest The properties needed to create a connection monitor test.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Connection Monitor Test class.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ConnectionMonitorTestInner createOrUpdate(
+ String resourceGroupName,
+ String peeringServiceName,
+ String connectionMonitorTestName,
+ ConnectionMonitorTestInner connectionMonitorTest) {
+ return createOrUpdateAsync(
+ resourceGroupName, peeringServiceName, connectionMonitorTestName, connectionMonitorTest)
+ .block();
+ }
+
+ /**
+ * Creates or updates a connection monitor test with the specified name under the given subscription, resource group
+ * and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param connectionMonitorTestName The name of the connection monitor test.
+ * @param connectionMonitorTest The properties needed to create a connection monitor test.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Connection Monitor Test class along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String peeringServiceName,
+ String connectionMonitorTestName,
+ ConnectionMonitorTestInner connectionMonitorTest,
+ Context context) {
+ return createOrUpdateWithResponseAsync(
+ resourceGroupName, peeringServiceName, connectionMonitorTestName, connectionMonitorTest, context)
+ .block();
+ }
+
+ /**
+ * Deletes an existing connection monitor test with the specified name under the given subscription, resource group
+ * and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param connectionMonitorTestName The name of the connection monitor test.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName, String peeringServiceName, String connectionMonitorTestName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (peeringServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter peeringServiceName is required and cannot be null."));
+ }
+ if (connectionMonitorTestName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter connectionMonitorTestName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ peeringServiceName,
+ connectionMonitorTestName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes an existing connection monitor test with the specified name under the given subscription, resource group
+ * and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param connectionMonitorTestName The name of the connection monitor test.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName, String peeringServiceName, String connectionMonitorTestName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (peeringServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter peeringServiceName is required and cannot be null."));
+ }
+ if (connectionMonitorTestName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter connectionMonitorTestName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ peeringServiceName,
+ connectionMonitorTestName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes an existing connection monitor test with the specified name under the given subscription, resource group
+ * and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param connectionMonitorTestName The name of the connection monitor test.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String peeringServiceName, String connectionMonitorTestName) {
+ return deleteWithResponseAsync(resourceGroupName, peeringServiceName, connectionMonitorTestName)
+ .flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * Deletes an existing connection monitor test with the specified name under the given subscription, resource group
+ * and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param connectionMonitorTestName The name of the connection monitor test.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String peeringServiceName, String connectionMonitorTestName) {
+ deleteAsync(resourceGroupName, peeringServiceName, connectionMonitorTestName).block();
+ }
+
+ /**
+ * Deletes an existing connection monitor test with the specified name under the given subscription, resource group
+ * and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param connectionMonitorTestName The name of the connection monitor test.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(
+ String resourceGroupName, String peeringServiceName, String connectionMonitorTestName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, peeringServiceName, connectionMonitorTestName, context)
+ .block();
+ }
+
+ /**
+ * Lists all connection monitor tests under the given subscription, resource group and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 paginated list of [T] along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByPeeringServiceSinglePageAsync(
+ String resourceGroupName, String peeringServiceName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (peeringServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter peeringServiceName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByPeeringService(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ peeringServiceName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists all connection monitor tests under the given subscription, resource group and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 paginated list of [T] along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByPeeringServiceSinglePageAsync(
+ String resourceGroupName, String peeringServiceName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (peeringServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter peeringServiceName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByPeeringService(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ peeringServiceName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists all connection monitor tests under the given subscription, resource group and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 paginated list of [T] as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByPeeringServiceAsync(
+ String resourceGroupName, String peeringServiceName) {
+ return new PagedFlux<>(
+ () -> listByPeeringServiceSinglePageAsync(resourceGroupName, peeringServiceName),
+ nextLink -> listByPeeringServiceNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all connection monitor tests under the given subscription, resource group and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 paginated list of [T] as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByPeeringServiceAsync(
+ String resourceGroupName, String peeringServiceName, Context context) {
+ return new PagedFlux<>(
+ () -> listByPeeringServiceSinglePageAsync(resourceGroupName, peeringServiceName, context),
+ nextLink -> listByPeeringServiceNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists all connection monitor tests under the given subscription, resource group and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 paginated list of [T] as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByPeeringService(
+ String resourceGroupName, String peeringServiceName) {
+ return new PagedIterable<>(listByPeeringServiceAsync(resourceGroupName, peeringServiceName));
+ }
+
+ /**
+ * Lists all connection monitor tests under the given subscription, resource group and peering service.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param peeringServiceName The name of the peering service.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 paginated list of [T] as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByPeeringService(
+ String resourceGroupName, String peeringServiceName, Context context) {
+ return new PagedIterable<>(listByPeeringServiceAsync(resourceGroupName, peeringServiceName, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 paginated list of [T] along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByPeeringServiceNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listByPeeringServiceNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 paginated list of [T] along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByPeeringServiceNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByPeeringServiceNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/ConnectionMonitorTestsImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/ConnectionMonitorTestsImpl.java
new file mode 100644
index 000000000000..420ef6ef00ec
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/ConnectionMonitorTestsImpl.java
@@ -0,0 +1,216 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.peering.fluent.ConnectionMonitorTestsClient;
+import com.azure.resourcemanager.peering.fluent.models.ConnectionMonitorTestInner;
+import com.azure.resourcemanager.peering.models.ConnectionMonitorTest;
+import com.azure.resourcemanager.peering.models.ConnectionMonitorTests;
+
+public final class ConnectionMonitorTestsImpl implements ConnectionMonitorTests {
+ private static final ClientLogger LOGGER = new ClientLogger(ConnectionMonitorTestsImpl.class);
+
+ private final ConnectionMonitorTestsClient innerClient;
+
+ private final com.azure.resourcemanager.peering.PeeringManager serviceManager;
+
+ public ConnectionMonitorTestsImpl(
+ ConnectionMonitorTestsClient innerClient, com.azure.resourcemanager.peering.PeeringManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public ConnectionMonitorTest get(
+ String resourceGroupName, String peeringServiceName, String connectionMonitorTestName) {
+ ConnectionMonitorTestInner inner =
+ this.serviceClient().get(resourceGroupName, peeringServiceName, connectionMonitorTestName);
+ if (inner != null) {
+ return new ConnectionMonitorTestImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String peeringServiceName, String connectionMonitorTestName, Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getWithResponse(resourceGroupName, peeringServiceName, connectionMonitorTestName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ConnectionMonitorTestImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String peeringServiceName, String connectionMonitorTestName) {
+ this.serviceClient().delete(resourceGroupName, peeringServiceName, connectionMonitorTestName);
+ }
+
+ public Response deleteWithResponse(
+ String resourceGroupName, String peeringServiceName, String connectionMonitorTestName, Context context) {
+ return this
+ .serviceClient()
+ .deleteWithResponse(resourceGroupName, peeringServiceName, connectionMonitorTestName, context);
+ }
+
+ public PagedIterable listByPeeringService(
+ String resourceGroupName, String peeringServiceName) {
+ PagedIterable inner =
+ this.serviceClient().listByPeeringService(resourceGroupName, peeringServiceName);
+ return Utils.mapPage(inner, inner1 -> new ConnectionMonitorTestImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByPeeringService(
+ String resourceGroupName, String peeringServiceName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByPeeringService(resourceGroupName, peeringServiceName, context);
+ return Utils.mapPage(inner, inner1 -> new ConnectionMonitorTestImpl(inner1, this.manager()));
+ }
+
+ public ConnectionMonitorTest getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String peeringServiceName = Utils.getValueFromIdByName(id, "peeringServices");
+ if (peeringServiceName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'peeringServices'.", id)));
+ }
+ String connectionMonitorTestName = Utils.getValueFromIdByName(id, "connectionMonitorTests");
+ if (connectionMonitorTestName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'connectionMonitorTests'.",
+ id)));
+ }
+ return this
+ .getWithResponse(resourceGroupName, peeringServiceName, connectionMonitorTestName, Context.NONE)
+ .getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String peeringServiceName = Utils.getValueFromIdByName(id, "peeringServices");
+ if (peeringServiceName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'peeringServices'.", id)));
+ }
+ String connectionMonitorTestName = Utils.getValueFromIdByName(id, "connectionMonitorTests");
+ if (connectionMonitorTestName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'connectionMonitorTests'.",
+ id)));
+ }
+ return this.getWithResponse(resourceGroupName, peeringServiceName, connectionMonitorTestName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String peeringServiceName = Utils.getValueFromIdByName(id, "peeringServices");
+ if (peeringServiceName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'peeringServices'.", id)));
+ }
+ String connectionMonitorTestName = Utils.getValueFromIdByName(id, "connectionMonitorTests");
+ if (connectionMonitorTestName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'connectionMonitorTests'.",
+ id)));
+ }
+ this.deleteWithResponse(resourceGroupName, peeringServiceName, connectionMonitorTestName, Context.NONE);
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String peeringServiceName = Utils.getValueFromIdByName(id, "peeringServices");
+ if (peeringServiceName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'peeringServices'.", id)));
+ }
+ String connectionMonitorTestName = Utils.getValueFromIdByName(id, "connectionMonitorTests");
+ if (connectionMonitorTestName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'connectionMonitorTests'.",
+ id)));
+ }
+ return this.deleteWithResponse(resourceGroupName, peeringServiceName, connectionMonitorTestName, context);
+ }
+
+ private ConnectionMonitorTestsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.peering.PeeringManager manager() {
+ return this.serviceManager;
+ }
+
+ public ConnectionMonitorTestImpl define(String name) {
+ return new ConnectionMonitorTestImpl(name, this.manager());
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LegacyPeeringsClientImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LegacyPeeringsClientImpl.java
index 544847e55a06..e3522aa6aa71 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LegacyPeeringsClientImpl.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LegacyPeeringsClientImpl.java
@@ -25,17 +25,15 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.peering.fluent.LegacyPeeringsClient;
import com.azure.resourcemanager.peering.fluent.models.PeeringInner;
+import com.azure.resourcemanager.peering.models.DirectPeeringType;
import com.azure.resourcemanager.peering.models.LegacyPeeringsKind;
import com.azure.resourcemanager.peering.models.PeeringListResult;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in LegacyPeeringsClient. */
public final class LegacyPeeringsClientImpl implements LegacyPeeringsClient {
- private final ClientLogger logger = new ClientLogger(LegacyPeeringsClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final LegacyPeeringsService service;
@@ -69,6 +67,7 @@ Mono> list(
@QueryParam("peeringLocation") String peeringLocation,
@QueryParam("kind") LegacyPeeringsKind kind,
@QueryParam("asn") Integer asn,
+ @QueryParam("directPeeringType") DirectPeeringType directPeeringType,
@PathParam("subscriptionId") String subscriptionId,
@QueryParam("api-version") String apiVersion,
@HeaderParam("Accept") String accept,
@@ -91,14 +90,15 @@ Mono> listNext(
* @param peeringLocation The location of the peering.
* @param kind The kind of the peering.
* @param asn The ASN number associated with a legacy peering.
+ * @param directPeeringType The direct peering type.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of peerings.
+ * @return the paginated list of peerings along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(
- String peeringLocation, LegacyPeeringsKind kind, Integer asn) {
+ String peeringLocation, LegacyPeeringsKind kind, Integer asn, DirectPeeringType directPeeringType) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -128,6 +128,7 @@ private Mono> listSinglePageAsync(
peeringLocation,
kind,
asn,
+ directPeeringType,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
accept,
@@ -150,15 +151,20 @@ private Mono> listSinglePageAsync(
* @param peeringLocation The location of the peering.
* @param kind The kind of the peering.
* @param asn The ASN number associated with a legacy peering.
+ * @param directPeeringType The direct peering type.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of peerings.
+ * @return the paginated list of peerings along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(
- String peeringLocation, LegacyPeeringsKind kind, Integer asn, Context context) {
+ String peeringLocation,
+ LegacyPeeringsKind kind,
+ Integer asn,
+ DirectPeeringType directPeeringType,
+ Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -186,6 +192,7 @@ private Mono> listSinglePageAsync(
peeringLocation,
kind,
asn,
+ directPeeringType,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
accept,
@@ -207,15 +214,18 @@ private Mono> listSinglePageAsync(
* @param peeringLocation The location of the peering.
* @param kind The kind of the peering.
* @param asn The ASN number associated with a legacy peering.
+ * @param directPeeringType The direct peering type.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of peerings.
+ * @return the paginated list of peerings as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String peeringLocation, LegacyPeeringsKind kind, Integer asn) {
+ private PagedFlux listAsync(
+ String peeringLocation, LegacyPeeringsKind kind, Integer asn, DirectPeeringType directPeeringType) {
return new PagedFlux<>(
- () -> listSinglePageAsync(peeringLocation, kind, asn), nextLink -> listNextSinglePageAsync(nextLink));
+ () -> listSinglePageAsync(peeringLocation, kind, asn, directPeeringType),
+ nextLink -> listNextSinglePageAsync(nextLink));
}
/**
@@ -226,13 +236,15 @@ private PagedFlux listAsync(String peeringLocation, LegacyPeerings
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of peerings.
+ * @return the paginated list of peerings as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String peeringLocation, LegacyPeeringsKind kind) {
final Integer asn = null;
+ final DirectPeeringType directPeeringType = null;
return new PagedFlux<>(
- () -> listSinglePageAsync(peeringLocation, kind, asn), nextLink -> listNextSinglePageAsync(nextLink));
+ () -> listSinglePageAsync(peeringLocation, kind, asn, directPeeringType),
+ nextLink -> listNextSinglePageAsync(nextLink));
}
/**
@@ -241,17 +253,22 @@ private PagedFlux listAsync(String peeringLocation, LegacyPeerings
* @param peeringLocation The location of the peering.
* @param kind The kind of the peering.
* @param asn The ASN number associated with a legacy peering.
+ * @param directPeeringType The direct peering type.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of peerings.
+ * @return the paginated list of peerings as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(
- String peeringLocation, LegacyPeeringsKind kind, Integer asn, Context context) {
+ String peeringLocation,
+ LegacyPeeringsKind kind,
+ Integer asn,
+ DirectPeeringType directPeeringType,
+ Context context) {
return new PagedFlux<>(
- () -> listSinglePageAsync(peeringLocation, kind, asn, context),
+ () -> listSinglePageAsync(peeringLocation, kind, asn, directPeeringType, context),
nextLink -> listNextSinglePageAsync(nextLink, context));
}
@@ -263,12 +280,13 @@ private PagedFlux listAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of peerings.
+ * @return the paginated list of peerings as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String peeringLocation, LegacyPeeringsKind kind) {
final Integer asn = null;
- return new PagedIterable<>(listAsync(peeringLocation, kind, asn));
+ final DirectPeeringType directPeeringType = null;
+ return new PagedIterable<>(listAsync(peeringLocation, kind, asn, directPeeringType));
}
/**
@@ -277,16 +295,21 @@ public PagedIterable list(String peeringLocation, LegacyPeeringsKi
* @param peeringLocation The location of the peering.
* @param kind The kind of the peering.
* @param asn The ASN number associated with a legacy peering.
+ * @param directPeeringType The direct peering type.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of peerings.
+ * @return the paginated list of peerings as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(
- String peeringLocation, LegacyPeeringsKind kind, Integer asn, Context context) {
- return new PagedIterable<>(listAsync(peeringLocation, kind, asn, context));
+ String peeringLocation,
+ LegacyPeeringsKind kind,
+ Integer asn,
+ DirectPeeringType directPeeringType,
+ Context context) {
+ return new PagedIterable<>(listAsync(peeringLocation, kind, asn, directPeeringType, context));
}
/**
@@ -296,7 +319,7 @@ public PagedIterable list(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of peerings.
+ * @return the paginated list of peerings along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink) {
@@ -332,7 +355,7 @@ private Mono> listNextSinglePageAsync(String nextLin
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of peerings.
+ * @return the paginated list of peerings along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink, Context context) {
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LegacyPeeringsImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LegacyPeeringsImpl.java
index 9633dbf063a9..b92ff2677aa7 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LegacyPeeringsImpl.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LegacyPeeringsImpl.java
@@ -9,13 +9,13 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.peering.fluent.LegacyPeeringsClient;
import com.azure.resourcemanager.peering.fluent.models.PeeringInner;
+import com.azure.resourcemanager.peering.models.DirectPeeringType;
import com.azure.resourcemanager.peering.models.LegacyPeerings;
import com.azure.resourcemanager.peering.models.LegacyPeeringsKind;
import com.azure.resourcemanager.peering.models.Peering;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class LegacyPeeringsImpl implements LegacyPeerings {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(LegacyPeeringsImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(LegacyPeeringsImpl.class);
private final LegacyPeeringsClient innerClient;
@@ -32,8 +32,14 @@ public PagedIterable list(String peeringLocation, LegacyPeeringsKind ki
return Utils.mapPage(inner, inner1 -> new PeeringImpl(inner1, this.manager()));
}
- public PagedIterable list(String peeringLocation, LegacyPeeringsKind kind, Integer asn, Context context) {
- PagedIterable inner = this.serviceClient().list(peeringLocation, kind, asn, context);
+ public PagedIterable list(
+ String peeringLocation,
+ LegacyPeeringsKind kind,
+ Integer asn,
+ DirectPeeringType directPeeringType,
+ Context context) {
+ PagedIterable inner =
+ this.serviceClient().list(peeringLocation, kind, asn, directPeeringType, context);
return Utils.mapPage(inner, inner1 -> new PeeringImpl(inner1, this.manager()));
}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LookingGlassClientImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LookingGlassClientImpl.java
new file mode 100644
index 000000000000..cd9d8e10c7b8
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LookingGlassClientImpl.java
@@ -0,0 +1,247 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.peering.fluent.LookingGlassClient;
+import com.azure.resourcemanager.peering.fluent.models.LookingGlassOutputInner;
+import com.azure.resourcemanager.peering.models.LookingGlassCommand;
+import com.azure.resourcemanager.peering.models.LookingGlassSourceType;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in LookingGlassClient. */
+public final class LookingGlassClientImpl implements LookingGlassClient {
+ /** The proxy service used to perform REST calls. */
+ private final LookingGlassService service;
+
+ /** The service client containing this operation class. */
+ private final PeeringManagementClientImpl client;
+
+ /**
+ * Initializes an instance of LookingGlassClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ LookingGlassClientImpl(PeeringManagementClientImpl client) {
+ this.service =
+ RestProxy.create(LookingGlassService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PeeringManagementClientLookingGlass to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "PeeringManagementCli")
+ private interface LookingGlassService {
+ @Headers({"Content-Type: application/json"})
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Peering/lookingGlass")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> invoke(
+ @HostParam("$host") String endpoint,
+ @QueryParam("command") LookingGlassCommand command,
+ @QueryParam("sourceType") LookingGlassSourceType sourceType,
+ @QueryParam("sourceLocation") String sourceLocation,
+ @QueryParam("destinationIP") String destinationIp,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Run looking glass functionality.
+ *
+ * @param command The command to be executed: ping, traceroute, bgpRoute.
+ * @param sourceType The type of the source: Edge site or Azure Region.
+ * @param sourceLocation The location of the source.
+ * @param destinationIp The IP address of the destination.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return looking glass output model along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> invokeWithResponseAsync(
+ LookingGlassCommand command, LookingGlassSourceType sourceType, String sourceLocation, String destinationIp) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (command == null) {
+ return Mono.error(new IllegalArgumentException("Parameter command is required and cannot be null."));
+ }
+ if (sourceType == null) {
+ return Mono.error(new IllegalArgumentException("Parameter sourceType is required and cannot be null."));
+ }
+ if (sourceLocation == null) {
+ return Mono.error(new IllegalArgumentException("Parameter sourceLocation is required and cannot be null."));
+ }
+ if (destinationIp == null) {
+ return Mono.error(new IllegalArgumentException("Parameter destinationIp is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .invoke(
+ this.client.getEndpoint(),
+ command,
+ sourceType,
+ sourceLocation,
+ destinationIp,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Run looking glass functionality.
+ *
+ * @param command The command to be executed: ping, traceroute, bgpRoute.
+ * @param sourceType The type of the source: Edge site or Azure Region.
+ * @param sourceLocation The location of the source.
+ * @param destinationIp The IP address of the destination.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return looking glass output model along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> invokeWithResponseAsync(
+ LookingGlassCommand command,
+ LookingGlassSourceType sourceType,
+ String sourceLocation,
+ String destinationIp,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (command == null) {
+ return Mono.error(new IllegalArgumentException("Parameter command is required and cannot be null."));
+ }
+ if (sourceType == null) {
+ return Mono.error(new IllegalArgumentException("Parameter sourceType is required and cannot be null."));
+ }
+ if (sourceLocation == null) {
+ return Mono.error(new IllegalArgumentException("Parameter sourceLocation is required and cannot be null."));
+ }
+ if (destinationIp == null) {
+ return Mono.error(new IllegalArgumentException("Parameter destinationIp is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .invoke(
+ this.client.getEndpoint(),
+ command,
+ sourceType,
+ sourceLocation,
+ destinationIp,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Run looking glass functionality.
+ *
+ * @param command The command to be executed: ping, traceroute, bgpRoute.
+ * @param sourceType The type of the source: Edge site or Azure Region.
+ * @param sourceLocation The location of the source.
+ * @param destinationIp The IP address of the destination.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return looking glass output model on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono invokeAsync(
+ LookingGlassCommand command, LookingGlassSourceType sourceType, String sourceLocation, String destinationIp) {
+ return invokeWithResponseAsync(command, sourceType, sourceLocation, destinationIp)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Run looking glass functionality.
+ *
+ * @param command The command to be executed: ping, traceroute, bgpRoute.
+ * @param sourceType The type of the source: Edge site or Azure Region.
+ * @param sourceLocation The location of the source.
+ * @param destinationIp The IP address of the destination.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return looking glass output model.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public LookingGlassOutputInner invoke(
+ LookingGlassCommand command, LookingGlassSourceType sourceType, String sourceLocation, String destinationIp) {
+ return invokeAsync(command, sourceType, sourceLocation, destinationIp).block();
+ }
+
+ /**
+ * Run looking glass functionality.
+ *
+ * @param command The command to be executed: ping, traceroute, bgpRoute.
+ * @param sourceType The type of the source: Edge site or Azure Region.
+ * @param sourceLocation The location of the source.
+ * @param destinationIp The IP address of the destination.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return looking glass output model along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response invokeWithResponse(
+ LookingGlassCommand command,
+ LookingGlassSourceType sourceType,
+ String sourceLocation,
+ String destinationIp,
+ Context context) {
+ return invokeWithResponseAsync(command, sourceType, sourceLocation, destinationIp, context).block();
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LookingGlassImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LookingGlassImpl.java
new file mode 100644
index 000000000000..75791807b12a
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LookingGlassImpl.java
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.peering.fluent.LookingGlassClient;
+import com.azure.resourcemanager.peering.fluent.models.LookingGlassOutputInner;
+import com.azure.resourcemanager.peering.models.LookingGlass;
+import com.azure.resourcemanager.peering.models.LookingGlassCommand;
+import com.azure.resourcemanager.peering.models.LookingGlassOutput;
+import com.azure.resourcemanager.peering.models.LookingGlassSourceType;
+
+public final class LookingGlassImpl implements LookingGlass {
+ private static final ClientLogger LOGGER = new ClientLogger(LookingGlassImpl.class);
+
+ private final LookingGlassClient innerClient;
+
+ private final com.azure.resourcemanager.peering.PeeringManager serviceManager;
+
+ public LookingGlassImpl(
+ LookingGlassClient innerClient, com.azure.resourcemanager.peering.PeeringManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public LookingGlassOutput invoke(
+ LookingGlassCommand command, LookingGlassSourceType sourceType, String sourceLocation, String destinationIp) {
+ LookingGlassOutputInner inner = this.serviceClient().invoke(command, sourceType, sourceLocation, destinationIp);
+ if (inner != null) {
+ return new LookingGlassOutputImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response invokeWithResponse(
+ LookingGlassCommand command,
+ LookingGlassSourceType sourceType,
+ String sourceLocation,
+ String destinationIp,
+ Context context) {
+ Response inner =
+ this.serviceClient().invokeWithResponse(command, sourceType, sourceLocation, destinationIp, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new LookingGlassOutputImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private LookingGlassClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.peering.PeeringManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LookingGlassOutputImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LookingGlassOutputImpl.java
new file mode 100644
index 000000000000..38a9344c8ae4
--- /dev/null
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/LookingGlassOutputImpl.java
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.peering.implementation;
+
+import com.azure.resourcemanager.peering.fluent.models.LookingGlassOutputInner;
+import com.azure.resourcemanager.peering.models.Command;
+import com.azure.resourcemanager.peering.models.LookingGlassOutput;
+
+public final class LookingGlassOutputImpl implements LookingGlassOutput {
+ private LookingGlassOutputInner innerObject;
+
+ private final com.azure.resourcemanager.peering.PeeringManager serviceManager;
+
+ LookingGlassOutputImpl(
+ LookingGlassOutputInner innerObject, com.azure.resourcemanager.peering.PeeringManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public Command command() {
+ return this.innerModel().command();
+ }
+
+ public String output() {
+ return this.innerModel().output();
+ }
+
+ public LookingGlassOutputInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.peering.PeeringManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/OperationImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/OperationImpl.java
index 2769fb724264..5b1536854bdb 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/OperationImpl.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/OperationImpl.java
@@ -7,6 +7,7 @@
import com.azure.resourcemanager.peering.fluent.models.OperationInner;
import com.azure.resourcemanager.peering.models.Operation;
import com.azure.resourcemanager.peering.models.OperationDisplayInfo;
+import com.azure.resourcemanager.peering.models.ServiceSpecification;
public final class OperationImpl implements Operation {
private OperationInner innerObject;
@@ -30,6 +31,10 @@ public Boolean isDataAction() {
return this.innerModel().isDataAction();
}
+ public ServiceSpecification serviceSpecification() {
+ return this.innerModel().serviceSpecification();
+ }
+
public OperationInner innerModel() {
return this.innerObject;
}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/OperationsClientImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/OperationsClientImpl.java
index 3e0045867d0b..62386bcdd7de 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/OperationsClientImpl.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/OperationsClientImpl.java
@@ -25,7 +25,6 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.peering.fluent.OperationsClient;
import com.azure.resourcemanager.peering.fluent.models.OperationInner;
import com.azure.resourcemanager.peering.models.OperationListResult;
@@ -33,8 +32,6 @@
/** An instance of this class provides access to all the operations defined in OperationsClient. */
public final class OperationsClientImpl implements OperationsClient {
- private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final OperationsService service;
@@ -85,7 +82,8 @@ Mono> listNext(
*
* @throws 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 paginated list of peering API operations.
+ * @return the paginated list of peering API operations along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
@@ -118,7 +116,8 @@ private Mono> listSinglePageAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of peering API operations.
+ * @return the paginated list of peering API operations along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Context context) {
@@ -148,7 +147,7 @@ private Mono> listSinglePageAsync(Context context)
*
* @throws 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 paginated list of peering API operations.
+ * @return the paginated list of peering API operations as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -162,7 +161,7 @@ private PagedFlux listAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of peering API operations.
+ * @return the paginated list of peering API operations as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Context context) {
@@ -175,7 +174,7 @@ private PagedFlux listAsync(Context context) {
*
* @throws 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 paginated list of peering API operations.
+ * @return the paginated list of peering API operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
@@ -189,7 +188,7 @@ public PagedIterable list() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of peering API operations.
+ * @return the paginated list of peering API operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
@@ -203,7 +202,8 @@ public PagedIterable list(Context context) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of peering API operations.
+ * @return the paginated list of peering API operations along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink) {
@@ -239,7 +239,8 @@ private Mono> listNextSinglePageAsync(String nextL
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of peering API operations.
+ * @return the paginated list of peering API operations along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink, Context context) {
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/OperationsImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/OperationsImpl.java
index 4bb8c597a92c..53d0a41b47e1 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/OperationsImpl.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/OperationsImpl.java
@@ -11,10 +11,9 @@
import com.azure.resourcemanager.peering.fluent.models.OperationInner;
import com.azure.resourcemanager.peering.models.Operation;
import com.azure.resourcemanager.peering.models.Operations;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class OperationsImpl implements Operations {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class);
private final OperationsClient innerClient;
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeerAsnImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeerAsnImpl.java
index 8c01d2524817..f5ef2a117443 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeerAsnImpl.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeerAsnImpl.java
@@ -146,9 +146,4 @@ public PeerAsnImpl withPeerName(String peerName) {
this.innerModel().withPeerName(peerName);
return this;
}
-
- public PeerAsnImpl withValidationState(ValidationState validationState) {
- this.innerModel().withValidationState(validationState);
- return this;
- }
}
diff --git a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeerAsnsClientImpl.java b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeerAsnsClientImpl.java
index 13175882e076..034b2e399350 100644
--- a/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeerAsnsClientImpl.java
+++ b/sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/implementation/PeerAsnsClientImpl.java
@@ -28,7 +28,6 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.peering.fluent.PeerAsnsClient;
import com.azure.resourcemanager.peering.fluent.models.PeerAsnInner;
import com.azure.resourcemanager.peering.models.PeerAsnListResult;
@@ -36,8 +35,6 @@
/** An instance of this class provides access to all the operations defined in PeerAsnsClient. */
public final class PeerAsnsClientImpl implements PeerAsnsClient {
- private final ClientLogger logger = new ClientLogger(PeerAsnsClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final PeerAsnsService service;
@@ -127,7 +124,8 @@ Mono> listBySubscriptionNext(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 peer ASN with the specified name under the given subscription.
+ * @return the peer ASN with the specified name under the given subscription along with {@link Response} on
+ * successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(String peerAsnName) {
@@ -169,7 +167,8 @@ private Mono> getWithResponseAsync(String peerAsnName) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 peer ASN with the specified name under the given subscription.
+ * @return the peer ASN with the specified name under the given subscription along with {@link Response} on
+ * successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(String peerAsnName, Context context) {
@@ -207,19 +206,12 @@ private Mono> getWithResponseAsync(String peerAsnName, Co
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 peer ASN with the specified name under the given subscription.
+ * @return the peer ASN with the specified name under the given subscription on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getAsync(String peerAsnName) {
- return getWithResponseAsync(peerAsnName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ return getWithResponseAsync(peerAsnName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -244,7 +236,7 @@ public PeerAsnInner get(String peerAsnName) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 peer ASN with the specified name under the given subscription.
+ * @return the peer ASN with the specified name under the given subscription along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getWithResponse(String peerAsnName, Context context) {
@@ -259,7 +251,8 @@ public Response getWithResponse(String peerAsnName, Context contex
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 essential information related to the peer's ASN.
+ * @return the essential information related to the peer's ASN along with {@link Response} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createOrUpdateWithResponseAsync(String peerAsnName, PeerAsnInner peerAsn) {
@@ -308,7 +301,8 @@ private Mono> createOrUpdateWithResponseAsync(String peer
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 essential information related to the peer's ASN.
+ * @return the essential information related to the peer's ASN along with {@link Response} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createOrUpdateWithResponseAsync(
@@ -354,19 +348,11 @@ private Mono> createOrUpdateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 essential information related to the peer's ASN.
+ * @return the essential information related to the peer's ASN on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(String peerAsnName, PeerAsnInner peerAsn) {
- return createOrUpdateWithResponseAsync(peerAsnName, peerAsn)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ return createOrUpdateWithResponseAsync(peerAsnName, peerAsn).flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -393,7 +379,7 @@ public PeerAsnInner createOrUpdate(String peerAsnName, PeerAsnInner peerAsn) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 essential information related to the peer's ASN.
+ * @return the essential information related to the peer's ASN along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response createOrUpdateWithResponse(
@@ -408,7 +394,7 @@ public Response createOrUpdateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteWithResponseAsync(String peerAsnName) {
@@ -450,7 +436,7 @@ private Mono> deleteWithResponseAsync(String peerAsnName) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteWithResponseAsync(String peerAsnName, Context context) {
@@ -488,11 +474,11 @@ private Mono> deleteWithResponseAsync(String peerAsnName, Context
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String peerAsnName) {
- return deleteWithResponseAsync(peerAsnName).flatMap((Response res) -> Mono.empty());
+ return deleteWithResponseAsync(peerAsnName).flatMap(ignored -> Mono.empty());
}
/**
@@ -516,7 +502,7 @@ public void delete(String peerAsnName) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response deleteWithResponse(String peerAsnName, Context context) {
@@ -528,7 +514,8 @@ public Response deleteWithResponse(String peerAsnName, Context context) {
*
* @throws 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 paginated list of peer ASNs.
+ * @return the paginated list of peer ASNs along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
@@ -574,7 +561,8 @@ private Mono> listSinglePageAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 paginated list of peer ASNs.
+ * @return the paginated list of peer ASNs along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Context context) {
@@ -615,7 +603,7 @@ private Mono